Skip to content

Support supplied per-observation astrometric uncertainties - #431

Merged
matthewholman merged 1 commit into
mainfrom
feat/supplied-weights
Jul 7, 2026
Merged

Support supplied per-observation astrometric uncertainties#431
matthewholman merged 1 commit into
mainfrom
feat/supplied-weights

Conversation

@matthewholman

Copy link
Copy Markdown
Collaborator

What

Adds a third astrometric-weighting mode to orbitfit: weight_data="supplied" reads the per-observation rmsRA/rmsDec columns (in arcseconds) and uses them directly as the observation uncertainties, instead of the built-in ~1-arcsecond default (weight_data=False) or the Veres et al. (2017) model (weight_data=True).

Why

layup currently weights every observation at ~1 arcsecond by default, and the Veres 2017 model returns ~1 arcsecond for anything pre-CCD. That badly over-weights historical astrometry — 19th- and early-20th-century visual and photographic positions are really only good to several arcseconds, up to an arcminute. In the fit's reject/refit loop that then throws the orbit out entirely, so a century-old comet discovery arc simply will not fit. Letting the caller supply per-observation uncertainties — from ADES, or from an external model such as era-based historical weighting — fixes that without hard-coding any weighting policy into layup.

Behaviour / compatibility

  • weight_data=False (default) and weight_data=True (Veres 2017) are unchanged — byte-identical.
  • "supplied" requires the rmsRA/rmsDec columns (raises a clear error otherwise); a NaN or non-positive value on a given row falls back to the default weighting for that row.

Tests

Adds tests that a looser supplied sigma yields a proportionally looser position covariance (confirming the weights are actually applied) and that the missing-columns case raises. The existing weight_data regression tests pass.

🤖 Generated with Claude Code

Add weight_data="supplied" to orbitfit: use the per-observation rmsRA / rmsDec
columns (arcseconds) directly as the astrometric uncertainties, instead of the
built-in default or the Veres 2017 model. This lets callers supply their own
weights -- e.g. ADES-reported uncertainties, or an external weighting model such
as era-based historical weighting for old (arcminute-era) comet apparitions,
which the flat 1-arcsecond default otherwise over-weights until the fit is
quality-rejected. A NaN or nonpositive value on a row falls back to the default;
weight_data False/True are unchanged (byte-identical).

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

@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.

Excellent

@matthewholman
matthewholman merged commit affd3b5 into main Jul 7, 2026
7 checks passed
@matthewholman
matthewholman deleted the feat/supplied-weights branch July 7, 2026 21:44
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.

2 participants