Skip to content

Add model figures to the modeling cookbook (PyAutoLens#736) - #541

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/model-figures-lens
Sep 11, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/model-figures-lens

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Workspace half of model-figures phase 3 (PyAutoLens#736). The modeling cookbook draws the model figure beside every model.info — the figure is the map (which component owns which parameter; fixed, shared, related, constrained, solved and missing states), model.info the legend. The Redshift Free stage now builds and prints its model (a free Redshift is an ordinary sampled pill; a fixed one is the redshift = 0.5 subtitle). A new Solved Parameters stage shows what PyAutoFit cannot know on its own: linear-profile intensity, the pixelization reconstruction and PointSolved's centre are solved during fitting and drawn dashed, and a Delaunay mesh with no prior config shows areas_factor · missing; the stage also explains the plate-vs-model.info grouping difference. Also fixes source.effective_radius being set on the Galaxy instead of its bulge. Notebook regenerated; config/output.yaml gains model_figure: false.

Needs the library branches: workspace CI checks out the same-named PyAutoFit / PyAutoArray / PyAutoGalaxy / PyAutoLens branches; merges behind the library-first gate.

Scripts Changed

  • scripts/guides/modeling/cookbook.py — model figure after every model.info stage (simple, complex, four galaxies, concise, prior customization, model customization); Redshift Free now builds and prints its model with a figure; new __Solved Parameters__ section (linear intensity, pixelization reconstruction, PointSolved.centre solved; the missing state; plate-vs-model.info grouping); JSON reload note (the reload writes zero-free-parameter components as instances, so its figure differs); bug fix source.effective_radius → source.bulge.effective_radius; stale free-parameter counts corrected (17, not 19)
  • config/output.yaml — new key model_figure: false
  • notebooks/guides/modeling/cookbook.ipynb — regenerated from the script
  • llms-full.txt, workspace_index.json — regenerated catalogues (new Contents entry)

Upstream PR

Test Plan

  • scripts/guides/modeling/cookbook.py runs headless end to end in the task worktree under the smoke profile env with the library branches on PYTHONPATH.
  • Notebook regenerated with PyAutoHands generate.py autolens; only the cookbook twin committed.
  • Workspace CI (smoke on the same-named library branches).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa

Draw the model figure (af.ModelPlotter) after every model.info stage of
guides/modeling/cookbook.py, make the Redshift Free stage build and print
its model, add a Solved Parameters stage (linear intensity, pixelization
reconstruction and PointSolved centre are solved during fitting; Delaunay's
areas_factor is missing configuration), fix source.effective_radius being
set on the Galaxy instead of its bulge, regenerate the notebook, and add the
output.yaml key model_figure: false.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 11, 2026
@Jammy2211
Jammy2211 merged commit 022c665 into main Sep 11, 2026
7 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 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