gwkokab.models.hybrids ====================== .. py:module:: gwkokab.models.hybrids Functions --------- .. autoapisummary:: gwkokab.models.hybrids.MultiSourceModel gwkokab.models.hybrids.NPowerlawMGaussian gwkokab.models.hybrids.SubPopulationModel Package Contents ---------------- .. py:function:: 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 .. py:function:: 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 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 :code:`N_pl` components are power-law and the next :code:`N_g` components are Gaussian. * Log rates are named as :code:`log_rate_{i}` where :code:`i` is the index of the component. * First :code:`N_pl` log rates are for power-law components and the next :code:`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 :class:`PowerlawPrimaryMassRatio` and for Gaussian we have :class:`~numpyro.distributions.truncated.TruncatedNormal` distribution. .. math:: (m_1, m_2) \sim \text{PowerlawPrimaryMassRatio}(\alpha, \beta, m_{\text{min}}, m_{\text{max}}) .. math:: (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 :math:`\mu` and :math:`\sigma^2` where :math:`\mu` is the mean and :math:`\sigma^2` is the variance of the beta distribution. .. math:: \chi_i \sim \mathrm{Beta}(\mu, \sigma^2) .. warning:: Not every choice of :math:`\mu` and :math:`\sigma^2` will result in a valid beta distribution. The beta distribution is only valid when :math:`\mu \in (0, 1)`, :math:`\sigma^2 \in (0, 0.25)`, and :math:`\mu(1-\mu) > \sigma^2`. Refer to the `link `_ for more information. **Tilt distribution**: Tilt is taken from a :class:`~numpyro.distributions.truncated.TruncatedNormal` distribution, with fixed mean :math:`\mu=1` and fixed bounds, :math:`a=-1` and :math:`b=1`. .. math:: \cos(\theta_i) \sim \mathcal{N}_{[-1, 1]}(\sigma^2\mid\mu=1) **Eccentricity distribution**: Eccentricity is taken from :class:`~numpyro.distributions.truncated.TruncatedNormal` distribution. .. math:: \varepsilon_i \sim \mathcal{N}_{[a,b]}(\mu, \sigma^2) .. attention:: Interestingly, in :class:`~numpyro.distributions.truncated.TruncatedNormal` distribution, if any of the bounds are not provided, it will be set to :math:`\pm\infty`. For example, if we set :math:`\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: .. code:: bash ___ with an exception for the powerlaw mass distribution where the :code:`` is ignored. For example, spin is taken from a beta distribution whose parameters are :code:`mean` and :code:`variance`. The naming convention for the spin parameters would be: .. code:: text chi[1-2]_mean_(pl|g)_[0-N_pl+N_g] chi[1-2]_variance_(pl|g)_[0-N_pl+N_g] :param N_pl: Number of power-law components :type N_pl: int :param N_g: Number of Gaussian components :type N_g: int :param use_spin: whether to include spin, defaults to False :type use_spin: bool :param use_tilt: whether to include tilt, defaults to False :type use_tilt: bool :param use_eccentricity_mixture: whether to include eccentricity, defaults to False :type use_eccentricity_mixture: bool :param use_mean_anomaly: whether to include mean_anomaly, defaults to False :type use_mean_anomaly: bool :param use_powerlaw_redshift: whether to include redshift, defaults to False :type use_powerlaw_redshift: bool :param use_cos_iota: whether to include cos_iota, defaults to False :type use_cos_iota: bool :param use_polarization_angle: whether to include polarization_angle, defaults to False :type use_polarization_angle: bool :param use_right_ascension: whether to include right_ascension, defaults to False :type use_right_ascension: bool :param use_sin_declination: whether to include sin_declination, defaults to False :type use_sin_declination: bool :param use_detection_time: whether to include detection_time, defaults to False :type use_detection_time: bool :param use_phi_1: whether to include phi_1, defaults to False :type use_phi_1: bool :param use_phi_2: whether to include phi_2, defaults to False :type use_phi_2: bool :param use_phi_12: whether to include phi_12, defaults to False :type use_phi_12: bool :param use_phi_orb: whether to include phi_orb, defaults to False :type use_phi_orb: bool :param validate_args: whether to validate arguments, defaults to None :type validate_args: Optional[bool], optional :returns: scaled mixture of distributions :rtype: ScaledMixture .. py:function:: 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