Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Mass-ratio distributions

San Diego State University

The conditional mass-ratio distribution g(qM1)g(q \mid M_1) is the component of the Moe & Di Stefano (2017) joint f(M1,q,P,e)f(M_1, q, P, e) that the binary-aware likelihood (Binary-aware likelihood) integrates over at inference time. Getting it right is essential — a misspecified g(q)g(q) produces residual bias on the inferred IMF slope even after correcting for the binary fraction.

This chapter documents the parametric form, the per-mass and per-period values, and the period-averaged-vs-period-conditional trade-off that progenax exposes through BinaryIMF.

The parametric form

For a primary of mass M1M_1, the Moe & Di Stefano (2017) mass-ratio distribution combines a power-law in qq with a narrow Gaussian “twin excess” near q=1q = 1:

g(qM1)  =  (1ftwin)qγ(M1)Zpl  +  ftwinN(q1,σtwin)g(q \mid M_1) \;=\; (1 - f_{\mathrm{twin}})\,\frac{q^{\gamma(M_1)}}{Z_{\mathrm{pl}}} \;+\; f_{\mathrm{twin}}\,\mathcal{N}(q \mid 1,\,\sigma_{\mathrm{twin}})

↗ model card

with Zpl=qmin1qγdqZ_{\mathrm{pl}} = \int_{q_{\min}}^{1} q^\gamma\,\mathrm{d}q the power-law normalisation and σtwin0.03\sigma_{\mathrm{twin}} \approx 0.03 the twin-peak width. The twin Gaussian is sharply peaked at q=1q = 1 and truncated at q>1q > 1; the power-law dominates everywhere except the narrow q[0.95,1]q \in [0.95, 1] window.

The two component weights (1ftwin)(1 - f_{\mathrm{twin}}) and ftwinf_{\mathrm{twin}} guarantee normalisation. Both depend on M1M_1; γ\gamma also depends on PP in the full Moe & Di Stefano (2017) description (see period-conditional treatment below).

The power-law slope γ(M1)\gamma(M_1)

```{list-table} Period-averaged single-slope γ(M1)\gamma(M_1) — a reduction of Moe & Di Stefano (2017) Table 13 (γsmallq/γlargeq\gamma_{\mathrm{smallq}}/\gamma_{\mathrm{largeq}} averaged over logP\log P); a progenax approximation, not a verbatim Moe row. :header-rows: 1


The trend reverses across the mass spectrum: massive stars
preferentially have *low-$q$* companions, while low-mass stars prefer
*equal-mass* companions. Physically, this is consistent with
fragmentation cascades feeding low-mass companions to massive
primaries, while low-mass primaries form alongside near-equal-mass
companions in shared accretion environments.

## The twin fraction $f_{\mathrm{twin}}(M_1)$

```{list-table} Period-averaged twin-excess fraction $f_{\mathrm{twin}}(M_1)$ — reduced from {cite:t}`MoeDiStefano2017` Table 13 ($\mathcal{F}_{\mathrm{twin}}$ averaged over $\log P$).
:header-rows: 1

* - Primary mass
  - $f_{\mathrm{twin}}$
  - Pattern
* - $M_1 < 0.8\,\Msun$
  - 0.05
  - Modest twin excess
* - $0.8$–$1.2\,\Msun$
  - **0.10**
  - Peak — solar-type strongest twin signature
* - $1.2$–$3.5\,\Msun$
  - 0.08
  - Slightly lower
* - $M_1 > 3.5\,\Msun$
  - 0.03
  - Massive stars rarely twin

Solar-type primaries (the 0.81.2M1.2\,\Msun row) show the strongest twin excess. The “twin” terminology is precise: ftwinf_{\mathrm{twin}} is the fraction of systems with q>0.95q > 0.95 above the extrapolated power-law — not the total fraction of near-equal mass systems. Conflating “twin” with “high-q” is a common miscalibration in older population-synthesis codes.

Period-averaged vs period-conditional

The values above are period-averaged — they integrate the full Moe & Di Stefano (2017) g(qM1,P)g(q \mid M_1, P) over all observed periods, weighted by the period distribution. progenax’s default BinaryIMF uses these values because:

  1. Most IMF-inference targets sample the full range of binary periods (resolved-cluster photometric surveys are not period-selective).

  2. The period-conditional treatment requires sampling PP inside the forward model and marginalising over it in the likelihood — an extra integration dimension.

For surveys that are period-selective — spectroscopic surveys (short-period biased), visual-binary surveys (wide-period biased) — the period-averaged γ\gamma is wrong. A future period-conditional likelihood layer should accept a period-selectivity function w(P)w(P) and replace the integrated g(qM1)g(q \mid M_1) with the conditional g(qM1,P)g(q \mid M_1, P) from Moe & Di Stefano (2017) Table 11 (the per-logP\log P γsmallq/γlargeq\gamma_{\mathrm{smallq}}/\gamma_{\mathrm{largeq}} breakdown for solar-type primaries, with the analogous early-type tables). The current BinaryIMF does not export a with_period_conditional() constructor. The conditional treatment splits γ\gamma further:

