Skip to content

docs: floor lens-light MGE Gaussians at a tenth of the pixel scale - #67

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/mge-sigma-min-workspace-sweep
Aug 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/mge-sigma-min-workspace-sweep

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Phase 2 of the sweep started in autolens_workspace#467 (merged).

chapter_2_lens_modeling/tutorial_5_linear_profiles.py builds three MGE sigma ladders by hand, all previously hardcoded to -2.

The lens ladders (2)

Now start at np.log10(dataset.pixel_scales[0] / 10.0), so the basis stops spending Gaussians ~2 dex below what the data resolves.

The source ladder (1) — moves to -4 instead

The source is lensed. Magnification samples the source plane far more finely than the image-plane pixel scale, so flooring a source basis at a tenth of the image pixel scale would truncate real small-scale source structure that the lensing actually resolves.

-4 is what mge_model_from gives a source, so the hand-written tutorial basis now matches the helper it exists to teach — previously the two disagreed by 2 dex, which is exactly the inconsistency this sweep removes.

This was verified by tracing, not by name or by the ladder's upper bound: the third ladder feeds source_bulge. In the companion repo both of those heuristics turned out to be wrong somewhere, so neither was trusted here.

Scripts Changed

  • scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py (+ regenerated notebook)

Validation

  • pyflakes: zero introduced undefined names
  • Tutorial passes smoke (18s)
  • Notebook regenerated 1-for-1, no unrelated churn

Merge gate

pending-release — sigma_min exists only on PyAutoGalaxy main (#549, 13d3023c) and in no released PyAutoGalaxy.

🤖 Generated with Claude Code

Phase 2 of the sweep started in autolens_workspace#467. Tutorial 5 builds
three MGE ladders by hand. The two lens-light ladders now start at
`np.log10(dataset.pixel_scales[0] / 10.0)` instead of a hardcoded -2.

The third ladder is the SOURCE MGE and moves from -2 to -4 instead. The
source is lensed, so magnification samples the source plane far more finely
than the image pixel scale — a pixel-scale floor would truncate real
small-scale source structure. -4 is what `mge_model_from` gives a source, so
the hand-written tutorial basis now matches the helper it exists to teach.

Verified by tracing: the third ladder feeds `source_bulge`, not the lens.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 4, 2026
@Jammy2211
Jammy2211 merged commit 4ff3135 into main Aug 4, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/mge-sigma-min-workspace-sweep branch August 4, 2026 17:49
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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