Skip to content

feat: model figures phase 3 — real-class lens acceptance + cookbook/overview figures (#736) - #737

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/model-figures-lens
Sep 11, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/model-figures-lens

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

PyAutoLens half of model-figures phase 3 (issue #736; protocol in the PyAutoFit sibling PR, declarations in the PyAutoArray and PyAutoGalaxy sibling PRs). This PR renders the epic's three lens acceptance models with the real classes and puts model figures into the lens documentation.

test_autolens/model_figure/ (19 tests): (a) simple lens — six model cards in model.info order; (b) MGE 2×30 lp_linear.Gaussian in two Basis components + Pixelization(Delaunay(pixels=500, zeroed_pixels=0), ConstantSplit) source — two 30 components plates split on ell_comps, centre shared across the group, intensity · solved on every member, reconstruction · solved, areas_factor · missing, 6 shared priors; (e) group scale with eight synthetic extra-galaxy centres — one plate of 8 with centre · fixed, varies by member and independent sigma. Counts pinned as measured with # epic target comments (the real pixelized source has 1 sampled scalar, so (b) reports 14 unique sampled scalars where the phase-1 double's Sersic source gave 16). PNG widths ≤ 1400 px, layout dict deterministic.

Docs: docs/general/model_cookbook.md re-synced to autolens_workspace/scripts/guides/modeling/cookbook.py (al.lp_linear.*, regenerated model.info block), a model figure after every stage, the Redshift Free stage now builds its model, a new ## Solved Parameters section (linear intensity, pixelization reconstruction, PointSolved.centre are solved during fitting and are additional information absent from model.info; a Delaunay mesh with no prior config shows areas_factor · missing), and ## Reading the Figure (map vs legend; the correspondence contract; the plate-vs-model.info grouping paragraph from the epic; background tint follows nesting depth only). The script-less "Multi Galaxy, Group and Cluster Models" section now points at group/modeling.py with the group figure. docs/overview/overview_3_features.md gains MGE, pixelization and point-source model figures. Evidence PNGs under docs/general/images/model_cookbook/ and docs/overview/images/overview_3/ with make_figures.py.

Two things the figures exposed, documented rather than patched here: a relation on one component of a tuple (mass.centre.centre_0 = bulge.centre.centre_0 + 0.1) is carried by the spec but not yet annotated on the tuple pill (phase-2 presentation follow-up); and cookbook.py:247 sets source.effective_radius on the Galaxy rather than source.bulge, adding a stray free parameter — fixed in the autolens_workspace follow-up PR.

API Changes

None — tests and docs only. See full details below.

Test Plan

  • test_autolens/model_figure 19 passed; test_autolens/point 162 passed + 1 xfail (serial, task worktree with the sibling branches).
  • Sphinx: 110 warnings vs baseline 134; none on touched pages.
  • CI (lib-tests checks out the same-named PyAutoFit / PyAutoArray / PyAutoGalaxy branches).
Full API Changes (for automation & release notes)

Added

  • None (tests and documentation).

Migration

  • None.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa

…ew figures (PyAutoLens#736)

Model figures phase 3. test_autolens/model_figure builds the epic's three
acceptance models with the real classes (simple lens; MGE 2x30 linear
Gaussians + Delaunay/ConstantSplit pixelized source; group scale with eight
extra galaxies) and asserts the structural invariants: two "30 components"
plates split on ell_comps with intensity solved, reconstruction solved,
areas_factor missing, per-galaxy fixed centres varying by member. The model
cookbook docs page is re-synced to the workspace script and gains a figure
per stage, a Redshift Free model, a Solved Parameters section and a
"Reading the Figure" note (correspondence contract, the plate-vs-model.info
grouping difference, tint = nesting depth); overview_3 gains MGE,
pixelization and point-source model figures.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa
…t config (PyAutoLens#736)

autolens_workspace configures it as a constant 0.5, so the same model drawn
from the workspace shows a fixed pill rather than the red missing pill.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

@Jammy2211
Jammy2211 merged commit 3f9c883 into main Sep 11, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/model-figures-lens branch September 11, 2026 15:47
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 26, 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