gwinferno.preprocess.priors.chi_p_prior_given_chi_eff_q#
- chi_p_prior_given_chi_eff_q(chi_p, chi_eff, q, a_max=1.0, ndraws=10000, bw_method='scott')[source]#
Calculate the prior density for effective precession conditioned on effective spin and mass ratio, \(p(\chi_\mathrm{p}\mid \chi_\mathrm{eff}, q)\), corresponding to uniform and isotropic component spin priors.
- The prior density is computed numerically by:
drawing random component spins and tilts,
computing the corresponding effective precession values,
training a kernel density estimate (KDE),
building an interpolant using the KDE’s density evaluated over a grid.
- Parameters:
- chi_pfloat, array-like
Effective precession value at which to compute the prior density.
- chi_efffloat
Effective spin value to condition on.
- qfloat
Mass ratio value to condition on. Expected convention \(q<1\).
- a_maxfloat, default=1.0
Maximum allowed dimensionless component spin magnitude.
- ndrawsint, default=10000
Number of draws from the component spin priors used to train KDE.
- **kwargs: dict, optional
Keyword arguments to pass to
chi_p_prior_given_chi_eff_q()
.
- Returns:
- array-like
Prior density at given effective precession value.
See also
Notes
This can be `np.vectorize`ed for convenience, but it can become _painfully_ slow, especially when operating near boundaries where monte-carlo sampling of tilts results in frequent unphysical spins (e.g., extremal effective spins).