Defer close-approach IOD candidates instead of fitting them in polynomial order - #510
Merged
Merged
Conversation
…mial order A Gauss root whose trajectory grazes the Earth is expensive rather than obviously wrong: the integrator resolves the encounter step by step and a single candidate can consume the whole fit budget. On short main-belt arcs the offender is the degenerate branch that collapses onto Earth's own orbit, which is spurious for those objects and is rejected at 1e4-1e6 sigma once it is actually evaluated. Partition the candidates on the existing _CLOSE_EARTH_AU threshold, fit the rest first, and return to the close ones only if none of the others converged. Deferred, not discarded: for a genuine near-Earth object with a real close approach the close root is the correct orbit. Closes #465.
kjnapier
approved these changes
Aug 31, 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.
Closes #465.
A Gauss root that grazes the Earth is expensive rather than obviously wrong:
the integrator resolves the encounter step by step and one candidate can
consume the whole fit budget. On short main-belt arcs it is the degenerate
branch that collapses onto Earth's own orbit, and it is rejected at
1e4-1e6 sigma once it is actually evaluated (traces in the issue).
This partitions the candidates on the existing
_CLOSE_EARTH_AU, fits therest first, and returns to the close ones only if none of the others
converged. Deferred, not discarded -- for a genuine near-Earth object with
a real close approach the close root is the correct orbit, which is why
(308635) 2005 YU55 and (367943) Duende must keep working.
No new tunable, no change to the residual prefilter.
Effect. 500 Rubin-only arcs (MPC observatory code X05), 420 s deadline:
The quality statistics are unchanged -- median reduced chi-square identical at
0.0061 and 0.0023, formal sigma_a/a and |da/a| moving in the third digit -- so
the newly-converging objects are ordinary fits that were previously never
reached, not marginal ones squeaking in. Six arcs that returned nothing after
420 s now finish in ~0.04 s.
Also 96.8% of a 400-object MPC sample now fits from a cold start with no
initial guess at all.
Tests. Six unit tests on the partition: a far candidate is safe, a close one
is deferred and never dropped, ordering and completeness are preserved, the
threshold is the shared constant, motion toward the observer during the arc is
detected, and an unreadable candidate degrades to safe. Full suite 491 passed,
1 skipped. (
test_comet_outputfails locally on a stalelayupon PATH -- theproblem #506 fixes -- and is unrelated.)
The five arcs that still return flag 3 are a separate matter: #509.