Skip to content

docs: apply reviewed Chapter 2 modeling lessons - #115

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/howtolens-chapter2
Nov 1, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/howtolens-chapter2

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Chapter 2's first four lessons now follow the approved teaching sequence: a Nautilus introduction, practical model fitting, diagnosing difficult fits, and linear profiles/MGE. This applies the reviewed prose and code while retaining the later lessons for their separate review.

Scripts Changed

  • Tutorials 1–2 clarify data/model/Analysis/search roles and practical output, VRAM, batching and identifier behaviour.
  • Consolidate realism and failure material into tutorial_3_why_modeling_is_hard.py, preserving visual prior tuning and comparisons between tuned priors, reduced complexity and longer searches.
  • Move linear profiles to tutorial_4_linear_profiles.py; explain solved intensities and Gaussian geometry, retain shear, and plot the current MGE result.
  • Move the approved Prodigy introduction/example into the optional searches lesson; retain its MCMC material.
  • Update navigation and early-lesson references; regenerate notebook twins and catalogues. Chapter 3 is unchanged.

The deliberately small search uses 21 live points: the actual model has 20 free parameters, so the proposed 10 is rejected by Nautilus. Tuned and simplified comparisons use 75; the thorough search uses 300. The MGE model has 15 non-linear parameters and 45 linearly solved intensities.

Validation

  • Official Heart isolated Python 3.12 smoke suite: 43 passed, 0 failed (all runnable scripts).
  • Canonical Hands generation: 44 passed; 43 tutorial/simulator notebook files structurally validated.
  • Navigator paths/banner checks, search-memory checks, 32 tutorial-completeness checks and diff whitespace checks passed.
  • Independent read-only review: CLEAN.
  • Live API checks confirm the 20-parameter model rejects n_live=10 and accepts 21; the MGE has 15 parameters, independent lens/source centres, 30+15 Gaussians and retained shear.

Smoke bypasses sampling/plotting and caps datasets. It does not establish scientific convergence, full-search runtime or GPU performance.

Scope and readiness

This ships the approved lessons 1–4. The redesigned Data and Likelihoods and Search Chaining lessons still require the user's five-block review; existing later lessons retain their numbering and content with necessary cross-reference corrections.
Fresh Heart readiness: STALE — release validation incomplete: no rehearsal for current source. Development shipping is permitted; no release-readiness claim or failed-check bypass. The user explicitly requested PR, prm and merge in this chat, conditional on required checks passing.

Closes #113.

Integrated main after Chapter 1 PR #114 merged. Chapter 1 and Chapter 3 source/notebooks match main exactly. Regeneration again passed 44 targets, with navigation, completeness and memory checks passing. The final combined commit must pass all CI jobs before merge.

@Jammy2211
Jammy2211 merged commit 1a8ed8b into main Nov 1, 2026
8 checks passed
@Jammy2211
Jammy2211 deleted the feature/howtolens-chapter2 branch November 1, 2026 15:43
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.

docs: implement approved Chapter 2 lessons 1–4

1 participant