Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ for the chapter 1 tutorials listed with a `markdown` link below; every other tut
- **[Chapter 1: Introduction](scripts/chapter_1_introduction/README.md)** — Grids, light and mass profiles, galaxies, ray-tracing, point sources, the lensing formalism, data, and fitting.
- Tutorial 0: Visualization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_0_visualization.md))
- Tutorial 1: Grids and Galaxies — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_1_grids_and_galaxies.md))
- Tutorial 2: Ray Tracing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_2_ray_tracing.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_2_ray_tracing.md))
- Tutorial 3: More Ray Tracing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_3_more_ray_tracing.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_3_more_ray_tracing.md))
- Tutorial 2: Ray Tracing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_2_ray_tracing.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_2_ray_tracing.md))
- Tutorial 3: More Ray Tracing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_3_more_ray_tracing.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_3_more_ray_tracing.md))
- Tutorial 4: Point Sources — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_4_point_sources.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_4_point_sources.md))
- Tutorial 5: Lensing Formalism — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_5_lensing_formalism.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_5_lensing_formalism.md))
- Tutorial 6: Data — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_6_data.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_6_data.md))
- Tutorial 7: Fitting — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_7_fitting.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_7_fitting.md))
- Tutorial 8: Summary — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_8_summary.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_8_summary.md))
- Tutorial 5: Data — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_5_data.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_5_data.md))
- Tutorial 6: Fitting — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_6_fitting.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_6_fitting.md))
- Tutorial 7: Summary — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_7_summary.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_7_summary.md))
- **[Chapter 2: Lens Modeling](scripts/chapter_2_lens_modeling/README.md)** — Bayesian inference, non-linear searches, lens modeling, search chaining, prior passing, and SLaM pipelines.
- Tutorial 1: Non-linear Search — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_2_lens_modeling/tutorial_1_non_linear_search.ipynb))
- Tutorial 2: Practicalities — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_2_lens_modeling/tutorial_2_practicalities.ipynb))
Expand Down
8 changes: 3 additions & 5 deletions config/build/markdown_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_4_point_sources.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_5_lensing_formalism.py
- script: scripts/chapter_1_introduction/tutorial_5_data.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_6_data.py
- script: scripts/chapter_1_introduction/tutorial_6_fitting.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_7_fitting.py
max_minutes: 30
- script: scripts/chapter_1_introduction/tutorial_8_summary.py
- script: scripts/chapter_1_introduction/tutorial_7_summary.py
max_minutes: 30
14 changes: 6 additions & 8 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate.
- [HowToLens: Introduction](scripts/chapter_1_introduction/tutorial_1_grids_and_galaxies.py): A distant galaxy can appear as multiple images, stretched arcs or a ring when its light passes a sufficiently well-aligned foreground galaxy. The foreground galaxy’s gravity deflects the light, allowing it to reach us along different paths. This is strong gravitational lensing.
- Contents: Grids, Geometry, Light Profiles, One Dimension Projection, Galaxies, Units, Wrap Up, Advanced Topics, Other Unit Conversion, Over Sampling
- [Tutorial 2: Ray Tracing](scripts/chapter_1_introduction/tutorial_2_ray_tracing.py): Strong gravitational lensing occurs when the mass of a foreground galaxy curves space-time, bending the paths of light rays from a background source galaxy. The source can then appear as arcs, a ring or multiple images.
- Contents: Grid, Mass Profiles, Ray Tracing Grids, Mappings, Ray Tracing Images, Galaxies, Tracer, Wrap Up, Env
- [Tutorial 3: More Ray Tracing](scripts/chapter_1_introduction/tutorial_3_more_ray_tracing.py): We'll now reinforce the ideas that we learnt about ray-tracing in the previous tutorial and introduce the following new concepts:
- Contents: Initial Setup, Concise Code, Critical Curves, Caustics, Units, More Complexity, Multi Galaxy Ray Tracing, Wrap Up
- Contents: Grid, Mass Profiles, Ray Tracing Grids, Mappings, Ray Tracing Images, Galaxies, Tracer, Units, More Complexity, Multi Galaxy Ray Tracing, Wrap Up, Env
- [Tutorial 3: More Ray Tracing](scripts/chapter_1_introduction/tutorial_3_more_ray_tracing.py): In tutorial 2, we used the lens equation to trace coordinates from the image plane to the source plane and build an image of a strong lens.
- Contents: Initial Setup, Concise Code, Cosmological Distances, Convergence, Deflection Angles, The Lensing Potential, Shear and Magnification, Critical Curves and Caustics, Einstein Radius, Time Delays, Wrap Up, Env
- [Tutorial 4: Point Sources](scripts/chapter_1_introduction/tutorial_4_point_sources.py): In the previous tutorials, the background sources we lensed were galaxies: extended objects whose light spreads over many thousands of light years. When lensed, their light is warped into the arcs and Einstein rings we produced with the `Tracer`, spread across many pixels of the image.
- Contents: Initial Setup, Point Sources, Point Source Tracer, The Lens Equation, Point Solver, Multiple Images and Critical Curves, Magnifications, Time Delays, Extended Versus Point Computations, Wrap Up
- [Tutorial 5: Lensing Formalism](scripts/chapter_1_introduction/tutorial_5_lensing_formalism.py): This tutorial is the equations lecture of **HowToLens**.
- Contents: Initial Setup, Cosmological Distances, The Lens Equation, Convergence, Deflection Angles, The Lensing Potential, Shear and Magnification, Critical Curves and Caustics, Einstein Radius, Time Delays, Wrap Up
- [Tutorial 6: Data](scripts/chapter_1_introduction/tutorial_6_data.py): In the last tutorials, we use tracers to create images of strong lenses. However, those images don't accurately represent what we would observe through a telescope.
- [Tutorial 5: Data](scripts/chapter_1_introduction/tutorial_5_data.py): In the last tutorials, we use tracers to create images of strong lenses. However, those images don't accurately represent what we would observe through a telescope.
- Contents: Initial Setup, Optics Blurring, Poisson Noise, Background Sky, Simulator, Output, Interferometer Data, Weak Lensing Data, Wrap Up
- [Tutorial 7: Fitting](scripts/chapter_1_introduction/tutorial_7_fitting.py): In previous tutorials, we used light profiles to create simulated images of a tracer and visualized how these images would appear when captured by a CCD detector on a telescope like the Hubble Space Telescope.
- [Tutorial 6: Fitting](scripts/chapter_1_introduction/tutorial_6_fitting.py): In previous tutorials, we used light profiles to create simulated images of a tracer and visualized how these images would appear when captured by a CCD detector on a telescope like the Hubble Space Telescope.
- Contents: Dataset, Dataset Auto-Simulation, Mask, Masked Grid, Fitting, Incorrect Fit, Model Fitting, Wrap Up
- [Tutorial 8: Summary](scripts/chapter_1_introduction/tutorial_8_summary.py): In this chapter, we have learnt that:
- [Tutorial 7: Summary](scripts/chapter_1_introduction/tutorial_7_summary.py): In this chapter, we have learnt that:
- Contents: Start, Object Composition, Visualization, Code Design, Source Code, Wrap Up

