Repository navigation
Add model figures to the modeling cookbook (PyAutoLens#736) - #541
Merged
Merged
Conversation
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
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.
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.infothe legend. The Redshift Free stage now builds and prints its model (a freeRedshiftis an ordinary sampled pill; a fixed one is theredshift = 0.5subtitle). A new Solved Parameters stage shows what PyAutoFit cannot know on its own: linear-profileintensity, the pixelizationreconstructionandPointSolved'scentreare solved during fitting and drawn dashed, and aDelaunaymesh with no prior config showsareas_factor · missing; the stage also explains the plate-vs-model.infogrouping difference. Also fixessource.effective_radiusbeing set on the Galaxy instead of its bulge. Notebook regenerated;config/output.yamlgainsmodel_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 everymodel.infostage (simple, complex, four galaxies, concise, prior customization, model customization); Redshift Free now builds and prints its model with a figure; new__Solved Parameters__section (linearintensity, pixelizationreconstruction,PointSolved.centresolved; themissingstate; plate-vs-model.infogrouping); JSON reload note (the reload writes zero-free-parameter components as instances, so its figure differs); bug fixsource.effective_radius→source.bulge.effective_radius; stale free-parameter counts corrected (17, not 19)config/output.yaml— new keymodel_figure: falsenotebooks/guides/modeling/cookbook.ipynb— regenerated from the scriptllms-full.txt,workspace_index.json— regenerated catalogues (new Contents entry)Upstream PR
Test Plan
scripts/guides/modeling/cookbook.pyruns headless end to end in the task worktree under the smoke profile env with the library branches onPYTHONPATH.generate.py autolens; only the cookbook twin committed.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_0178yLU9v19GtACcRPFggjGa