Skip to content

Defer close-approach IOD candidates instead of fitting them in polynomial order - #510

Merged
matthewholman merged 1 commit into
mainfrom
fix/465-defer-close-earth-roots
Aug 31, 2026
Merged

Defer close-approach IOD candidates instead of fitting them in polynomial order#510
matthewholman merged 1 commit into
mainfrom
fix/465-defer-close-earth-roots

Conversation

@matthewholman

Copy link
Copy Markdown
Collaborator

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 the
rest 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:

discoveries known
converged, before 229 (91.6%) 201 (80.4%)
converged, after 247 (98.8%) 248 (99.2%)
exceeded the deadline, before 18 37
exceeded the deadline, after 0 0

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_output fails locally on a stale layup on PATH -- the
problem #506 fixes -- and is unrelated.)

The five arcs that still return flag 3 are a separate matter: #509.

…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.
@matthewholman matthewholman added this to the v1.0 milestone Aug 30, 2026
@matthewholman
matthewholman requested a review from kjnapier August 30, 2026 14:26

@kjnapier kjnapier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@matthewholman
matthewholman merged commit f39e460 into main Aug 31, 2026
7 of 11 checks passed
@matthewholman
matthewholman deleted the fix/465-defer-close-earth-roots branch August 31, 2026 15:56
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.

Unusually long orbitfit execution time for certain MBAs

2 participants