gwkokab.models.hybridsΒΆ

FunctionsΒΆ

MultiSourceModel(β†’ gwkokab.models.utils.ScaledMixture)

NPowerlawMGaussian(β†’ gwkokab.models.utils.ScaledMixture)

Create a mixture of power-law and Gaussian components.

SubPopulationModel(β†’ gwkokab.models.utils.ScaledMixture)

Package ContentsΒΆ

gwkokab.models.hybrids.MultiSourceModel(N_spl: int, N_bpl: int, N_gpl: int, N_gg: int, use_beta_spin_magnitude: bool = False, use_spin_magnitude_mixture: bool = False, use_truncated_normal_spin_x: bool = False, use_truncated_normal_spin_y: bool = False, use_truncated_normal_spin_z: bool = False, use_chi_eff_mixture: bool = False, use_skew_normal_chi_eff: bool = False, use_truncated_normal_chi_p: bool = False, use_tilt: bool = False, use_eccentricity_mixture: bool = False, use_eccentricity_powerlaw: bool = False, use_mean_anomaly: bool = False, use_powerlaw_redshift: bool = False, use_madau_dickinson_redshift: bool = False, *, validate_args=None, **params) gwkokab.models.utils.ScaledMixture[source]ΒΆ
gwkokab.models.hybrids.NPowerlawMGaussian(N_pl: int, N_g: int, use_beta_spin_magnitude: bool = False, use_spin_magnitude_mixture: bool = False, use_truncated_normal_spin_x: bool = False, use_truncated_normal_spin_y: bool = False, use_truncated_normal_spin_z: bool = False, use_chi_eff_mixture: bool = False, use_skew_normal_chi_eff: bool = False, use_truncated_normal_chi_p: bool = False, use_tilt: bool = False, use_eccentricity_mixture: bool = False, use_eccentricity_powerlaw: bool = False, use_powerlaw_redshift: bool = False, use_madau_dickinson_redshift: bool = False, use_cos_iota: bool = False, use_phi_12: bool = False, use_polarization_angle: bool = False, use_right_ascension: bool = False, use_sin_declination: bool = False, use_detection_time: bool = False, use_phi_1: bool = False, use_phi_2: bool = False, use_phi_orb: bool = False, use_mean_anomaly: bool = False, *, validate_args=None, **params) gwkokab.models.utils.ScaledMixture[source]ΒΆ

Create a mixture of power-law and Gaussian components.

This model has a lot of parameters, we can not list all of them here. Therefore, we are providing the general description of the each sub model and their parameters.

Important

Important information about this models are as follows:

  • The first N_pl components are power-law and the next N_g components are Gaussian.

  • Log rates are named as log_rate_{i} where i is the index of the component.

  • First N_pl log rates are for power-law components and the next N_g log rates are for Gaussian components.

  • All log rates are in terms of natural logarithm.

Note

Mass distribution: For powerlaw mass distribution is PowerlawPrimaryMassRatio and for Gaussian we have TruncatedNormal distribution.

\[(m_1, m_2) \sim \text{PowerlawPrimaryMassRatio}(\alpha, \beta, m_{\text{min}}, m_{\text{max}})\]
\[(m_1, m_2) \sim \mathcal{N}_{[a,b]}(\mu, \sigma^2)\]

Spin distribution: Spin is taken from a beta distribution. The beta distribution is parameterized by \(\mu\) and \(\sigma^2\) where \(\mu\) is the mean and \(\sigma^2\) is the variance of the beta distribution.

\[\chi_i \sim \mathrm{Beta}(\mu, \sigma^2)\]

Warning

Not every choice of \(\mu\) and \(\sigma^2\) will result in a valid beta distribution. The beta distribution is only valid when \(\mu \in (0, 1)\), \(\sigma^2 \in (0, 0.25)\), and \(\mu(1-\mu) > \sigma^2\). Refer to the link for more information.

Tilt distribution: Tilt is taken from a TruncatedNormal distribution, with fixed mean \(\mu=1\) and fixed bounds, \(a=-1\) and \(b=1\).

\[\cos(\theta_i) \sim \mathcal{N}_{[-1, 1]}(\sigma^2\mid\mu=1)\]

Eccentricity distribution: Eccentricity is taken from TruncatedNormal distribution.

\[\varepsilon_i \sim \mathcal{N}_{[a,b]}(\mu, \sigma^2)\]

Attention

Interestingly, in TruncatedNormal distribution, if any of the bounds are not provided, it will be set to \(\pm\infty\). For example, if we set \(\mu=0\) and do not provide the upper bound, then the resulting distribution would be a half normal distribution.

The naming of the parameters follows the following convention:

<parameter name>_<model parameter>_<component type>_<component number>

with an exception for the powerlaw mass distribution where the <parameter name> is ignored. For example, spin is taken from a beta distribution whose parameters are mean and variance. The naming convention for the spin parameters would be:

chi[1-2]_mean_(pl|g)_[0-N_pl+N_g]
chi[1-2]_variance_(pl|g)_[0-N_pl+N_g]
Parameters:
  • N_pl (int) – Number of power-law components

  • N_g (int) – Number of Gaussian components

  • use_spin (bool) – whether to include spin, defaults to False

  • use_tilt (bool) – whether to include tilt, defaults to False

  • use_eccentricity_mixture (bool) – whether to include eccentricity, defaults to False

  • use_mean_anomaly (bool) – whether to include mean_anomaly, defaults to False

  • use_powerlaw_redshift (bool) – whether to include redshift, defaults to False

  • use_cos_iota (bool) – whether to include cos_iota, defaults to False

  • use_polarization_angle (bool) – whether to include polarization_angle, defaults to False

  • use_right_ascension (bool) – whether to include right_ascension, defaults to False

  • use_sin_declination (bool) – whether to include sin_declination, defaults to False

  • use_detection_time (bool) – whether to include detection_time, defaults to False

  • use_phi_1 (bool) – whether to include phi_1, defaults to False

  • use_phi_2 (bool) – whether to include phi_2, defaults to False

  • use_phi_12 (bool) – whether to include phi_12, defaults to False

  • use_phi_orb (bool) – whether to include phi_orb, defaults to False

  • validate_args (Optional[bool], optional) – whether to validate arguments, defaults to None

Returns:

scaled mixture of distributions

Return type:

ScaledMixture

gwkokab.models.hybrids.SubPopulationModel(N_spl: int, N_bpl: int, N_gpl: int, use_beta_spin_magnitude: bool = False, use_spin_magnitude_mixture: bool = False, use_truncated_normal_spin_x: bool = False, use_truncated_normal_spin_y: bool = False, use_truncated_normal_spin_z: bool = False, use_chi_eff_mixture: bool = False, use_skew_normal_chi_eff: bool = False, use_truncated_normal_chi_p: bool = False, use_tilt: bool = False, use_eccentricity_mixture: bool = False, use_eccentricity_powerlaw: bool = False, use_mean_anomaly: bool = False, use_powerlaw_redshift: bool = False, use_madau_dickinson_redshift: bool = False, *, validate_args=None, **params) gwkokab.models.utils.ScaledMixture[source]ΒΆ