Repository navigation
Hold the reference fixed within later alignment iterations - #37
Draft
wei-lingfeng wants to merge 4 commits into
Draft
wei-lingfeng wants to merge 4 commits into
wei-lingfeng wants to merge 4 commits into
Conversation
…llax In iterations after the first, update_ref_table_aggregates sends stars with at most one epoch to combine_lists_xym, which sets x0/y0 to that epoch's position but leaves t0 and the motion parameters from the previous fit (introduced in cea7916). predict_positions then moves the star with its old velocity from the old t0, misplacing it at every other epoch; with clustered epochs, stars stop matching and split into several reference rows. x0/y0 are now shifted so that the star's existing trajectory passes through the new position. t0 and the motion parameters are kept, so catalog velocities still apply; a Fixed star is unchanged. MotionModel gets min_epochs, the fewest epochs before the model is chosen (None means n_params), read through required_epochs(). Parallax sets it to 4, as mm_rework did: 3 epochs in one season cannot separate parallax from proper motion. Only model selection in StarTable.fit_motion_models uses it. OB150211 pass 1 with the notebook settings: stars detected in >= 6 of 12 epochs go from 4-9 on dev to 201-204 (mm_rework: 170-192). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MosaicSelfRef, MosaicToRef and StarTable.fit_motion_models take
min_epochs, a dict keyed by model name (e.g. {'Parallax': 3}), that sets
the fewest epochs before a model is chosen for that run only. The class
attribute stays as the default (4 for Parallax, n_params otherwise).
Unknown names and values below n_params raise. The aligners pass it to
every motion fit, including the bootstrap, and write it to the params log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wei-lingfeng
force-pushed
the
hold-ref-within-iteration
branch
from
December 3, 2026 00:31
6e2e6ee to
bfdc155
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the second iteration on, stars already in the reference keep their fit from the previous iteration while the starlists are matched, and all stars are refit once, after the last list. Before, each star was refit after every list from only the epochs matched so far in that iteration (one epoch, then two close in time), and the next list was matched against those poorly constrained fits. Stars added during an iteration are still fit as their lists come in, and the first iteration is unchanged. update_ref_orig='periter' already held catalog stars this way; this extends it to stars added from the starlists. On the test-suite datasets (every star in the reference) results are identical. With clustered epochs, 1 mas noise, and a 15-star reference, position and velocity errors against the truth are 36% smaller on all 10 seeds; star-to-star precision is unchanged. fit() is 6-17% faster on OB150211. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wei-lingfeng
force-pushed
the
hold-ref-within-iteration
branch
from
December 3, 2026 00:37
bfdc155 to
feb9ddb
Compare
This branch has not been deployed
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.
Builds on #36; review the last commit (6e2e6ee). Draft until #36 is merged.
From the second iteration on, stars already in the reference keep their fit from the previous iteration while the starlists are matched, and all stars are refit once, after the last list. Before, each star was refit after every list from only the epochs matched so far in that iteration (one epoch, then two close in time), and the next list was matched against those fits. Stars added during an iteration are still fit as their lists come in; the first iteration is unchanged.
update_ref_orig='periter'already held catalog stars this way; this extends it to stars added from the starlists.This changes the results of multi-iteration runs that add stars from the starlists (for example every
MosaicToRefrun against a Gaia subset). Runs where every star is in the reference catalog are unchanged.Results against known truth
make_fake_starlists_poly1_vel,_poly1_acc;update_ref_origFalse and'periter'; 10 seeds): identical results.poly1_velwith clustered epochs, 1 mas noise, and a 15-star reference (10 seeds): position and velocity errors 36% smaller on every seed (median 1.62 -> 1.08 mas, 1.57 -> 1.15 mas/yr). The gain is in the frame tie; star-to-star precision (after removing a linear field) is unchanged.OB150211: leave-one-epoch-out residuals of stars matched identically by both versions, median 1.77-1.93 -> 1.71-1.74 mas.
fit()is 6-17% faster (aggregate updates take half the time).Tests:
test_reference_held_within_later_iterations(fails without the change). Full suite: 139 passed.CHANGES.rstanddocs/alignment.rstupdated.