The conditional mass-ratio distribution is the component of the Moe & Di Stefano (2017) joint that the binary-aware likelihood (Binary-aware likelihood) integrates over at inference time. Getting it right is essential — a misspecified 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 , the Moe & Di Stefano (2017) mass-ratio distribution combines a power-law in with a narrow Gaussian “twin excess” near :
with the power-law normalisation and the twin-peak width. The twin Gaussian is sharply peaked at and truncated at ; the power-law dominates everywhere except the narrow window.
The two component weights and guarantee normalisation. Both depend on ; also depends on in the full Moe & Di Stefano (2017) description (see period-conditional treatment below).
The power-law slope ¶
```{list-table} Period-averaged single-slope — a reduction of Moe & Di Stefano (2017) Table 13 ( averaged over ); a progenax approximation, not a verbatim Moe row. :header-rows: 1
Primary mass
Behaviour at typical
0.4
Preference for near-equal masses ( rises toward )
0.8–
0.3
Mild preference for equal masses
1.2–
0.0
Flat (uniform in )
-0.5
Preference for unequal masses ( rises toward )
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 twinSolar-type primaries (the 0.8– row) show the strongest twin excess. The “twin” terminology is precise: is the fraction of systems with 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) over all observed periods,
weighted by the period distribution. progenax’s default BinaryIMF
uses these values because:
Most IMF-inference targets sample the full range of binary periods (resolved-cluster photometric surveys are not period-selective).
The period-conditional treatment requires sampling 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 is wrong. A future
period-conditional likelihood layer should accept a period-selectivity
function and replace the integrated with the
conditional from Moe & Di Stefano (2017) Table 11
(the per-
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 further:
```{list-table} Moe & Di Stefano (2017) split into small- and large- regimes (period-averaged). :header-rows: 1
Primary mass
()
()
Used as
0.3
0.4
(avg)
0.8–
0.2
0.3
(avg)
1.2–
-0.4
0.0
(avg)
-1.0
-0.5
(avg)
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 , but
pdf_given_primary expects a scalar per call — broadcast across
a mass array with jax.vmap, as above.
Domain of validity¶
Period-averaging assumption — period-selective surveys need a future period-conditional likelihood layer; the current
BinaryIMFis period-averaged.floor — all distributions in this chapter assume , matching Moe & Di Stefano (2017)’s observational completeness threshold. Below , companion detection is unreliable, so the calibration cannot constrain that regime.
Single- approximation in the default
BinaryIMF— loses small- structure relevant to spectroscopic-binary inference. Treat the period-conditional treatment above as design guidance if the small- regime matters for your science.Metallicity assumed solar — Moe et al. (2019) finds metallicity-dependent close-binary fractions, which progenax does not currently incorporate into .
Implementation, validation & references¶
In code:
src/progenax/imf/binary/mass_ratio.py(the models —MoeDiStefano2017,PowerLawMassRatio,TwinPeakedMassRatio— and thesample_given_primary/pdf_given_primarymethods) used byBinaryIMFinsrc/progenax/imf/binary/imf.py— see the IMF API.Validated in: IMF statistics and binary-aware recovery, which check the sampled distribution against .
Primary sources: the functional form is Moe & Di Stefano (2017) Table 1 / Eq. 2 (per-mass and from Table 13, the period-conditional split from Table 11); the metallicity dependence is Moe et al. (2019) — full notes in the bibliography. For the broader multiplicity context see Multiplicity statistics (Moe & Di Stefano 2017).
- 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
- 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