Support supplied per-observation astrometric uncertainties - #431
Merged
Conversation
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>
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.
What
Adds a third astrometric-weighting mode to
orbitfit:weight_data="supplied"reads the per-observationrmsRA/rmsDeccolumns (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) andweight_data=True(Veres 2017) are unchanged — byte-identical."supplied"requires thermsRA/rmsDeccolumns (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_dataregression tests pass.🤖 Generated with Claude Code