Skip to content

docs: simplify the model figure prose to two fixed paragraphs - #83

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/model-figure-prose-lens
Sep 14, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/model-figure-prose-lens

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Applies the new model-figure prose standard to the HowToLens tutorials. Wave 1 of phase 6b (PR #81) added these figures; this sweeps the prose it wrote.

Scripts Changed

12 tutorials, 12 regenerated notebook twins, across scripts/chapter_2_lens_modeling/ and scripts/chapter_4_scaling_up_lensing/.

Three commits: collapse the per-figure prose (12 files), regenerate the twins, then strip figure vocabulary from the later-site notes (8 notes across 7 tutorials).

The standard

Every first-figure block — opener, map/legend paragraph, and the file-specific commentary after it — becomes:

The same model can also be visualized as a figure, making its structure easier to understand at a glance.

The figure shows how the model is organized: which parameters belong to each component, and whether they are free, fixed, shared, linked by an expression, solved during the fit, or not configured. model.info provides the corresponding numerical details, including the prior assigned to each free parameter and the value of each fixed parameter.

Half of these blocks carried no **map** token at all and were found only by a whitespace-flattened search — in two tutorials the token wraps across a line break, and six more carried per-figure commentary in a different form.

Teaching content preserved

These are tutorials, so several blocks mixed figure description with teaching the tutorial's own subject. Collapsing them wholesale would have deleted real pedagogy, so 10 sentences were kept, reworded to stand alone without referring to pills, cards or the footer. For example tutorial_9_search_chaining.py keeps:

Eleven dimensions is a deliberately crude model, and that is exactly what the first search in a chain wants: it needs only to be good enough to locate the lens roughly, and to do so quickly.

and chapter_4/tutorial_6_weak_lensing.py keeps the point that in weak lensing the source galaxies are the data, a catalogue of measured shapes, so there is no source light to fit.

Verification

  • End-to-end gate over scripts/*.py and notebooks/*.ipynb: zero non-exempt occurrences of **map**, **legend**, pill, badge, plate, greyed or footer-count language. The one science use of "the map" (the mass-sheet degeneracy note in tutorial_6_weak_lensing.py) is untouched.
  • Notebooks regenerated via PyAutoHands/autohands/generate.py, never hand-edited; check_navigator.py passes.
  • Tutorials run headless under the smoke profile.

No API changes — tutorial prose only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LPCvGNHahZqynPyEfMijsb

Jammy2211 and others added 3 commits September 14, 2026 20:51
The per-figure reading commentary rolled out in phase 6 is information
overload: the figure should be self-explanatory. Every first-figure prose
block now collapses to the same two paragraphs, which say what the figure
shows and point at `model.info` for the numbers.

All 12 tutorials with a figure site are swept. Where a trailing paragraph
taught the tutorial's own science or method rather than describing the
figure, that sentence is preserved as a third paragraph, reworded so it
stands on its own without referring to pills, cards, badges or plates.
Two tutorials (chapter 2 tutorial 5, chapter 4 tutorial 4) had nothing of
that kind and collapse entirely. Short notes at second and later figure
sites are untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPCvGNHahZqynPyEfMijsb
Notebooks are generated, never hand-edited: 12 twins regenerated from
their scripts with ../PyAutoHands/autohands/generate.py howtolens.
llms-full.txt and workspace_index.json were rewritten unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPCvGNHahZqynPyEfMijsb
The first-figure blocks were collapsed to the canonical two paragraphs in
the previous commit; the notes at second and third figure sites still
described how the figure renders a model rather than the model.

Every such note is rewritten, not deleted: clauses whose subject is a
pill, plate, badge, card, footer count or "the map" / "the legend" are
dropped, and every statement of fact about the model, and every sentence
teaching the tutorial's own science or method, is kept and reworded to
stand on its own. 8 notes across 7 tutorials.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPCvGNHahZqynPyEfMijsb
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 14, 2026
@Jammy2211
Jammy2211 merged commit 19d050f into main Sep 14, 2026
7 checks passed
@Jammy2211
Jammy2211 deleted the feature/model-figure-prose-lens branch September 14, 2026 22:33
@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