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
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ they are concise and assume the concepts taught in **HowToLens** as background.
- `chapter_2_lens_modeling` — Bayesian inference, non-linear searches, and how to fit a lens model to CCD
imaging data with **PyAutoLens**, ending with search chaining and automated pipelines.
- `chapter_3_pixelizations` — Pixelized source reconstructions (inversions) for sources with irregular
morphologies, including the Bayesian formalism underpinning them.
morphologies, with practical explanations of mappings, regularization and model fitting.
- `chapter_4_scaling_up_lensing` — Scaling lens modeling up beyond a single lens galaxy: extra galaxies,
multi-galaxy lenses, scaling relations, group and cluster scales, and weak lensing.
- `chapter_optional` — Optional tutorials on alternative non-linear searches and other advanced topics.
Expand Down Expand Up @@ -100,19 +100,14 @@ for the chapter 1 tutorials listed with a `markdown` link below; every other tut
- Tutorial 9: Search Chaining — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_2_lens_modeling/tutorial_9_search_chaining.ipynb))
- Tutorial 10: Prior Passing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_2_lens_modeling/tutorial_10_prior_passing.ipynb))
- Tutorial 11: SLaM — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_2_lens_modeling/tutorial_11_slam.ipynb))
- **[Chapter 3: Pixelizations](scripts/chapter_3_pixelizations/README.md)** — Pixelized source reconstructions, inversions, the Bayesian formalism, and adaptive pixelizations and regularization.
- Tutorial 1: Pixelizations — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb))
- Tutorial 2: Mappers — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb))
- Tutorial 3: Inversions — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb))
- Tutorial 4: Bayesian Regularization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb))
- Tutorial 5: Bayesian Formalism — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb))
- Tutorial 6: Borders — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb))
- Tutorial 7: Lens Modeling — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb))
- Tutorial 8: Adaptive Pixelization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb))
- Tutorial 9: Model Fit — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb))
- Tutorial 10: Fit Problems — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb))
- Tutorial 11: Brightness Adaption — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb))
- Tutorial 12: Adaptive Regularization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb))
- **[Chapter 3: Pixelizations](scripts/chapter_3_pixelizations/README.md)** — From MGE to pixelized sources: mappings, inversions, Bayesian regularization, borders and chained lens fits.
- Tutorial 1 Pixelizations — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb))
- Tutorial 2 Bayesian Regularization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb))
- Tutorial 3 Borders — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb))
- Tutorial 4 Lens Modeling — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb))
- Tutorial 8 Adaptive Pixelization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb))
- Tutorial 11 Brightness Adaption — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb))
- Tutorial 12 Adaptive Regularization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb))
- **[Chapter 4: Scaling Up Lensing](scripts/chapter_4_scaling_up_lensing/README.md)** — Extra galaxies, multi-galaxy lenses, scaling relations, group and cluster scales, and weak lensing.
- Tutorial 1: Extra Galaxies — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.ipynb))
- Tutorial 2: Multi Galaxy — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.ipynb))
Expand Down
27 changes: 9 additions & 18 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,20 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate.

## chapter_3_pixelizations