## chapter_2_lens_modeling
Expand Down
4 changes: 2 additions & 2 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ analysis?" below).
## I want to understand…

- **What is a strong lens / how does ray tracing work?** → [scripts/chapter_1_introduction/tutorial_2_ray_tracing.py](scripts/chapter_1_introduction/tutorial_2_ray_tracing.py): Mass profiles deflecting light; image-plane vs source-plane.
- **How does a telescope image (and noise/PSF) get simulated?** → [scripts/chapter_1_introduction/tutorial_6_data.py](scripts/chapter_1_introduction/tutorial_6_data.py): Optics blurring, Poisson noise, background sky, the simulator API.
- **What does "fitting" a lens actually mean?** → [scripts/chapter_1_introduction/tutorial_7_fitting.py](scripts/chapter_1_introduction/tutorial_7_fitting.py): Masking, model images, residuals and the log likelihood.
- **How does a telescope image (and noise/PSF) get simulated?** → [scripts/chapter_1_introduction/tutorial_5_data.py](scripts/chapter_1_introduction/tutorial_5_data.py): Optics blurring, Poisson noise, background sky, the simulator API.
- **What does "fitting" a lens actually mean?** → [scripts/chapter_1_introduction/tutorial_6_fitting.py](scripts/chapter_1_introduction/tutorial_6_fitting.py): Masking, model images, residuals and the log likelihood.
- **How does a non-linear search find a model?** → [scripts/chapter_2_lens_modeling/tutorial_1_non_linear_search.py](scripts/chapter_2_lens_modeling/tutorial_1_non_linear_search.py): Parameter space, priors, nested sampling with Nautilus.
- **My fit found a wrong (local-maxima) solution — what do I do?** → [scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py](scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py): Prior tuning, simplifying the model, and other escapes from local maxima.
- **What are linear light profiles / MGE?** → [scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py](scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py): Solving intensities linearly; the Multi-Gaussian Expansion basis.
Expand Down
7 changes: 3 additions & 4 deletions markdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ Every page below is the corresponding example script **fully executed**, rendere
- [Tutorial 2: Ray Tracing](chapter_1_introduction/tutorial_2_ray_tracing.md) — from `scripts/chapter_1_introduction/tutorial_2_ray_tracing.py`
- [Tutorial 3: More Ray Tracing](chapter_1_introduction/tutorial_3_more_ray_tracing.md) — from `scripts/chapter_1_introduction/tutorial_3_more_ray_tracing.py`
- [Tutorial 4: Point Sources](chapter_1_introduction/tutorial_4_point_sources.md) — from `scripts/chapter_1_introduction/tutorial_4_point_sources.py`
- [Tutorial 5: Lensing Formalism](chapter_1_introduction/tutorial_5_lensing_formalism.md) — from `scripts/chapter_1_introduction/tutorial_5_lensing_formalism.py`
- [Tutorial 6: Data](chapter_1_introduction/tutorial_6_data.md) — from `scripts/chapter_1_introduction/tutorial_6_data.py`
- [Tutorial 7: Fitting](chapter_1_introduction/tutorial_7_fitting.md) — from `scripts/chapter_1_introduction/tutorial_7_fitting.py`
- [Tutorial 8: Summary](chapter_1_introduction/tutorial_8_summary.md) — from `scripts/chapter_1_introduction/tutorial_8_summary.py`
- [Tutorial 5: Data](chapter_1_introduction/tutorial_5_data.md) — from `scripts/chapter_1_introduction/tutorial_5_data.py`
- [Tutorial 6: Fitting](chapter_1_introduction/tutorial_6_fitting.md) — from `scripts/chapter_1_introduction/tutorial_6_fitting.py`
- [Tutorial 7: Summary](chapter_1_introduction/tutorial_7_summary.md) — from `scripts/chapter_1_introduction/tutorial_7_summary.py`

These pages are regenerated manually by PyAutoHands's `generate_markdown.py` when a curated script changes.
Loading
Loading