Skip to content

feat: point-source examples demonstrate solved-centre + all-to-all defaults with benchmark evidence (#678 phase D) - #453

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/point-source-defaults-campaign
Aug 3, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/point-source-defaults-campaign

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Phase D of PyAutoLabs/PyAutoLens#678 — the end goal: workspace examples demonstrate the recommended defaults, with the full benchmark evidence written into the guides. PENDING RELEASE — merge only after PyAutoLabs/PyAutoLens#686 (phase C default change) ships in a release, since the demonstrated compositions rely on the new FitPositionsImagePairAllSolved default.

What changed

  • All point_source + cluster examples move to the recommended defaults: ps.PointSolved sources with the default all-to-all solved image-plane chi-squared. Free-centre composition is kept as the clearly documented alternative with its use-cases (informative centre priors, centres linked across bands/epochs, centre-as-science, and the glSNe standard-candle flux caveat — FitFluxesSolved's flat-prior flux discards standardization priors).
  • guides/point_source_pairing.py gains a "Benchmark evidence (truth-anchored, A100)" section with the phase B numbers: the missing-image pairing discriminator (repeat pairing mis-ranks truth by 1.8×10⁵ logL), tensor-vs-scalar weighting rankings at both tiers, the free-centre gradient plateau, posterior-width honesty, near-caustic validity, and cluster search-strategy caveats (Nautilus for cluster source-plane; gradient searches → solved image-plane).
  • point_source/modeling.py + cluster/modeling.py/start_here.py carry the distilled learnings inline; stale "the lens equation cannot be differentiated" claims corrected (the solved positions carry an exact implicit gradient).
  • PointFlux feature scripts (fluxes, extra_galaxies, scaling_relation, plot) pass the free-centre FitPositionsImagePairAll explicitly, with a comment explaining why.
  • cluster/simulator.py bug fix: the jitted solve now passes per-source plane_redshift — solve defaults to the final plane, which silently placed the z=1.0 source's images as if it sat at z=2.0 (the feat: cluster examples default to PointSolved + solved position fits #436 taint). Requires the register_tracer_classes Galaxy-redshift aux fix in PyAutoLens#686. Dataset regenerated locally end-to-end to validate.
  • weak/features/strong_lensing/a2744.py adopts the cluster PointSolved + solved source-plane convention (its centre-prior loop is replaced by the setattr swap).
  • Notebooks regenerated (17), workspace_index.json refreshed.

Verification

  • All 16 edited scripts compile; model composition + likelihood evaluation sanity-checked against the phase C library for every demonstrated pattern (solved default, free-centre explicit, centre-bearing + default raises loudly, solved + time delays).
  • Cluster simulator ran end-to-end with the fix (physical per-plane image multiplicities).
  • CI smoke will fail against the released library until phase C ships — expected for a pending-release PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd

Jammy2211 and others added 2 commits August 1, 2026 14:49
…faults with benchmark evidence (#678 phase D)

All point_source and cluster examples move to the recommended defaults:
ps.PointSolved sources with the (new) default FitPositionsImagePairAllSolved
image-plane chi-squared, free-centre composition kept as the clearly
documented alternative with its use-cases (informative/linked centre priors,
centre-as-science, glSNe standard-candle fluxes). PointFlux feature scripts
pass the free-centre FitPositionsImagePairAll explicitly.

guides/point_source_pairing.py gains the truth-anchored A100 benchmark
evidence (#678 phase B): the missing-image pairing discriminator (repeat
pairing mis-ranks truth by 1.8e5 logL), tensor-vs-scalar source-plane
weighting rankings, free-centre gradient plateau, posterior-width honesty,
near-caustic domain of validity, and the cluster search-strategy caveats.
Cluster modeling/start_here cite the cluster-tier evidence; stale
'lens equation cannot be differentiated' claims corrected.

cluster/simulator.py: the jitted PointSolver solve now passes per-source
plane_redshift (solve defaults to the FINAL plane, silently placing the
z=1.0 source's images as if at z=2.0). Requires the accompanying PyAutoLens
fix registering Galaxy redshift as no_flatten aux.

Notebooks regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd
…and modeling scripts

The pairing guide gains a dedicated section on how FitPositionsImagePairAll(Solved)
penalizes too few images (quadratic, automatic; 1e4 finite floor at zero images)
vs too many (mild logarithmic Occam factor, magnification-blind — central image
tolerated by construction, but so is a bright spurious image, hence the
image-plane validation step). point_source/modeling.py carries the brief version;
cluster/modeling.py + start_here.py state why the source-plane search chi-squared
cannot see either failure mode and point at the guide for the choice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DnTmLoJjJgMTze5uAbg1Jd
@Jammy2211
Jammy2211 merged commit f6bdd92 into main Aug 3, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/point-source-defaults-campaign branch August 4, 2026 20:40
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.

1 participant