bilby.gw.prior.secondary_mass_condition_function

bilby.gw.prior.secondary_mass_condition_function(reference_params, mass_1)[source]

Condition function to use for a prior that is conditional on the value of the primary mass, for example, a prior on the secondary mass that is bounded by the primary mass.

import bilby
priors = bilby.gw.prior.CBCPriorDict()
priors["mass_1"] = bilby.core.prior.Uniform(5, 50)
priors["mass_2"] = bilby.core.prior.ConditionalUniform(
    condition_func=bilby.gw.prior.secondary_mass_condition_function,
    minimum=5,
    maximum=50,
)
Parameters:
reference_params: dict

Reference parameter dictionary, this should contain a “minimum” attribute.

mass_1: float

The primary mass to use as the upper limit for the prior.

Returns:
dict:

Updated prior limits given the provided primary mass.