popstock.PopulationOmegaGW.PopulationOmegaGW
- class popstock.PopulationOmegaGW.PopulationOmegaGW(models, mass_coordinates=['mass_1', 'mass_ratio'], frequency_array=None, backend='numpy')[source]
Bases:
object
- __init__(models, mass_coordinates=['mass_1', 'mass_ratio'], frequency_array=None, backend='numpy')[source]
\(\Omega_{\text{GW}}\) population object.
- Parameters:
models (
gwpopulation.model
) – Model object formatted as in thegwpopulation
package.mass_coordinates (
list
) – List of two parameters to describe binary population masses (e.g.[mass_1, mass_ratio]
by default).frequency_array (
array-like
) – If given, used to define the frequency array to calculate Omega_{text{GW}}(f) for. Default isnp.arange(10, 2048)
.
- __call__(*args, **kwargs)
Call self as a function.
Methods
__init__
(models[, mass_coordinates, ...])\(\Omega_{\text{GW}}\) population object.
calculate_omega_gw
([Lambda, Rate_norm, ...])calculate_p_masses
(samples, mass_parameters)Calculate the probability of drawing a set of masses from the reference mass model.
calculate_p_spin_models
(samples, parameters)Calculate the probability of drawing a set of spins from the reference spin model.
calculate_p_z
(samples, redshift_parameters)Calculate the probability of drawing a set of redshifts from the reference redshift model.
calculate_pdraws
(proposal_samples, ...)calculate_probabilities
(samples, ...)Calculate the probability of drawing the sample set from a specific population.
calculate_wave_energies
([waveform_duration, ...])calculate_weights
([Lambda])Calculate weights from Lambda0 to Lambda
draw_and_set_proposal_samples
(...[, ...])draw_mass_proposal_samples
(population_params, N)draw_mass_proposal_samples_OLD
(...[, grids])draw_redshift_proposal_samples
(z_grid, ...)draw_source_proposal_samples
(...)draw_spin_parameter_proposal_samples
(...[, ...])set_pdraws_source
()set_proposal_samples
([proposal_samples])to_cupy
()- calculate_p_masses(samples, mass_parameters)[source]
Calculate the probability of drawing a set of masses from the reference mass model.
- Parameters:
samples (
dict
) – Dictionary of binary mass samples.mass_parameters (
dict
) – Dictionary of hyper-parameters for the mass model describing the binary population.
- calculate_p_spin_models(samples, parameters)[source]
Calculate the probability of drawing a set of spins from the reference spin model.
- Parameters:
samples (
dict
) – Dictionary of binary spin samples.parameters (
dict
) – Dictionary of hyper-parameters for the spin model describing the binary population.
- calculate_p_z(samples, redshift_parameters)[source]
Calculate the probability of drawing a set of redshifts from the reference redshift model.
- Parameters:
samples (
dict
) – Dictionary of binary redshift samples \(z\).redshift_parameters (
dict
) – Dictionary of hyper-parameters for the redshift model describing the binary population.
- calculate_pdraws(proposal_samples, fiducial_parameters)[source]
- Parameters:
proposal_samples (
dict
) – Dictionary of binary samples \(\Theta\).fiducial_parameters (
dict
) – Dictionary of fiducial population hyper-parameters \(\Lambda_0\), from which proposal_samples are drawn.
- calculate_probabilities(samples, population_parameters)[source]
Calculate the probability of drawing the sample set from a specific population.
- Parameters:
samples (
dict
) – Dictionary of binary samples \(\Theta\).population_parameters (
dict
) – Dictionary of population hyper-parameters \(\Lambda\).