feat!: point-source position fit defaults to FitPositionsImagePairAllSolved (#678 phase C) - #686
Merged
Merged
Conversation
…Solved AnalysisPoint (was FitPositionsImagePairRepeat) and FitPointDataset (was FitPositionsImagePair) now default to all-to-all pairing with the analytically-solved source centre, per the #678 phase B truth-anchored A100 evidence: repeat pairing catastrophically mis-ranks truth when an observed image is missing (delta +1.8e5 logL on the simple_missing discriminator) while the all-to-all Occam mixture absorbs it; solved centres converge under gradient searches where free centres plateau; solved posteriors are not overconfident (einstein_radius sigma 0.038 vs 0.027 free). Centre-bearing profiles (ps.Point / ps.PointFlux) used with the new default raise PointProfileMismatchException loudly, directing users to pair ps.PointSolved with the default or pass a free-centre fit class explicitly. Tests pinning free-centre literals now pass their fit class explicitly; new tests pin the default and the loud mismatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd
…asses Plane bookkeeping (Tracer.plane_index_via_redshift_from, reached by any jitted PointSolver.solve(..., plane_redshift=...) on a multi-plane tracer) compares redshifts to derive a static plane index, which is impossible when redshift enters the trace as a leaf. Mirrors the cosmology no_flatten registration; found fixing autolens_workspace cluster/simulator.py's per-source plane_redshift solve (#678 phase D). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd
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.
Phase C of #678 — the defaults decision, driven by the phase B truth-anchored A100 evidence (
autolens_profiling/results/notes/point_source_defaults_campaign.md).API Changes
AnalysisPoint.fit_positions_clsdefault:FitPositionsImagePairRepeat→FitPositionsImagePairAllSolved(all-to-all image pairing + analytically-solved source centre).FitPointDataset.fit_positions_clsdefault:FitPositionsImagePair(Hungarian) →FitPositionsImagePairAllSolved(reconciled with the analysis default).ps.Point/ps.PointFlux) with the new default now raisePointProfileMismatchExceptionat likelihood evaluation, directing users to pairps.PointSolvedwith the default or pass a free-centre fit class explicitly. Migration:ps.Point→ps.PointSolved(recommended), or addfit_positions_cls=al.FitPositionsImagePairAll.Also includes:
register_tracer_classesnow registersGalaxywithredshiftasno_flattenaux (mirrors the cosmology registration) so jitted multi-planePointSolver.solve(..., plane_redshift=...)can derive its static plane index — needed by the workspace cluster simulator's per-source solve.Evidence for the default (headline numbers)
PairAllSolvedrecovers truth (Δ=+1.3) whilePairRepeatSolvedmis-ranks it by +1.8×10⁵ logL — nearest-image pairing cannot leave an unobserved model image unmatched. On clean data the two are equivalent (Δ +2.85 vs +2.88; walls 147 s vs 163 s).einstein_radiusσ 0.038 solved vs 0.027 free).Gate status
The complementary spurious-extra-position arms are rerunning on the A100s at 8h walls (jobs 331885/331886) after 2h timeouts — hold merge until they land and the exp-3 verdict is confirmed on the issue. The missing-image arm alone already rules out repeat pairing as a default.
Verification
Full
test_autolens/: 510 passed (3 new tests pin the new default and the loud mismatch). Downstream:autolens_workspacemigration is ready as the phase D PR (pending-release);workspace_testscripts all pass explicit fit classes and are unaffected.🤖 Generated with Claude Code
https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd