GWForge.population.spin¶
Attributes¶
Classes¶
Functions¶
|
Truncated-normal density and its log-derivatives in |
|
|
|
The marginal |
Module Contents¶
- GWForge.population.spin.choices = ['Non-spinning', 'Aligned', 'Aligned-Bilby', 'Aligned-Uniform', 'Beta-Aligned',...[source]¶
- GWForge.population.spin.truncated_normal(value, mu, sigma, low, high)[source]¶
Truncated-normal density and its log-derivatives in
muandsigma.The kernel both halves of the
DefaultBBH spin model are built from: the magnitudes are one of these on \([0, a_{\max}]\), and the cos-tilt mixture’s Gaussian component is one on \([t_{\min}, 1]\).With \(z = (x-\mu)/\sigma\), \(a = (\text{low}-\mu)/\sigma\), \(b = (\text{high}-\mu)/\sigma\) and \(D = \Phi(b) - \Phi(a)\),
\[\frac{\partial \ln N}{\partial \mu} = \frac{z}{\sigma} - \frac{\phi(a) - \phi(b)}{\sigma D}, \qquad \frac{\partial \ln N}{\partial \sigma} = \frac{z^2 - 1}{\sigma} - \frac{a\phi(a) - b\phi(b)}{\sigma D}.\]- Parameters:
value (array_like)
mu (float)
sigma (float)
low (float)
high (float)
- Returns:
{"density": ..., "mu": ..., "sigma": ...}, the latter two beingd ln N / d muandd ln N / d sigma.densityis zero outside[low, high].- Return type:
dict
- GWForge.population.spin.default_spin_magnitude_density(magnitude, mu_chi, sigma_chi, amax=1.0)[source]¶
p(chi)for theDefaultBBH model: Eq. B15 of arXiv:2605.27226.A truncated Gaussian \(N_{[0, a_{\max}]}(\mu_\chi, \sigma_\chi)\), the same for both components.
sigma_chiis a standard deviation; the Beta models take a variance and are a different model.
- GWForge.population.spin.default_spin_tilt_density(cosine, mu_t, sigma_t, xi_spin, t_min=-1.0)[source]¶
The marginal
p(cos t)of one component: Eq. B16, one tilt at a time.\[p(\cos t) = \xi\, N_{[t_{\min}, 1]}(\mu_t, \sigma_t) + \frac{1 - \xi}{1 - t_{\min}}.\]Careful: the model is joint over the binary – one draw decides whether both tilts come from the Gaussian or both from the isotropic component – so the density of the pair is not the product of two of these. It is
\[p(\cos t_1, \cos t_2) = \xi\, N(\cos t_1) N(\cos t_2) + \frac{1 - \xi}{(1 - t_{\min})^2},\]which is what
GWForge.population_fisher.DefaultSpinevaluates and what makescorr(cos t_1, cos t_2)non-zero. This marginal is the right thing to compare a one-dimensional histogram against, and nothing else.