- [Tutorial 10: Fit Problems](scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py): To begin, make sure you have read tutorials 4 and 5 carefully, as a clear understanding of how the Bayesian evidence works is key to understanding the adaption tutorials that close this chapter!
- Contents: Initial Setup, Mask, Simulator, Fitting, Fit Problems, Discussion, Wrap Up
- [Tutorial 11: Brightness Adaption](scripts/chapter_3_pixelizations/tutorial_11_brightness_adaption.py): In the previous tutorial we motivated our need to adapt the pixelization to the source's morphology, such that source pixels congregates in the source's brightest regions regardless of where the source is located in the source-plane.
- Contents: Initial Setup, Adapt Image, Adaption, Hilbert, Weight Map, Wrap Up
- [Tutorial 12: Adaptive Regularization](scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py): In tutorial 10, we discussed why the `Constant` regularization scheme was sub-optimal. Different regions of the source demand different levels of regularization, motivating a regularization scheme which adapts to the reconstructed source's surface brightness.
- [Tutorial 12: Adaptive Regularization](scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py): Tutorial 2 introduced `Constant` regularization. Different regions of the source can favour different levels of regularization, motivating a scheme which adapts to the reconstructed source's surface brightness.
- Contents: Initial Setup, Convenience Function, Adaptive Regularization, Wrap Up
- [Tutorial 1: Pixelizations](scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py): In the previous chapters, we used light profiles to model the light of a strong lens's source galaxy, where the light profile was an analytic description of how the luminosity varies as a function of radius. In this chapter, we are instead going to reconstruct the source's light on a pixel-grid, and in this tutorial we will learn how to create a source-plane pixelization.
- Contents: Initial Setup, Mesh, Wrap Up
- [Tutorial 2: Mappers](scripts/chapter_3_pixelizations/tutorial_2_mappers.py): In the previous tutorial, we used a pixelization to create a `Mapper`. However, it was not clear what a `Mapper` does, why it was called a mapper and whether it was mapping anything at all!
- Contents: Initial Setup, Mappers, Mask, Wrap Up
- [Tutorial 3: Inversions](scripts/chapter_3_pixelizations/tutorial_3_inversions.py): In the previous two tutorials, we introduced:
- Contents: Initial Setup, Pixelization, Positive Only Solver, Wrap Up, Detailed Explanation
- [Tutorial 4: Bayesian Regularization](scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py): So far, we have:
- Contents: Initial Setup, Convenience Function, Pixelization, Regularization, Bayesian Evidence, Detailed Description
- [Tutorial 5: Bayesian Formalism](scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py): In tutorials 1 to 4, we built an intuition for how pixelized source reconstruction works: pixelizations place a pixel-grid in the source-plane, mappers pair source-pixels with image-pixels, inversions solve for the source-pixel fluxes that best fit the data, and regularization smooths the solution within a Bayesian framework.
- Contents: Initial Setup, Mesh Shape, Ray Tracing, Border Relocation, Source Pixel Centres, Interpolation, Mapper, Mapping Matrix, Blurred Mapping Matrix, Data Vector, Curvature Matrix, Unregularized Solve, Regularization Matrix, Source Reconstruction, Image Reconstruction, Likelihood Function, Chi Squared, Regularization Term, Complexity Terms, Noise Normalization Term, Log Evidence, Fit, Wrap Up
- [Tutorial 6: Borders](scripts/chapter_3_pixelizations/tutorial_6_borders.py): In the previous tutorials, the source-plane pixel grid perfectly mapped over the traced image-pixel $(y,x)$ coordinates in the source plane. If these pixels mapped to a larger area in the source plane, its pixel-grid would automatically increase its size so as to cover every source-plane coordinate.
- Contents: Initial Setup, Borders, Wrap Up
- [Tutorial 7: Lens Modeling](scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py): When modeling complex sources with parametric profiles, we quickly entered a regime where our non-linear search was faced with a parameter space of dimensionality N=20+ parameters. This made the model-fitting inefficient and likely to infer a local maxima.
- Contents: Initial Setup, Unphysical Solutions, Brief Description, Light Profiles, Wrap Up
- [Tutorial 1: Pixelizations, Mappers and Inversions](scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py): (no summary in script docstring)
- Contents: Opening — Pixelized source reconstruction, A complex source, Why a simple source model falls short, A grid for the source light, Following the same image pixels into the source plane, Where a traced image pixel meets the source mesh, One source region, several image regions, Reconstructing the source, A first look at regularization, From source indexes to reconstructed brightnesses, Turning the reconstructed source back into an image, Inspecting the reconstruction, Changing the source resolution, Wrap up
- [Tutorial 2: Bayesian Regularization](scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py): (no summary in script docstring)
- Contents: Interpolation and Bayesian regularization, Interpolation and our starting reconstruction, Reducing regularization, Increasing regularization, Bayesian evidence, Exploring the regularization coefficient, Inspecting the preferred reconstruction, What is linear, and what requires a search?, Mesh resolution and regularization belong together, What we have learned, and what comes next
- [Tutorial 3: Borders](scripts/chapter_3_pixelizations/tutorial_3_borders.py): (no summary in script docstring)
- Contents: Why the extent of the source mesh matters, What we mean by a border, Starting without border relocation, Including the central image pixels, Following the central pixels into the source plane, Tracing the outer border, Switching border relocation on, What relocation changes—and what it does not, The mask still needs to cover the lensed source, Wrap up
- [Tutorial 4: Lens Modeling](scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py): (no summary in script docstring)
- Contents: Lens modelling with a pixelized source, Giving the inversion an incorrect mass model, Comparing with the correct mass model, Seeing how the mass model changes the mappings, Why evidence does not remove the search difficulty, Starting with a simpler source model, Running and inspecting the initial search, Requiring corresponding images to trace together, Replacing the analytic source with a pixelization, Running the pixelized-source search, Establishing the foreground light model, Using that result in the pixelized-source fit
- [Tutorial 8: Adaptive Pixelization](scripts/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.py): In this tutorial we will introduce a new `Pixelization` object, which uses an `Overlay` image-mesh and a `Delaunay` mesh.
- Contents: Initial Setup, Advantages and Disadvantages, Image Mesh, Regularization, Wrap Up
- [Tutorial 9: Model-Fit](scripts/chapter_3_pixelizations/tutorial_9_model_fit.py): You should now perform lens modeling using a pixelization, which is described fully in the example:

## chapter_4_scaling_up_lensing

Expand Down
2 changes: 1 addition & 1 deletion llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ analysis?" below).
- **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.
- **How do I chain searches / what is SLaM?** → [scripts/chapter_2_lens_modeling/tutorial_9_search_chaining.py](scripts/chapter_2_lens_modeling/tutorial_9_search_chaining.py) then [scripts/chapter_2_lens_modeling/tutorial_11_slam.py](scripts/chapter_2_lens_modeling/tutorial_11_slam.py).
- **How do I reconstruct a complex source on a pixel grid?** → [scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py](scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py) through [tutorial_4_bayesian_regularization.py](scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py).
- **How do I reconstruct a complex source on a pixel grid?** → [scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py](scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py) through [tutorial_2_bayesian_regularization.py](scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py).
- **How do I model lenses with many galaxies, groups, clusters or weak lensing?** → [scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py](scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py) through [tutorial_6_weak_lensing.py](scripts/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.py).

## Ready for real analysis?
Expand Down
Loading
Loading