Fix the fourth copy of the inverted-eccentricity transit duration missed by #1384 - #1393
Open
opusbuilds wants to merge 1 commit into
Conversation
…sue rzellem#1383) PR rzellem#1384 corrected three sites in exotic.py; elca.py's transit_duration carried a fourth copy that was missed. It normalized the arcsin argument by the eccentricity-scaled separation and omitted the orbital-speed factor sqrt(1-e^2)/(1+e sin omega), reporting durations up to 3.5x wrong for eccentric orbits (1.95x at e=0.3/omega=90; exact for circular). Three live consumers were affected for any target with nonzero archive eccentricity: the nested-sampling duration prior in single_loglike (which compared the broken value against the FIXED estimator's expected duration, chi2-penalizing eccentric fits at their true geometry), the QC duration score (a perfect eccentric fit scored 0.04/1), and the exposure-smearing candidate window (in-transit points left unsmeared for sin(omega)<0). Regression test asserts the analytic duration matches the transit model's own first-to-fourth-contact duration to 1% across circular and eccentric geometries.
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1383/#1384: my fix corrected the three copies of the analytic transit duration in exotic.py but missed the fourth in
elca.py— an honest gap in my own PR, found by a systematic module audit today.Verified before and after against the transit model's own first-to-fourth-contact duration (and against an independent Kepler-equation contact solver): the broken form was 1.95x off at e=0.3/ω=90°, 0.56x at ω=270°, 3.48x at e=0.5, exact for circular; the fixed form agrees to ≤0.5% everywhere. Three live consumers were affected for eccentric targets: the ns duration prior (which penalized fits at the TRUE geometry with χ² up to ~45 because it compared this broken value against the fixed estimator's), the QC duration score (a perfect eccentric fit scored 0.04), and the exposure-smearing window (in-transit points unsmeared for sin ω < 0).
Same shape as #1384: port the corrected normalization + eccentric speed factor, plus a regression test pinning analytic-vs-model agreement across four geometries. Test suites: only the two pre-existing
*windows*failures, unrelated.