jesterTOV.inference.flows.bilby_extract.extract_gw_posterior_from_bilby#
- extract_gw_posterior_from_bilby(bilby_result_file, output_file=None)[source]#
Extract GW posterior samples from a bilby result HDF5 file.
Reads
mass_1_source,mass_2_source,lambda_1, andlambda_2from a bilby result file and saves them as a.npzfile suitable for use withFlowTrainingConfig.All four parameters must be present in the bilby result file. Bilby writes them directly for BNS analyses, so no parameter conversion is performed here.
- Parameters:
- Return type:
- Returns:
str – Path to the saved
.npzfile.- Raises:
KeyError – If a required parameter is absent from the bilby result file.
ValueError – If the HDF5 file does not contain a
posteriorgroup.