generate_component_masses¶
- generate_component_masses(sample, require_add=False, source=False)[source]¶
Add the component masses to the dataframe/dictionary.
We add
mass_1, mass_2, or ifsource=True,mass_1_source, mass_2_source. We also add any other masses which may be necessary for intermediate steps, i.e., typically the total mass is necessary, along with the mass ratio, so these will usually be added to the dictionary.If require_add is True, then having an incomplete set of mass parameters (so that the component mass parameters cannot be added) will throw an error, otherwise it will quietly add nothing to the dictionary.
- Parameters:
- sampledict
The input dictionary with at least one component with overall mass scaling (i.e. chirp_mass, mass_1, mass_2, total_mass) and then any other mass parameter.
- sourcebool, default False
If True, then perform the conversions for source mass parameters i.e. mass_1_source instead of mass_1
- Returns
- dictthe updated dictionary