bilby.gw.conversion.generate_mass_parameters

bilby.gw.conversion.generate_mass_parameters(sample, source=False)[source]

Add the known mass parameters to the data frame/dictionary. We do not recompute keys already present in the dictionary

We add, potentially:

chirp_mass, total_mass, symmetric_mass_ratio, mass_ratio, mass_1, mass_2

Or if source=True:

chirp_mass_source, total_mass_source, symmetric_mass_ratio, mass_ratio, mass_1_source, mass_2_source

Parameters:
sampledict

The input dictionary with two “spanning” mass parameters e.g. (mass_1, mass_2), or (chirp_mass, mass_ratio), but not e.g. only (mass_ratio, symmetric_mass_ratio)

sourcebool, default False

If True, then perform the conversions for source mass parameters i.e. mass_1_source instead of mass_1

Returns:
dict: The updated dictionary