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.

Science demos

San Diego State University

The validation section proves that each progenax model reproduces its analytic or published ground truth. This section answers a different question: can you run the models backwards — recover the parameters of a cluster from mock observations of it — and does the recovery land on truth? That is the use case the whole package is built for: a differentiable forward model whose gradients drive maximum-likelihood and Hamiltonian-Monte-Carlo inference.

Each demo is a standalone gated CLI in scripts/ (the same validate_* house style — it exits nonzero if any recovery gate fails).

Batch B (kinematic recovery, the σ(r)\sigma(r) channel):

Demo

Question

Recovered

Cross-engine agreement (B1)

Do the DF-defined and density-defined engines build the same cluster?

(none — a consistency check)

IMF + equipartition (B2)

Can one IMF slope α\alpha be measured jointly from masses and kinematics?

(α, δ, W0)(\alpha,\ \delta,\ W_0)

Halo + core (B3)

Can a two-family cluster’s mass split + anisotropy be recovered?

(t, ra, rh)(t,\ r_a,\ r_h)

Batch C (binaries, environment IMF, structural recovery, diagnostics — paper seeds + methods showcases):

Demo

Question

Result

Binary energy budget (B9)

How big is the primordial-binary energy reservoir?

dwarfs W|W| 12–1900×; environment-dependent

King concentration (B11)

Recover (W0,rc)(W_0, r_c) from star counts alone?

yes — with a ρ=0.91\rho=-0.91 degeneracy

Differentiable diagnostics (B10)

Do JAX QQ / ΛMSR\Lambda_{\rm MSR} surrogates track the exact statistics?

yes (substructure regime); usable as a loss

Birth environment (B5)

Read the birth conditions off the IMF?

α3\alpha_3 yes; environment rank-1 unrecoverable

Binary mass function (B4)

Recover fbf_b from the unresolved-binary distortion?

yes — ignoring Moe PPqq coupling biases it 3.6σ-3.6\sigma

Binary dynamical mass (B12)

Remove the binary-inflated virial-mass bias?

yes — from the velocity wings (1.28×1.28\times bias removed; dispersion-only is rank-1)

Anisotropy (B6)

Measure the anisotropy radius from β(r)\beta(r)?

yes (OM); a Michie cluster mis-fits 12.9×12.9\times

Tidal radius (B7)

Recover rtr_t → Galactocentric distance?

from the count-limited outskirts (93% of the info)

Rotation + projection (B8)

Recover the rotation rate from vlos\langle v_{\rm los}\rangle?

only ωsini\omega\sin i — rank-1 with inclination

Optimal experimental design (B14)

Pre-data: where to spend a star budget to pin rar_a, and how deep to weigh MM?

PMs to the outskirts (3.66×3.66\times fewer stars); an interior optimal survey depth for MdynM_{\rm dyn}

The shared method: physics-direct differentiable inference

The demos share one inference layer (scripts/_demo_inference.py): forward-sample mock stars at truth once, compress them to binned kinematic summaries with honest finite-NN standard errors, evaluate a Gaussian/Poisson likelihood against the model’s analytic prediction (so gradients flow only through the prediction, not a resampled data side), then optimize with Adam and quantify with the Gauss-Newton Fisher (and, where affordable, blackjax NUTS). The full four-step recipe — with the 6n\sqrt{6n} pooled-dispersion estimator, the likelihood, and the binned-expectation predictor — is derived once in The scientific throughline → the shared method.

Honest scope — these are clean-mock methods showcases

Running the demos

The inference layer needs the experimental optional dependencies (blackjax for NUTS, optax for Adam):

env -u VIRTUAL_ENV uv pip install -e ".[dev,experimental]"

# each demo is a gated CLI (exits nonzero on a recovery-gate failure)
# --- Batch B (kinematic recovery) ---
python scripts/demo_cross_engine.py        # B1 (seconds)
python scripts/demo_delta_recovery.py      # B2 headline MLE + Fisher (minutes)
python scripts/demo_delta_recovery.py --run-nuts   # + the ~52 min NUTS corner
python scripts/demo_delta_recovery_bias.py # B2 wrong-IMF curve + robustness grid
python scripts/demo_halo_core.py           # B3 (~4 min, MLE-compile-dominated)
# --- Batch C (binaries, environment IMF, structure, diagnostics) ---
python scripts/demo_binary_energy_budget.py  # B9 (~30 s)
python scripts/demo_king_concentration.py    # B11 (~30 s)
python scripts/demo_diff_diagnostics.py      # B10 (~6 s)
python scripts/demo_birth_environment.py     # B5 (~7 s)
python scripts/demo_binary_mass_function.py  # B4 (ZAMS relations in-package via progenax.stellar)
python scripts/demo_binary_dynamical_mass.py # B12 (~90 s; kinematic companion to B4)
python scripts/demo_anisotropy.py            # B6 (~9 s)
python scripts/demo_tidal_radius.py          # B7 (~5 s)
python scripts/demo_rotation.py              # B8 (~4 s)

Figures are written to validation/plots/ (a gitignored, regeneratable artifact); the copies embedded on these pages live in docs/website/60-science-demos/figures/.