gwkokab.models.hybridsΒΆ
FunctionsΒΆ
|
|
|
Create a mixture of power-law and Gaussian components. |
|
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_plcomponents are power-law and the nextN_gcomponents are Gaussian.Log rates are named as
log_rate_{i}whereiis the index of the component.First
N_pllog rates are for power-law components and the nextN_glog rates are for Gaussian components.All log rates are in terms of natural logarithm.
Note
Mass distribution: For powerlaw mass distribution is
PowerlawPrimaryMassRatioand for Gaussian we haveTruncatedNormaldistribution.\[(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
TruncatedNormaldistribution, 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
TruncatedNormaldistribution.\[\varepsilon_i \sim \mathcal{N}_{[a,b]}(\mu, \sigma^2)\]Attention
Interestingly, in
TruncatedNormaldistribution, 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 aremeanandvariance. 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:
- 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]ΒΆ