```{list-table} Moe & Di Stefano (2017) γ\gamma split into small-qq and large-qq regimes (period-averaged). :header-rows: 1


The two-segment fit reflects the observation that low-$q$ companions
follow a different distribution than high-$q$ ones — the cascade-style
fragmentation that produces low-$q$ companions to massive primaries
saturates around $q \sim 0.3$. progenax's default uses only the
$\gamma_{\mathrm{large}{-}q}$ value (the period-averaged $\gamma$ in the
table above), which is appropriate for *total* mass-function analyses
but loses the small-$q$ structure relevant to spectroscopic surveys.

## Sampling

Sampling $q$ from {eq}`gq-form` is straightforward. progenax exposes
this through `BinaryIMF.sample_mass_ratios(key, m1)`; internally the
default `MoeDiStefano2017.sample_given_primary(key, m1)` does:

1. Draw a uniform $u \sim \mathcal{U}(0, 1)$.
2. With probability $1 - f_{\mathrm{twin}}(m_1)$: invert the
   power-law CDF $\int_{q_{\min}}^{q} q'^\gamma\,\mathrm{d}q' / Z_{\mathrm{pl}}$
   analytically.
3. Otherwise: draw from the twin Gaussian $\mathcal{N}(1,
   \sigma_{\mathrm{twin}})$, truncated at $q \in [\max(0.95, q_{\min}), 1]$.

The branch choice is implemented via `lax.cond` with a smooth-blend
fallback to keep the sampling differentiable in $f_{\mathrm{twin}}$
when the binary fraction is being inferred.

## Likelihood evaluation

For the binary-aware likelihood ([](binary-aware-likelihood.md)),
$g(q \mid M_1)$ enters the integrand directly. The 128-point
Gauss-Legendre quadrature over $q \in [q_{\min}, 1]$ evaluates
$g(q \mid M_1)$ at each node; for the period-averaged form, the
piecewise nature of $\gamma(M_1)$ is handled inside `BinaryIMF` via
mass-bin lookups.

The full likelihood structure and its computational cost are
documented at [](binary-aware-likelihood.md); this chapter only
covers the $g(q)$ ingredient.

## Implementation in progenax

```python
import jax
import jax.numpy as jnp
from progenax.imf import BinaryIMF, MoeDiStefano2017, PowerLawIMF

key = jax.random.PRNGKey(0)
m1 = jnp.array([0.5, 1.0, 2.0, 5.0, 20.0])
q = jnp.linspace(0.1, 1.0, 128)

q_dist = MoeDiStefano2017()
# pdf_given_primary takes a SCALAR primary mass (the power-law branch uses
# lax.cond, whose predicate must be scalar) — vmap over m1 for a grid:
pdf = jax.vmap(lambda m: q_dist.pdf_given_primary(q, m))(m1)  # shape (5, 128)

binary_imf = BinaryIMF(primary_imf=PowerLawIMF.kroupa())
m1_sample, m2_sample, is_binary = binary_imf.sample_systems(key, 1000)

The MoeDiStefano2017 methods implement the mass-binning above; they are JIT-safe (jnp.where piecewise) and differentiable in m1m_1, but pdf_given_primary expects a scalar m1m_1 per call — broadcast across a mass array with jax.vmap, as above.

Domain of validity

  1. Period-averaging assumption — period-selective surveys need a future period-conditional likelihood layer; the current BinaryIMF is period-averaged.

  2. qqminq \ge q_{\min} floor — all distributions in this chapter assume q0.1q \ge 0.1, matching Moe & Di Stefano (2017)’s observational completeness threshold. Below q=0.1q = 0.1, companion detection is unreliable, so the calibration cannot constrain that regime.

  3. Single-γ\gamma approximation in the default BinaryIMF — loses small-qq structure relevant to spectroscopic-binary inference. Treat the period-conditional treatment above as design guidance if the small-qq regime matters for your science.

  4. Metallicity assumed solarMoe et al. (2019) finds metallicity-dependent close-binary fractions, which progenax does not currently incorporate into g(q)g(q).

Implementation, validation & references

References
  1. Moe, M., & Di Stefano, R. (2017). Mind your Ps and Qs: The interrelation between period (P) and mass-ratio (Q) distributions of binary stars. The Astrophysical Journal Supplement Series, 230, 15. 10.3847/1538-4365/aa6fb6
  2. Moe, M., Kratter, K. M., & Badenes, C. (2019). The close binary fraction of solar-type stars is strongly anticorrelated with metallicity. The Astrophysical Journal, 875, 61. 10.3847/1538-4357/ab0d88