gwpopulation_pipe.common_format.save_to_popsummary_format

save_to_popsummary_format(filename, bilby_result, event_meta_data, reweighted_samples, model, maximum_mass, minimum_mass, max_redshift)[source]

Saves all data products to a single hdf5 file in popsummary format. See https://git.ligo.org/christian.adamcewicz/popsummary and, specifically, https://git.ligo.org/christian.adamcewicz/popsummary/-/blob/main/examples/tutorial.ipynb for more information on reading and writing to popsummary format.

Parameters:
filename: str

filename for the popsummary result (must be .h5/.hdf5)

bilby_result: bilby.core.result.Result

result object in bilby format

event_meta_data: dict

dictionary containing approximant and label for each event

reweighted_samples: dict

dictionary containing reweighted posteriors and injections

model: bilby.hyper.model.Model

population model for computing fair population draws

maximum_mass: float

maximum mass to sample from for fair population draws

minimum_mass: float

minimum mass to sample from for fair population draws

max_redshift: float

maximum redshift to sample from for fair population draws