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.

Cross-cutting physics tests

San Diego State University

Some physics properties are not specific to one module — they are contracts across modules: that any profile pairs with any DF and still virializes, that the units policy holds end-to-end, that gradients flow through the whole pipeline. progenax does not carry a dedicated tests/validation/test_cross_cutting.py; instead these cross-cutting properties are covered indirectly by the unit and integration suites listed below. This page documents which property each suite enforces, so the cross-cutting coverage is auditable rather than assumed.

What is covered, and where

Cross-cutting property

Asserted in

Virial Q=T/VQ = T/|V| recovery for matched profile/DF pairs (and predictable departure for mismatched pairs)

tests/unit/test_builders.py, tests/unit/builders/test_cluster_builders.py (plus the per-model virial rows on the module pages — Plummer equilibrium, King profile validation, EFF profile validation)

Energy conservation through builder → modifier chains (tidal truncation, mass segregation)

tests/unit/test_tidal.py, tests/integration/test_end_to_end.py

Units-policy contract — no implicit G/units defaults leak into core APIs; explicit GG threads unchanged through the pipeline

tests/integration/test_units_through_pipeline.py

Differentiability across the full pipeline — finite jax.grad at every layer

tests/integration/test_jax_compatibility.py (and the per-entry-point autodiff-vs-FD registry on Differentiability gradient audit)

Mass-first API contract — all builders accept masses first (exercised by every builder call site)

tests/unit/test_builders.py, tests/unit/builders/test_cluster_builders.py

The profile × DF virial contract

The defining cross-cutting check is that any spatial profile pairs with any velocity DF (protocol-based composition), and a matched pair sits at virial equilibrium with no external rescale. How the suite covers this:

The per-model virial rows on the module validation pages (Plummer equilibrium, King profile validation, EFF profile validation) carry the measured numbers and tolerances; this page records that the composition across profile/DF combinations is exercised, not just the diagonal matched cases.

How to run

pytest tests/unit/test_builders.py -v
pytest tests/integration/test_units_through_pipeline.py -v
pytest tests/integration/test_jax_compatibility.py -v
pytest tests/integration/test_end_to_end.py -v

References

The per-module measured values live on the per-module validation pages (Plummer equilibrium, King profile validation, …); the three-tier methodology and tolerance conventions are at Validation methodology; the end-to-end gradient registry is at Differentiability gradient audit. This page maps the interaction contracts onto the suites that enforce them.