Current test + acceptance files:
gravoturb/validation/acceptance.py— AC3/AC4 anchor ζ(p) on PP20 Eq. 6 + analytic + the direct-field estimator; AC1/AC2 anchor the BM19 scalars + mass conservation. These print their numbers (seegravoturb/VALIDATION_SUMMARY.md).tests/experimental/unit/test_pp20.py— PP20 ζ(p) unit tests (anchors, no-spurious-pole regression, divergence at ).tests/experimental/unit/test_bm19.py,tests/experimental/unit/test_pdf.py— BM19 scalar + density-PDF/iCDF coverage.tests/experimental/validation/test_acceptance.py— asserts the AC PASS verdicts so “validated” is backed by fresh output.
What is verified (PP20 ζ(p))¶
Property | Tolerance | Anchor |
|---|---|---|
10-10 abs | Top-hat reference | |
10-12 rel | Exact analytic | |
10-12 rel | Exact analytic | |
0.02 abs | Kainulainen et al. (2014) median | |
PP20 Eq. 6 vs analytic at 10 values | 0.2% rel | 2.6 ≈ rounding |
Monotonic in over | Strict | No spurious singularity at |
Smooth across | change | Refutes the bug-induced “domain limit” |
Diverges as | Singular isothermal limit | |
clipping | Identity above | Numerical safety |
JIT, vmap, grad compatibility | Round-trips | JAX-native |
No buggy form in source tree | Source-text scan | Regression trap |
These regression anchors are exercised by tests/experimental/unit/test_pp20.py
and printed by AC3/AC4; run the commands below for fresh status.
What is verified (BM19 unit coverage)¶
Property | Tolerance | Anchor |
|---|---|---|
10-12 rel | Closed form | |
Transition density continuity | 10-12 rel at lognormal-power-law match | Analytic matching condition |
at canonical params | 1% rel | Numerical integration cross-check |
α↔p mapping | exactly | Definition |
End-to-end forward chain (1D → 3D realization) | AC6 cornerstone: realized vs BM19 , ensemble bias |
|
Spot ζ values (canonical anchors)¶
Comment | ||
|---|---|---|
0 | 1.0 (exact) | Top-hat |
0.5 | 1.014 | Pre-2026-04-28 buggy formula returned 1.235 |
1.0 | 1.0887 | Exact analytic anchor |
1.5 | ≈ 1.4142 | Exact analytic anchor |
1.67 | 1.789 | Kainulainen+14 observational |
1.95 | 8.28 | Approaching |
How to run¶
# Unit tests (repo-only; needs src/experimental on the path)
PYTHONPATH=src:src/experimental pytest tests/experimental/unit/test_pp20.py -v
PYTHONPATH=src:src/experimental pytest tests/experimental/unit/test_bm19.py tests/experimental/unit/test_pdf.py -v
# Acceptance suite — prints the ζ/BM19 anchor numbers (AC1–AC4)
PYTHONPATH=src:src/experimental python -m gravoturb.validation.acceptanceA few seconds for the unit tests; the full AC suite (incl. the 128³ AC6 cornerstone) takes a couple of minutes.
The 2026-04-28 fix¶
The ζ(p) regression suite was added simultaneously with the bug fix on
2026-04-28 (those tests now live in the experimental gravoturb
package; see the test dashboard for current counts).
Pre-fix, the buggy magnification_factor returned values like
that all prior tests accepted (because the
prior tests anchored on the buggy formula’s output). The fix
re-anchored every test on either PP20 Eq. 6, the integral-derived
analytic form, or the Kainulainen+14 observation. Full history at
PP20 ζ(p) transcription fix.
References¶
Parmentier & Pasquali (2020) for ζ(p); Kainulainen et al. (2014) for the observational anchor; Burkhart (2018)Burkhart & Mocz (2019) for the BM19 framework. Theory at The magnification factor ζ — three ways to compute it and BM19 dense-gas SFR framework.
- Kainulainen, J., Federrath, C., & Henning, T. (2014). Unfolding the laws of star formation: The density distribution of molecular clouds. Science, 344, 183–185. 10.1126/science.1248724
- Parmentier, G., & Pasquali, A. (2020). A new parameterization of the star formation rate–dense gas mass relation: Embracing gas density gradients. The Astrophysical Journal, 903, 56. 10.3847/1538-4357/abb8d3
- Burkhart, B. (2018). The Star Formation Rate in the Gravoturbulent Interstellar Medium. The Astrophysical Journal, 863, 118. 10.3847/1538-4357/aad002
- Burkhart, B., & Mocz, P. (2019). The self-gravitating gas fraction and the critical density for star formation. The Astrophysical Journal, 879, 129. 10.3847/1538-4357/ab25ed