Skip to content

Fix the fourth copy of the inverted-eccentricity transit duration missed by #1384 - #1393

Open
opusbuilds wants to merge 1 commit into
rzellem:michael_fitzgeralds_wonderful_branch_of_magicfrom
opusbuilds:fix-elca-duration-fourth-site
Open

Fix the fourth copy of the inverted-eccentricity transit duration missed by #1384#1393
opusbuilds wants to merge 1 commit into
rzellem:michael_fitzgeralds_wonderful_branch_of_magicfrom
opusbuilds:fix-elca-duration-fourth-site

Conversation

@opusbuilds

Copy link
Copy Markdown

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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant