Add Engle24Auto XUV model with per-timestep dispatch#347
Conversation
Introduces a new sXUVModel value, Engle24Auto, that lets vplanet pick between the Engle (2024) Early (M >= 0.4 Msun) and MidLate (M < 0.4 Msun) coefficient sets at every integration timestep based on the current stellar mass. Both coefficient blocks must be set in star.in. Motivation: when CXUVFC's vconverge runs draw stellar mass from a Gaussian prior that straddles the 0.4 Msun model boundary, every sample should use the calibration that matches its drawn mass. Forcing one model up front biases the posterior for boundary stars (Wolf 327, TOI-406, TOI-2095, TOI-700, TOI-4438) and outright fails for stars whose mean is at or beyond the calibration bound (TRAPPIST-1, M=0.0898; Teegarden, M=0.097; GJ 4274, M=0.18; GJ 3473, M=0.36 sigma=0.016). Verification bounds: Auto accepts dMass in (0.075, 0.75) Msun -- a 25% extrapolation margin around the calibrated union range [0.1, 0.6] -- and exits beyond that to flag truly unphysical inputs. Changes: - src/stellar.h: define STELLAR_MODEL_ENGLE24AUTO (=9). - src/stellar.c: parse "engle24a*" in ReadXUVModel; add VerifyXUVEngleAuto (relaxes VerifyTwoEngleOptionsNotSet, applies the 25% safety bound); dispatch Auto in VerifyXUVEngle and per-timestep in fnPropsAuxStellar based on body[].dMass. - tests/Stellar/EngleAutoMidLate/: benchmark test that Auto at M=0.181 reproduces the existing EngleXUV (MidLate) numerics bit-identically, proving correct dispatch in the MidLate regime. - tests/Stellar/EngleAutoEarly/: benchmark test at M=0.5 with the full Auto coefficient set populated -- proves correct dispatch in the Early regime. Both test files generated via tests/maketest.py.
Test Results (ubuntu-24.04 py3.13)20 103 tests 19 847 ✅ 1m 43s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-24.04 py3.14)20 103 tests 19 847 ✅ 1m 43s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-24.04 py3.12)20 103 tests 19 847 ✅ 1m 45s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.13)20 103 tests 19 847 ✅ 1m 48s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-24.04 py3.11)20 103 tests 19 847 ✅ 1m 41s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-24.04 py3.10)20 103 tests 19 847 ✅ 1m 47s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-24.04 py3.9)20 103 tests 19 847 ✅ 1m 51s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.11)20 103 tests 19 847 ✅ 1m 46s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.10)20 103 tests 19 847 ✅ 1m 49s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.9)20 103 tests 19 847 ✅ 1m 54s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.12)20 103 tests 19 847 ✅ 1m 48s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Test Results (ubuntu-22.04 py3.14)20 103 tests 19 847 ✅ 1m 47s ⏱️ For more details on these failures, see this check. Results for commit 4cd0940. |
Introduces a new sXUVModel value, Engle24Auto, that lets vplanet pick between the Engle (2024) Early (M >= 0.4 Msun) and MidLate (M < 0.4 Msun) coefficient sets at every integration timestep based on the current stellar mass. Both coefficient blocks must be set in star.in.
Motivation: when CXUVFC's vconverge runs draw stellar mass from a Gaussian prior that straddles the 0.4 Msun model boundary, every sample should use the calibration that matches its drawn mass. Forcing one model up front biases the posterior for boundary stars (Wolf 327, TOI-406, TOI-2095, TOI-700, TOI-4438) and outright fails for stars whose mean is at or beyond the calibration bound (TRAPPIST-1, M=0.0898; Teegarden, M=0.097; GJ 4274, M=0.18; GJ 3473, M=0.36 sigma=0.016).
Verification bounds: Auto accepts dMass in (0.075, 0.75) Msun -- a 25% extrapolation margin around the calibrated union range [0.1, 0.6] -- and exits beyond that to flag truly unphysical inputs.
Changes:
Proposed changes
Describe your changes here to communicate to the maintainers the value of this pull request (PR). If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your PR introduce to VPLanet?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of the steps that are necessary before merging your PR.Further comments
If this is a relatively large or complex change, explain why you chose the solution you did, what alternatives you considered, or anything else you believe to be relevant.