Repository navigation
Revise Chapter 2 lens modelling tutorials and search chaining - #124
Merged
Merged
Conversation
Keep intensities in the non-linear search until Tutorial 4. Restore explicit likelihood functions and physical intuition, clarify local-maxima investigations and point to alternative searches. Agent: Codex; model: GPT-6
Apply the approved Tutorial 5 review: circular masking, verified positions and a single constrained fit, noise scaling, and the shared model composition API across datasets. Include the comparison figure and regenerated notebook/catalogue. Agent: Codex; model: GPT-6
Replace prior-passing lesson with approved Prodigy-to-Nautilus MGE chain, fixed lens-light geometry, free power-law mass slope and automatic positions. Explain conditional uncertainty and regenerate the notebook and catalogue. Agent: Codex; model: GPT-6
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
Chapter 2 now builds from explicit likelihood functions and parameter-space intuition to reusable dataset/likelihood interfaces and component-based search chaining. Linear light profiles are introduced in Tutorial 4, after the first three lessons have established ordinary profile fitting and the challenges of local maxima.
Tutorial 5 explains why the examples use circular masks, demonstrates a fast positions penalty with lens light, and shows how the same model-composition API applies across datasets. Tutorial 6 chains Prodigy and Nautilus, distinguishes optimisation from uncertainty estimation, fixes selected lens-light geometry, and introduces SLaM. Runtime guidance and runnable
model_centredprior passing are optional lessons.Scripts Changed
scripts/chapter_2_lens_modeling/tutorial_1_non_linear_search.py,tutorial_2_practicalities.py,tutorial_3_why_modeling_is_hard.py— restore explicit parameter-space functions and physical interpretation; defer linear profiles; explain local maxima, search effort and alternative methods.scripts/chapter_2_lens_modeling/tutorial_5_data_and_likelihoods.py— replace mask-choice exercises with the circular-mask rationale, one annular comparison image, positions-constrained fitting, noise scaling and dataset/model/likelihood separation.scripts/chapter_2_lens_modeling/tutorial_6_search_chaining.py— use a 15-parameter Prodigy fit followed by a 12-parameter Nautilus fit; explain fixed geometry, automatically derived positions and conditional uncertainties.scripts/chapter_2_lens_modeling/tutorial_7_summary.py— add the updated summary as a generated notebook.scripts/chapter_optional/tutorial_need_for_speed.py,tutorial_prior_passing.py— update JAX/batching/runtime guidance and demonstrate supported prior transfer withresult.model_centred, including the correct centres and width semantics.Validation
Result/SamplesSummaryvalidation verified 11 centred priors, posterior-median centres, positive widths, fixed/shared parameters and actual second-model transfers (11 → 17 parameters).Heart acknowledgement
Heart reported YELLOW on 2026-11-04:
The user explicitly authorised development shipping despite these warnings: "yes go ahead, push chapter 2 and open the PR despite those warnings". This authorisation covers pushing and opening this PR; merge remains separate.
Closes #123.
Generated by the PyAutoLabs agent workflow.