Skip to content

Warn when an orbit fit fails on a sub-24h arc (#312)#335

Open
matthewholman wants to merge 1 commit into
mainfrom
issue/312/short-arc-warning
Open

Warn when an orbit fit fails on a sub-24h arc (#312)#335
matthewholman wants to merge 1 commit into
mainfrom
issue/312/short-arc-warning

Conversation

@matthewholman

Copy link
Copy Markdown
Collaborator

Summary

Orbit determination needs an observational baseline longer than ~24 hours. When a fit failed on a single night of data, the user previously got an opaque failure (issue #312).

On a failed fit, _orbitfit now checks the observation arc span and, if it is under a day, logs a clear warning naming the object and the (too-short) arc length so the likely cause is obvious.

Changes

  • New _warn_if_short_arc(jds, obj_id) helper (threshold _MIN_ARC_DAYS = 1.0 day), called where the fit result is known to have failed.
  • Unit tests for the sub-day (warns), multi-day (silent), and empty (no crash) cases.

Verification

  • test_orbit_fit.py: 9 passed on a fresh build, including the 3 new tests.

Closes #312.

🤖 Generated with Claude Code

Orbit determination needs an observational baseline longer than ~24 hours.
When a fit fails on a single night of data the user previously got an opaque
failure. Now, on a failed fit, _orbitfit checks the observation arc span and,
if it is under a day, logs a clear warning naming the object and the (too
short) arc length so the likely cause is obvious.

Implemented as a small _warn_if_short_arc helper (threshold _MIN_ARC_DAYS =
1.0 day) called where the fit result is known to have failed. Adds unit tests
for the sub-day (warns), multi-day (silent), and empty (no crash) cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Warn user with a better error message if input is only 1 night of observations

1 participant