GWForge.population.mass¶
Attributes¶
Classes¶
Functions¶
|
|
|
|
|
Number of primary-mass grid nodes needed to resolve the narrowest peak. |
|
Draw |
Module Contents¶
- GWForge.population.mass.choices = ['PowerLaw+Peak', 'MultiPeak', 'BrokenPowerLaw', 'BGP', 'UniformSecondary', 'DoubleGaussian',...[source]¶
- GWForge.population.mass.primary_mass_grid_nodes(parameters, minimum_mass, maximum_mass)[source]¶
Number of primary-mass grid nodes needed to resolve the narrowest peak.
The smoothed mass models are sampled by wrapping the density in a
bilby.core.prior.Interped, which builds a linear interpolant on this grid and inverse-CDF samples from that. The interpolant, not the density, is what the catalogue is drawn from, so the grid has to resolve every feature the density has.- Parameters:
parameters (dict) – Mass-model parameters. Any key beginning with
sigppis treated as a peak width; models without peaks keep the floor.minimum_mass (float) – Range the grid spans.
maximum_mass (float) – Range the grid spans.
- Returns:
Clipped to
[MINIMUM_MASS_GRID_NODES, MAXIMUM_MASS_GRID_NODES].- Return type:
int
- GWForge.population.mass.sample_mass_ratio_given_primary(model, primary_samples, mass_ratio_parameters, random_state=None)[source]¶
Draw
mass_ratioconditionally onmass_1, by inverse CDF.- Parameters:
model (BaseSmoothedMassDistribution) – Supplies the
m1s/qsgrids andp_q.primary_samples (array_like) – Sampled
mass_1_source.mass_ratio_parameters (dict) –
beta,mminanddelta_m, and optionallymmin_2anddelta_m_2for models whose secondary has its own taper.random_state (numpy.random.Generator or None) – Defaults to numpy’s global RNG, so a single seed governs it.
- Returns:
Mass-ratio samples, the same length as
primary_samples.- Return type:
numpy.ndarray