From cc6b8277df021c052e57f6d9d7887f866fd9774f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 31 Oct 2026 17:05:51 +0000 Subject: [PATCH] docs: consolidate reviewed Chapter 3 pixelization lessons --- README.md | 23 +- llms-full.txt | 27 +- llms.txt | 2 +- notebooks/chapter_3_pixelizations/README.md | 35 +- .../tutorial_10_fit_problems.ipynb | 514 -------- .../tutorial_12_adaptive_regularization.ipynb | 5 +- .../tutorial_1_pixelizations.ipynb | 521 +++++++-- .../tutorial_2_bayesian_regularization.ipynb | 781 +++++++++++++ .../tutorial_2_mappers.ipynb | 605 ---------- .../tutorial_3_borders.ipynb | 785 +++++++++++++ .../tutorial_3_inversions.ipynb | 615 ---------- .../tutorial_4_bayesian_regularization.ipynb | 540 --------- .../tutorial_4_lens_modeling.ipynb | 1038 +++++++++++++++++ .../tutorial_5_bayesian_formalism.ipynb | 1023 ---------------- .../tutorial_6_borders.ipynb | 788 ------------- .../tutorial_7_lens_modeling.ipynb | 515 -------- .../tutorial_8_adaptive_pixelization.ipynb | 4 +- .../tutorial_9_model_fit.ipynb | 101 -- scripts/chapter_3_pixelizations/README.md | 35 +- .../images/maresca_fig1.png | Bin 0 -> 294534 bytes scripts/chapter_3_pixelizations/introduction | 41 +- .../tutorial_10_fit_problems.py | 329 ------ .../tutorial_12_adaptive_regularization.py | 5 +- .../tutorial_1_pixelizations.py | 495 ++++++-- .../tutorial_2_bayesian_regularization.py | 557 +++++++++ .../tutorial_2_mappers.py | 342 ------ .../tutorial_3_borders.py | 561 +++++++++ .../tutorial_3_inversions.py | 351 ------ .../tutorial_4_bayesian_regularization.py | 343 ------ .../tutorial_4_lens_modeling.py | 803 +++++++++++++ .../tutorial_5_bayesian_formalism.py | 649 ----------- .../tutorial_6_borders.py | 515 -------- .../tutorial_7_lens_modeling.py | 318 ----- .../tutorial_8_adaptive_pixelization.py | 4 +- .../tutorial_9_model_fit.py | 15 - workspace_index.json | 188 ++- 36 files changed, 5488 insertions(+), 7985 deletions(-) delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb create mode 100644 notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb create mode 100644 notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb create mode 100644 notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb delete mode 100644 notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb create mode 100755 scripts/chapter_3_pixelizations/images/maresca_fig1.png delete mode 100644 scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py create mode 100644 scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_2_mappers.py create mode 100644 scripts/chapter_3_pixelizations/tutorial_3_borders.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_3_inversions.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py create mode 100644 scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_6_borders.py delete mode 100644 scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py delete mode 100755 scripts/chapter_3_pixelizations/tutorial_9_model_fit.py diff --git a/README.md b/README.md index 0ad1d26..fec1e1f 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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)) diff --git a/llms-full.txt b/llms-full.txt index d1c2ff4..29df721 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -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 diff --git a/llms.txt b/llms.txt index bafe3fa..2ab4a0f 100644 --- a/llms.txt +++ b/llms.txt @@ -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? diff --git a/notebooks/chapter_3_pixelizations/README.md b/notebooks/chapter_3_pixelizations/README.md index e184ada..4cd4c8b 100644 --- a/notebooks/chapter_3_pixelizations/README.md +++ b/notebooks/chapter_3_pixelizations/README.md @@ -1,29 +1,28 @@ -In chapter 3, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. +Look at a resolved lensed arc. Its broad shape may be smooth, but the light along it can contain bright knots, faint extensions and irregular structure. A model might reproduce the overall arc while leaving compact, coherent features in the residual image. -**Colab** links to every tutorial are included. +In Chapter 2, we introduced linear light profiles and multi-Gaussian expansions (MGEs). By combining Gaussians of different widths, an MGE can describe a much more flexible radial brightness distribution than a single Sérsic profile. Gaussian groups with different ellipticities and orientations can also describe changes in flattening and isophotal twists. Fixed widths and linearly solved intensities keep the number of non-linear parameters manageable. -# Files +That flexibility makes MGE a useful modelling tool, but consider the geometry of our worked example. Within each galaxy’s Gaussian group, the components shared a common centre and elliptical shape. Adding more Gaussians gives us finer control over how brightness changes around that centre. It does not give us separate centres for star-forming knots, off-centre clumps or several distinct source components. -- [Tutorial 1: Pixelizations](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb) — Creating a pixel-grid in the source-plane. +We could add offset Gaussian groups. MGEs are not fundamentally restricted to one centre. The practical difficulty is deciding how many groups to use, where to place them and how to fit their geometry as the source becomes more complicated. -- [Tutorial 2: Mappers](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb) — How a pixelization maps source-pixels to image-pixels. +This is where the image residuals become useful. If an MGE captures the broad light distribution but leaves compact structure along the arcs, its source description may need more spatial freedom. Those residuals are not proof of source clumpiness: errors in the mass model, foreground light subtraction, telescope blurring or other aspects of the data treatment can also produce structure. We need to investigate their origin. -- [Tutorial 3: Inversions](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb) — Inverting the mappings to reconstruct the source's light. +In this chapter, we introduce pixelized source reconstruction. Instead of prescribing a light-profile centre and shape for every feature, we describe the source brightness on a mesh. Different regions of that mesh can take different brightness values, allowing the reconstruction to represent more complicated source structure. -- [Tutorial 4: Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb) — Smoothing the source within a Bayesian framework. +The connection to Chapter 2 is direct. There, we solved for Gaussian intensities linearly. Here, for a specified mass model and mesh, we solve for source brightness values using the same underlying advantage: they enter the predicted image linearly. -- [Tutorial 5: Bayesian Formalism](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb) — The linear algebra and Bayesian evidence equations behind pixelized source reconstruction. +This additional freedom also allows the reconstruction to fit noise. We therefore introduce regularization—a prior that controls how freely neighbouring source brightnesses can vary. Pixelization is not assumption-free: the mass model, mesh geometry, resolution and regularization all affect the inferred source. -- [Tutorial 6: Borders](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb) — Preventing highly demagnified image-pixels ruining the inversion. +MGE remains valuable, especially for foreground lens light and initial source fits. Pixelization is the next tool when the source requires more spatial freedom. We will learn how to use these tools together, inspect their reconstructions and recognise when their assumptions need revisiting. -- [Tutorial 7: Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb) — How to use inversions to fit a lens model. +- [Pixelizations, Mappers and Inversions](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb) +- [Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb) +- [Borders](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb) +- [Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb) -- [Tutorial 8: Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb) — A Delaunay mesh which adapts to the mass model's magnification. +The following tutorials explore adaptive meshes and regularization: -- [Tutorial 9: Model Fit](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb) — An example lens modeling pipeline which uses an inversion. - -- [Tutorial 10: Fit Problems](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb) — The shortcomings of our lens models and inversions. - -- [Tutorial 11: Brightness Adaption](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb) — Adapting the pixelization to the source's morphology. - -- [Tutorial 12: Adaptive Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb) — Adapting the regularization to the source's morphology. +- [Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb) +- [Brightness Adaption](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb) +- [Adaptive Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb) diff --git a/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb b/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb deleted file mode 100644 index d21612e..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb +++ /dev/null @@ -1,514 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 10: Fit Problems\n", - "=========================\n", - "\n", - "To begin, make sure you have read tutorials 4 and 5 carefully, as a clear understanding of how the Bayesian\n", - "evidence works is key to understanding the adaption tutorials that close this chapter!\n", - "\n", - "Earlier in this chapter (tutorial 8) we investigated two pixelizations: the `RectangularBilinearAdaptDensity` mesh and the\n", - "`Delaunay` mesh with an `Overlay` image-mesh. We argued that the latter was better than the former, because it\n", - "dedicated more source-pixels to the regions of the source-plane where we had more data, e.g. the high-magnification\n", - "regions. Therefore, we could fit the data using fewer source pixels, which improved computational efficiency and\n", - "increased the Bayesian evidence.\n", - "\n", - "So far, we've used just one regularization scheme; `Constant`. As the name suggests, this scheme applies just one\n", - "regularization coefficient when comparing source pixel fluxes to apply smoothing. Here is a recap of our discussion\n", - "about regularization from tutorial 4:\n", - "\n", - "--------------------------------------------\n", - "\n", - "When the inversion reconstructs the source, it does not *only* compute the set of source-pixel fluxes that best-fit\n", - "the image. It also regularizes this solution, whereby it goes to every pixel on the rectangular source-plane grid\n", - "and computes the different between the reconstructed flux values of every source pixel with its 4 neighboring pixels.\n", - "If the difference in flux is large the solution is penalized, reducing its log likelihood. You can think of this as\n", - "us applying a 'smoothness prior' on the reconstructed source galaxy's light.\n", - "\n", - "This smoothing adds a 'penalty term' to the log likelihood of an inversion which is the summed difference between the\n", - "reconstructed fluxes of every source-pixel pair multiplied by the `coefficient`. By setting the regularization\n", - "coefficient to zero, we set this penalty term to zero, meaning that regularization is completely omitted.\n", - "\n", - "Why do we need to regularize our solution? We just saw why, if we do not apply this smoothness prior to the source, we\n", - "`over-fit` the image and reconstruct a noisy source with lots of extraneous features. This is what the large flux\n", - "values located at the exterior regions of the source reconstruction above are. If the inversions's sole aim is to\n", - "maximize the log likelihood, it can do this by fitting *everything* accurately, including the noise.\n", - "\n", - "----------------------------------------------\n", - "\n", - "When using a `Constant` regularization scheme, we regularize the source by adding up the difference in fluxes\n", - "between all source-pixels multiplied by one single value of the regularization coefficient. This means that every\n", - "single source pixel receives the same `level` of regularization, regardless of whether it is reconstructing the\n", - "bright central regions of the source or its faint exterior regions.\n", - "\n", - "In this tutorial, we'll learn why our magnification-based pixelization and constant regularization schemes are not\n", - "optimal. We'll inspect fits to three strong lenses, simulated using the same mass profile but with different\n", - "sources whose light profiles become gradually more compact. For all 3 fits, we'll use the same source-plane resolution\n", - "and a regularization_coefficient that maximize the Bayesian evidence. Thus, these are the `best` source reconstructions\n", - "we can hope to achieve when adapting to the magnification.\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** we'll use 3 sources whose `effective_radius` and `sersic_index` are changed such that each is more.\n", - "- **Mask:** Define the 2D mask applied to the dataset for the model-fit.\n", - "- **Simulator:** Now, lets simulate all 3 of our source's as to create `Imaging` data.\n", - "- **Fitting:** Fit the lens model to the dataset and inspect the results.\n", - "- **Fit Problems:** Lets fit our first source which was simulated using the flattest light profile.\n", - "- **Discussion:** Okay, so what did we learn?\n", - "- **Wrap Up:** Summary of the script and next steps." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use 3 sources whose `effective_radius` and `sersic_index` are changed such that each is more compact that the last." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "source_galaxy_flat = al.Galaxy(\n", - " redshift=1.0,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 0.0),\n", - " ell_comps=(0.0, 0.15),\n", - " intensity=0.2,\n", - " effective_radius=0.5,\n", - " sersic_index=1.0,\n", - " ),\n", - ")\n", - "\n", - "source_galaxy_compact = al.Galaxy(\n", - " redshift=1.0,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 0.0),\n", - " ell_comps=(0.0, 0.15),\n", - " intensity=0.2,\n", - " effective_radius=0.2,\n", - " sersic_index=2.5,\n", - " ),\n", - ")\n", - "\n", - "source_galaxy_super_compact = al.Galaxy(\n", - " redshift=1.0,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 0.0),\n", - " ell_comps=(0.0, 0.15),\n", - " intensity=0.2,\n", - " effective_radius=0.1,\n", - " sersic_index=4.0,\n", - " ),\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The function below uses each source galaxy to simulate imaging data. It performs the usual tasks we are used to \n", - "seeing (make the PSF, galaxies, tracer, etc.)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def simulate_for_source_galaxy(source_galaxy):\n", - " grid = al.Grid2D.uniform(shape_native=(150, 150), pixel_scales=0.05)\n", - "\n", - " psf = al.Convolver.from_gaussian(\n", - " shape_native=(11, 11), sigma=0.05, pixel_scales=0.05\n", - " )\n", - "\n", - " lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0), ell_comps=(0.111111, 0.0), einstein_radius=1.6\n", - " ),\n", - " )\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])\n", - "\n", - " simulator = al.SimulatorImaging(\n", - " exposure_time=300.0,\n", - " psf=psf,\n", - " background_sky_level=100.0,\n", - " add_poisson_noise_to_data=True,\n", - " noise_seed=1,\n", - " )\n", - "\n", - " return simulator.via_tracer_from(tracer=tracer, grid=grid)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mask__\n", - "\n", - "we'll use a 3.0\" mask to fit all three of our sources." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular(shape_native=(150, 150), pixel_scales=0.05, radius=3.0)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Simulator__\n", - "\n", - "Now, lets simulate all 3 of our source's as to create `Imaging` data." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_source_flat = simulate_for_source_galaxy(source_galaxy=source_galaxy_flat)\n", - "\n", - "dataset_source_compact = simulate_for_source_galaxy(source_galaxy=source_galaxy_compact)\n", - "\n", - "dataset_source_super_compact = simulate_for_source_galaxy(\n", - " source_galaxy=source_galaxy_super_compact\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Fitting__\n", - "\n", - "we'll make one more convenience function which fits the simulated imaging data with a\n", - "`RectangularBilinearAdaptDensity` mesh and `Constant` regularization scheme pixelization.\n", - "\n", - "We'll input the `coefficient` of each fit, so that for each simulated source we regularize it at an appropriate level. \n", - "There is nothing new in this function you haven't seen before." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def fit_with_Rectangular_from(dataset, mask, coefficient):\n", - " dataset = dataset.apply_mask(mask=mask)\n", - "\n", - " lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0), ell_comps=(0.111111, 0.0), einstein_radius=1.6\n", - " ),\n", - " )\n", - "\n", - " pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(24, 24)),\n", - " regularization=al.reg.Constant(coefficient=coefficient),\n", - " )\n", - "\n", - " source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])\n", - "\n", - " return al.FitImaging(dataset=dataset, tracer=tracer)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Fit Problems__\n", - "\n", - "Lets fit our first source which was simulated using the flattest light profile. One should note that this uses the \n", - "highest regularization coefficient of our 3 fits (as determined by maximizing the Bayesian log evidence)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit_flat = fit_with_Rectangular_from(\n", - " dataset=dataset_source_flat, mask=mask, coefficient=9.2\n", - ")\n", - "\n", - "mapper = fit_flat.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit_flat)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit_flat)\n", - "\n", - "\n", - "print(fit_flat.log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The fit was *excellent*. There were effectively no residuals in the fit, and the source has been reconstructed using \n", - "lots of pixels! Nice!\n", - "\n", - "Now, lets fit the next source, which is more compact." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit_compact = fit_with_Rectangular_from(\n", - " dataset=dataset_source_compact, mask=mask, coefficient=3.3\n", - ")\n", - "\n", - "mapper = fit_compact.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit_compact)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit_compact)\n", - "\n", - "print(fit_compact.log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The fit does not look so good! \n", - "\n", - "It reconstructs most of the lensed source's structure, but there are two clear blobs in the residual map where \n", - "the fit is failing to reconstruct the central regions of the source galaxy.\n", - "\n", - "Take a second to think about why this might be. Is it the mesh or how the regularization is applying smoothing?\n", - "\n", - "Finally, lets fit the very compact source. Given that the results for the compact source did not look good, you are \n", - "right in thinking this is going to make things even worse. Again, think about why this might be." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit_super_compact = fit_with_Rectangular_from(\n", - " dataset=dataset_source_super_compact, mask=mask, coefficient=3.1\n", - ")\n", - "\n", - "mapper = fit_super_compact.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit_super_compact)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit_super_compact)\n", - "\n", - "print(fit_super_compact.log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Discussion__\n", - "\n", - "Okay, so what did we learn? The more compact our source, the worse the fit. This happens even though we are using the \n", - "correct lens mass model, telling us that something is going fundamentally wrong with our source reconstruction and \n", - "pixelization. Both the mesh and regularization are to blame!\n", - "\n", - "*Image-Mesh / Mesh*:\n", - "\n", - "The problem is the same one we discussed in tutorial 8, when we motivated pixelizations which adapt to where the\n", - "data constrains the source.\n", - "\n", - "We are simply not dedicating enough source-pixels to the central regions of the source reconstruction,\n", - "e.g. where it's brightest. As the source becomes more compact, the source reconstruction no longer has enough\n", - "resolution to resolve its fine-detailed central structure, causing the fit to the image to degrade.\n", - "\n", - "As we made our sources more compact we went from reconstructing them using ~100 source pixels, to ~20 source pixels\n", - "to ~10 source pixels.\n", - "\n", - "Adapting to the mass model magnification is not the best approach. As we simulated more compact sources the \n", - "magnification (which is determined via the mass model) does not change. We therefore reconstructed each source\n", - "using fewer and fewer pixels, leading to a worse and worse fit. \n", - "\n", - "Furthermore, the source galaxies above are located in the highest magnification regions of the source plane! If the \n", - "source's were further away from the caustic, the pixelization would use *even less* pixels to reconstruct them. \n", - "Clearly, we want to adapt to something else. \n", - "\n", - "**Regularization**:\n", - "\n", - "Regularization also causes problems. When using a `Constant` regularization scheme, we regularize the source by \n", - "adding up the difference in fluxes between all source-pixels multiplied by one single value, the regularization\n", - "coefficient. This means that, every single source pixel receives the same `level` of regularization, regardless of \n", - "whether it is reconstructing the bright central regions of the source or its faint exterior regions. \n", - "\n", - "To visualize this, we are going to plot the `regularization_weights`. \n", - "\n", - "The `aplt.subplot_fit_imaging` does not have a method that is able to plot this attribute of the `Inversion`. However, \n", - "the `aplt.subplot_fit_imaging` has its own `aplt.plot_array` which we can use to make this plot. The benefit of using this \n", - "is that it inherits from the `aplt.subplot_fit_imaging` properties like the caustics, so they appear on the figure (this \n", - "would not happen if we manually set up an `aplt.plot_array` as we did in previous tutorials." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "aplt.plot_array(\n", - " array=fit_super_compact.inversion.mapped_reconstructed_operated_data,\n", - " title=\"Inversion\",\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As you can see, all pixels are regularized with our single input regularization coefficient value.\n", - "\n", - "This is not the best approach to regularizing the source. In fact, different regions of the source prefer different \n", - "levels of regularization:\n", - "\n", - " 1) In the source's central regions its flux gradient is steepest; the change in flux between two source pixels is \n", - " much larger than in the exterior regions where the gradient is flatter (or there is no source flux at all). To \n", - " reconstruct the detailed structure of the source's cuspy inner regions, the regularization coefficient needs to \n", - " be much lower to avoid over-smoothing.\n", - "\n", - " 2) On the other hand, the source reconstruction wants to assume a high regularization coefficient further out \n", - " because the source's flux gradient is flat (or there is no source signal at all). Higher regularization coefficients \n", - " will increase the Bayesian evidence because by smoothing more source-pixels it makes the solution `simpler`, given \n", - " that correlating the flux in these source pixels the solution effectively uses fewer source-pixels (e.g. degrees of \n", - " freedom).\n", - "\n", - "This outlines the problem using a constant regularization scheme. Some parts of the reconstructed source demand a \n", - "low regularization coefficient whereas other parts want a high value. \n", - "\n", - "By using a single regularization coefficient, we infer an intermediate regularization coefficient that over-smooths \n", - "the source's central regions whilst failing to fully correlate exterior pixels. \n", - "\n", - "An adaptive regularization scheme, where the regularization coefficient varies from the outskirts to the central\n", - "regions, will produce solutions that further increase the Bayesian evidence.\n", - "\n", - "__Wrap Up__\n", - "\n", - "We have motivated an even more adaptive pixelization, where the mesh and regularization scheme adapt to the source's \n", - "unlensed morphology. \n", - "\n", - "The next two tutorials will show **PyAutoLens**'s adapt-model which enables this." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb b/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb index 20b62fe..1f88f0d 100644 --- a/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb +++ b/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb @@ -7,9 +7,8 @@ "Tutorial 12: Adaptive Regularization\n", "====================================\n", "\n", - "In tutorial 10, we discussed why the `Constant` regularization scheme was sub-optimal. Different regions of the source\n", - "demand different levels of regularization, motivating a regularization scheme which adapts to the reconstructed\n", - "source's surface brightness.\n", + "Tutorial 2 introduced `Constant` regularization. Different regions of the source can favour different levels of\n", + "regularization, motivating a scheme which adapts to the reconstructed source's surface brightness.\n", "\n", "This raises the same question as before, how do we adapt our regularization scheme to the source before we've\n", "reconstructed it? Just like in the last tutorial, we'll use a model image of a strongly lensed source from a previous\n", diff --git a/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb b/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb index 3507add..03b292f 100644 --- a/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb +++ b/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb @@ -4,19 +4,25 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Tutorial 1: Pixelizations\n", - "=========================\n", - "\n", - "In the previous chapters, we used light profiles to model the light of a strong lens's source galaxy, where the light\n", - "profile was an analytic description of how the luminosity varies as a function of radius. In this chapter, we are\n", - "instead going to reconstruct the source's light on a pixel-grid, and in this tutorial we will learn how to create\n", - "a source-plane pixelization.\n", + "Tutorial 1: Pixelizations, Mappers and Inversions\n", + "=================================================\n", "\n", "__Contents__\n", "\n", - "- **Initial Setup:** Lets setup a lensed source-plane grid, using a lens galaxy and tracer.\n", - "- **Mesh:** Next, lets set up a `Mesh` using the `mesh` module.\n", - "- **Wrap Up:** Summary of the script and next steps." + "- Opening \u2014 Pixelized source reconstruction\n", + "- A complex source\n", + "- Why a simple source model falls short\n", + "- A grid for the source light\n", + "- Following the same image pixels into the source plane\n", + "- Where a traced image pixel meets the source mesh\n", + "- One source region, several image regions\n", + "- Reconstructing the source\n", + "- A first look at regularization\n", + "- From source indexes to reconstructed brightnesses\n", + "- Turning the reconstructed source back into an image\n", + "- Inspecting the reconstruction\n", + "- Changing the source resolution\n", + "- Wrap up" ] }, { @@ -58,55 +64,99 @@ ] }, { - "cell_type": "code", + "cell_type": "markdown", "metadata": {}, "source": [ + "__Opening \u2014 Pixelized source reconstruction__\n", "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", + "Look at a resolved lensed arc. Its broad shape may be smooth, but the light along it can contain bright knots, faint extensions and irregular structure. A model might reproduce the overall arc while leaving compact, coherent features in the residual image.\n", "\n", - "from autolens import setup_notebook; setup_notebook()\n", + "In Chapter 2, we introduced linear light profiles and multi-Gaussian expansions (MGEs). By combining Gaussians of different widths, an MGE can describe a much more flexible radial brightness distribution than a single S\u00e9rsic profile. Gaussian groups with different ellipticities and orientations can also describe changes in flattening and isophotal twists. Fixed widths and linearly solved intensities keep the number of non-linear parameters manageable.\n", "\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", + "That flexibility makes MGE a useful modelling tool, but consider the geometry of our worked example. Within each galaxy\u2019s Gaussian group, the components shared a common centre and elliptical shape. Adding more Gaussians gives us finer control over how brightness changes around that centre. It does not give us separate centres for star-forming knots, off-centre clumps or several distinct source components.\n", + "\n", + "We could add offset Gaussian groups. MGEs are not fundamentally restricted to one centre. The practical difficulty is deciding how many groups to use, where to place them and how to fit their geometry as the source becomes more complicated.\n", + "\n", + "This is where the image residuals become useful. If an MGE captures the broad light distribution but leaves compact structure along the arcs, its source description may need more spatial freedom. Those residuals are not proof of source clumpiness: errors in the mass model, foreground light subtraction, telescope blurring or other aspects of the data treatment can also produce structure. We need to investigate their origin.\n", + "\n", + "In this chapter, we introduce pixelized source reconstruction. Instead of prescribing a light-profile centre and shape for every feature, we describe the source brightness on a mesh. Different regions of that mesh can take different brightness values, allowing the reconstruction to represent more complicated source structure.\n", + "\n", + "The connection to Chapter 2 is direct. There, we solved for Gaussian intensities linearly. Here, for a specified mass model and mesh, we solve for source brightness values using the same underlying advantage: they enter the predicted image linearly.\n", "\n", - "Lets setup a lensed source-plane grid, using a lens galaxy and tracer. \n", + "This additional freedom also allows the reconstruction to fit noise. We therefore introduce regularization\u2014a prior that controls how freely neighbouring source brightnesses can vary. Pixelization is not assumption-free: the mass model, mesh geometry, resolution and regularization all affect the inferred source.\n", "\n", - "Note how our source galaxy no longer uses a light profile, as we will instead reconstruct its light using a \n", - "pixelization." + "MGE remains valuable, especially for foreground lens light and initial source fits. Pixelization is the next tool when the source requires more spatial freedom. We will learn how to use these tools together, inspect their reconstructions and recognise when their assumptions need revisiting.\n", + "\n", + "__A complex source__\n", + "\n", + "We will use a simulated source with several light components at different positions, giving it an asymmetric appearance. The simulation provides both the lensed image and the original source, so we can see what the reconstruction is trying to recover.\n", + "\n", + "The next figures show these two views. Look at the separate bright regions in the source and how lensing stretches and repeats their structure in the image.\n", + "\n", + "For observed data, we would only have the lensed image. The source reconstruction would be an inference from that image and our lens model, not an independent observation of the unlensed galaxy." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "grid = al.Grid2D.uniform(shape_native=(100, 100), pixel_scales=0.05, over_sample_size=1)\n", + "\n", + "from autolens import jax_wrapper\n", + "\n", + "from pathlib import Path\n", + "import subprocess\n", + "import sys\n", + "\n", + "import numpy as np\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "import autoarray.plot as aaplt\n", + "\n", + "dataset_path = Path(\"dataset\") / \"imaging\" / \"source_complex\"\n", + "\n", + "if al.util.dataset.should_simulate(str(dataset_path)):\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulator/source_complex.py\"],\n", + " check=True,\n", + " )\n", + "\n", + "dataset = al.Imaging.from_fits(\n", + " data_path=dataset_path / \"data.fits\",\n", + " noise_map_path=dataset_path / \"noise_map.fits\",\n", + " psf_path=dataset_path / \"psf.fits\",\n", + " pixel_scales=0.05,\n", + ")\n", + "\n", + "mask = al.Mask2D.circular_annular(\n", + " shape_native=dataset.shape_native,\n", + " pixel_scales=dataset.pixel_scales,\n", + " inner_radius=0.1,\n", + " outer_radius=3.2,\n", + ")\n", + "\n", + "dataset = dataset.apply_mask(mask=mask)\n", + "dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1)\n", + "\n", + "# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25.\n", + "mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25)\n", "\n", "lens_galaxy = al.Galaxy(\n", " redshift=0.5,\n", " mass=al.mp.Isothermal(\n", " centre=(0.0, 0.0),\n", " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", + " ell_comps=(0.17647, 0.0),\n", " ),\n", ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", "\n", - "source_galaxy = al.Galaxy(redshift=1.0)\n", + "aplt.subplot_imaging_dataset(dataset=dataset)\n", "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])\n", - "\n", - "source_plane_grid = tracer.traced_grid_2d_list_from(grid=grid)[1]" + "input_tracer = al.from_json(file_path=dataset_path / \"tracer.json\")\n", + "source_plot_grid = al.Grid2D.uniform(shape_native=(100, 100), pixel_scales=0.03)\n", + "aplt.plot_array(\n", + " array=input_tracer.galaxies[-1].image_2d_from(grid=source_plot_grid),\n", + " title=\"Input Source: Separate Bright Components\",\n", + ")" ], "outputs": [], "execution_count": null @@ -115,26 +165,33 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "__Mesh__\n", + "__Why a simple source model falls short__\n", + "\n", + "An MGE can describe flexible radial light distributions, as we saw in Chapter 2. Here we fix a Gaussian group to one common centre and elliptical shape to isolate the missing spatial freedom: adding widths at that centre cannot independently place all the bright regions in this source.\n", "\n", - "Next, lets set up a `Mesh` using the `mesh` module. The mesh represents the pixel-grid used by the pixelization\n", - "to reconstruct the galaxy.\n", + "We will compare the simulated image with a model that uses one common-centre MGE group, keeping the lens mass fixed to the values used in the simulation. This is an illustrative fixed-geometry comparison, not an optimized MGE search. The fixed mass cannot compensate for missing source structure.\n", "\n", - "There are multiple `Mesh`'s available. For now, we'll keep it simple and use a rectangular\n", - "grid, whose `shape` defines its $(y,x)$ dimensions.\n", + "Inspect the residual map for coherent structure along the arcs. Such structure would show where this source model leaves light unexplained, rather than just the random differences expected from noise.\n", "\n", - "The `RectangularBilinearAdaptDensity` mesh adapts its pixels to the density of the traced source-plane\n", - "grid via the ray-guided transformed uniform (RTU) grid formulation of Enzi et al. (2026)\n", - "(https://arxiv.org/abs/2606.30620), which should be cited in published work using this mesh.\n", - "Note that whereas that paper pairs the RTU grid with a Gaussian-process source prior,\n", - "**PyAutoLens** instead uses its own regularization schemes, introduced later in this chapter." + "**\ud83e\udd16 Ask AI:** If I allowed the lens mass parameters to vary while using this overly simple source model, how could the missing source structure affect the inferred mass distribution?" ] }, { "cell_type": "code", "metadata": {}, "source": [ - "mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25))" + "\n", + "gaussians = [\n", + " al.lp_linear.Gaussian(centre=(0.0, 0.0), ell_comps=(0.0, 0.0), sigma=sigma)\n", + " for sigma in np.logspace(-2, np.log10(2.0), 20)\n", + "]\n", + "analytic_source = al.Galaxy(\n", + " redshift=1.0, bulge=al.lp_basis.Basis(profile_list=gaussians),\n", + ")\n", + "analytic_fit = al.FitImaging(\n", + " dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, analytic_source]),\n", + ")\n", + "aplt.subplot_fit_imaging(fit=analytic_fit)" ], "outputs": [], "execution_count": null @@ -143,14 +200,83 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We now pass the mesh to a `Pixelization`." + "Offset Gaussian groups could supply this spatial freedom too, at the cost of choosing and fitting their geometry. MGE remains useful for initial source fits and foreground light. Here we explore a mesh as the next tool for more complicated source structure.\n", + "\n", + "\n", + "__A grid for the source light__\n", + "\n", + "A pixelization describes the source using brightness values distributed across a mesh. We infer these values from the image instead of requiring the entire source to follow a small set of analytic profiles.\n", + "\n", + "We begin with `RectangularUniform`, which places mesh points at regular intervals in the source plane. Its `shape` specifies the number of points along each direction. The next plot shows where these points lie relative to the ray-traced image coordinates.\n", + "\n", + "The mesh also defines how brightness is interpolated between its points. We will examine this more closely in the next tutorial. For now, the important distinction is that the mesh specifies where we represent the source; it does not yet tell us how bright the source is.\n", + "\n", + "\n", + "\n", + "__Following the same image pixels into the source plane__\n", + "\n", + "Every unmasked image pixel has an index and a position. Ray tracing changes its position, but preserves its index: image point 100 and traced source point 100 describe the same light path.\n", + "\n", + "We will highlight two small groups of image pixels and follow them into the source plane. Matching colours identify matching indexes in the two plots. The source-plane points here are ray-traced image coordinates; they are not the points of our source mesh.\n", + "\n", + "For this demonstration, we use one sample at each image-pixel centre, making the correspondence easy to follow. More accurate image integration can use several samples within each pixel." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "pixelization = al.Pixelization(mesh=mesh)" + "\n", + "import numpy as np\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "import autoarray.plot as aaplt\n", + "\n", + "dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1)\n", + "\n", + "# Match the mass model used by the source_complex simulator.\n", + "lens_galaxy = al.Galaxy(\n", + " redshift=0.5,\n", + " mass=al.mp.Isothermal(\n", + " centre=(0.0, 0.0),\n", + " einstein_radius=1.6,\n", + " ell_comps=(0.17647, 0.0),\n", + " ),\n", + ")\n", + "\n", + "tracer = al.Tracer(\n", + " galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)]\n", + ")\n", + "\n", + "image_grid = dataset.grids.pixelization\n", + "source_grid = tracer.traced_grid_2d_list_from(grid=image_grid)[1]\n", + "\n", + "# Select small groups near two opposite sides of the lens.\n", + "image_coordinates = np.asarray(image_grid)\n", + "indexes = [\n", + " np.argsort(\n", + " np.sum((image_coordinates - position) ** 2, axis=1)\n", + " )[:5].tolist()\n", + " for position in [(0.0, 1.6), (0.0, -1.6)]\n", + "]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=image_grid,\n", + " indexes=indexes,\n", + " title=\"Selected Image-Pixel Coordinates\",\n", + ")\n", + "aaplt.plot_grid(\n", + " grid=source_grid,\n", + " indexes=indexes,\n", + " title=\"The Same Coordinates After Ray Tracing\",\n", + ")\n", + "\n", + "for group in indexes:\n", + " for index in group:\n", + " print(\n", + " f\"Image index {index}: {np.asarray(image_grid[index])} \"\n", + " f\"-> source position {np.asarray(source_grid[index])}\"\n", + " )" ], "outputs": [], "execution_count": null @@ -159,22 +285,55 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "By itself, a pixelization does not tell us much. It has no grid of $(y,x)$ coordinates, no image, and no information\n", - "about the lens we are fitting.\n", + "Compare the separation and shape of each group before and after ray tracing. Their indexes remain unchanged even when the lens strongly changes their arrangement.\n", + "\n", + "\n", "\n", - "This information comes when we use the pixelization to create a `Mapper`, which we\n", - "do below using the (traced) source-plane grid that we created above." + "__Where a traced image pixel meets the source mesh__\n", + "\n", + "We now place a separate rectangular mesh in the source plane. Its indexes identify the brightness values we will reconstruct. An image-pixel index and a source-mesh index therefore refer to different things.\n", + "\n", + "A traced image coordinate generally falls between mesh points. With bilinear interpolation, its brightness is calculated from the four surrounding mesh values, weighted according to its position. Falling within one rectangular cell does not mean taking its brightness from just one source point.\n", + "\n", + "The next cell selects one image pixel and highlights the source mesh points contributing to it. We print their indexes and weights to make this relationship explicit." ] }, { "cell_type": "code", "metadata": {}, "source": [ + "\n", + "mesh = al.mesh.RectangularUniform(shape=mesh_shape)\n", + "\n", "interpolator = mesh.interpolator_from(\n", - " source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None\n", + " source_plane_data_grid=source_grid,\n", + " source_plane_mesh_grid=None,\n", + ")\n", + "\n", + "mapper = al.Mapper(\n", + " interpolator=interpolator,\n", + " regularization=al.reg.Constant(coefficient=1.0),\n", + ")\n", + "\n", + "image_index = indexes[0][0]\n", + "\n", + "# One row describes how source mesh values contribute to this image pixel.\n", + "weights = np.asarray(mapper.mapping_matrix[image_index])\n", + "source_indexes = np.flatnonzero(np.abs(weights) > 1.0e-12)\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper.source_plane_mesh_grid,\n", + " indexes=[source_indexes.tolist()],\n", + " title=f\"Source Mesh Points Contributing to Image Pixel {image_index}\",\n", ")\n", "\n", - "mapper = al.Mapper(interpolator=interpolator)" + "print(\"Ray-traced position:\", np.asarray(source_grid[image_index]))\n", + "for source_index in source_indexes:\n", + " print(\n", + " f\"Source mesh index {source_index}: \"\n", + " f\"position={np.asarray(mapper.source_plane_mesh_grid[source_index])}, \"\n", + " f\"weight={weights[source_index]:.4f}\"\n", + " )" ], "outputs": [], "execution_count": null @@ -183,14 +342,69 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This `Mapper` is a `RectangularMapper` -- every `Pixelization` generates its own mapper." + "The mapper stores these relationships for all image pixels. We do not need to construct or solve the mapping matrix by hand; inspecting one row simply exposes what the mapping means.\n", + "\n", + "\n", + "\n", + "__One source region, several image regions__\n", + "\n", + "We can also follow the mapping in the opposite direction. Select a source mesh point and ask which image pixels receive a contribution from it.\n", + "\n", + "The figure below uses the same colour for a selected source region and its associated image regions. A small source region can contribute to widely separated parts of the image: this is how multiple images constrain a shared source reconstruction.\n", + "\n", + "The coloured image regions show interpolation support. They are not a strict statement that every traced coordinate falls inside the coloured source cell." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "print(type(mapper))" + "\n", + "source_coordinates = np.asarray(mapper.source_plane_mesh_grid)\n", + "\n", + "# Find the mesh point nearest the source-plane origin.\n", + "central_index = int(\n", + " np.argmin(np.sum(source_coordinates**2, axis=1))\n", + ")\n", + "\n", + "pix_indexes = [[central_index]]\n", + "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", + "\n", + "aaplt.subplot_image_and_mapper(\n", + " mapper=mapper,\n", + " image=dataset.data,\n", + " regions=mappings,\n", + " region_labels=[str(central_index)],\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + ")\n", + "\n", + "# Now compare two nearby source points with a more distant point.\n", + "nearby_indexes = np.argsort(\n", + " np.sum(\n", + " (source_coordinates - source_coordinates[central_index]) ** 2,\n", + " axis=1,\n", + " )\n", + ")[:2].tolist()\n", + "\n", + "offset_index = int(\n", + " np.argmin(\n", + " np.sum(\n", + " (source_coordinates - np.array([0.3, 0.3])) ** 2,\n", + " axis=1,\n", + " )\n", + " )\n", + ")\n", + "\n", + "pix_indexes = [nearby_indexes, [offset_index]]\n", + "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", + "\n", + "aaplt.subplot_image_and_mapper(\n", + " mapper=mapper,\n", + " image=dataset.data,\n", + " regions=mappings,\n", + " region_labels=[str(group) for group in pix_indexes],\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + ")" ], "outputs": [], "execution_count": null @@ -199,14 +413,44 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "By plotting our mapper, we now see our `Pixelization`. " + "Try changing `(0.3, 0.3)` to another source position and follow how its image regions change. The number of coloured patches is not necessarily the physical image multiplicity: masking and pixel sampling can split or hide regions.\n", + "\n", + "\n", + "\n", + "__Reconstructing the source__\n", + "\n", + "We now have a mesh and a description of how its brightness values contribute to the observed image. The next step is to infer those values from the data. This is called an inversion.\n", + "\n", + "For a fixed lens mass model, the source brightnesses enter the predicted image linearly. PyAutoLens uses this property to solve for them together, rather than asking a non-linear search to explore each brightness value individually.\n", + "\n", + "The next cell evaluates a `FitImaging` using a pixelized source. We keep the lens mass fixed to the simulation values, so this calculation reconstructs the source without searching for a new mass model.\n", + "\n", + "\n", + "\n", + "__A first look at regularization__\n", + "\n", + "Giving the source many adjustable brightness values lets it represent complex structure, but also gives it freedom to fit noise. We therefore include regularization: a prior that favours smoother source reconstructions.\n", + "\n", + "For this first reconstruction, we use `Constant` regularization with a fixed coefficient. It discourages large differences between neighbouring mesh values. The data can still support structure, but adding structure comes with a penalty.\n", + "\n", + "We will keep this setting fixed for the rest of this tutorial. In tutorial 2, we will vary it and see how too little smoothing fits noise, while too much smoothing erases source detail." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" + "\n", + "pixelization = al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=al.reg.Constant(coefficient=1.0),\n", + ")\n", + "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", + "fit = al.FitImaging(\n", + " dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, source_galaxy]),\n", + ")\n", + "aplt.subplot_fit_imaging(fit=fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=fit)" ], "outputs": [], "execution_count": null @@ -215,21 +459,42 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The `Mapper` contains lots of interesting information about our `Pixelization`, for example its\n", - "`source_plane_mesh_grid` tells us where the pixel centres are located." + "__From source indexes to reconstructed brightnesses__\n", + "\n", + "So far, the mapper tells us how source brightness would contribute to the image, but we have not determined those brightnesses.\n", + "\n", + "The inversion combines these mappings with the observed image, its noise and telescope blurring. It solves for the source brightness values together, including the smoothness prior supplied by regularization.\n", + "\n", + "In this example there is one mapper. Entry `j` of its reconstruction therefore gives the brightness associated with source mesh index `j`. We can print selected values and show their locations on the reconstructed source." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 1:\")\n", - "print(mapper.source_plane_mesh_grid[0])\n", - "print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 2:\")\n", - "print(mapper.source_plane_mesh_grid[1])\n", - "print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 3:\")\n", - "print(mapper.source_plane_mesh_grid[2])\n", - "print(\"etc.\")" + "\n", + "inversion = al.Inversion(\n", + " dataset=dataset,\n", + " linear_obj_list=[mapper],\n", + ")\n", + "\n", + "reconstruction = np.asarray(inversion.reconstruction)\n", + "\n", + "for group in pix_indexes:\n", + " for source_index in group:\n", + " print(\n", + " f\"Source mesh index {source_index}: \"\n", + " f\"reconstructed brightness={reconstruction[source_index]:.6g}\"\n", + " )\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=mapper,\n", + " solution_vector=reconstruction,\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + " regions=[mapping.source_contours for mapping in mappings],\n", + " region_labels=[str(group) for group in pix_indexes],\n", + " title=\"Reconstructed Source and Selected Mesh Indexes\",\n", + ")" ], "outputs": [], "execution_count": null @@ -238,7 +503,17 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can plot these centre on our grid, to make it look slightly less boring!" + "These brightnesses are inferred jointly. We do not independently fit each coloured image region: shared source values must explain their contributions across the image, while regularization connects neighbouring source values.\n", + "\n", + "\n", + "\n", + "__Turning the reconstructed source back into an image__\n", + "\n", + "The source reconstruction and the reconstructed image are different objects. The source lives on our source-plane mesh. Mapping its brightness values through the lens produces an image-plane prediction.\n", + "\n", + "The telescope then blurs that prediction. This blurred image is what we compare with the observed data. The inversion already accounts for that blurring when solving for the source; it is not an extra correction applied after an otherwise completed fit.\n", + "\n", + "The following plots separate these stages." ] }, { @@ -246,7 +521,28 @@ "metadata": {}, "source": [ "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" + "image_before_blurring = inversion.mapped_reconstructed_data\n", + "model_image = inversion.mapped_reconstructed_operated_data\n", + "\n", + "residual_map = dataset.data - model_image\n", + "normalized_residual_map = residual_map / dataset.noise_map\n", + "\n", + "aplt.plot_array(\n", + " array=image_before_blurring,\n", + " title=\"Reconstructed Lensed Image Before Telescope Blurring\",\n", + ")\n", + "aplt.plot_array(\n", + " array=model_image,\n", + " title=\"Model Image Including Telescope Blurring\",\n", + ")\n", + "aplt.plot_array(\n", + " array=residual_map,\n", + " title=\"Residuals: Data Minus Model\",\n", + ")\n", + "aplt.plot_array(\n", + " array=normalized_residual_map,\n", + " title=\"Residuals Divided by the Noise\",\n", + ")" ], "outputs": [], "execution_count": null @@ -255,20 +551,31 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The `Mapper` also has the (source-plane) grid that we passed when we set it up. Lets check they're the same." + "Compare the source reconstruction with these image-plane plots. A feature in the source can appear in several places in the lensed image, and telescope blurring can make those image features less distinct.\n", + "\n", + "Inspect the residuals for coherent unexplained structure. A plausible-looking source alone does not establish that the model explains the data.\n", + "\n", + "**\ud83e\udd16 Ask AI:** Why must the same reconstructed source brightnesses explain all of their associated image regions, rather than allowing each arc to have an independent source reconstruction?\n", + "\n", + "__Inspecting the reconstruction__\n", + "\n", + "We will plot the inferred source alongside the model image and residuals. These answer different questions.\n", + "\n", + "The source reconstruction shows the brightness distribution inferred under our chosen lens model, mesh and regularization. The model image shows how that reconstruction appears after lensing and telescope blurring. The residuals show what remains unexplained in the observed image.\n", + "\n", + "Compare these residuals with those from the simple source model earlier in the tutorial. Look particularly at the image regions associated with the source\u2019s separate bright components. The comparison will show whether the extra source freedom helps explain those features.\n", + "\n", + "Because this is a simulation, we can also compare the reconstruction with the input source. We should not expect an exact copy: finite resolution, noise and regularization limit the detail we can recover." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "print(\"Source Grid2D Pixel 1\")\n", - "print(source_plane_grid[0])\n", - "print(mapper.source_plane_data_grid[0])\n", - "print(\"Source Grid2D Pixel 2\")\n", - "print(source_plane_grid[1])\n", - "print(mapper.source_plane_data_grid[1])\n", - "print(\"etc.\")" + "\n", + "aplt.subplot_fit_imaging(fit=analytic_fit)\n", + "aplt.subplot_fit_imaging(fit=fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=fit)" ], "outputs": [], "execution_count": null @@ -277,37 +584,35 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can over-lay this grid on the figure, which is starting to look a bit less boring now!" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ + "__Changing the source resolution__\n", "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")\n", + "The mesh resolution controls how finely we can represent the source. A coarse mesh may merge distinct features, while a finer mesh gives the reconstruction more freedom.\n", "\n", + "Repeat the reconstruction with mesh shapes of `(15, 15)`, `(25, 25)` and `(35, 35)`, keeping the lens mass and regularization coefficient fixed. Compare the source structure and image residuals in each case, then restore the starting shape of `(25, 25)`.\n", "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Finally, the mapper's mesh grid has lots of information about the pixelization, for example, its arc-second\n", - "size and dimensions." + "More mesh points do not necessarily reveal more reliable detail. The data must constrain that detail, and changing the mesh also changes how the regularization acts. This experiment explores the effect of resolution; choosing an appropriate reconstruction requires considering resolution and smoothing together.\n", + "\n", + "**\ud83e\udd16 Ask AI:** When I increase the source mesh resolution, how can I distinguish newly resolved source structure from extra freedom being used to fit noise?" ] }, { "cell_type": "code", "metadata": {}, "source": [ - "print(mapper.source_plane_mesh_grid.geometry.shape_native_scaled)\n", - "print(mapper.source_plane_mesh_grid.geometry.scaled_maxima)\n", - "print(mapper.source_plane_mesh_grid.geometry.scaled_minima)" + "\n", + "for shape in ([(6, 6), (8, 8), (10, 10)] if mesh_shape == (8, 8) else [(15, 15), (25, 25), (35, 35)]):\n", + " source_galaxy = al.Galaxy(\n", + " redshift=1.0,\n", + " pixelization=al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=shape),\n", + " regularization=al.reg.Constant(coefficient=1.0),\n", + " ),\n", + " )\n", + " resolution_fit = al.FitImaging(\n", + " dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, source_galaxy]),\n", + " )\n", + " aplt.subplot_fit_imaging_of_planes(fit=resolution_fit)\n", + " aplt.subplot_fit_imaging(fit=resolution_fit)" ], "outputs": [], "execution_count": null @@ -316,17 +621,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "__Wrap Up__\n", + "__Wrap up__\n", + "\n", + "We have reconstructed a complex source without prescribing the positions and shapes of its individual light components.\n", "\n", - "This was a relatively gentle overview of pixelizations, but one that was hopefully easy to follow. Think about the \n", - "following questions before moving on to the next tutorial:\n", + "The mesh specifies where we represent the source. The mapper connects its brightness values to the observed image through the lens model. The inversion solves for those values, with regularization controlling the freedom to introduce structure.\n", "\n", - " 1) Look at how the source-grid coordinates are distributed over the rectangular pixel-grid. Are these points\n", - " distributed evenly over the rectangular grid's pixels? Do some pixels have a lot more grid-points inside of them?\n", - " Do some pixels have no grid-points in them?\n", + "Throughout this tutorial, the lens mass was fixed. Later in the chapter, we will vary the mass model and reconstruct the source for each proposed model, allowing the image to constrain both.\n", "\n", - " 2) The rectangular pixelization's edges are aligned with the most exterior coordinates of the source-grid. This is\n", - " intentional -- why do you think this is?" + "First, we need to understand how interpolation and regularization shape the reconstruction. Tutorial 2 explores these choices and introduces the Bayesian evidence used to compare different levels of smoothing." ] } ], @@ -354,7 +657,7 @@ "97746750-6915-569b-a61d-792a6bc69437": { "id": "97746750-6915-569b-a61d-792a6bc69437", "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" + "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones \u2014 common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially \u2014 both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type \u2014 Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation \u2014 constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source \u2014 do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* \u2014 either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised \u2014 `(adapt_image / max) ** power` \u2014 so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** \u2014 `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, \u2026).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead \u2014 transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` \u2014 the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` \u2014 the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` \u2014 the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline \u2014 imaging, group, multi-galaxy, multi-dataset \u2014 over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data \u2014 ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** \u2014 it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** \u2014 a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch \u2014 Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch \u2014 bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n \u2014 post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) \u2014 datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** \u2014 [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit \u2014 source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** \u2014 the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory \u2014 what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty \u2014\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at \u2014 the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* \u2014 if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions \u2014 the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` \u2014 see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> \u26a0\ufe0f **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch \u2014 source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot \u2014 when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D \u2014 plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch \u2014 mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch \u2014 double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel \u2014 the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map \u2014 regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic \u2014 mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) \u2014 overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) \u2014 automated pipeline that\n handles the parametric \u2192 pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart \u2014 least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** \u2014 [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets \u2014\n links into deeper docs.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model \u2014 production\n pattern for extended-arc sources.\n" } }, "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" diff --git a/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb b/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb new file mode 100644 index 0000000..c22c51b --- /dev/null +++ b/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb @@ -0,0 +1,781 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tutorial 2: Bayesian Regularization\n", + "===================================\n", + "\n", + "__Contents__\n", + "\n", + "- Interpolation and Bayesian regularization\n", + "- Interpolation and our starting reconstruction\n", + "- Reducing regularization\n", + "- Increasing regularization\n", + "- Bayesian evidence\n", + "- Exploring the regularization coefficient\n", + "- Inspecting the preferred reconstruction\n", + "- What is linear, and what requires a search?\n", + "- Mesh resolution and regularization belong together\n", + "- What we have learned, and what comes next" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Google Colab Setup__\n", + "\n", + "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "jupyter": { + "source_hidden": true + } + }, + "outputs": [], + "source": [ + "# @title Set up Google Colab { display-mode: \"form\" }\n", + "try:\n", + " import google.colab\n", + "except ImportError:\n", + " from autolens import setup_colab as _setup_colab\n", + "else:\n", + " import importlib\n", + " import subprocess\n", + " import sys\n", + "\n", + " subprocess.check_call(\n", + " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", + " )\n", + " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", + "\n", + "_setup_colab.setup(\"howtolens\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Interpolation and Bayesian regularization__\n", + "\n", + "So far, we have:\n", + "\n", + "- Used pixelizations and mappers to connect source mesh points to image pixels.\n", + "- Used an inversion to reconstruct the source\u2019s brightness.\n", + "- Mapped that reconstruction back into the image, including telescope blurring, to compare it with the data.\n", + "\n", + "Our explanation of how an inversion works has deliberately left some things unexplained. In particular, you will have noticed the regularization input that we passed when creating our pixelization. We used a coefficient of `1.0`, but have not established why that value should give an appropriate reconstruction.\n", + "\n", + "This tutorial explores what regularization does and why we need it. We will change its strength, inspect the resulting source reconstructions, and see why obtaining a close fit to the image is not enough on its own.\n", + "\n", + "First, we will revisit interpolation. It is easy to confuse interpolation with smoothing, because both affect the appearance of the reconstructed source. Understanding the distinction will help us interpret the experiments that follow.\n", + "\n", + "We use the same complex source as tutorial 1. The lens mass remains fixed to the simulation values, so changes in the reconstruction come from our source modelling choices." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "from autolens import jax_wrapper\n", + "\n", + "from pathlib import Path\n", + "import subprocess\n", + "import sys\n", + "\n", + "import numpy as np\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "import autoarray.plot as aaplt\n", + "\n", + "dataset_path = Path(\"dataset\") / \"imaging\" / \"source_complex\"\n", + "\n", + "if al.util.dataset.should_simulate(str(dataset_path)):\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulator/source_complex.py\"],\n", + " check=True,\n", + " )\n", + "\n", + "dataset = al.Imaging.from_fits(\n", + " data_path=dataset_path / \"data.fits\",\n", + " noise_map_path=dataset_path / \"noise_map.fits\",\n", + " psf_path=dataset_path / \"psf.fits\",\n", + " pixel_scales=0.05,\n", + ")\n", + "\n", + "mask = al.Mask2D.circular_annular(\n", + " shape_native=dataset.shape_native,\n", + " pixel_scales=dataset.pixel_scales,\n", + " inner_radius=0.1,\n", + " outer_radius=3.2,\n", + ")\n", + "\n", + "dataset = dataset.apply_mask(mask=mask)\n", + "dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1)\n", + "\n", + "lens_galaxy = al.Galaxy(\n", + " redshift=0.5,\n", + " mass=al.mp.Isothermal(\n", + " centre=(0.0, 0.0),\n", + " einstein_radius=1.6,\n", + " ell_comps=(0.17647, 0.0),\n", + " ),\n", + ")\n", + "\n", + "aplt.subplot_imaging_dataset(dataset=dataset)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The single sample per image pixel keeps the indexed mapping example straightforward. For scientific modelling, we would also check that our image sampling is sufficiently accurate.\n", + "\n", + "__Interpolation and our starting reconstruction__\n", + "\n", + "Let\u2019s look at our reconstruction from the previous tutorial in more detail.\n", + "\n", + "The `RectangularUniform` mesh describes the source using brightness values at regularly spaced points. A ray-traced image coordinate generally falls between these points. Its predicted brightness is obtained by combining the four surrounding values, with weights determined by its position. This is bilinear interpolation.\n", + "\n", + "Interpolation tells us how to calculate brightness between mesh points, but it does not tell us what those mesh values should be. Four neighbouring values could be similar, or one could be much brighter than the others. Both can be interpolated. In the second case, however, the brightness changes much more sharply across the source.\n", + "\n", + "Regularization influences the brightness values we infer, discouraging variations that are not sufficiently supported by the data. Interpolation then determines how those values contribute between mesh points.\n", + "\n", + "We are going to evaluate several reconstructions, so the function below keeps their common setup in one place. Only the regularization coefficient changes." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25)\n", + "\n", + "\n", + "def fit_with_coefficient(coefficient):\n", + " pixelization = al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=al.reg.Constant(coefficient=coefficient),\n", + " )\n", + "\n", + " source_galaxy = al.Galaxy(\n", + " redshift=1.0,\n", + " pixelization=pixelization,\n", + " )\n", + "\n", + " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])\n", + "\n", + " return al.FitImaging(dataset=dataset, tracer=tracer)\n", + "\n", + "\n", + "fit = fit_with_coefficient(coefficient=1.0)\n", + "\n", + "aplt.subplot_fit_imaging(fit=fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here is the interpolation calculation for one image pixel. As in tutorial 1, the mapper supplies the contributing source indexes and their weights. This time, we also have reconstructed brightness values, so we can see how the contributions combine." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", + "reconstruction = np.asarray(fit.inversion.reconstruction)\n", + "\n", + "# Select an image pixel near the right-hand side of the lens.\n", + "image_coordinates = np.asarray(mapper.image_plane_data_grid)\n", + "image_index = int(\n", + " np.argmin(\n", + " np.sum((image_coordinates - np.array([0.0, 1.6])) ** 2, axis=1)\n", + " )\n", + ")\n", + "\n", + "weights = np.asarray(mapper.mapping_matrix[image_index])\n", + "source_indexes = np.flatnonzero(np.abs(weights) > 1.0e-12)\n", + "\n", + "for source_index in source_indexes:\n", + " brightness = reconstruction[source_index]\n", + " weight = weights[source_index]\n", + " print(\n", + " f\"Source index {source_index}: \"\n", + " f\"brightness={brightness:.5g}, weight={weight:.5g}, \"\n", + " f\"contribution={brightness * weight:.5g}\"\n", + " )\n", + "\n", + "print(\n", + " \"Combined brightness before telescope blurring:\",\n", + " float(np.dot(weights, reconstruction)),\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This is the image prediction before the PSF redistributes light between image pixels. We are inspecting a small part of the calculation, not replacing the inversion\u2019s treatment of telescope blurring.\n", + "\n", + "__Reducing regularization__\n", + "\n", + "Our starting reconstruction uses a regularization coefficient of `1.0`. Let\u2019s reduce it substantially and examine what changes.\n", + "\n", + "We use `0.01` rather than exactly zero, retaining a small smoothness penalty. Keep the lens model, mesh and data unchanged: we want to isolate the effect of weakening regularization." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "weak_regularization_fit = fit_with_coefficient(coefficient=0.01)\n", + "\n", + "aplt.subplot_fit_imaging(fit=weak_regularization_fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=weak_regularization_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To understand this comparison, we need to look more closely at what regularization actually does.\n", + "\n", + "When the inversion reconstructs the source, it does not only seek brightness values that reproduce the image. With `Constant` regularization, it also compares neighbouring brightness values on the rectangular source mesh. Interior mesh points have four immediate neighbours. Large differences between their brightnesses contribute a larger penalty.\n", + "\n", + "You can think of this as applying a **smoothness prior** to the reconstructed source. It expresses a preference for neighbouring regions to have similar brightness, unless the image provides enough evidence for them to differ.\n", + "\n", + "The penalty depends on squared differences, so positive and negative differences cannot cancel. The coefficient controls its strength. Reducing that coefficient makes a given amount of variation less costly; increasing it makes the same variation more costly.\n", + "\n", + "In the language of linear algebra, this prior contributes a regularization matrix to the system the inversion solves. We do not need to construct that matrix ourselves to understand its effect.\n", + "\n", + "Without sufficient regularization, the inversion has greater freedom to fit fluctuations in the observed image, including noise. Some of those fluctuations can be explained by adding irregular structure to the source. The image fit may improve even though the inferred source becomes less faithful to the galaxy that produced the data.\n", + "\n", + "Inspect the weakly regularized reconstruction for isolated bright values or rapid changes between neighbouring points. Also look at its faint regions, where the image provides less information about the source.\n", + "\n", + "A few extreme values can dominate the colour scale. We can compare both reconstructions using the starting reconstruction\u2019s brightness range to see the remaining structure more clearly." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "source_vmax = float(np.max(np.asarray(fit.inversion.reconstruction)))\n", + "\n", + "for label, current_fit in [\n", + " (\"Starting Reconstruction\", fit),\n", + " (\"Weak Regularization\", weak_regularization_fit),\n", + "]:\n", + " current_mapper = current_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + " aaplt.plot_mapper(\n", + " mapper=current_mapper,\n", + " solution_vector=current_fit.inversion.reconstruction,\n", + " vmin=0.0,\n", + " vmax=source_vmax,\n", + " zoom_to_brightest=False,\n", + " title=label,\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Values above this plotting limit share the highest colour, so use these figures alongside the original plots rather than treating them as the full brightness range.\n", + "\n", + "The important point is that recovering recognizable source structure does not mean every reconstructed feature is reliable. Genuine structure and noise-fitting can appear in the same reconstruction.\n", + "\n", + "__Increasing regularization__\n", + "\n", + "Now let\u2019s move in the other direction and use a much larger coefficient.\n", + "\n", + "With stronger regularization, the inversion pays a greater penalty for differences between neighbouring brightnesses. This discourages the sharp variations that can fit noise. However, the real source also contains brightness variations: compact components, bright centres and the changes between those regions and their surroundings.\n", + "\n", + "Regularization cannot identify which variations are genuine simply by examining the source. The image fit and the prior must work together. If we make the smoothness preference too strong, the reconstruction can lose genuine structure because reproducing it carries too large a penalty." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "strong_regularization_fit = fit_with_coefficient(coefficient=100.0)\n", + "\n", + "strong_mapper = strong_regularization_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=strong_mapper,\n", + " solution_vector=strong_regularization_fit.inversion.reconstruction,\n", + " vmin=0.0,\n", + " vmax=source_vmax,\n", + " zoom_to_brightest=False,\n", + " title=\"Strong Regularization\",\n", + ")\n", + "\n", + "aplt.subplot_fit_imaging(fit=strong_regularization_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare the bright components with the starting reconstruction. Look for features becoming flatter or merging together, then inspect the corresponding regions of the image residuals.\n", + "\n", + "This illustrates the difficulty in choosing a coefficient. Too little smoothing can introduce structure that explains noise. Too much can remove structure needed to explain the galaxy. Neither the smoothest source nor the closest possible image fit is automatically the reconstruction we want.\n", + "\n", + "We can quantify image agreement using chi-squared: the sum of squared residuals divided by their noise variances." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "fit_comparisons = [\n", + " (\"Weak\", 0.01, weak_regularization_fit),\n", + " (\"Starting\", 1.0, fit),\n", + " (\"Strong\", 100.0, strong_regularization_fit),\n", + "]\n", + "\n", + "for label, coefficient, current_fit in fit_comparisons:\n", + " normalized_residuals = np.asarray(\n", + " (dataset.data - current_fit.model_data) / dataset.noise_map\n", + " )\n", + "\n", + " chi_squared = float(np.sum(normalized_residuals**2))\n", + " print(f\"{label}: coefficient={coefficient:g}, chi-squared={chi_squared:.3f}\")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "A lower chi-squared means closer agreement with the image under the assumed noise map. It does not distinguish fitting genuine structure from fitting noise. This is why choosing the coefficient solely by image agreement would favour giving the source too much freedom.\n", + "\n", + "**\ud83e\udd16 Ask AI:** Why might a weakly regularized reconstruction have a lower chi-squared but a less trustworthy source than a more strongly regularized reconstruction?\n", + "\n", + "__Bayesian evidence__\n", + "\n", + "For inversions, we therefore need more than image agreement to choose an appropriate level of regularization.\n", + "\n", + "We use the **Bayesian evidence**, which accounts for both the fit to the image and the source prior. It helps us compare reconstructions that have different amounts of freedom, rather than simply choosing whichever one follows the observed pixel values most closely.\n", + "\n", + "There are two useful parts to this intuition.\n", + "\n", + "First, the reconstruction must explain the image. If strong regularization prevents it from reproducing genuine source structure, the resulting residuals count against that choice. Preferring a smooth source is not useful if that source cannot explain the observed arcs.\n", + "\n", + "Second, allowing a more flexible source comes at a cost. Weak regularization permits many more patterns of brightness across neighbouring mesh points. Some of that extra freedom may be needed to describe the galaxy, but some may only help reproduce the particular noise fluctuations in this image.\n", + "\n", + "Evidence weighs the improvement in fit against the freedom allowed by the prior. An improvement must be sufficient to justify that additional flexibility.\n", + "\n", + "This is also why complexity is not simply the number of source mesh points. Our three examples have exactly the same mesh. Stronger regularization ties neighbouring brightnesses together more closely, reducing their freedom to vary independently. We can therefore change the effective flexibility of the reconstruction without changing the number of mesh points.\n", + "\n", + "Let\u2019s compare the evidence values returned by `FitImaging`." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "log_evidences = []\n", + "\n", + "for label, coefficient, current_fit in fit_comparisons:\n", + " log_evidence = float(current_fit.log_evidence)\n", + " log_evidences.append(log_evidence)\n", + "\n", + " print(\n", + " f\"{label}: coefficient={coefficient:g}, \"\n", + " f\"log evidence={log_evidence:.3f}\"\n", + " )\n", + "\n", + "best_index = int(np.argmax(log_evidences))\n", + "best_label, best_coefficient, _ = fit_comparisons[best_index]\n", + "\n", + "print(\n", + " f\"\\nHighest evidence among these examples: \"\n", + " f\"{best_label}, coefficient={best_coefficient:g}\"\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare this ranking with the source plots and the chi-squared values. The highest evidence need not belong to the reconstruction with the lowest chi-squared, because image agreement is only part of the comparison.\n", + "\n", + "We still need to inspect the residuals ourselves. Evidence does not explicitly examine their spatial pattern or guarantee that a preferred model is correct. Structured residuals can reveal shortcomings in the source, lens mass, PSF or other assumptions that this three-coefficient comparison does not address.\n", + "\n", + "For now, we have compared only three choices. The starting value of `1.0` has no special status, and the best of these three is not necessarily the best coefficient overall. Next, we will explore a broader range and see how this choice fits into the wider modelling process.\n", + "\n", + "__Exploring the regularization coefficient__\n", + "\n", + "We have compared weak, moderate and strong regularization, but those three values were chosen to illustrate different behaviours. They do not tell us where the evidence reaches its highest value.\n", + "\n", + "Let\u2019s explore the coefficient more systematically. We will keep the lens mass, mesh resolution, mask and noise map fixed, and reconstruct the source for a sequence of coefficients.\n", + "\n", + "Regularization coefficients can span several orders of magnitude, so we use logarithmically spaced values. This gives us comparable coverage between `0.01` and `0.1`, between `0.1` and `1.0`, and so on.\n", + "\n", + "Every point in this experiment requires a new source reconstruction. We are not taking one reconstructed source and smoothing it by different amounts afterwards. The coefficient changes the problem that the inversion solves." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "coefficient_grid = np.logspace(-2, 2, 13)\n", + "\n", + "# Reuse the three reconstructions already calculated.\n", + "known_fits = {\n", + " 0.01: weak_regularization_fit,\n", + " 1.0: fit,\n", + " 100.0: strong_regularization_fit,\n", + "}\n", + "\n", + "evidence_grid = []\n", + "\n", + "for coefficient in coefficient_grid:\n", + " coefficient = float(coefficient)\n", + "\n", + " if coefficient in known_fits:\n", + " current_fit = known_fits[coefficient]\n", + " else:\n", + " current_fit = fit_with_coefficient(coefficient=coefficient)\n", + "\n", + " evidence_grid.append(float(current_fit.log_evidence))\n", + "\n", + "evidence_grid = np.asarray(evidence_grid)\n", + "\n", + "if not np.all(np.isfinite(evidence_grid)):\n", + " raise ValueError(\n", + " \"Some evidence values are not finite. Inspect those fits before comparing.\"\n", + " )\n", + "\n", + "fig, ax = plt.subplots()\n", + "ax.semilogx(\n", + " coefficient_grid,\n", + " evidence_grid - np.max(evidence_grid),\n", + " marker=\"o\",\n", + ")\n", + "ax.set_xlabel(\"Regularization coefficient\")\n", + "ax.set_ylabel(\"Log evidence relative to the highest sampled value\")\n", + "ax.set_title(\"Choosing the Strength of Regularization\")\n", + "plt.show()" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Look for the part of the curve where the evidence is highest. Moving towards weaker regularization gives the source more freedom; moving towards stronger regularization increasingly restricts its variations.\n", + "\n", + "We may find a clear peak, a broad region with similar evidence, or a highest value at one end of the range. These outcomes mean different things. A boundary maximum tells us that this experiment has not bracketed the preferred coefficient\u2014we should extend the range before claiming to have located it.\n", + "\n", + "The plotted points are also discrete samples. Even an interior maximum only identifies the best coefficient we have tried so far.\n", + "\n", + "__Inspecting the preferred reconstruction__\n", + "\n", + "Let\u2019s inspect the reconstruction with the highest evidence in our sampled range.\n", + "\n", + "It is tempting to treat the highest number as the end of the analysis. However, we should connect that number back to the source and image. We want to understand what this choice preserves, what it smooths away, and what the resulting model still fails to explain.\n", + "\n", + "Compare it with the weakly and strongly regularized examples. In particular, examine the distinct bright source components and the faint regions between them. Then look at the image residuals where those components are lensed." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "best_index = int(np.argmax(evidence_grid))\n", + "preferred_coefficient = float(coefficient_grid[best_index])\n", + "\n", + "if preferred_coefficient in known_fits:\n", + " preferred_fit = known_fits[preferred_coefficient]\n", + "else:\n", + " preferred_fit = fit_with_coefficient(\n", + " coefficient=preferred_coefficient\n", + " )\n", + "\n", + "print(\"Preferred sampled coefficient:\", preferred_coefficient)\n", + "\n", + "if best_index in (0, len(coefficient_grid) - 1):\n", + " print(\n", + " \"The highest evidence lies at the boundary. \"\n", + " \"Extend the coefficient range before interpreting this as a peak.\"\n", + " )\n", + "\n", + "preferred_mapper = preferred_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=preferred_mapper,\n", + " solution_vector=preferred_fit.inversion.reconstruction,\n", + " zoom_to_brightest=False,\n", + " title=\"Source at the Preferred Sampled Coefficient\",\n", + ")\n", + "\n", + "aplt.subplot_fit_imaging(fit=preferred_fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=preferred_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "A preferred coefficient does not establish that every visible feature in the source is real. The reconstruction remains conditional on the lens model, source mesh, noise map and telescope blurring.\n", + "\n", + "Nor does a good-looking source excuse coherent residuals in the image. The source and residual plots provide complementary information: one shows what we inferred, while the other shows what that inference leaves unexplained.\n", + "\n", + "**\ud83e\udd16 Ask AI:** If the evidence prefers a particular regularization coefficient but the residuals still follow the shape of an arc, what modelling assumptions should I investigate next?\n", + "\n", + "__What is linear, and what requires a search?__\n", + "\n", + "Before going further, let\u2019s separate two parts of the calculation that are easy to confuse.\n", + "\n", + "For each coefficient we supplied, the inversion solved for the source brightnesses. We did not give a non-linear search hundreds of independent source brightness parameters and ask it to explore their possible combinations. Instead, the source enters the predicted image linearly, allowing these brightnesses to be solved together using linear algebra.\n", + "\n", + "Regularization is included in that solve. The source is not first reconstructed without a prior and then smoothed afterwards. The inferred brightnesses already reflect the balance between fitting the image and satisfying the smoothness prior.\n", + "\n", + "Choosing the regularization coefficient is a different problem. We supplied several coefficients, performed an inversion for each, and compared their evidence values. Our loop is a simple grid search over one quantity.\n", + "\n", + "We can see the difference in scale directly:" + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "source_brightnesses = np.asarray(\n", + " preferred_fit.inversion.reconstruction\n", + ")\n", + "\n", + "print(\"Number of source mesh values:\", preferred_mapper.pixels)\n", + "print(\"Number of reconstructed entries:\", source_brightnesses.size)\n", + "print(\"Number of coefficients evaluated:\", coefficient_grid.size)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The reconstruction contains an entry for each source mesh point in this single-mapper example. Some values may be constrained to zero at the mesh boundary, and regularization couples neighbouring values, so the number of entries is not the number of independently constrained source features.\n", + "\n", + "During lens modelling, the search also changes the mass parameters. Each proposed mass model changes the ray tracing and therefore the mappings between source and image. The source must be reconstructed again for that proposal.\n", + "\n", + "The sequence is therefore:\n", + "\n", + "1. Propose the non-linear parameters, including the lens mass and regularization coefficient.\n", + "2. Construct the corresponding mappings.\n", + "3. Solve for the source brightnesses.\n", + "4. Evaluate how well that model explains the data, accounting for the source prior.\n", + "\n", + "This is what makes pixelized sources practical: the search explores the non-linear model choices, while the inversion handles the many source brightness values.\n", + "\n", + "__Mesh resolution and regularization belong together__\n", + "\n", + "We have held the source mesh at `(25, 25)`. The preferred coefficient we found belongs to that choice of mesh.\n", + "\n", + "Changing the mesh changes the locations and number of source brightness values, their neighbours, and how they contribute to the image. The same numerical coefficient therefore need not give an equivalent amount of smoothing on another mesh.\n", + "\n", + "This matters when testing resolution. If we increase the number of source points but keep the coefficient fixed, any change in the reconstruction reflects both the new resolution and its interaction with the prior. We cannot assume that we have made a fair comparison of the best reconstructions available at each resolution.\n", + "\n", + "Let\u2019s repeat the coefficient experiment for `(15, 15)` and `(35, 35)`, alongside our existing `(25, 25)` results. We extend our helper so the mesh shape is an explicit input." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "def fit_with_coefficient(coefficient, mesh_shape=mesh_shape):\n", + " pixelization = al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=al.reg.Constant(coefficient=coefficient),\n", + " )\n", + "\n", + " source_galaxy = al.Galaxy(\n", + " redshift=1.0,\n", + " pixelization=pixelization,\n", + " )\n", + "\n", + " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])\n", + "\n", + " return al.FitImaging(dataset=dataset, tracer=tracer)\n", + "\n", + "\n", + "evidence_by_shape = {mesh_shape: evidence_grid}\n", + "\n", + "for shape in ([(6, 6), (10, 10)] if mesh_shape == (8, 8) else [(15, 15), (35, 35)]):\n", + " values = []\n", + "\n", + " for coefficient in coefficient_grid:\n", + " current_fit = fit_with_coefficient(\n", + " coefficient=float(coefficient),\n", + " mesh_shape=shape,\n", + " )\n", + " values.append(float(current_fit.log_evidence))\n", + "\n", + " evidence_by_shape[shape] = np.asarray(values)\n", + "\n", + "if not all(\n", + " np.all(np.isfinite(values))\n", + " for values in evidence_by_shape.values()\n", + "):\n", + " raise ValueError(\"Inspect non-finite evidence values before comparing meshes.\")\n", + "\n", + "reference_evidence = max(\n", + " float(np.max(values))\n", + " for values in evidence_by_shape.values()\n", + ")\n", + "\n", + "fig, ax = plt.subplots()\n", + "\n", + "for shape, values in sorted(evidence_by_shape.items()):\n", + " ax.semilogx(\n", + " coefficient_grid,\n", + " values - reference_evidence,\n", + " marker=\"o\",\n", + " label=f\"{shape[0]} \u00d7 {shape[1]}\",\n", + " )\n", + "\n", + "ax.set_xlabel(\"Regularization coefficient\")\n", + "ax.set_ylabel(\"Log evidence relative to the highest sampled value\")\n", + "ax.set_title(\"Mesh Resolution and Regularization\")\n", + "ax.legend()\n", + "plt.show()" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This experiment performs 26 additional reconstructions, so it takes longer than our earlier three-way comparison.\n", + "\n", + "Look at both the locations and heights of the curves\u2019 maxima. The preferred coefficient may shift as the mesh changes. A finer mesh may help describe source structure, but adding points does not guarantee a higher evidence.\n", + "\n", + "All three curves use the same image pixels and noise model. We also subtract one common reference evidence, preserving differences between the meshes. Subtracting each curve\u2019s own maximum would hide those differences.\n", + "\n", + "As before, a boundary maximum means that the coefficient range needs extending. These are controlled resolution checks, not a demonstration that mesh dimensions should become free parameters in every lens-model search.\n", + "\n", + "__Wrap Up__\n", + "\n", + "We can now give the regularization input a more meaningful interpretation.\n", + "\n", + "The source mesh supplies brightness values that can vary to explain the image. Interpolation defines the brightness between those values. Regularization places a prior on their variation, discouraging unnecessary differences between neighbours.\n", + "\n", + "Too little regularization can allow the reconstruction to explain noise through spurious source structure. Too much can suppress real structure and leave it visible in the image residuals. Evidence helps compare these choices by accounting for both image agreement and the freedom allowed by the source prior.\n", + "\n", + "We also saw that the coefficient is not a universal setting. Its appropriate value depends on the dataset, lens model, mesh and regularization scheme. A value that works for one reconstruction should not simply be carried into another analysis without checking it.\n", + "\n", + "For a final comparison, print the preferred sampled coefficient for each mesh:" + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "for shape, values in sorted(evidence_by_shape.items()):\n", + " index = int(np.argmax(values))\n", + " coefficient = float(coefficient_grid[index])\n", + " boundary = index in (0, len(coefficient_grid) - 1)\n", + "\n", + " print(\n", + " f\"Mesh {shape}: coefficient={coefficient:.4g}, \"\n", + " f\"log evidence={values[index]:.3f}\"\n", + " + (\" \u2014 boundary maximum; extend the range\" if boundary else \"\")\n", + " )\n", + "\n", + "# Retain the original mesh's preferred fit for subsequent inspection.\n", + "fit = preferred_fit" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Throughout this tutorial, we fixed the lens mass to the simulation values. We have selected source-reconstruction settings under that assumption; we have not inferred the mass or its uncertainty.\n", + "\n", + "Later, these source reconstructions will sit inside a lens-model search. Before that, the next tutorial examines another practical issue: how the source mesh covers the ray-traced image coordinates, and why a small number of extreme coordinates can affect the resolution available to reconstruct the source.\n", + "\n", + "For readers who want the underlying equations, the workspace\u2019s [pixelization likelihood guide](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/likelihood_function.py) follows the mapping, blurring, regularization and evidence calculations step by step. That derivation complements the experiments here; it is not required to continue using pixelizations." + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.1" + }, + "colab": { + "aiContexts": { + "97746750-6915-569b-a61d-792a6bc69437": { + "id": "97746750-6915-569b-a61d-792a6bc69437", + "name": "PyAutoLens assistant", + "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones \u2014 common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially \u2014 both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type \u2014 Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation \u2014 constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source \u2014 do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* \u2014 either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised \u2014 `(adapt_image / max) ** power` \u2014 so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** \u2014 `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, \u2026).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead \u2014 transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` \u2014 the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` \u2014 the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` \u2014 the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline \u2014 imaging, group, multi-galaxy, multi-dataset \u2014 over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data \u2014 ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** \u2014 it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** \u2014 a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch \u2014 Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch \u2014 bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n \u2014 post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) \u2014 datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** \u2014 [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit \u2014 source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** \u2014 the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory \u2014 what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty \u2014\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at \u2014 the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* \u2014 if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions \u2014 the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` \u2014 see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> \u26a0\ufe0f **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch \u2014 source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot \u2014 when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D \u2014 plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch \u2014 mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch \u2014 double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel \u2014 the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map \u2014 regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic \u2014 mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) \u2014 overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) \u2014 automated pipeline that\n handles the parametric \u2192 pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart \u2014 least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** \u2014 [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets \u2014\n links into deeper docs.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model \u2014 production\n pattern for extended-arc sources.\n" + } + }, + "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb b/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb deleted file mode 100644 index 8e0b1f8..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb +++ /dev/null @@ -1,605 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 2: Mappers\n", - "===================\n", - "\n", - "In the previous tutorial, we used a pixelization to create a `Mapper`. However, it was not clear what a `Mapper`\n", - "does, why it was called a mapper and whether it was mapping anything at all!\n", - "\n", - "Therefore, in this tutorial, we'll cover mappers in more detail.\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** we'll use new strong lensing data, where.\n", - "- **Mappers:** We now setup a `Pixelization` and use it to create a `Mapper` via the tracer`s source-plane grid.\n", - "- **Mask:** Define the 2D mask applied to the dataset for the model-fit.\n", - "- **Wrap Up:** Summary of the script and next steps." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "from pathlib import Path\n", - "import autolens as al\n", - "import autolens.plot as aplt\n", - "import autoarray.plot as aaplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use new strong lensing data, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - " over_sample_size_pixelization=1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, lets set up our `Grid2D` (using the image above)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "grid = al.Grid2D.uniform(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " over_sample_size=1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Our `Tracer` will use the same lens galaxy and source galaxy that we used to simulate the imaging data (although,\n", - "because we're modeling the source with a pixel-grid, we do not pass the source any light profiles)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field])\n", - "\n", - "source_plane_grid = tracer.traced_grid_2d_list_from(grid=grid)[1]" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mappers__\n", - "\n", - "We now setup a `Pixelization` and use it to create a `Mapper` via the tracer`s source-plane grid, just like we did in\n", - "the previous tutorial." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25))\n", - "\n", - "pixelization = al.Pixelization(mesh=mesh)\n", - "\n", - "interpolator = mesh.interpolator_from(\n", - " source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None\n", - ")\n", - "\n", - "mapper = al.Mapper(interpolator=interpolator)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Lets look at the two things a mapper holds. In the image-plane it has the (y,x) coordinate of every image-pixel it\n", - "uses, and in the source-plane it has the rectangular mesh those coordinates land on after being ray-traced by the\n", - "tracer." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "aplt.plot_array(\n", - " array=dataset.data, title=\"Image\", positions=mapper.image_plane_data_grid\n", - ")\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The mapper's job is to pair those two things together. Before we look at how it pairs whole source pixels, it helps\n", - "to see the simpler, point-level version: take a handful of image-pixel coordinates and follow the *same* coordinates\n", - "into the source-plane.\n", - "\n", - "We do this by giving the `indexes=` input a list of index groups, where each group is drawn in its own colour. The\n", - "same colour therefore marks the same coordinates in both planes." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "total_points = len(mapper.image_plane_data_grid)\n", - "\n", - "side = int(round(total_points**0.5))\n", - "\n", - "centre = side * (side // 2) + side // 2\n", - "\n", - "indexes = [\n", - " [index for index in range(0, 10) if index < total_points],\n", - " [\n", - " centre + step * side\n", - " for step in range(-5, 5)\n", - " if 0 <= centre + step * side < total_points\n", - " ],\n", - "]\n", - "\n", - "aaplt.plot_grid(\n", - " grid=mapper.image_plane_data_grid,\n", - " indexes=indexes,\n", - " title=\"Image-Plane Data Grid\",\n", - ")\n", - "aaplt.plot_grid(\n", - " grid=mapper.source_plane_data_grid,\n", - " indexes=indexes,\n", - " title=\"Source-Plane Data Grid (Traced)\",\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The red points, the first ten image-pixels at the very corner of the image, barely move: they are far from the lens\n", - "galaxy, so they are hardly deflected. The green points run vertically through the centre of the image, straight\n", - "through the lens galaxy, and are dragged a long way -- in the source-plane they no longer form a straight line, and\n", - "they pile up near the centre.\n", - "\n", - "This is only half the story though, because it tells us where individual coordinates go, not which *source pixel*\n", - "they end up inside. That is what a mapper actually stores, and it is what we look at next.\n", - "\n", - "We can now make the mapping appear the other way round. That is, we can input a source-pixel index (of our\n", - "rectangular mesh) and ask the mapper which image-pixels land inside it.\n", - "\n", - "`mapper.mappings_from` answers exactly this. It takes a list of source-pixel index *groups* and returns one `Mapping`\n", - "per group. Each `Mapping` carries:\n", - "\n", - " - `source_contours`: the outline of the source-plane cell(s) in the group.\n", - " - `image_contours`: the outlines of the connected regions of image-pixels which map into that group.\n", - "\n", - "Both are polygons in arc-seconds, so we can draw them straight onto the image and onto the source-plane, in the same\n", - "colour. That colour is the whole point: it says \"this source region produces these image regions\".\n", - "\n", - "Lets map source pixel 312, the central source-pixel, and draw it in both planes. We clamp the index with\n", - "`min(index, mapper.pixels - 1)` so the tutorial still runs if you shrink the mesh." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pix_indexes = [[min(312, mapper.pixels - 1)]]\n", - "\n", - "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", - "\n", - "aaplt.subplot_image_and_mapper(\n", - " mapper=mapper,\n", - " image=dataset.data,\n", - " regions=mappings,\n", - " mesh_grid=mapper.source_plane_mesh_grid,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "There we have it, multiple imaging in all its glory.\n", - "\n", - "On the right, a single small red rectangle: one cell of the source-plane mesh. On the left, that same red appears in\n", - "two or more *separate* regions of the image, sitting on the lensed source's ring. The lens galaxy's mass has taken\n", - "one patch of source and produced several images of it, and the mapper knows which image-pixels belong to which.\n", - "\n", - "Notice also that the red regions in the image-plane are wider than a strict \"four image pixels per source pixel\"\n", - "footprint would be. This is because the pairing of image-pixels to source-pixels is not one-to-one: a bilinear\n", - "interpolation scheme is used, so an image-pixel which lands near the edge of a source-pixel, but outside it, is still\n", - "paired with that source-pixel with a weight.\n", - "\n", - "Try changing the source-pixel indexes below. This will give you a feel for how different regions of the source-plane\n", - "map to the image." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pix_indexes = [\n", - " [min(index, mapper.pixels - 1) for index in group] for group in [[312, 313], [412]]\n", - "]\n", - "\n", - "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", - "\n", - "aaplt.subplot_image_and_mapper(\n", - " mapper=mapper,\n", - " image=dataset.data,\n", - " regions=mappings,\n", - " mesh_grid=mapper.source_plane_mesh_grid,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Two groups, two colours. The first group is two neighbouring source pixels, so red covers twice the area of the\n", - "source-plane and correspondingly wider arcs in the image. The second group is a single pixel further from the centre\n", - "of the source-plane, drawn in green, and its images land somewhere else entirely on the ring.\n", - "\n", - "This is the key insight of the whole chapter: *every* source pixel has a set of image regions like this, and the\n", - "collection of all of them is the \"mapping matrix\" that an inversion solves. Tutorial 3 puts that matrix to work.\n", - "\n", - "Okay, so I think we can agree, mapper's map things! More specifically, they map source-plane pixels to multiple pixels\n", - "in the observed image of a strong lens.\n", - "\n", - "__Mask__\n", - "\n", - "Finally, lets repeat the steps that we performed above, but now using a masked image. By applying a `Mask2D`, the\n", - "mapper only maps image-pixels that are not removed by the mask. This removes the (many) image pixels at the edge of the\n", - "image, where the source is not present. These pixels also pad-out the source-plane, thus by removing them our\n", - "source-plane reduces in size.\n", - "\n", - "Lets first see why they are worth removing, by drawing source pixels near the edge of the mesh:" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pix_indexes = [\n", - " [min(index, mapper.pixels - 1) for index in group]\n", - " for group in [[600, 601, 602, 603, 604], [620, 621, 622, 623, 624]]\n", - "]\n", - "\n", - "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", - "\n", - "aaplt.subplot_image_and_mapper(\n", - " mapper=mapper,\n", - " image=dataset.data,\n", - " regions=mappings,\n", - " mesh_grid=mapper.source_plane_mesh_grid,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Both groups sit along the bottom edge of the source-plane mesh, and both map to a single blob in a corner of the\n", - "image, far from the lensed source, where there is no signal to reconstruct. They are wasted source pixels: the\n", - "inversion has to solve for them, but the data has nothing to say about them.\n", - "\n", - "Lets use an annular `Mask2D`, which will capture the ring-like shape of the lensed source galaxy." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=1.0,\n", - " outer_radius=2.2,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask)\n", - "aplt.plot_array(array=dataset.data, title=\"Data\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To create the mapper, we need to trace the masked imaging's grid to the source-plane via the tracer." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field])\n", - "\n", - "source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1]" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We can now use the masked source-plane grid to create a new `Mapper` (using the same rectangular 25 x 25 pixelization \n", - "as before)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "interpolator = mesh.interpolator_from(\n", - " source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None\n", - ")\n", - "mapper = al.Mapper(interpolator=interpolator)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Lets plot it, including the image-plane grid and source-plane grid, which are now much smaller than before because\n", - "the mask has removed the many image pixels at the edge of the image." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "aplt.plot_array(array=dataset.data, title=\"Image\")\n", - "\n", - "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "First, look how much closer we are to the source-plane (The axis sizes have decreased from ~ -2.5\" -> 2.5\" to \n", - "~ -0.6\" to 0.6\"). \n", - "\n", - "We can more clearly see the diamond of points in the centre of the source-plane (for those who have been reading up, \n", - "this diamond is called the `caustic`).\n", - "\n", - "The source-plane is now only ~1\" across instead of ~7\", so every source pixel covers a much larger fraction of the\n", - "figure and the polygons we drew above are far easier to read. Lets draw four source pixels at once, each in its own\n", - "colour." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pix_indexes = [[min(index, mapper.pixels - 1)] for index in [312, 314, 316, 318]]\n", - "\n", - "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", - "\n", - "aaplt.subplot_image_and_mapper(\n", - " mapper=mapper,\n", - " image=dataset.data,\n", - " regions=mappings,\n", - " mesh_grid=mapper.source_plane_mesh_grid,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Four source pixels, four colours, and in the image-plane each colour picks out its own short segments of the ring,\n", - "on opposite sides of it. Source pixels which are neighbours in the source-plane produce image regions which are\n", - "neighbours along each arc -- the lensing is smooth, and the mapper preserves that.\n", - "\n", - "The number of image-plane regions each source pixel maps to is the number of multiple images it produces (the mask\n", - "can split one arc into more than one region, so treat these counts as a lower bound on the physical multiplicity):" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "for mapping in mappings:\n", - " print(\n", - " f\"Source pixel {mapping.pix_indexes} maps to {len(mapping.image_regions)} image-plane regions.\"\n", - " )" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Wrap Up__\n", - "\n", - "In this tutorial, we learnt about mappers, and we used them to understand how the image and source plane map to one \n", - "another. Your exercises are:\n", - "\n", - " 1) Change the einstein radius of the lens galaxy in small increments (e.g. einstein radius 1.6\" -> 1.55\"). As the \n", - " radius deviates from 1.6\" (the input value of the simulated lens), what do you notice about where the points map \n", - " from the centre of the source-plane (where the source-galaxy is simulated, e.g. (0.0\", 0.0\"))?\n", - " \n", - " 2) Think about how this could help us actually model lenses. We have said we're going to reconstruct our source\n", - " galaxies on the pixel-grid. So, how does knowing how each pixel maps to the image actually help us? If you've not got\n", - " any bright ideas, then worry not, that's exactly what we're going to cover in the next tutorial." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb b/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb new file mode 100644 index 0000000..f7fd667 --- /dev/null +++ b/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb @@ -0,0 +1,785 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tutorial 3: Borders\n", + "===================\n", + "\n", + "__Contents__\n", + "\n", + "- Why the extent of the source mesh matters\n", + "- What we mean by a border\n", + "- Starting without border relocation\n", + "- Including the central image pixels\n", + "- Following the central pixels into the source plane\n", + "- Tracing the outer border\n", + "- Switching border relocation on\n", + "- What relocation changes\u2014and what it does not\n", + "- The mask still needs to cover the lensed source\n", + "- Wrap up" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Google Colab Setup__\n", + "\n", + "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "jupyter": { + "source_hidden": true + } + }, + "outputs": [], + "source": [ + "# @title Set up Google Colab { display-mode: \"form\" }\n", + "try:\n", + " import google.colab\n", + "except ImportError:\n", + " from autolens import setup_colab as _setup_colab\n", + "else:\n", + " import importlib\n", + " import subprocess\n", + " import sys\n", + "\n", + " subprocess.check_call(\n", + " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", + " )\n", + " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", + "\n", + "_setup_colab.setup(\"howtolens\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Why the extent of the source mesh matters__\n", + "\n", + "In the previous tutorials, we chose how many points our rectangular source mesh contained. However, the number of points is only part of what determines its resolution. We also need to consider how much of the source plane those points cover.\n", + "\n", + "A `(25, 25)` mesh spread across a small source region can describe finer structure than the same mesh spread across a much larger region. If a few ray-traced coordinates extend far beyond the source, the mesh can expand to accommodate them, leaving fewer points where we actually need to reconstruct the galaxy.\n", + "\n", + "This tutorial examines how that happens and introduces the border relocator, which provides a practical way to control these extreme coordinates.\n", + "\n", + "We return to a simpler simulated source so that its morphology does not distract from the geometry. The image contains lensed source light but no foreground lens light." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "from autolens import jax_wrapper\n", + "\n", + "from pathlib import Path\n", + "import subprocess\n", + "import sys\n", + "\n", + "import numpy as np\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "import autoarray.plot as aaplt\n", + "\n", + "dataset_path = Path(\"dataset\") / \"imaging\" / \"simple__no_lens_light\"\n", + "\n", + "if al.util.dataset.should_simulate(str(dataset_path)):\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", + " check=True,\n", + " )\n", + "\n", + "dataset_unmasked = al.Imaging.from_fits(\n", + " data_path=dataset_path / \"data.fits\",\n", + " noise_map_path=dataset_path / \"noise_map.fits\",\n", + " psf_path=dataset_path / \"psf.fits\",\n", + " pixel_scales=0.1,\n", + ")\n", + "\n", + "dataset_unmasked = dataset_unmasked.apply_over_sampling(\n", + " over_sample_size_pixelization=1\n", + ")\n", + "\n", + "aplt.subplot_imaging_dataset(dataset=dataset_unmasked)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We will compare two masks with the same outer radius. One includes the centre of the image; the other excludes it. This lets us see what happens when the central image pixels enter the reconstruction.\n", + "\n", + "__What we mean by a border__\n", + "\n", + "The border is the outermost boundary of the unmasked image region.\n", + "\n", + "For a circular mask, this is straightforward: the border follows the outside of the circle. An annular mask has an inner and an outer edge, but the border used here follows the outer edge. The hole in the middle does not become a second outer border.\n", + "\n", + "Let\u2019s plot both masks and mark their border coordinates." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "mask_circular = al.Mask2D.circular(\n", + " shape_native=dataset_unmasked.shape_native,\n", + " pixel_scales=dataset_unmasked.pixel_scales,\n", + " radius=2.5,\n", + ")\n", + "\n", + "mask_annular = al.Mask2D.circular_annular(\n", + " shape_native=dataset_unmasked.shape_native,\n", + " pixel_scales=dataset_unmasked.pixel_scales,\n", + " inner_radius=0.8,\n", + " outer_radius=2.5,\n", + ")\n", + "\n", + "dataset_circular = dataset_unmasked.apply_mask(mask=mask_circular)\n", + "dataset_annular = dataset_unmasked.apply_mask(mask=mask_annular)\n", + "\n", + "aplt.plot_array(\n", + " array=dataset_circular.data,\n", + " positions=mask_circular.derive_grid.border,\n", + " title=\"Circular Mask: Outer Border\",\n", + ")\n", + "\n", + "aplt.plot_array(\n", + " array=dataset_annular.data,\n", + " positions=mask_annular.derive_grid.border,\n", + " title=\"Annular Mask: Outer Border\",\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The outer borders should coincide because the masks share the same outer radius. The difference is inside: the circular mask includes image pixels near the lens centre that the annular mask removes.\n", + "\n", + "We will keep the masks fixed while comparing the source-plane grids. Choosing the mask and relocating a border are different operations: the mask selects which image pixels enter the fit, while relocation changes how certain coordinates are treated when constructing the source reconstruction.\n", + "\n", + "__Starting without border relocation__\n", + "\n", + "First, let\u2019s reconstruct the source using the annular mask with border relocation explicitly switched off.\n", + "\n", + "We use the mass model that generated the simulation and a uniform rectangular source mesh. The helper below lets us change the mask and relocation setting while keeping the lens model, mesh shape and regularization coefficient unchanged." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25.\n", + "mesh_shape = (8, 8) if dataset_unmasked.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25)\n", + "\n", + "lens_galaxy = al.Galaxy(\n", + " redshift=0.5,\n", + " mass=al.mp.Isothermal(\n", + " centre=(0.0, 0.0),\n", + " einstein_radius=1.6,\n", + " ell_comps=al.convert.ell_comps_from(\n", + " axis_ratio=0.9,\n", + " angle=45.0,\n", + " ),\n", + " ),\n", + ")\n", + "\n", + "field = al.MassField(\n", + " redshift=0.5,\n", + " shear=al.mp.ExternalShear(\n", + " gamma_1=0.05,\n", + " gamma_2=0.05,\n", + " ),\n", + ")\n", + "\n", + "pixelization = al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=al.reg.Constant(coefficient=1.0),\n", + ")\n", + "\n", + "source_galaxy = al.Galaxy(\n", + " redshift=1.0,\n", + " pixelization=pixelization,\n", + ")\n", + "\n", + "tracer = al.Tracer(\n", + " galaxies=[lens_galaxy, source_galaxy],\n", + " fields=[field],\n", + ")\n", + "\n", + "\n", + "def fit_with_mask_and_border(mask, use_border_relocator):\n", + " dataset = dataset_unmasked.apply_mask(mask=mask)\n", + "\n", + " return al.FitImaging(\n", + " dataset=dataset,\n", + " tracer=tracer,\n", + " settings=al.Settings(\n", + " use_border_relocator=use_border_relocator,\n", + " ),\n", + " )\n", + "\n", + "\n", + "fit_annular = fit_with_mask_and_border(\n", + " mask=mask_annular,\n", + " use_border_relocator=False,\n", + ")\n", + "\n", + "mapper_annular = fit_annular.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_annular.source_plane_data_grid,\n", + " title=\"Annular Mask: Ray-Traced Image Coordinates\",\n", + ")\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=mapper_annular,\n", + " solution_vector=fit_annular.inversion.reconstruction,\n", + " mesh_grid=mapper_annular.source_plane_mesh_grid,\n", + " zoom_to_brightest=False,\n", + " title=\"Annular Mask: Source Reconstruction\",\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The first plot shows where the image coordinates land after ray tracing. The second shows the source mesh and the brightnesses inferred on it.\n", + "\n", + "Look at the coordinate ranges as well as the source itself. These tell us how much source-plane area the mesh is covering. We will use this reconstruction as a reference when we add the central image pixels.\n", + "\n", + "__Including the central image pixels__\n", + "\n", + "Now repeat the calculation with the circular mask, still without border relocation.\n", + "\n", + "The outer image boundary is unchanged. We are adding the pixels within the central hole of the annulus, rather than extending the image to larger radii." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "fit_circular = fit_with_mask_and_border(\n", + " mask=mask_circular,\n", + " use_border_relocator=False,\n", + ")\n", + "\n", + "mapper_circular = fit_circular.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_circular.source_plane_data_grid,\n", + " title=\"Circular Mask: Ray-Traced Image Coordinates\",\n", + ")\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=mapper_circular,\n", + " solution_vector=fit_circular.inversion.reconstruction,\n", + " mesh_grid=mapper_circular.source_plane_mesh_grid,\n", + " zoom_to_brightest=False,\n", + " title=\"Circular Mask: Source Reconstruction\",\n", + ")\n", + "\n", + "for label, mapper in [\n", + " (\"Annular\", mapper_annular),\n", + " (\"Circular\", mapper_circular),\n", + "]:\n", + " coordinates = np.asarray(mapper.source_plane_mesh_grid)\n", + " span_y, span_x = np.ptp(coordinates, axis=0)\n", + "\n", + " print(\n", + " f\"{label} mesh coordinate spans: \"\n", + " f\"y={span_y:.3f} arcsec, x={span_x:.3f} arcsec\"\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare the source-plane extent with the annular case. The added image pixels can trace outside the compact region occupied by the other coordinates, causing the rectangular mesh to cover a larger area.\n", + "\n", + "Both reconstructions still use the same number of mesh points. If the mesh expands, their spacing increases, reducing the resolution available to describe the central source.\n", + "\n", + "This illustrates why increasing the number of image pixels does not automatically improve a reconstruction with a fixed mesh. We must also consider how those pixels affect the source-plane coverage.\n", + "\n", + "The two masks contain different data, so this is a geometric comparison\u2014not a direct evidence comparison between otherwise identical fits.\n", + "\n", + "__Following the central pixels into the source plane__\n", + "\n", + "Let\u2019s confirm where the extra source-plane coordinates come from.\n", + "\n", + "We select two small groups of image pixels: one close to the lens centre and another near the lensed arc. As in tutorial 1, we use the same index groups in both planes, so matching colours identify the same light paths." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "image_coordinates = np.asarray(\n", + " mapper_circular.image_plane_data_grid\n", + ")\n", + "\n", + "central_indexes = np.argsort(\n", + " np.sum(image_coordinates**2, axis=1)\n", + ")[:12].tolist()\n", + "\n", + "arc_indexes = np.argsort(\n", + " np.sum(\n", + " (image_coordinates - np.array([0.0, 1.6])) ** 2,\n", + " axis=1,\n", + " )\n", + ")[:12].tolist()\n", + "\n", + "index_groups = [central_indexes, arc_indexes]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_circular.image_plane_data_grid,\n", + " indexes=index_groups,\n", + " title=\"Image Coordinates: Central Pixels and Arc Pixels\",\n", + ")\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_circular.source_plane_data_grid,\n", + " indexes=index_groups,\n", + " title=\"The Same Pixels Traced into the Source Plane\",\n", + ")\n", + "\n", + "for index in central_indexes[:4]:\n", + " print(\n", + " f\"Image index {index}: \"\n", + " f\"{image_coordinates[index]} -> \"\n", + " f\"{np.asarray(mapper_circular.source_plane_data_grid[index])}\"\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The central image coordinates need not map close to the source-plane origin. Their source positions depend on the difference between their image positions and the lens deflections.\n", + "\n", + "Near the centre of a cuspy mass distribution, a small image region can correspond to a much larger source region. This is demagnification: the image occupies less area than the corresponding source region. It does not require the deflection angle itself to become arbitrarily large.\n", + "\n", + "For our reconstruction, the practical consequence is that central image pixels can map well outside the region traced by the arcs. The mesh then spends some of its resolution covering those distant positions.\n", + "\n", + "There is another concern. Source structure reconstructed at those positions may predict other images outside our chosen mask, where we are not comparing the model with the data. The reconstruction is then missing some of the observational constraints that would otherwise act on that structure.\n", + "\n", + "In the next blocks, we will trace the outer border into the source plane and examine how border relocation handles coordinates beyond it. We will compare the same circularly masked dataset with relocation switched off and on, so that the effect of relocation is isolated.\n", + "\n", + "**\ud83e\udd16 Ask AI:** Why can a small group of central image pixels change the resolution of a rectangular source mesh, even when most of the observed source light lies in the arcs?\n", + "\n", + "__Tracing the outer border__\n", + "\n", + "We have seen that some central image pixels trace beyond the compact source region. To decide how to handle those coordinates, we first need a reference boundary in the source plane.\n", + "\n", + "We obtain this from the outer border of the image mask. These are ordinary image coordinates, so we can ray-trace them through the same lens model as every other pixel. Their traced positions describe where the edge of our fitted image region maps into the source plane.\n", + "\n", + "Let\u2019s highlight the border pixels in the image and follow the same indexes into the source plane. Border relocation is still switched off here, so we are looking at the original ray-traced coordinates." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "border_indexes = mask_circular.derive_indexes.border_slim.tolist()\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_circular.image_plane_data_grid,\n", + " indexes=[border_indexes],\n", + " title=\"Image-Plane Coordinates: Outer Border Highlighted\",\n", + ")\n", + "\n", + "aaplt.plot_grid(\n", + " grid=mapper_circular.source_plane_data_grid,\n", + " indexes=[border_indexes],\n", + " title=\"Source-Plane Coordinates: Traced Outer Border Highlighted\",\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare the highlighted border with the central image pixels traced in the previous block. Some image coordinates that were well inside the image mask can land beyond the traced outer border in the source plane.\n", + "\n", + "This is the important geometric distinction: being inside the image-plane border does not guarantee that a coordinate remains inside its traced counterpart.\n", + "\n", + "The border relocator uses the traced outer-border coordinates to estimate a source-plane boundary. In the current implementation, this is an ellipse. Coordinates beyond that boundary are moved inward for the source reconstruction, preventing them from extending its coverage unchecked.\n", + "\n", + "__Switching border relocation on__\n", + "\n", + "Let\u2019s repeat the circular-mask fit with border relocation enabled.\n", + "\n", + "The data, mask, lens mass, mesh shape and regularization coefficient all remain unchanged. This time, the source mesh is constructed using the relocated coordinates." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "fit_relocated = fit_with_mask_and_border(\n", + " mask=mask_circular,\n", + " use_border_relocator=True,\n", + ")\n", + "\n", + "mapper_relocated = fit_relocated.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + "for label, mapper in [\n", + " (\"Without Relocation\", mapper_circular),\n", + " (\"With Relocation\", mapper_relocated),\n", + "]:\n", + " aaplt.plot_grid(\n", + " grid=mapper.source_plane_data_grid,\n", + " indexes=index_groups,\n", + " title=f\"{label}: Selected Source-Plane Coordinates\",\n", + " )\n", + "\n", + " mesh_coordinates = np.asarray(mapper.source_plane_mesh_grid)\n", + " span_y, span_x = np.ptp(mesh_coordinates, axis=0)\n", + "\n", + " print(\n", + " f\"{label}: mesh spans \"\n", + " f\"y={span_y:.3f} arcsec, x={span_x:.3f} arcsec\"\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Follow the same coloured coordinate groups through the two plots. Coordinates outside the estimated boundary are relocated towards it; those inside remain unchanged.\n", + "\n", + "If relocation reduces the mesh extent, the same number of source points now covers a smaller area. This can restore resolution in the region where the source is being reconstructed, without increasing the mesh dimensions.\n", + "\n", + "We can also identify which coordinates moved and display their positions before and after relocation." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "coordinates_before = np.asarray(\n", + " mapper_circular.source_plane_data_grid\n", + ")\n", + "coordinates_after = np.asarray(\n", + " mapper_relocated.source_plane_data_grid\n", + ")\n", + "\n", + "displacements = np.linalg.norm(\n", + " coordinates_after - coordinates_before,\n", + " axis=1,\n", + ")\n", + "moved_indexes = np.flatnonzero(displacements > 1.0e-8).tolist()\n", + "\n", + "print(\"Number of relocated image-pixel coordinates:\", len(moved_indexes))\n", + "\n", + "if moved_indexes:\n", + " aaplt.plot_grid(\n", + " grid=mapper_circular.source_plane_data_grid,\n", + " indexes=[moved_indexes],\n", + " title=\"Relocated Coordinates: Original Positions\",\n", + " )\n", + "\n", + " aaplt.plot_grid(\n", + " grid=mapper_relocated.source_plane_data_grid,\n", + " indexes=[moved_indexes],\n", + " title=\"Relocated Coordinates: Positions Used by the Mapper\",\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "These are still the same image pixels with the same measured brightnesses. Relocation changes their source-plane mapping coordinates; it does not remove them from the fit or move their positions in the observed image.\n", + "\n", + "__What relocation changes\u2014and what it does not__\n", + "\n", + "Border relocation is a numerical treatment of the source reconstruction. It does not change the lens mass profile or the physical deflection calculation.\n", + "\n", + "That distinction matters. If we ray-trace the image grid directly through the tracer, we recover the original source coordinates. The mapper used by the relocated inversion instead contains the coordinates after the border treatment.\n", + "\n", + "Let\u2019s compare these explicitly." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "physical_source_grid = tracer.traced_grid_2d_list_from(\n", + " grid=dataset_circular.grids.pixelization\n", + ")[1]\n", + "\n", + "physical_coordinates = np.asarray(physical_source_grid)\n", + "\n", + "print(\n", + " \"Largest difference between direct ray tracing and the \"\n", + " \"mapper without relocation:\",\n", + " np.max(\n", + " np.linalg.norm(\n", + " physical_coordinates - coordinates_before,\n", + " axis=1,\n", + " )\n", + " ),\n", + ")\n", + "\n", + "if moved_indexes:\n", + " index = moved_indexes[0]\n", + "\n", + " print(\"Image-pixel index:\", index)\n", + " print(\"Directly ray-traced position:\", physical_coordinates[index])\n", + " print(\"Position used after relocation:\", coordinates_after[index])" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We should therefore understand relocation as a practical boundary treatment, not an alternative physical lens equation. It controls how extreme coordinates participate in a reconstruction whose image coverage is finite.\n", + "\n", + "The next step is to inspect its effect on the inferred source and the model image. We use a common source colour scale so that changes in brightness are not hidden by separately scaled figures." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "source_vmax = max(\n", + " float(np.max(np.asarray(current_fit.inversion.reconstruction)))\n", + " for current_fit in [fit_circular, fit_relocated]\n", + ")\n", + "\n", + "for label, current_fit in [\n", + " (\"Without Relocation\", fit_circular),\n", + " (\"With Relocation\", fit_relocated),\n", + "]:\n", + " mapper = current_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + " aaplt.plot_mapper(\n", + " mapper=mapper,\n", + " solution_vector=current_fit.inversion.reconstruction,\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + " vmin=0.0,\n", + " vmax=source_vmax,\n", + " zoom_to_brightest=False,\n", + " title=f\"{label}: Source Reconstruction\",\n", + " )\n", + "\n", + " aplt.plot_array(\n", + " array=(\n", + " dataset_circular.data - current_fit.model_data\n", + " ) / dataset_circular.noise_map,\n", + " title=f\"{label}: Normalized Residuals\",\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Look for changes in the mesh coverage, the source structure and the residuals. A more compact mesh alone does not prove that the model is accurate, and relocation does not guarantee freedom from systematic errors.\n", + "\n", + "We have also kept the regularization coefficient fixed to isolate the change in configuration. As tutorial 2 showed, changing mesh geometry can alter how regularization acts, so this is a diagnostic comparison rather than a complete optimization of both reconstructions.\n", + "\n", + "__The mask still needs to cover the lensed source__\n", + "\n", + "Border relocation does not replace choosing an appropriate image mask.\n", + "\n", + "If the mask excludes part of an arc or another image of the source, those pixels do not constrain the reconstruction. Relocating source coordinates cannot recover information that we have excluded from the fit.\n", + "\n", + "The mask also determines the border from which the source-plane boundary is estimated. Changing its size therefore changes both the image pixels being fitted and the boundary treatment.\n", + "\n", + "Let\u2019s inspect several circular masks before fitting them. We plot their borders on the full image so that any source light outside the selected region remains visible." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "mask_radii = [2.0, 2.5, 3.0]\n", + "masks_by_radius = {}\n", + "\n", + "for radius in mask_radii:\n", + " mask = al.Mask2D.circular(\n", + " shape_native=dataset_unmasked.shape_native,\n", + " pixel_scales=dataset_unmasked.pixel_scales,\n", + " radius=radius,\n", + " )\n", + " masks_by_radius[radius] = mask\n", + "\n", + " aplt.plot_array(\n", + " array=dataset_unmasked.data,\n", + " positions=mask.derive_grid.border,\n", + " title=f\"Full Image with Mask Border at {radius:.1f} Arcsec\",\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check whether each border encloses the visible lensed emission with some surrounding background. A mask that follows only the brightest parts can exclude faint extensions that still matter to the reconstruction.\n", + "\n", + "Now compare the resulting fits with relocation enabled." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "fits_by_radius = {}\n", + "\n", + "for radius, mask in masks_by_radius.items():\n", + " current_fit = fit_with_mask_and_border(\n", + " mask=mask,\n", + " use_border_relocator=True,\n", + " )\n", + " fits_by_radius[radius] = current_fit\n", + "\n", + " mapper = current_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + " aaplt.plot_mapper(\n", + " mapper=mapper,\n", + " solution_vector=current_fit.inversion.reconstruction,\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + " zoom_to_brightest=False,\n", + " title=f\"Source Reconstruction: Mask Radius {radius:.1f} Arcsec\",\n", + " )\n", + "\n", + " aplt.subplot_fit_imaging(fit=current_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare the source structure and residuals, especially where a smaller mask approaches the arcs. If the reconstruction changes substantially as clearly relevant source light enters the mask, the smaller-mask result deserves closer inspection.\n", + "\n", + "Do not rank these masks by their raw evidence values: they contain different sets of image pixels. The purpose here is to examine coverage and stability, not to select whichever mask produces the largest number.\n", + "\n", + "**\ud83e\udd16 Ask AI:** Why can a reconstruction appear satisfactory inside a small mask while failing to explain other visible parts of the same lensed source?\n", + "\n", + "__Wrap up__\n", + "\n", + "We began with a rectangular source mesh whose resolution depended on both its number of points and the area they covered. A small number of extreme ray-traced coordinates could expand that area and reduce the resolution available for the source.\n", + "\n", + "The border relocator uses the traced outer image border to estimate a source-plane boundary, then moves coordinates beyond that boundary inward for the reconstruction. The observed image pixels remain in the fit, and the physical lens model is unchanged.\n", + "\n", + "In routine modelling, we normally leave this treatment enabled. Knowing what it does is useful when a source mesh extends unexpectedly far from the reconstructed galaxy, or when a reconstruction changes strongly with the mask.\n", + "\n", + "These issues can also occur in systems with several lens galaxies. Extreme coordinates need not originate only near the centre of the image; they can be associated with other mass concentrations. The same diagnostic applies: follow the image coordinates into the source plane and inspect the boundary and mesh coverage.\n", + "\n", + "For subsequent inspection, return to our circular mask with radius `2.5` arcsec and relocation enabled." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "dataset = dataset_circular\n", + "fit = fit_relocated\n", + "mapper = mapper_relocated\n", + "\n", + "aplt.subplot_fit_imaging(fit=fit)\n", + "\n", + "aaplt.plot_mapper(\n", + " mapper=mapper,\n", + " solution_vector=fit.inversion.reconstruction,\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + " zoom_to_brightest=False,\n", + " title=\"Source Reconstruction with Border Relocation Enabled\",\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have now examined the source mesh, interpolation, regularization and border treatment while holding the lens mass fixed.\n", + "\n", + "In the next tutorial, we let the mass model vary. We will see how a pixelized source participates in lens modelling, why its flexibility can admit misleading solutions, and how a sensible starting model helps the search find the relevant region of parameter space." + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.1" + }, + "colab": { + "aiContexts": { + "97746750-6915-569b-a61d-792a6bc69437": { + "id": "97746750-6915-569b-a61d-792a6bc69437", + "name": "PyAutoLens assistant", + "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones \u2014 common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially \u2014 both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type \u2014 Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation \u2014 constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source \u2014 do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* \u2014 either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised \u2014 `(adapt_image / max) ** power` \u2014 so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** \u2014 `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, \u2026).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead \u2014 transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` \u2014 the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` \u2014 the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` \u2014 the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline \u2014 imaging, group, multi-galaxy, multi-dataset \u2014 over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data \u2014 ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** \u2014 it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** \u2014 a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch \u2014 Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch \u2014 bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n \u2014 post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) \u2014 datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** \u2014 [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit \u2014 source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** \u2014 the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory \u2014 what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty \u2014\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at \u2014 the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* \u2014 if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions \u2014 the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` \u2014 see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> \u26a0\ufe0f **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch \u2014 source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot \u2014 when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D \u2014 plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch \u2014 mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch \u2014 double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel \u2014 the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map \u2014 regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic \u2014 mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) \u2014 overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) \u2014 automated pipeline that\n handles the parametric \u2192 pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart \u2014 least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** \u2014 [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets \u2014\n links into deeper docs.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model \u2014 production\n pattern for extended-arc sources.\n" + } + }, + "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb b/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb deleted file mode 100644 index 43272eb..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb +++ /dev/null @@ -1,615 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 3: Inversions\n", - "======================\n", - "\n", - "In the previous two tutorials, we introduced:\n", - "\n", - " - `Pixelization`'s: which place a pixel-grid in the source-plane.\n", - " - `Mappers`'s: which describe how each source-pixel maps to one or more image pixels.\n", - "\n", - "However, none of this has actually helped us fit strong lens data or reconstruct the source galaxy. This is the subject\n", - "of this tutorial, where the process of reconstructing the source's light on the pixelization is called an `Inversion`.\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.\n", - "- **Pixelization:** Finally, we can now use the `Mapper` to reconstruct the source via an `Inversion`.\n", - "- **Positive Only Solver:** Ensuring positive-only solutions for linear light profile intensities.\n", - "- **Wrap Up:** Summary of the script and next steps.\n", - "- **Detailed Explanation:** If you are interested in a more detailed description of how inversions work, then checkout the file." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "from pathlib import Path\n", - "import autolens as al\n", - "import autolens.plot as aplt\n", - "import autoarray.plot as aaplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use the same strong lensing data as the previous tutorial, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Lets create an annular mask which traces the strongly lensed source's ring of light, and apply it to the dataset." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=0.5,\n", - " outer_radius=2.8,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now the mask is applied, plotting the data draws it over the image, letting us check the annulus traces the ring of\n", - "lensed source light." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "aplt.plot_array(array=dataset.data, title=\"Image Data With Mask Applied\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We now create the masked source-plane grid via the tracer, as we did in the previous tutorial." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field])\n", - "\n", - "source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1]" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "we again use the rectangular pixelization to create the mapper.\n", - "\n", - "(Ignore the regularization input below for now, we will cover this in the next tutorial)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25))\n", - "\n", - "pixelization = al.Pixelization(mesh=mesh)\n", - "\n", - "interpolator = mesh.interpolator_from(\n", - " source_plane_data_grid=source_plane_grid,\n", - " source_plane_mesh_grid=None,\n", - ")\n", - "\n", - "mapper = al.Mapper(\n", - " interpolator=interpolator,\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Pixelization__\n", - "\n", - "Finally, we can now use the `Mapper` to reconstruct the source via an `Inversion`. I'll explain how this works in a \n", - "second, but lets just go ahead and create the inversion first. " - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "inversion = al.Inversion(dataset=dataset, linear_obj_list=[mapper])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The inversion has reconstructed the source's light on the rectangular pixel grid, which is called the \n", - "`reconstruction`. This source-plane reconstruction can be mapped back to the image-plane to produce the \n", - "`mapped_reconstructed_operated_data`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "print(inversion.reconstruction)\n", - "print(inversion.mapped_reconstructed_operated_data)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Both of these can be plotted using an `aplt.plot_array`.\n", - "\n", - "It is possible for an inversion to have multiple `Mapper`'s, therefore for certain figures we specify the index \n", - "of the mapper we wish to plot. In this case, because we only have one mapper we specify the index 0." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "aplt.plot_array(\n", - " array=inversion.mapped_reconstructed_operated_data, title=\"Inversion Reconstruction\"\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "There we have it, we have successfully reconstructed the source using a rectangular pixel-grid. Whilst this source \n", - "was simple (a blob of light in the centre of the source-plane), inversions come into their own when fitting sources \n", - "with complex morphologies. \n", - "\n", - "Lets use an inversion to reconstruct a complex source!" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"source_complex\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/source_complex.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.05,\n", - ")\n", - "\n", - "aplt.plot_array(array=dataset.data, title=\"Data\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This code is doing all the same as above (setup the mask, galaxy, tracers, mapper, inversion, etc.)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=0.1,\n", - " outer_radius=3.2,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask)\n", - "\n", - "aplt.plot_array(array=dataset.data, title=\"Image Data With Mask Applied\")\n", - "\n", - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0), einstein_radius=1.6, ell_comps=(0.17647, 0.0)\n", - " ),\n", - ")\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field])\n", - "\n", - "source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1]\n", - "\n", - "interpolator = mesh.interpolator_from(\n", - " source_plane_data_grid=source_plane_grid,\n", - " source_plane_mesh_grid=None,\n", - ")\n", - "\n", - "mapper = al.Mapper(\n", - " interpolator=interpolator,\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "inversion = al.Inversion(dataset=dataset, linear_obj_list=[mapper])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now lets plot the complex source reconstruction." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "aplt.plot_array(\n", - " array=inversion.mapped_reconstructed_operated_data, title=\"Inversion Reconstruction\"\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Pretty great, huh? If you fitted complex sources using light profiles in the search chaining tutorials at the end of\n", - "chapter 2 (tutorials 9-11), you'll remember that getting a model image that looked this good simply *was not possible*.\n", - "With an inversion, we can do this with ease and without having to perform model-fitting with 20+ parameters for the\n", - "source's light!\n", - "\n", - "We will now briefly discuss how an inversion actually works, however the explanation I give in this tutorial will be \n", - "overly-simplified. To be good at lens modeling you do not need to understand the details of how an inversion works, you \n", - "simply need to be able to use an inversion to model a strong lens. \n", - "\n", - "To begin, lets consider some random mappings between our mapper`s source-pixels and the image.\n", - "\n", - "`mapper.mappings_from` returns one `Mapping` per group of source-pixels, which we pass straight to\n", - "`subplot_image_and_mapper` as `regions=`. Each mapping is drawn in its own colour: the source-plane cell on the right,\n", - "and the image-plane regions it maps to on the left. Tutorial 2 covers this in detail." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pix_indexes = [[min(index, mapper.pixels - 1)] for index in [445, 285, 313, 132, 211]]\n", - "\n", - "mappings = mapper.mappings_from(pix_indexes=pix_indexes)\n", - "\n", - "aaplt.subplot_image_and_mapper(\n", - " mapper=mapper,\n", - " image=dataset.data,\n", - " regions=mappings,\n", - " mesh_grid=mapper.source_plane_mesh_grid,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "These mappings are known before the inversion reconstructs the source galaxy, which means before this inversion is\n", - "performed we know two key pieces of information:\n", - "\n", - " 1) The mappings between every source-pixel and sets of image-pixels.\n", - " 2) The flux values in every observed image-pixel, which are the values we want to fit successfully.\n", - "\n", - "It turns out that with these two pieces of information we can linearly solve for the set of source-pixel fluxes that\n", - "best-fit (e.g. maximize the log likelihood) our observed image. Essentially, we set up the mappings between source and\n", - "image pixels as a large matrix and solve for the source-pixel fluxes in an analogous fashion to how you would solve a\n", - "set of simultaneous linear equations. This process is called a `linear inversion`.\n", - "\n", - "In the language of linear algebra: the mappings form a `mapping matrix` $f$, which together with the data and\n", - "noise-map defines a linear system whose solution is the vector of source-pixel fluxes $s$. Tutorial 5 of this\n", - "chapter writes this system out in full and computes it step-by-step in code -- for now, the intuition above is all\n", - "you need.\n", - "\n", - "There are three more things about a linear inversion that are worth knowing:\n", - "\n", - " 1) When performing fits using light profiles, we discussed how a `model_image` was generated by convolving the light\n", - " profile images with the data's PSF. A similar blurring operation is incorporated into the inversion, such that it \n", - " reconstructs a source (and therefore image) which fully accounts for the telescope optics and effect of the PSF.\n", - "\n", - " 2) You may be familiar with image sub-gridding, which splits each image-pixel into a sub-pixel (if you are not \n", - " familiar then feel free to checkout the optional **HowToLens** tutorial on sub-gridding. If a sub-grid is used, it is \n", - " the mapping between every sub-pixel and source-pixel that is computed and used to perform the inversion. This prevents \n", - " aliasing effects degrading the image reconstruction. By default **PyAutoLens** uses sub-gridding of degree 4x4.\n", - "\n", - " 3) The inversion's solution is regularized. But wait, that's what we'll cover in the next tutorial!\n", - "\n", - "Finally, let me show you how easy it is to fit an image with an `Inversion` using a `FitImaging` object. Instead of \n", - "giving the source galaxy a light profile, we simply pass it a `Pixelization` and regularization, and pass it to a \n", - "tracer." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a\n", - "# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is\n", - "# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above.\n", - "mesh_shape = (\n", - " al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " else (40, 40)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Then, like before, we pass the imaging and tracer `FitImaging` object. \n", - "\n", - "We see some pretty good looking residuals, we must be fitting the lensed source accurately! In fact, we can use the\n", - "`subplot_of_planes` method to specifically visualize the inversion and plot the source reconstruction." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = al.FitImaging(dataset=dataset, tracer=tracer)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Positive Only Solver__\n", - "\n", - "All pixelized source reconstructions use a positive-only solver, meaning that every source-pixel is only allowed\n", - "to reconstruct positive flux values. This ensures that the source reconstruction is physical and that we don't\n", - "reconstruct negative flux values that don't exist in the real source galaxy (a common systematic solution in lens\n", - "analysis).\n", - "\n", - "It may be surprising to hear that this is a feature worth pointing out, but it turns out setting up the linear algebra\n", - "to enforce positive reconstructions is difficult to make efficient. A lot of development time went into making this\n", - "possible, where a bespoke fast non-negative linear solver was developed to achieve this.\n", - "\n", - "Other methods in the literature often do not use a positive only solver, and therefore suffer from these \n", - "unphysical solutions, which can degrade the results of lens model in general.\n", - "\n", - "__Wrap Up__\n", - "\n", - "And, we're done, here are a few questions to get you thinking about inversions:\n", - "\n", - " 1) The inversion provides the maximum log likelihood solution to the observed image. Is there a problem with seeking \n", - " the highest likelihood solution? Is there a risk that we're going to fit other things in the image than just the \n", - " lensed source galaxy? What happens if you reduce the `coefficient` of the regularization object above to zero?\n", - "\n", - " 2) The exterior pixels in the rectangular pixel-grid have no image-pixels in them. However, they are still given a \n", - " reconstructed flux. Given these pixels do not map to the data, where is this value coming from?\n", - " \n", - "__Detailed Explanation__\n", - "\n", - "If you are interested in a more detailed description of how inversions work, tutorial 5 of this chapter collects the\n", - "full linear algebra in one place. The file\n", - "`autolens_workspace/*/imaging/features/pixelization/likelihood_function.ipynb` gives a complementary visual\n", - "step-by-step guide of the process alongside equations and references to literature on the subject." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb b/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb deleted file mode 100644 index 50b9b9c..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb +++ /dev/null @@ -1,540 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 4: Bayesian Regularization\n", - "===================================\n", - "\n", - "So far, we have:\n", - "\n", - " - Used pixelizations and mappers to map source-pixels to image-pixels and visa versa.\n", - " - Successfully used an inversion to reconstruct a source.\n", - " - Seen that this reconstruction provides a good fit of the observed image, providing a high likelihood solution.\n", - "\n", - "The explanation of *how* an inversion works has so far been overly simplified. You'll have noted the regularization\n", - "inputs which we have not so far discussed. This will be the topic of this tutorial, and where inversions become more\n", - "conceptually challenging!\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.\n", - "- **Convenience Function:** we're going to perform a lot of fits using an `Inversion` this tutorial.\n", - "- **Pixelization:** Okay, so lets look at our fit from the previous tutorial in more detail.\n", - "- **Regularization:** The source reconstruction looks excellent!\n", - "- **Bayesian Evidence:** For inversions, we therefore need a different goodness-of-fit measure to choose the appropriate.\n", - "- **Detailed Description:** Below, I provide a more detailed discussion of the Bayesian evidence." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "from pathlib import Path\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use the same strong lensing data as the previous tutorial, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Convenience Function__\n", - "\n", - "we're going to perform a lot of fits using an `Inversion` this tutorial. This would create a lot of code, so to keep\n", - "things tidy, I've setup this function which handles it all for us.\n", - "\n", - "(Borders, which relocate demagnified image pixels in the source-plane, are used behind the scenes here -- we'll be\n", - "covering them in tutorial 6.)" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def perform_fit_with_source_galaxy(dataset, source_galaxy):\n", - " mask = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=0.3,\n", - " outer_radius=2.6,\n", - " )\n", - "\n", - " dataset = dataset.apply_mask(mask=mask)\n", - "\n", - " lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - " )\n", - " field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - " )\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])\n", - "\n", - " return al.FitImaging(dataset=dataset, tracer=tracer)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Pixelization__\n", - "\n", - "Okay, so lets look at our fit from the previous tutorial in more detail. we'll use a higher resolution 40 x 40 grid." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a\n", - "# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is\n", - "# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above.\n", - "mesh_shape = (\n", - " al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " else (40, 40)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "fit = perform_fit_with_source_galaxy(dataset=dataset, source_galaxy=source_galaxy)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Regularization__\n", - "\n", - "The source reconstruction looks excellent! \n", - "\n", - "However, the high quality of this solution was possible because I chose a `coefficient` for the regularization input of\n", - "1.0. If we reduce this `coefficient` to zero, the source reconstruction goes *very* weird." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=0.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "no_regularization_fit = perform_fit_with_source_galaxy(\n", - " dataset=dataset, source_galaxy=source_galaxy\n", - ")\n", - "\n", - "aplt.subplot_fit_imaging(fit=no_regularization_fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "So, what is happening here? Why does reducing the `coefficient` do this to our source reconstruction? First, we need\n", - "to understand what regularization actually does!\n", - "\n", - "When the inversion reconstructs the source, it does not *only* compute the set of source-pixel fluxes that best-fit\n", - "the image. It also regularizes this solution, whereby it goes to every pixel on the rectangular source-plane grid\n", - "and computes the difference between the reconstructed flux values of every source pixel with its 4 neighboring pixels.\n", - "If the difference in flux is large the solution is penalized, reducing its log likelihood. You can think of this as\n", - "us applying a 'smoothness prior' on the reconstructed source galaxy's light.\n", - "\n", - "(In the language of linear algebra, this smoothness prior is encoded in a `regularization matrix` $H$ which is\n", - "added to the linear system the inversion solves -- tutorial 5 writes this out in full.)\n", - "\n", - "This smoothing adds a 'penalty term' to the log likelihood of an inversion which is the summed difference between the \n", - "reconstructed fluxes of every source-pixel pair multiplied by the `coefficient`. By setting the regularization \n", - "coefficient to zero, we set this penalty term to zero, meaning that regularization is completely omitted.\n", - "\n", - "Why do we need to regularize our solution? We just saw why, if we do not apply this smoothness prior to the source, we \n", - "`over-fit` the image and reconstruct a noisy source with lots of extraneous features. This is what the large flux \n", - "values located at the exterior regions of the source reconstruction above are. If the inversions's sole aim is to \n", - "maximize the log likelihood, it can do this by fitting *everything* accurately, including the noise.\n", - "\n", - "If we change the `vmax` and `vmin` variables of the plotting function's `CMap` such that the color-map is restricted to a \n", - "narrower range of values, we can see that even without regularization we are still reconstructing the actual source \n", - "galaxy." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "aplt.plot_array(\n", - " array=fit.inversion.mapped_reconstructed_operated_data,\n", - " title=\"Inversion Reconstruction\",\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Over-fitting is why regularization is necessary. Solutions like this will completely ruin our attempts to model a \n", - "strong lens. By smoothing our source reconstruction we ensure it does not over fit noise in the image. \n", - "\n", - "So, what happens if we apply a high value for the regularization coefficient?" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=100.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "high_regularization_fit = perform_fit_with_source_galaxy(\n", - " dataset=dataset, source_galaxy=source_galaxy\n", - ")\n", - "\n", - "aplt.subplot_fit_imaging(fit=high_regularization_fit)\n", - "\n", - "aplt.plot_array(\n", - " array=fit.inversion.mapped_reconstructed_operated_data,\n", - " title=\"Inversion Reconstruction\",\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The figure above shows that we completely remove over-fitting. However, we now fit the image data less accurately,\n", - "due to the much higher level of smoothing.\n", - "\n", - "So, we now understand what regularization is and why it is necessary. There is one nagging question that remains, how \n", - "do I choose the regularization coefficient value? We can not use the log likelihood, as decreasing the regularization\n", - "coefficient will always increase the log likelihood, because less smoothing allows the source reconstruction to fit \n", - "the data better." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "print(\"Likelihood Without Regularization:\")\n", - "print(no_regularization_fit.log_likelihood_with_regularization)\n", - "print(\"Likelihood With Normal Regularization:\")\n", - "print(fit.log_likelihood_with_regularization)\n", - "print(\"Likelihood With High Regularization:\")\n", - "print(high_regularization_fit.log_likelihood_with_regularization)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Bayesian Evidence__\n", - "\n", - "For inversions, we therefore need a different goodness-of-fit measure to choose the appropriate level of regularization. \n", - "\n", - "For this, we invoke the `Bayesian Evidence`, which quantifies the goodness of the fit as follows:\n", - "\n", - " - It requires that the residuals of the fit are consistent with Gaussian noise (which is the type of noise expected \n", - " in the imaging data). If this Gaussian pattern is not visible in the residuals, the noise must have been over-fitted\n", - " by the inversion. The Bayesian evidence will therefore decrease. If the image is fitted poorly due to over smoothing, \n", - " the residuals will again not appear Gaussian either, again producing a decrease in the Bayesian evidence value.\n", - "\n", - " - There can be many solutions which fit the data to the noise level, without over-fitting. To determine the best \n", - " solutions from these solutions, the Bayesian evidence therefore also quantifies the complexity of the source \n", - " reconstruction. If an inversion requires many pixels and a low level of regularization to achieve a good fit, the \n", - " Bayesian evidence will decrease. The evidence penalizes solutions which are complex, which, in a Bayesian sense, are \n", - " less probable (you may want to look up `Occam`s Razor`).\n", - "\n", - "The Bayesian evidence therefore ensures we only invoke a more complex source reconstruction when the data absolutely \n", - "necessitates it.\n", - "\n", - "Lets take a look at the Bayesian evidence of the fits that we performed above, which is accessible from a `FitImaging` \n", - "object via the `log_evidence` property:" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "print(\"Bayesian Evidence Without Regularization:\")\n", - "print(no_regularization_fit.log_evidence)\n", - "print(\"Bayesian Evidence With Normal Regularization:\")\n", - "print(fit.log_evidence)\n", - "print(\"Bayesian Evidence With High Regularization:\")\n", - "print(high_regularization_fit.log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As expected, the solution that we could see `by-eye` was the best solution corresponds to the highest log evidence \n", - "solution.\n", - "\n", - "__Non-Linear and Linear__\n", - "\n", - "Before we end, lets consider which aspects of an inversion are linear and which are non-linear.\n", - "\n", - "The linear part of the inversion is the step that solves for the reconstruct source pixel fluxes, including accounting\n", - "for the smoothing via regularizaton. We do not have to perform a non-linear search to determine the source-pixel\n", - "fluxes or compute the Bayesian evidence discussed above.\n", - "\n", - "However, determining the regularization `coefficient` that maximizes the Bayesian log evidence is a non-linear problem \n", - "that requires a non-linear search. The Bayesian evidence also depends on the source grid resolution, which means the \n", - "pixel-grid's `shape` parameter may also now become dimensions of non linear parameter space. Nevertheless, these total \n", - "only 3 non-linear parameters, far fewer than the 20+ that are required when modeling sources uses light profiles! \n", - "\n", - "Here are a few questions for you to think about.\n", - "\n", - " 1) We maximize the log evidence by using simpler source reconstructions. Therefore, decreasing the pixel-grid \n", - " size should provide a higher log_evidence, provided it still has sufficiently high resolution to fit the image well \n", - " (and provided that the regularization coefficient is set to an appropriate value). Can you increase the log evidence \n", - " from the value above by changing these parameters, I've set you up with a code to do so below." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "fit = perform_fit_with_source_galaxy(dataset=dataset, source_galaxy=source_galaxy)\n", - "\n", - "print(\"Previous Bayesian Evidence:\")\n", - "print(3988.0716851250163)\n", - "print(\"New Bayesian Evidence:\")\n", - "print(fit.log_evidence)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - " 2) Can you think of any other ways we might increase the Bayesian evidence even further? In future tutorials we will\n", - " learn how **PyAutoLens** can adapt the source reconstruction to the properties of the image so as to maximize the\n", - " Bayesian evidence!\n", - "\n", - "__Detailed Description__\n", - "\n", - "Below, I provide a more detailed discussion of the Bayesian evidence. It is not paramount that you understand this to\n", - "use **PyAutoLens**, but I recommend you give it a read to get an intuition for how the evidence works. The evidence\n", - "itself is a sum of chi-squared, regularization and matrix log-determinant terms -- tutorial 5 derives the exact\n", - "expression and computes every term in code.\n", - "\n", - "The Bayesian log evidence quantifies the following 3 aspects of a fit to strong lens imaging data:\n", - "\n", - "1) *The quality of the image reconstruction:* The source reconstruction is a linear inversion which uses the observed\n", - " values in the image-data to fit it and reconstruct the source. It is in principle able to perfectly reconstruct the\n", - " image regardless of the image\u2019s noise or the accuracy of the lens model (e.g. at infinite source resolution without\n", - " regularization). The problem is therefore \u2018ill-posed\u2019 and this is why regularization is necessary.\n", - "\n", - " However, this raises the question of what constitutes a \u2018good\u2019 solution? The Bayesian evidence defines this by\n", - " assuming that the image data consists of independent Gaussian noise in every image pixel. A \u2018good\u2019 solution is one\n", - " whose chi-squared residuals are consistent with Gaussian noise, producing a reduced chi-squared near 1.0. Solutions\n", - " which give a reduced chi-squared below 1 are penalized for being overly complex and fitting the image\u2019s noise, whereas\n", - " solutions with a reduced chi-squared above 1 are penalized for not invoking a more complex source model when the data\n", - " necessitates it. In both circumstances, these penalties reduce the inferred Bayesian evidence!\n", - "\n", - "2) *The complexity of the source reconstruction:* The log evidence estimates the number of source pixels that are used \n", - " to reconstruct the image, after accounting for their correlation with one another due to regularization. Solutions that\n", - " require fewer correlated source pixels increase the Bayesian evidence. Thus, simpler and less complex source \n", - " reconstructions are favoured.\n", - "\n", - "3) *The signal-to-noise (S/N) of the image that is fitted:* The Bayesian evidence favours models which fit higher S/N\n", - " realizations of the observed data (where the S/N is determined using the image-pixel variances, e.g. the noise-map). Up\n", - " to now, all **PyAutoLens** fits assumed fixed variances, meaning that this aspect of the Bayesian evidence has no impact\n", - " on the inferred evidence values. However, adaptive features can invoke functionality that increases the variances\n", - " of image-pixels where the lens model fits the data poorly.\n", - " \n", - " The premise is that whilst increasing the variances of image pixels lowers their S/N values and therefore also\n", - " decreases the log evidence, doing so may produce a net increase in log evidence. This occurs when the chi-squared \n", - " values of the image pixels whose variances are increased were initially very high (e.g. they were fit poorly by the \n", - " lens model).\n", - "\n", - "__Wrap Up__\n", - "\n", - "In summary, the log evidence is maximized for solutions which most accurately reconstruct the highest S/N realization of\n", - "the observed image, without over-fitting its noise and using the fewest correlated source pixels. By employing this\n", - "framework throughout, **PyAutoLens** objectively determines the final lens model following the principles of Bayesian\n", - "analysis and Occam\u2019s Razor." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones \u2014 common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially \u2014 both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type \u2014 Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation \u2014 constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source \u2014 do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* \u2014 either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised \u2014 `(adapt_image / max) ** power` \u2014 so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** \u2014 `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, \u2026).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead \u2014 transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` \u2014 the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` \u2014 the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` \u2014 the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline \u2014 imaging, group, multi-galaxy, multi-dataset \u2014 over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data \u2014 ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** \u2014 it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** \u2014 a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch \u2014 Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch \u2014 bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n \u2014 post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) \u2014 datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** \u2014 [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit \u2014 source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** \u2014 the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory \u2014 what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty \u2014\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at \u2014 the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* \u2014 if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions \u2014 the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` \u2014 see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> \u26a0\ufe0f **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch \u2014 source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot \u2014 when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D \u2014 plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch \u2014 mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch \u2014 double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel \u2014 the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map \u2014 regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic \u2014 mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) \u2014 overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) \u2014 automated pipeline that\n handles the parametric \u2192 pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart \u2014 least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** \u2014 [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets \u2014\n links into deeper docs.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model \u2014 production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb b/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb new file mode 100644 index 0000000..70cd985 --- /dev/null +++ b/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb @@ -0,0 +1,1038 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tutorial 4: Lens Modeling\n", + "=========================\n", + "\n", + "__Contents__\n", + "\n", + "- Lens modelling with a pixelized source\n", + "- Giving the inversion an incorrect mass model\n", + "- Comparing with the correct mass model\n", + "- Seeing how the mass model changes the mappings\n", + "- Why evidence does not remove the search difficulty\n", + "- Starting with a simpler source model\n", + "- Running and inspecting the initial search\n", + "- Requiring corresponding images to trace together\n", + "- Replacing the analytic source with a pixelization\n", + "- Running the pixelized-source search\n", + "- Establishing the foreground light model\n", + "- Using that result in the pixelized-source fit" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Google Colab Setup__\n", + "\n", + "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "jupyter": { + "source_hidden": true + } + }, + "outputs": [], + "source": [ + "# @title Set up Google Colab { display-mode: \"form\" }\n", + "try:\n", + " import google.colab\n", + "except ImportError:\n", + " from autolens import setup_colab as _setup_colab\n", + "else:\n", + " import importlib\n", + " import subprocess\n", + " import sys\n", + "\n", + " subprocess.check_call(\n", + " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", + " )\n", + " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", + "\n", + "_setup_colab.setup(\"howtolens\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "__Lens modelling with a pixelized source__\n", + "\n", + "So far, we have reconstructed sources while keeping the lens mass fixed. We could therefore concentrate on the mesh, mappings and regularization without worrying about whether the lens model itself was correct.\n", + "\n", + "In a scientific analysis, the mass distribution is usually one of the things we want to measure. Changing it changes the ray tracing, which changes how the source must be reconstructed to explain the image.\n", + "\n", + "Pixelizations are powerful here because they can describe complicated source structure without requiring us to specify a separate analytic profile for every bright component. The non-linear search explores the lens parameters and regularization settings, while the inversion solves for the source brightnesses.\n", + "\n", + "However, this flexibility comes with a difficulty. An incorrect mass model can sometimes be compensated for by an unusual source reconstruction. A close fit to the image does not, by itself, establish that we have found the right mass distribution.\n", + "\n", + "We will investigate this using the familiar simulated lens with no foreground light. Its true Einstein radius is `1.6` arcsec, giving us a reference against which to compare deliberately incorrect models.\n", + "\n", + "The published example below makes this ambiguity visible before we explore it in code. Compare the reconstructed source structures with their corresponding image fits: a model can describe much of the observed image while assigning it a very different source morphology.\n", + "\n", + "![Demagnified source solutions, Figure 1 of Maresca et al.](https://raw.githubusercontent.com/PyAutoLabs/HowToLens/main/scripts/chapter_3_pixelizations/images/maresca_fig1.png)\n", + "\n", + "Figure 1 from [Maresca et al. (2021)](https://arxiv.org/abs/2012.04665), also discussed in the [PyAutoLens demagnified-solutions guide](https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html). We reproduce this figure to illustrate the ambiguity; the experiments below use our own simulated dataset." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "from autolens import jax_wrapper\n", + "\n", + "from pathlib import Path\n", + "import subprocess\n", + "import sys\n", + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "import autoarray.plot as aaplt\n", + "\n", + "dataset_path = Path(\"dataset\") / \"imaging\" / \"simple__no_lens_light\"\n", + "\n", + "if al.util.dataset.should_simulate(str(dataset_path)):\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", + " check=True,\n", + " )\n", + "\n", + "dataset = al.Imaging.from_fits(\n", + " data_path=dataset_path / \"data.fits\",\n", + " noise_map_path=dataset_path / \"noise_map.fits\",\n", + " psf_path=dataset_path / \"psf.fits\",\n", + " pixel_scales=0.1,\n", + ")\n", + "\n", + "mask = al.Mask2D.circular(\n", + " shape_native=dataset.shape_native,\n", + " pixel_scales=dataset.pixel_scales,\n", + " radius=2.5,\n", + ")\n", + "\n", + "dataset = dataset.apply_mask(mask=mask)\n", + "dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1)\n", + "\n", + "aplt.subplot_imaging_dataset(dataset=dataset)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We retain one sample per image pixel for the indexed mapping demonstration below. As before, the sampling accuracy would need checking before interpreting a scientific fit.\n", + "\n", + "__Giving the inversion an incorrect mass model__\n", + "\n", + "Let\u2019s begin with a mass model whose Einstein radius is `0.8` arcsec\u2014half the value used in the simulation.\n", + "\n", + "Everything else remains fixed, including the mass ellipticity, external shear, mesh dimensions and regularization coefficient. We then ask the inversion to reconstruct whatever source best satisfies this model\u2019s mappings and smoothness prior.\n", + "\n", + "This is the kind of incorrect mass model that a non-linear search could encounter while exploring a broad parameter range." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25.\n", + "mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25)\n", + "\n", + "def fit_at_einstein_radius(einstein_radius, coefficient=1.0):\n", + " lens_galaxy = al.Galaxy(\n", + " redshift=0.5,\n", + " mass=al.mp.Isothermal(\n", + " centre=(0.0, 0.0),\n", + " einstein_radius=einstein_radius,\n", + " ell_comps=al.convert.ell_comps_from(\n", + " axis_ratio=0.9,\n", + " angle=45.0,\n", + " ),\n", + " ),\n", + " )\n", + "\n", + " field = al.MassField(\n", + " redshift=0.5,\n", + " shear=al.mp.ExternalShear(\n", + " gamma_1=0.05,\n", + " gamma_2=0.05,\n", + " ),\n", + " )\n", + "\n", + " source_galaxy = al.Galaxy(\n", + " redshift=1.0,\n", + " pixelization=al.Pixelization(\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=al.reg.Constant(coefficient=coefficient),\n", + " ),\n", + " )\n", + "\n", + " tracer = al.Tracer(\n", + " galaxies=[lens_galaxy, source_galaxy],\n", + " fields=[field],\n", + " )\n", + "\n", + " return al.FitImaging(\n", + " dataset=dataset,\n", + " tracer=tracer,\n", + " settings=al.Settings(use_border_relocator=True),\n", + " )\n", + "\n", + "\n", + "incorrect_fit = fit_at_einstein_radius(einstein_radius=0.8)\n", + "\n", + "aplt.subplot_fit_imaging(fit=incorrect_fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=incorrect_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inspect both the image residuals and the reconstructed source. The experiment is designed to show how an inversion can explain some of the observed structure even when the lens mass is substantially wrong.\n", + "\n", + "Under insufficient deflection, parts of the observed arcs can remain separated in the source plane. Instead of reconstructing one compact galaxy whose light produces multiple images, the inversion can assign brightness to those separate source regions. The source may begin to resemble a less strongly lensed version of the observed image.\n", + "\n", + "Such solutions are often called **demagnified solutions**. This is a different issue from the demagnified central image coordinates discussed in the borders tutorial: here, the problem concerns an alternative mass-and-source interpretation of the image.\n", + "\n", + "Border relocation does not remove this modelling ambiguity.\n", + "\n", + "__Comparing with the correct mass model__\n", + "\n", + "Now repeat the reconstruction with the Einstein radius restored to `1.6` arcsec.\n", + "\n", + "The inversion still has the same mesh dimensions and regularization coefficient. Only the Einstein radius changes. This gives us a controlled comparison of how the mass model affects the source required to explain the image." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "correct_fit = fit_at_einstein_radius(einstein_radius=1.6)\n", + "\n", + "source_vmax = max(\n", + " float(np.max(np.asarray(current_fit.inversion.reconstruction)))\n", + " for current_fit in [incorrect_fit, correct_fit]\n", + ")\n", + "\n", + "for label, current_fit in [\n", + " (\"Einstein Radius 0.8 Arcsec\", incorrect_fit),\n", + " (\"Einstein Radius 1.6 Arcsec\", correct_fit),\n", + "]:\n", + " mapper = current_fit.inversion.cls_list_from(al.Mapper)[0]\n", + "\n", + " aaplt.plot_mapper(\n", + " mapper=mapper,\n", + " solution_vector=current_fit.inversion.reconstruction,\n", + " mesh_grid=mapper.source_plane_mesh_grid,\n", + " vmin=0.0,\n", + " vmax=source_vmax,\n", + " zoom_to_brightest=False,\n", + " title=label,\n", + " )\n", + "\n", + " aplt.plot_array(\n", + " array=(dataset.data - current_fit.model_data) / dataset.noise_map,\n", + " title=f\"{label}: Normalized Residuals\",\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare the source morphology and its coordinate extent. With the correct mass model, the different images of the source should be brought into a mutually consistent source reconstruction. With an incorrect mass model, the inversion may need more extended or fragmented structure to account for them.\n", + "\n", + "This is where regularization and evidence become important. The inversion\u2019s flexibility does not mean that all source reconstructions are equally preferred. A reconstruction requiring large variations between neighbouring brightnesses is treated differently from one that explains the data with a smoother source.\n", + "\n", + "Let\u2019s compare image agreement and evidence directly." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "for label, current_fit in [\n", + " (\"Incorrect mass model\", incorrect_fit),\n", + " (\"Correct mass model\", correct_fit),\n", + "]:\n", + " normalized_residuals = np.asarray(\n", + " (dataset.data - current_fit.model_data) / dataset.noise_map\n", + " )\n", + "\n", + " print(label)\n", + " print(\" Chi-squared:\", float(np.sum(normalized_residuals**2)))\n", + " print(\" Log evidence:\", float(current_fit.log_evidence))" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The expected lesson is that image agreement and source plausibility must be considered together. We should inspect the calculated evidence values rather than assume that the correct model wins by a particular amount.\n", + "\n", + "We have also held the coefficient fixed. A full model search would allow regularization to change, so these two evaluations do not establish the final relative preference after all model parameters have been explored.\n", + "\n", + "__Seeing how the mass model changes the mappings__\n", + "\n", + "The source plots show the outcome, but the mappings help explain why it happens.\n", + "\n", + "Let\u2019s select two small image regions on opposite sides of the lens and follow them into the source plane under each mass model. The image indexes stay the same: we are examining the same measured pixels through two different ray-tracing calculations.\n", + "\n", + "To isolate the physical ray tracing, we use the tracer directly. These plots show the coordinates before border relocation." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "image_grid = dataset.grids.pixelization\n", + "image_coordinates = np.asarray(image_grid)\n", + "\n", + "index_groups = [\n", + " np.argsort(\n", + " np.sum(\n", + " (image_coordinates - np.asarray(position)) ** 2,\n", + " axis=1,\n", + " )\n", + " )[:8].tolist()\n", + " for position in [(0.0, 1.6), (0.0, -1.6)]\n", + "]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=image_grid,\n", + " indexes=index_groups,\n", + " title=\"The Same Two Image Regions\",\n", + ")\n", + "\n", + "for label, current_fit in [\n", + " (\"Einstein Radius 0.8 Arcsec\", incorrect_fit),\n", + " (\"Einstein Radius 1.6 Arcsec\", correct_fit),\n", + "]:\n", + " traced_grid = current_fit.tracer.traced_grid_2d_list_from(\n", + " grid=image_grid\n", + " )[1]\n", + "\n", + " aaplt.plot_grid(\n", + " grid=traced_grid,\n", + " indexes=index_groups,\n", + " title=f\"{label}: Ray-Traced Coordinates\",\n", + " )" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Look at the relative positions of the coloured groups. Changing the mass model changes whether image regions can be explained by nearby parts of the source or require brightness in more widely separated regions.\n", + "\n", + "These groups were chosen to illustrate the geometry, not identified as exact images of the same source feature. We should therefore not expect their traced coordinates to coincide perfectly, even for the correct model.\n", + "\n", + "For a stronger constraint, we can identify image positions that genuinely correspond to the same source feature and require them to trace close together. We will introduce that idea when preparing the model search.\n", + "\n", + "**\ud83e\udd16 Ask AI:** How can an incorrect mass model still fit an arc if the source reconstruction is allowed to place light in several separate source regions?\n", + "\n", + "__Why evidence does not remove the search difficulty__\n", + "\n", + "Even if the correct mass model has higher evidence than our deliberately incorrect example, the non-linear search still has to find it.\n", + "\n", + "A pixelized source can provide tolerable image fits across a broad range of incorrect mass models. This can create competing regions of parameter space that require substantial exploration. Solving the source brightnesses efficiently does not make the remaining non-linear problem trivial or guarantee that a search finds the relevant solution.\n", + "\n", + "Let\u2019s examine a simple slice through this problem by changing only the Einstein radius. At every value, we reconstruct a new source and calculate its evidence." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "einstein_radii = np.array(\n", + " [0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0]\n", + ")\n", + "\n", + "known_fits = {\n", + " 0.8: incorrect_fit,\n", + " 1.6: correct_fit,\n", + "}\n", + "\n", + "log_evidences = []\n", + "\n", + "for einstein_radius in einstein_radii:\n", + " einstein_radius = float(einstein_radius)\n", + "\n", + " if einstein_radius in known_fits:\n", + " current_fit = known_fits[einstein_radius]\n", + " else:\n", + " current_fit = fit_at_einstein_radius(\n", + " einstein_radius=einstein_radius\n", + " )\n", + "\n", + " log_evidences.append(float(current_fit.log_evidence))\n", + "\n", + "log_evidences = np.asarray(log_evidences)\n", + "\n", + "if not np.all(np.isfinite(log_evidences)):\n", + " raise ValueError(\n", + " \"Inspect the non-finite evidence values before interpreting this scan.\"\n", + " )\n", + "\n", + "fig, ax = plt.subplots()\n", + "ax.plot(\n", + " einstein_radii,\n", + " log_evidences - np.max(log_evidences),\n", + " marker=\"o\",\n", + ")\n", + "ax.axvline(\n", + " 1.6,\n", + " color=\"black\",\n", + " linestyle=\"--\",\n", + " label=\"Simulation Einstein radius\",\n", + ")\n", + "ax.set_xlabel(\"Einstein radius (arcsec)\")\n", + "ax.set_ylabel(\"Log evidence relative to the highest sampled value\")\n", + "ax.set_title(\"A Fixed-Parameter Slice Through Lens-Model Space\")\n", + "ax.legend()\n", + "plt.show()" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This scan shows how the evidence behaves along one restricted direction. It is not a posterior distribution or an uncertainty measurement: the other mass parameters and regularization coefficient remain fixed, and we have sampled only a few radii.\n", + "\n", + "In a full search, those other parameters can vary together. An incorrect Einstein radius may be partly compensated for by changes in ellipticity, shear or source regularization, creating possibilities that this one-dimensional experiment cannot show.\n", + "\n", + "A useful strategy is therefore **search chaining**. We begin with a simpler source model to find a plausible region of lens parameter space, then introduce the pixelized source so that the detailed source structure can be reconstructed.\n", + "\n", + "The initial analytic source is a starting point, not the final description of the galaxy. Its purpose is to help establish the lensing geometry without giving the source enough freedom to reproduce almost any image arrangement.\n", + "\n", + "In the next blocks, we will turn that idea into a model-search setup and explain how corresponding image positions can help reject misleading solutions. We will also introduce foreground lens light, which must be modelled alongside the pixelized source.\n", + "\n", + "__Starting with a simpler source model__\n", + "\n", + "The misleading reconstructions we have just examined arise because a pixelized source has enough freedom to compensate for some incorrect mass models.\n", + "\n", + "A useful starting point is therefore a source model with less freedom. We first fit an analytic light profile, using it to establish a plausible lensing geometry. Once that fit has identified a useful region of parameter space, we replace the analytic source with a pixelization.\n", + "\n", + "This is search chaining, introduced in chapter 2. Here, the reason for chaining is particularly important: we want the pixelized reconstruction to improve the description of the source without beginning its search among a wide range of unrelated mass-and-source configurations.\n", + "\n", + "We use the multi-Gaussian expansion (MGE) from Chapter 2 as our baseline analytic source. Its fixed Gaussian widths and linearly solved intensities provide radial flexibility while a common centre and elliptical shape keep the geometry manageable. For a more complex galaxy, this first model may leave source structure unexplained. We would inspect those residuals and the inferred geometry before using it to initialize the next search." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "import autofit as af\n", + "\n", + "mass = af.Model(al.mp.Isothermal)\n", + "\n", + "# Keep the mass centre fixed for this introductory experiment.\n", + "mass.centre = (0.0, 0.0)\n", + "mass.einstein_radius = af.UniformPrior(\n", + " lower_limit=0.5,\n", + " upper_limit=2.5,\n", + ")\n", + "\n", + "lens = af.Model(\n", + " al.Galaxy,\n", + " redshift=0.5,\n", + " mass=mass,\n", + ")\n", + "\n", + "field = af.Model(\n", + " al.MassField,\n", + " redshift=0.5,\n", + " shear=af.Model(al.mp.ExternalShear),\n", + ")\n", + "\n", + "source = af.Model(\n", + " al.Galaxy,\n", + " redshift=1.0,\n", + " bulge=al.model_util.mge_model_from(\n", + " mask_radius=2.5, total_gaussians=20, centre_prior_is_uniform=False,\n", + " ),\n", + ")\n", + "\n", + "model_1 = af.Collection(\n", + " galaxies=af.Collection(\n", + " lens=lens,\n", + " source=source,\n", + " ),\n", + " fields=field,\n", + ")\n", + "\n", + "print(model_1.info)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Unlike our earlier experiments, the Einstein radius, mass ellipticity and external shear are now free. The MGE group\u2019s common centre and elliptical shape are also free. Its Gaussian widths are fixed, and all Gaussian intensities are solved linearly.\n", + "\n", + "Inspect `model_1.info` to see the complete set of free parameters and their priors. The known simulation values provide a check on the result; they are not supplied as the answer to the search.\n", + "\n", + "__Running and inspecting the initial search__\n", + "\n", + "We now perform a model fit. For each proposal, the search changes the non-linear parameters, predicts the image and evaluates its agreement with the data.\n", + "\n", + "This is different from calling `FitImaging` with specified parameter values. The search explores alternatives and produces samples that describe the inferred parameter distribution." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "search_1 = af.Nautilus(\n", + " path_prefix=Path(\"howtolens\") / \"chapter_3\" / \"tutorial_4\",\n", + " name=\"search_1_analytic_source\",\n", + " unique_tag=\"simple_no_lens_light\",\n", + " n_live=100,\n", + ")\n", + "\n", + "analysis_1 = al.AnalysisImaging(dataset=dataset)\n", + "\n", + "result_1 = search_1.fit(\n", + " model=model_1,\n", + " analysis=analysis_1,\n", + ")\n", + "\n", + "print(result_1.info)\n", + "\n", + "initial_fit = result_1.max_log_likelihood_fit\n", + "\n", + "aplt.subplot_fit_imaging(fit=initial_fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=initial_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Before continuing, inspect the model image, residuals and source. The purpose of this first fit is to establish a credible starting geometry, so a poor or clearly misleading solution should not simply be passed to the next search.\n", + "\n", + "For this simulated example, we can also compare the recovered Einstein radius with the input value of `1.6` arcsec. In an observed system, that answer would not be available; we would rely on the fit diagnostics, image configuration and parameter constraints.\n", + "\n", + "The maximum-likelihood fit is useful for visualization, but it is only one model. The result summary and samples are needed to assess uncertainty and whether the search adequately explored the parameters.\n", + "\n", + "__Requiring corresponding images to trace together__\n", + "\n", + "Search chaining gives us a useful starting point, but we can also impose a simple geometric check.\n", + "\n", + "If several image positions represent the same source feature, a plausible mass model should trace them close together in the source plane. An incorrect model that reconstructs them as unrelated pieces of source light fails this check.\n", + "\n", + "The `PositionsLH` object applies a penalty when the traced positions are separated by more than a chosen threshold. Models that bring them within the threshold receive no positions penalty.\n", + "\n", + "`PositionsLH` penalizes demagnified solutions whose corresponding image positions fail to trace sufficiently close together.\n", + "\n", + "We can identify corresponding positions manually, but our initial fit also provides a way to estimate them. The following method uses the fitted source centre and mass model to predict its multiple-image positions and constructs a positions constraint for the next search." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "positions_likelihood = result_1.positions_likelihood_from(\n", + " factor=3.0,\n", + " minimum_threshold=0.2,\n", + ")\n", + "\n", + "positions = positions_likelihood.positions\n", + "\n", + "print(\"Image-plane positions:\")\n", + "print(positions)\n", + "print(\n", + " \"Source-plane separation threshold:\",\n", + " positions_likelihood.threshold,\n", + " \"arcsec\",\n", + ")\n", + "\n", + "aplt.plot_array(\n", + " array=dataset.data,\n", + " positions=positions,\n", + " title=\"Multiple-Image Positions Predicted by the Initial Fit\",\n", + ")\n", + "\n", + "traced_positions = initial_fit.tracer.traced_grid_2d_list_from(\n", + " grid=positions\n", + ")[1]\n", + "\n", + "aaplt.plot_grid(\n", + " grid=traced_positions,\n", + " title=\"Predicted Image Positions Traced to the Source Plane\",\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "These positions are predictions from the initial model, not independent measurements. Check that they correspond sensibly to the observed image configuration before using them.\n", + "\n", + "The threshold should be loose enough to allow the mass model to improve. We are trying to reject grossly inconsistent mappings, not force every subsequent model to reproduce the initial solution exactly. Here, `factor` enlarges the separation estimated from the initial result, while `minimum_threshold` prevents the returned threshold from becoming smaller than `0.2` arcsec.\n", + "\n", + "This positions penalty is a modelling aid rather than a replacement for the image likelihood. It does not by itself establish that the mass model is correct, and an inappropriate set of positions or an overly restrictive threshold can exclude useful solutions.\n", + "\n", + "__Replacing the analytic source with a pixelization__\n", + "\n", + "We are ready to construct the second model.\n", + "\n", + "The lens mass and shear remain free, but their priors are initialized from the first result using the prior-passing machinery introduced in chapter 2. The source profile is replaced by a rectangular mesh and a regularization model.\n", + "\n", + "The distinction between `result_1.model` and `result_1.instance` matters here. Using the model carries free parameters into the next search. Using the instance would instead fix those components to particular fitted values." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "regularization = af.Model(al.reg.Constant)\n", + "regularization.coefficient = af.LogUniformPrior(\n", + " lower_limit=1.0e-3,\n", + " upper_limit=1.0e3,\n", + ")\n", + "\n", + "pixelization = af.Model(\n", + " al.Pixelization,\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=regularization,\n", + ")\n", + "\n", + "pixelized_source = af.Model(\n", + " al.Galaxy,\n", + " redshift=1.0,\n", + " pixelization=pixelization,\n", + ")\n", + "\n", + "model_2 = af.Collection(\n", + " galaxies=af.Collection(\n", + " lens=result_1.model.galaxies.lens,\n", + " source=pixelized_source,\n", + " ),\n", + " fields=result_1.model.fields,\n", + ")\n", + "\n", + "print(model_2.info)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inspect the resulting priors rather than assuming that they are suitable simply because they came from an earlier fit. In particular, a restrictive analytic source can bias an initial mass estimate; its result should guide the next search without preventing the mass model from changing.\n", + "\n", + "The mesh shape stays fixed. The regularization coefficient is now a non-linear parameter, explored alongside the mass and shear parameters.\n", + "\n", + "The hundreds of source brightnesses do not appear as hundreds of additional search parameters. For each proposal, the inversion reconstructs those values using the proposed mass model and coefficient.\n", + "\n", + "__Running the pixelized-source search__\n", + "\n", + "The second search combines the pixelized model with the positions constraint.\n", + "\n", + "For each proposed mass model, the analysis checks the positions condition and evaluates the source reconstruction as appropriate. The search can adjust the lens parameters and regularization coefficient, while each inversion solves for the source brightnesses." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "analysis_2 = al.AnalysisImaging(\n", + " dataset=dataset,\n", + " positions_likelihood_list=[positions_likelihood],\n", + " settings=al.Settings(use_border_relocator=True),\n", + ")\n", + "\n", + "search_2 = af.Nautilus(\n", + " path_prefix=Path(\"howtolens\") / \"chapter_3\" / \"tutorial_4\",\n", + " name=\"search_2_pixelized_source\",\n", + " unique_tag=\"simple_no_lens_light\",\n", + " n_live=100,\n", + ")\n", + "\n", + "result_2 = search_2.fit(\n", + " model=model_2,\n", + " analysis=analysis_2,\n", + ")\n", + "\n", + "print(result_2.info)\n", + "\n", + "pixelized_fit = result_2.max_log_likelihood_fit\n", + "\n", + "aplt.subplot_fit_imaging(fit=pixelized_fit)\n", + "aplt.subplot_fit_imaging_of_planes(fit=pixelized_fit)" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compare this result with the analytic-source fit. Inspect the source structure and image residuals, then examine how the inferred mass parameters and their uncertainties have changed.\n", + "\n", + "For this simple simulated source, an MGE can already describe its smooth light distribution, so a pixelization need not produce a dramatic improvement. Its value becomes clearer for irregular sources that cannot be described adequately by the initial profile. This example teaches the modelling procedure without requiring that extra complication.\n", + "\n", + "We can also check whether the displayed pixelized model satisfies the positions threshold." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "final_source_positions = pixelized_fit.tracer.traced_grid_2d_list_from(\n", + " grid=positions\n", + ")[1]\n", + "\n", + "coordinates = np.asarray(final_source_positions)\n", + "separations = np.linalg.norm(\n", + " coordinates[:, None, :] - coordinates[None, :, :],\n", + " axis=-1,\n", + ")\n", + "maximum_separation = float(np.max(separations))\n", + "\n", + "print(\n", + " \"Maximum source-plane separation:\",\n", + " maximum_separation,\n", + " \"arcsec\",\n", + ")\n", + "print(\n", + " \"Positions threshold:\",\n", + " positions_likelihood.threshold,\n", + " \"arcsec\",\n", + ")\n", + "print(\n", + " \"Within threshold:\",\n", + " maximum_separation <= positions_likelihood.threshold,\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Passing this check means the selected positions trace sufficiently close together under this model. It does not replace inspecting the residuals, uncertainties or search behaviour.\n", + "\n", + "We have now performed a chained fit with a pixelized source and a free mass model. The next blocks introduce foreground lens light, explaining how its analytic profiles are fitted alongside the source reconstruction and why errors in that light model can affect the inferred source.\n", + "\n", + "__Establishing the foreground light model__\n", + "\n", + "We can model the foreground lens galaxy\u2019s light and reconstruct a pixelized background source within the same fit. The foreground light profile and the lensed source contribute together to the predicted image.\n", + "\n", + "However, fitting everything from the outset gives the search several problems to solve at once. It must establish the mass distribution, separate foreground light from source light, and choose an appropriate source reconstruction.\n", + "\n", + "Search chaining helps us approach these problems in stages. We begin with MGE light models for both galaxies, following Chapter 2. This simpler source description provides a useful starting lens geometry and lets us establish the foreground light model before introducing a pixelization.\n", + "\n", + "Let\u2019s perform that initial fit using a simulated dataset containing foreground lens light. This is a new dataset, so we run a new search rather than reuse the result from our earlier no-lens-light example." + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "from pathlib import Path\n", + "import subprocess\n", + "import sys\n", + "\n", + "import autofit as af\n", + "import autolens as al\n", + "import autolens.plot as aplt\n", + "\n", + "foreground_dataset_path = Path(\"dataset\") / \"imaging\" / \"lens_sersic\"\n", + "\n", + "if al.util.dataset.should_simulate(str(foreground_dataset_path)):\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulator/lens_sersic.py\"],\n", + " check=True,\n", + " )\n", + "\n", + "foreground_dataset = al.Imaging.from_fits(\n", + " data_path=foreground_dataset_path / \"data.fits\",\n", + " noise_map_path=foreground_dataset_path / \"noise_map.fits\",\n", + " psf_path=foreground_dataset_path / \"psf.fits\",\n", + " pixel_scales=0.1,\n", + ")\n", + "\n", + "mask = al.Mask2D.circular(\n", + " shape_native=foreground_dataset.shape_native,\n", + " pixel_scales=foreground_dataset.pixel_scales,\n", + " radius=2.5,\n", + ")\n", + "foreground_dataset = foreground_dataset.apply_mask(mask=mask)\n", + "\n", + "over_sample_size = al.util.over_sample.over_sample_size_via_radial_bins_from(\n", + " grid=foreground_dataset.grid,\n", + " sub_size_list=[32, 8, 2],\n", + " radial_list=[0.3, 0.6],\n", + " centre_list=[(0.0, 0.0)],\n", + ")\n", + "foreground_dataset = foreground_dataset.apply_over_sampling(\n", + " over_sample_size_lp=over_sample_size,\n", + " over_sample_size_pixelization=2,\n", + ")\n", + "\n", + "aplt.subplot_imaging_dataset(dataset=foreground_dataset)\n", + "\n", + "lens_bulge = al.model_util.mge_model_from(\n", + " mask_radius=2.5, total_gaussians=20, gaussian_per_basis=2,\n", + " centre_prior_is_uniform=True,\n", + " sigma_min=foreground_dataset.pixel_scales[0] / 10.0,\n", + ")\n", + "for gaussian in lens_bulge.profile_list:\n", + " gaussian.centre = (0.0, 0.0)\n", + "\n", + "mass = af.Model(al.mp.Isothermal)\n", + "mass.centre = (0.0, 0.0)\n", + "mass.einstein_radius = af.UniformPrior(\n", + " lower_limit=0.5,\n", + " upper_limit=2.5,\n", + ")\n", + "\n", + "lens = af.Model(\n", + " al.Galaxy,\n", + " redshift=0.5,\n", + " bulge=lens_bulge,\n", + " mass=mass,\n", + ")\n", + "\n", + "source = af.Model(\n", + " al.Galaxy,\n", + " redshift=1.0,\n", + " bulge=al.model_util.mge_model_from(\n", + " mask_radius=2.5, total_gaussians=20, centre_prior_is_uniform=False,\n", + " ),\n", + ")\n", + "\n", + "field = af.Model(\n", + " al.MassField,\n", + " redshift=0.5,\n", + " shear=af.Model(al.mp.ExternalShear),\n", + ")\n", + "\n", + "foreground_model_1 = af.Collection(\n", + " galaxies=af.Collection(lens=lens, source=source),\n", + " fields=field,\n", + ")\n", + "\n", + "foreground_search_1 = af.Nautilus(\n", + " path_prefix=Path(\"howtolens\") / \"chapter_3\" / \"tutorial_4\",\n", + " name=\"foreground_search_1_analytic_source\",\n", + " unique_tag=\"lens_sersic\",\n", + " n_live=100,\n", + ")\n", + "\n", + "foreground_analysis_1 = al.AnalysisImaging(\n", + " dataset=foreground_dataset,\n", + ")\n", + "\n", + "foreground_result_1 = foreground_search_1.fit(\n", + " model=foreground_model_1,\n", + " analysis=foreground_analysis_1,\n", + ")\n", + "\n", + "print(foreground_result_1.info)\n", + "\n", + "aplt.subplot_fit_imaging(\n", + " fit=foreground_result_1.max_log_likelihood_fit,\n", + ")\n", + "aplt.subplot_fit_imaging_of_planes(\n", + " fit=foreground_result_1.max_log_likelihood_fit,\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We fix the foreground light and mass centres for this introductory example, while allowing their other parameters to vary. The foreground MGE uses two Gaussian groups, which can have different elliptical shapes; the source uses one. Their Gaussian widths are fixed and all Gaussian intensities are solved linearly.\n", + "\n", + "Before continuing, inspect the foreground model and residuals. We want a satisfactory description of the lens light and a plausible source geometry. For an irregular source, the analytic profile may leave structure unexplained, but obvious foreground residuals should not simply be passed into the next stage.\n", + "\n", + "This is a genuine non-linear search, so it will take longer than evaluating a single `FitImaging`.\n", + "\n", + "__Using that result in the pixelized-source fit__\n", + "\n", + "We now replace the analytic source with a pixelization and carry the foreground model into the second search.\n", + "\n", + "The distinction between `.model` and `.instance` is useful here. We use `.instance` to hold the foreground profile\u2019s fitted shape fixed, reducing the number of non-linear parameters the next search must explore. We use `.model` for the mass and shear so that they remain free, with priors passed from the first result.\n", + "\n", + "Because the foreground MGE uses linear Gaussian profiles, fixing its geometry does **not** fix its intensities. The second fit solves all Gaussian intensities alongside the pixelized source brightnesses. The foreground subtraction can therefore adjust without reopening the non-linear Gaussian geometry.\n", + "\n", + "Search chaining also supplies the initial geometry from which we construct the positions constraint. **`PositionsLH` penalizes demagnified solutions whose corresponding image positions fail to trace sufficiently close together.**" + ] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "\n", + "lens = af.Model(\n", + " al.Galaxy,\n", + " redshift=0.5,\n", + " bulge=foreground_result_1.instance.galaxies.lens.bulge,\n", + " mass=foreground_result_1.model.galaxies.lens.mass,\n", + ")\n", + "\n", + "regularization = af.Model(al.reg.Constant)\n", + "regularization.coefficient = af.LogUniformPrior(\n", + " lower_limit=1.0e-3,\n", + " upper_limit=1.0e3,\n", + ")\n", + "\n", + "source = af.Model(\n", + " al.Galaxy,\n", + " redshift=1.0,\n", + " pixelization=af.Model(\n", + " al.Pixelization,\n", + " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", + " regularization=regularization,\n", + " ),\n", + ")\n", + "\n", + "foreground_model_2 = af.Collection(\n", + " galaxies=af.Collection(lens=lens, source=source),\n", + " fields=foreground_result_1.model.fields,\n", + ")\n", + "\n", + "foreground_positions_likelihood = (\n", + " foreground_result_1.positions_likelihood_from(\n", + " factor=3.0,\n", + " minimum_threshold=0.2,\n", + " )\n", + ")\n", + "\n", + "aplt.plot_array(\n", + " array=foreground_dataset.data,\n", + " positions=foreground_positions_likelihood.positions,\n", + " title=\"Positions Predicted by the Initial Foreground-Light Fit\",\n", + ")\n", + "\n", + "print(foreground_model_2.info)\n", + "\n", + "foreground_analysis_2 = al.AnalysisImaging(\n", + " dataset=foreground_dataset,\n", + " positions_likelihood_list=[foreground_positions_likelihood],\n", + " settings=al.Settings(use_border_relocator=True),\n", + ")\n", + "\n", + "foreground_search_2 = af.Nautilus(\n", + " path_prefix=Path(\"howtolens\") / \"chapter_3\" / \"tutorial_4\",\n", + " name=\"foreground_search_2_pixelized_source\",\n", + " unique_tag=\"lens_sersic\",\n", + " n_live=100,\n", + ")\n", + "\n", + "foreground_result_2 = foreground_search_2.fit(\n", + " model=foreground_model_2,\n", + " analysis=foreground_analysis_2,\n", + ")\n", + "\n", + "print(foreground_result_2.info)\n", + "\n", + "aplt.subplot_fit_imaging(\n", + " fit=foreground_result_2.max_log_likelihood_fit,\n", + ")\n", + "aplt.subplot_fit_imaging_of_planes(\n", + " fit=foreground_result_2.max_log_likelihood_fit,\n", + ")" + ], + "outputs": [], + "execution_count": null + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inspect the predicted positions before running the second search, as we did earlier. They come from the initial model and should sensibly represent the multiple-image configuration.\n", + "\n", + "The second search now starts with an established foreground light shape and lens geometry. It can refine the mass and regularization while reconstructing the source, rather than solving the entire problem from broad initial priors.\n", + "\n", + "Compare the two results, paying attention to the foreground subtraction, source reconstruction and residuals. If the fixed foreground shape leaves significant residuals, a later chained search can free its parameters again. Fixing it is a useful intermediate step, not a requirement that the initial light model must remain unchanged throughout the analysis.\n", + "\n", + "__Wrap Up__\n", + "\n", + "This completes the practical chain: fit MGE lens and source light, carry forward the foreground geometry and mass priors, then fit a pixelized source with the positions constraint." + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.1" + }, + "colab": { + "aiContexts": { + "97746750-6915-569b-a61d-792a6bc69437": { + "id": "97746750-6915-569b-a61d-792a6bc69437", + "name": "PyAutoLens assistant", + "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones \u2014 common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially \u2014 both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type \u2014 Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation \u2014 constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source \u2014 do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* \u2014 either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised \u2014 `(adapt_image / max) ** power` \u2014 so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** \u2014 `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, \u2026).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead \u2014 transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` \u2014 the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` \u2014 the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` \u2014 the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline \u2014 imaging, group, multi-galaxy, multi-dataset \u2014 over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data \u2014 ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** \u2014 it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** \u2014 a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch \u2014 Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch \u2014 bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n \u2014 post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) \u2014 datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** \u2014 [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit \u2014 source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** \u2014 the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory \u2014 what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty \u2014\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at \u2014 the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* \u2014 if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions \u2014 the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` \u2014 see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> \u26a0\ufe0f **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch \u2014 source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot \u2014 when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D \u2014 plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch \u2014 mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch \u2014 double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel \u2014 the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map \u2014 regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic \u2014 mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) \u2014 overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) \u2014 the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) \u2014 automated pipeline that\n handles the parametric \u2192 pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** \u2014 [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart \u2014 least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** \u2014 [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets \u2014\n links into deeper docs.\n- **Experienced PyAutoLens user** \u2014 [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model \u2014 production\n pattern for extended-arc sources.\n" + } + }, + "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb b/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb deleted file mode 100644 index 7564636..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb +++ /dev/null @@ -1,1023 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 5: Bayesian Formalism\n", - "==============================\n", - "\n", - "In tutorials 1 to 4, we built an intuition for how pixelized source reconstruction works: pixelizations place a\n", - "pixel-grid in the source-plane, mappers pair source-pixels with image-pixels, inversions solve for the source-pixel\n", - "fluxes that best fit the data, and regularization smooths the solution within a Bayesian framework.\n", - "\n", - "This tutorial collects the linear algebra behind all of that in one place. It is the counterpart of chapter 1's\n", - "tutorial 3 on the lensing formalism: the hands-on tutorials built intuition, and now we write down the equations.\n", - "We will construct, step-by-step and in code, every matrix and vector the inversion uses, solve for the source\n", - "reconstruction ourselves and compute the Bayesian evidence by hand, comparing our answer at the end to the\n", - "`FitImaging` object which performs this calculation internally.\n", - "\n", - "None of this is required to *use* **PyAutoLens** for lens modeling. However, if you publish results which use a\n", - "pixelization, this is the calculation your paper's likelihood function section will describe, and understanding it\n", - "removes any sense that the source reconstruction is a \"black box\".\n", - "\n", - "The formalism follows Warren & Dye 2003 (https://arxiv.org/abs/astro-ph/0302587), hereafter WD03, with the data\n", - "vector notation of Nightingale & Dye 2015 (https://arxiv.org/abs/1412.7436), hereafter N15. The Bayesian evidence\n", - "was derived by Suyu et al. 2006 (https://arxiv.org/abs/astro-ph/0601493) and translated to **PyAutoLens** notation\n", - "in Dye et al. 2008 (https://arxiv.org/abs/0804.4002).\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** Load the dataset, mask it and disable over sampling so the algebra stays simple.\n", - "- **Mesh Shape:** Fix the rectangular mesh's shape and note why edge pixels are zeroed.\n", - "- **Ray Tracing:** Trace the masked image-pixel coordinates to the source-plane via the lens equation.\n", - "- **Border Relocation:** Relocate demagnified coordinates that trace far outside the source-plane border.\n", - "- **Source Pixel Centres:** Overlay the rectangular mesh over the traced coordinates.\n", - "- **Interpolation:** Pair every traced image-pixel with source pixels via bilinear interpolation.\n", - "- **Mapper:** Package the interpolation into a `Mapper` describing all image-to-source mappings.\n", - "- **Mapping Matrix:** Express the mappings as the 2D matrix $f$.\n", - "- **Blurred Mapping Matrix:** Convolve every column of $f$ with the imaging PSF.\n", - "- **Data Vector:** Compute the data vector $D$ from the blurred mapping matrix, data and noise-map.\n", - "- **Curvature Matrix:** Compute the curvature matrix $F$.\n", - "- **Unregularized Solve:** Solve $s = F^{-1} D$ and see the over-fitted mess this produces.\n", - "- **Regularization Matrix:** Compute the regularization matrix $H$ encoding the smoothness prior.\n", - "- **Source Reconstruction:** Solve the regularized system $s = [F + H]^{-1} D$.\n", - "- **Image Reconstruction:** Map the reconstruction back to the image-plane via the blurred mapping matrix.\n", - "- **Likelihood Function:** The five terms which combine into the log evidence.\n", - "- **Chi Squared:** The goodness-of-fit of the reconstructed image to the data.\n", - "- **Regularization Term:** The penalty $s^{T} H s$ applied by the smoothness prior.\n", - "- **Complexity Terms:** The log determinant terms which penalize complex source reconstructions.\n", - "- **Noise Normalization Term:** The Gaussian noise normalization.\n", - "- **Log Evidence:** Combine all five terms into the log evidence.\n", - "- **Fit:** Compare our by-hand log evidence to the `FitImaging` object's internal calculation.\n", - "- **Wrap Up:** Summary and next steps." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np\n", - "from pathlib import Path\n", - "\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use the same strong lensing data as the previous tutorials, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`.\n", - "\n", - "Because the lens galaxy's light is omitted, the data is already \"lens subtracted\". WD03 make the same assumption,\n", - "so in the equations below the lens light model $b_{j}$ is zero everywhere. For a lens with light, one simply computes\n", - "the lens galaxy's PSF-convolved image first and subtracts it from the data before the steps below (the workspace\n", - "guide referenced at the end shows this in full)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mask__\n", - "\n", - "The likelihood is only evaluated within a mask, which we define as a 3.0\" circle containing all of the lensed\n", - "source's light." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=3.0,\n", - ")\n", - "\n", - "masked_dataset = dataset.apply_mask(mask=mask)\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=masked_dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Over Sampling__\n", - "\n", - "Over sampling splits every image pixel into a sub-grid of sub-pixels, each of which is traced to the source-plane\n", - "and paired with source pixels individually. It improves accuracy, but it also multiplies the number of rows in every\n", - "matrix below by the number of sub-pixels.\n", - "\n", - "To keep the algebra as easy to follow as possible, we disable over sampling by setting both sub-grid sizes to 1, so\n", - "each image pixel is represented by the single coordinate at its centre." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "masked_dataset = masked_dataset.apply_over_sampling(\n", - " over_sample_size_lp=1,\n", - " over_sample_size_pixelization=1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mesh Shape__\n", - "\n", - "The `mesh_shape` defines the number of pixels in the rectangular mesh used to reconstruct the source, set below\n", - "to 20 x 20 = 400 source pixels.\n", - "\n", - "We use the `RectangularUniform` mesh, where all rectangular source pixels have the same size, rather than the\n", - "`RectangularBilinearAdaptDensity` mesh used in the previous tutorials. The uniform mesh keeps the geometry simple, and every\n", - "equation below applies unchanged to the adaptive meshes -- only the source pixel centres move.\n", - "\n", - "By default, source pixels at the edge of the mesh are forced to solutions of zero flux by the linear algebra solver.\n", - "This prevents unphysical solutions where the mesh edge lights up to fit residuals, and does not change any of the\n", - "formalism below." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mesh_pixels_yx = 20\n", - "mesh_shape = (mesh_pixels_yx, mesh_pixels_yx)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Tracer__\n", - "\n", - "We use the same lens system mass model as the previous tutorials (an `Isothermal` galaxy plus a separate `ExternalShear` field, the true\n", - "model of the simulated data) and a source galaxy whose `Pixelization` pairs the `RectangularUniform` mesh with\n", - "`Constant` regularization (whose role appears later, when we reach the matrix $H$)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularUniform(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Ray Tracing__\n", - "\n", - "Every 2D (y,x) image-plane coordinate $\\theta$ is ray-traced to its source-plane coordinate $\\beta$ by subtracting\n", - "the deflection angles $\\alpha$ of the mass profiles, via the lens equation we met in chapter 1:\n", - "\n", - " $\\beta = \\theta - \\alpha(\\theta)$\n", - "\n", - "The pixelization uses its own grid of coordinates, `masked_dataset.grids.pixelization`, with one coordinate at the\n", - "centre of every masked image pixel (because we disabled over sampling above). We trace this grid to the source-plane,\n", - "taking the final entry of the traced grid list (the source-plane)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "traced_grid_pixelization = tracer.traced_grid_2d_list_from(\n", - " grid=masked_dataset.grids.pixelization\n", - ")[-1]\n", - "\n", - "aplt.plot_grid(grid=traced_grid_pixelization, title=\"Traced Source-Plane Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Border Relocation__\n", - "\n", - "Coordinates which pass close to the mass profile's centre are heavily demagnified and can trace to the far outskirts\n", - "of the source-plane.\n", - "\n", - "We relocate these coordinates to the edge of the source-plane border (defined via the border of the image-plane\n", - "mask), exactly as tutorial 6 explains in detail (see also figure 2 of https://arxiv.org/abs/1708.07377). This stops\n", - "a handful of demagnified coordinates stretching the mesh over a huge, empty region of the source-plane." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "from autoarray.inversion.mesh.border_relocator import BorderRelocator\n", - "\n", - "border_relocator = BorderRelocator(mask=masked_dataset.mask, sub_size=1)\n", - "\n", - "relocated_grid = border_relocator.relocated_grid_from(grid=traced_grid_pixelization)\n", - "\n", - "aplt.plot_grid(grid=relocated_grid, title=\"Relocated Source-Plane Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Source Pixel Centres__\n", - "\n", - "To reconstruct the source on a `RectangularUniform` mesh, we need the centres of its rectangular source pixels.\n", - "\n", - "We compute these by overlaying a uniform rectangular grid over the relocated traced grid, sized so the mesh fully\n", - "contains the region of the source-plane the traced image-pixels cover, without wasted edge pixels beyond it." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "from autoarray.inversion.mesh.mesh.rectangular_rtu_adapt_density import (\n", - " overlay_grid_from,\n", - ")\n", - "\n", - "mesh_grid = overlay_grid_from(\n", - " shape_native=mesh_shape, grid=al.Grid2DIrregular(relocated_grid)\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Interpolation__\n", - "\n", - "We now combine the two grids to create an `Interpolator`, which describes how every traced image-pixel coordinate\n", - "maps to the rectangular mesh pixels.\n", - "\n", - "For a rectangular mesh the scheme is bilinear interpolation: every image pixel maps to the rectangular pixel it\n", - "lands in *and* its three nearest neighbours, with weights set by how close the coordinate is to each pixel centre.\n", - "Interpolation is what lets the mesh reconstruct smooth source morphologies. We can print the mappings and weights of\n", - "the first image pixel to confirm it pairs with four source pixels." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "interpolator = pixelization.mesh.interpolator_from(\n", - " source_plane_data_grid=relocated_grid,\n", - " source_plane_mesh_grid=mesh_grid,\n", - ")\n", - "\n", - "print(interpolator.mappings[0])\n", - "print(interpolator.weights[0])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mapper__\n", - "\n", - "The interpolator creates a `Mapper`, the object tutorials 1 and 2 introduced. It packages up the mapping between\n", - "every image pixel and every rectangular source pixel.\n", - "\n", - "The key attribute is `pix_indexes_for_sub_slim_index`, mapping every image-pixel index (`sub_slim_index`) to the\n", - "source-pixel indexes (`pix_indexes`) it interpolates onto, alongside the number of mappings per image pixel and\n", - "their interpolation weights." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mapper = al.Mapper(interpolator=interpolator)\n", - "\n", - "pix_indexes_for_sub_slim_index = mapper.pix_indexes_for_sub_slim_index\n", - "\n", - "print(pix_indexes_for_sub_slim_index[0:9])\n", - "print(mapper.pix_sizes_for_sub_slim_index[0:9])\n", - "print(mapper.pix_weights_for_sub_slim_index[0:9])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Mapping Matrix__\n", - "\n", - "The `mapping_matrix` expresses these image-pixel to source-pixel mappings as a single 2D matrix, with\n", - "dimensions `(total_image_pixels, total_source_pixels)`.\n", - "\n", - "Each column is the \"image\" of one source pixel: entries are the interpolation weights for image pixels which map to\n", - "that source pixel and zero everywhere else." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mapping_matrix = al.util.mapper.mapping_matrix_from(\n", - " pix_indexes_for_sub_slim_index=pix_indexes_for_sub_slim_index,\n", - " pix_size_for_sub_slim_index=mapper.pix_sizes_for_sub_slim_index,\n", - " pix_weights_for_sub_slim_index=mapper.pix_weights_for_sub_slim_index,\n", - " pixels=mapper.pixels,\n", - " total_mask_pixels=mapper.source_plane_data_grid.mask.pixels_in_mask,\n", - " slim_index_for_sub_slim_index=mapper.slim_index_for_sub_slim_index,\n", - " sub_fraction=mapper.over_sampler.sub_fraction,\n", - ")\n", - "\n", - "plt.imshow(mapping_matrix, aspect=(mapping_matrix.shape[1] / mapping_matrix.shape[0]))\n", - "plt.show()\n", - "plt.close()" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Because each column is an image of zeros and interpolation weights, we can plot any column as a 2D image showing all\n", - "image pixels its source pixel maps to. For a source pixel near the mesh centre these image pixels trace the multiple\n", - "images of that patch of the source." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "source_pixel_index = 210\n", - "\n", - "array_2d = al.Array2D(\n", - " values=mapping_matrix[:, source_pixel_index], mask=masked_dataset.mask\n", - ")\n", - "\n", - "aplt.plot_array(array=array_2d, title=\"Image of Source Pixel 210\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Blurred Mapping Matrix__\n", - "\n", - "The imaging data is blurred by the telescope's PSF, so the model must be too. Since each column of the mapping\n", - "matrix is an image, we simply convolve each column with the PSF via 2D convolution.\n", - "\n", - "This produces the `blurred_mapping_matrix`, with the same dimensions `(total_image_pixels, total_source_pixels)`.\n", - "\n", - "In WD03 this matrix is denoted $f_{ij}$, where $i$ runs over all $I$ source pixels and $j$ over all $J$ image\n", - "pixels. For example:\n", - "\n", - " - $f_{0, 2} = 0.3$ indicates that image-pixel $2$ maps to source-pixel $0$ with a weight of $0.3$ after PSF\n", - " convolution.\n", - " - $f_{4, 8} = 0$ indicates that image-pixel $8$ does not map to source-pixel $4$, even after PSF convolution.\n", - "\n", - "(The indexing of the code's `mapping_matrix` is transposed relative to WD03's $f$: image pixels are the first index\n", - "in the code, but the second index in the equations.)\n", - "\n", - "PSF blurring has an important consequence: whereas before, no two source pixels shared an image pixel, blurring\n", - "correlates neighbouring columns, so the images of nearby source pixels now overlap." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "blurred_mapping_matrix = masked_dataset.psf.convolved_mapping_matrix_from(\n", - " mapping_matrix=mapping_matrix, mask=masked_dataset.mask\n", - ")\n", - "\n", - "plt.imshow(\n", - " blurred_mapping_matrix,\n", - " aspect=(blurred_mapping_matrix.shape[1] / blurred_mapping_matrix.shape[0]),\n", - ")\n", - "plt.colorbar()\n", - "plt.show()\n", - "plt.close()" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Data Vector (D)__\n", - "\n", - "We now pose the reconstruction as a linear inversion, converting the blurred mapping matrix, data and noise-map\n", - "into two objects: the data vector $D$ and the curvature matrix $F$.\n", - "\n", - "The data vector has dimensions `(total_source_pixels,)` and is given by (WD03 / N15):\n", - "\n", - " $\\vec{D}_{i} = \\sum_{j=1}^{J} f_{ij} (d_{j} - b_{j}) / \\sigma_{j}^2 \\, \\, .$\n", - "\n", - "Where:\n", - "\n", - " - $d_{j}$ are the image-pixel data values.\n", - " - $b_{j}$ are the lens light model values ($d_{j} - b_{j}$ is the lens-subtracted image; zero for this dataset).\n", - " - $\\sigma_{j}^2$ are the statistical uncertainties of each image pixel.\n", - "\n", - "Each entry of $D$ is therefore the noise-weighted overlap between one source pixel's blurred image and the data:\n", - "it measures how much evidence the data provides for flux in that source pixel, with the PSF fully accounted for." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "data_vector = al.util.inversion_imaging.data_vector_via_blurred_mapping_matrix_from(\n", - " blurred_mapping_matrix=blurred_mapping_matrix,\n", - " image=np.array(masked_dataset.data),\n", - " noise_map=np.array(masked_dataset.noise_map),\n", - ")\n", - "\n", - "plt.imshow(\n", - " data_vector.reshape(data_vector.shape[0], 1), aspect=10.0 / data_vector.shape[0]\n", - ")\n", - "plt.colorbar()\n", - "plt.show()\n", - "plt.close()" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Curvature Matrix (F)__\n", - "\n", - "The curvature matrix has dimensions `(total_source_pixels, total_source_pixels)` and is given by (WD03):\n", - "\n", - " ${F}_{ik} = \\sum_{j=1}^{J} f_{ij} f_{kj} / \\sigma_{j}^2 \\, \\, .$\n", - "\n", - "Every entry of $F$ is the noise-weighted overlap between the blurred images of two source pixels: $F_{ik}$ sums the\n", - "product of columns $i$ and $k$ of $f$ over all image pixels. For $F_{ik}$ to be non-zero, source pixels $i$ and $k$\n", - "must share at least one image pixel, which (interpolation aside) only happens because of PSF blurring.\n", - "\n", - "$F$ describes how degenerate pairs of source pixels are with one another: two source pixels whose blurred images\n", - "overlap heavily can trade flux between themselves whilst fitting the data almost equally well." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "curvature_matrix = al.util.inversion.curvature_matrix_via_mapping_matrix_from(\n", - " mapping_matrix=blurred_mapping_matrix, noise_map=masked_dataset.noise_map\n", - ")\n", - "\n", - "plt.imshow(curvature_matrix)\n", - "plt.colorbar()\n", - "plt.show()\n", - "plt.close()" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Unregularized Solve__\n", - "\n", - "The inversion seeks the source-pixel fluxes $s$ (a vector with one entry per source pixel) that minimize the\n", - "chi-squared:\n", - "\n", - " $\\chi^2 = \\sum_{j=1}^{J} \\bigg[ \\frac{(\\sum_{i=1}^{I} s_{i} f_{ij}) + b_{j} - d_{j}}{\\sigma_{j}} \\bigg]^2$\n", - "\n", - "Setting the derivative of $\\chi^2$ with respect to each $s_{i}$ to zero gives the linear system whose solution is\n", - "(equation 5 of WD03):\n", - "\n", - " $s = F^{-1} D$\n", - "\n", - "We can solve this directly with NumPy. (Without regularization the curvature matrix is often singular, so the loop\n", - "below adds a tiny value to its diagonal to avoid a `LinAlgError` -- it is a numerical crutch, not part of the\n", - "formalism.)" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "for i in range(curvature_matrix.shape[0]):\n", - " curvature_matrix[i, i] += 1e-8\n", - "\n", - "reconstruction = np.linalg.solve(curvature_matrix, data_vector)\n", - "\n", - "print(reconstruction)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The reconstructed source-pixel fluxes are a noisy, unsmooth mess -- exactly the over-fitting we saw in tutorial 4\n", - "when we set the regularization coefficient to zero. The linear inversion is fitting the noise in the data, because\n", - "this system of equations is ill-posed: we need a smoothness prior.\n", - "\n", - "__Regularization Matrix (H)__\n", - "\n", - "Regularization adds a linear regularization term $G_{L}$ to the merit function we minimize (equation 11 of WD03):\n", - "\n", - " $G = \\chi^2 + \\lambda \\, G_{L}$\n", - "\n", - "where $\\lambda$ is the `regularization_coefficient` controlling the degree of smoothing. The `Constant` scheme uses\n", - "gradient regularization (equation 14 of WD03):\n", - "\n", - " $G_{L} = \\sum_{i}^{I} \\sum_{n=1}^{N} [s_{i} - s_{i, n}]^2$\n", - "\n", - "In words: for every source pixel, compare its flux with each of its $N$ neighbours $n$, and penalize solutions where\n", - "the differences are large. This is precisely the \"smoothness prior\" of tutorial 4, now written as an equation.\n", - "\n", - "To fold this into the linear algebra we define the regularization matrix $H$, with\n", - "dimensions `(total_source_pixels, total_source_pixels)` (equation 13 of WD03):\n", - "\n", - " $H_{ik} = \\frac{1}{2} \\frac{\\partial^{2} G_{L}}{\\partial s_{i} \\partial s_{k}}$\n", - "\n", - "$H$ has the coefficient $\\lambda$ folded into it. Its non-zero off-diagonal entries mark pairs of source pixels\n", - "which are neighbours and therefore regularized with one another; most entries are zero because most source pixels\n", - "are not neighbours." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "regularization_matrix = al.util.regularization.constant_regularization_matrix_from(\n", - " coefficient=source_galaxy.pixelization.regularization.coefficient,\n", - " neighbors=mapper.neighbors,\n", - " neighbors_sizes=mapper.neighbors.sizes,\n", - ")\n", - "\n", - "plt.imshow(regularization_matrix)\n", - "plt.colorbar()\n", - "plt.show()\n", - "plt.close()" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Source Reconstruction (s)__\n", - "\n", - "$H$ enters the linear system as follows (equation 12 of WD03):\n", - "\n", - " $s = [F + H]^{-1} D$\n", - "\n", - "We add the two matrices and solve again. The diagonal jitter used above is no longer needed, because $H$ makes the\n", - "system well-posed." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "curvature_reg_matrix = np.add(curvature_matrix, regularization_matrix)\n", - "\n", - "reconstruction = np.linalg.solve(curvature_reg_matrix, data_vector)\n", - "\n", - "print(reconstruction)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The reconstructed fluxes are now smooth and physical: regularization has suppressed the noisy solution and the\n", - "reconstruction actually looks like a galaxy, without over-fitting the noise.\n", - "\n", - "__Image Reconstruction__\n", - "\n", - "Using the reconstructed source-pixel fluxes, we map the source back to the image-plane via the blurred mapping\n", - "matrix (so the reconstructed image includes PSF blurring) to produce the model image of the lensed source." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mapped_reconstructed_data = (\n", - " al.util.inversion.mapped_reconstructed_data_via_mapping_matrix_from(\n", - " mapping_matrix=blurred_mapping_matrix, reconstruction=reconstruction\n", - " )\n", - ")\n", - "\n", - "mapped_reconstructed_data = al.Array2D(\n", - " values=mapped_reconstructed_data, mask=masked_dataset.mask\n", - ")\n", - "\n", - "aplt.plot_array(array=mapped_reconstructed_data, title=\"Reconstructed Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Likelihood Function__\n", - "\n", - "We now quantify the goodness-of-fit of the source reconstruction, computing the quantity tutorial 4 called the\n", - "Bayesian evidence. The log evidence consists of five terms:\n", - "\n", - " $-2 \\, \\mathrm{ln} \\, \\epsilon = \\chi^2 + s^{T} H s + \\mathrm{ln} \\, [ \\mathrm{det} (F + H) ] - \\mathrm{ln} \\, [ \\mathrm{det} (H) ] + \\sum_{j=1}^{J} \\mathrm{ln} \\, [2 \\pi (\\sigma_{j})^2 ] \\, .$\n", - "\n", - "This expression was first derived by Suyu et al. 2006 (https://arxiv.org/abs/astro-ph/0601493), equation (19), and\n", - "is given in **PyAutoLens** notation by Dye et al. 2008 (https://arxiv.org/abs/0804.4002), equation (5).\n", - "\n", - "We now compute each term in turn.\n", - "\n", - "__Chi Squared__\n", - "\n", - "The first term is the $\\chi^2$ statistic from the merit function above, computed as:\n", - "\n", - " - `model_data` = the reconstructed image of the lensed source (plus the lens light model, zero here).\n", - " - `residual_map` = (`data` - `model_data`)\n", - " - `normalized_residual_map` = (`data` - `model_data`) / `noise_map`\n", - " - `chi_squared_map` = (`normalized_residual_map`) ** 2.0\n", - " - `chi_squared` = sum(`chi_squared_map`)\n", - "\n", - "High chi-squared values indicate image pixels the reconstruction fits poorly, lowering the likelihood." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "model_image = mapped_reconstructed_data\n", - "\n", - "residual_map = masked_dataset.data - model_image\n", - "normalized_residual_map = residual_map / masked_dataset.noise_map\n", - "chi_squared_map = normalized_residual_map**2.0\n", - "\n", - "chi_squared = np.sum(chi_squared_map)\n", - "\n", - "print(chi_squared)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Regularization Term__\n", - "\n", - "The second term, $s^{T} H s$, is the $\\lambda \\, G_{L}$ regularization penalty evaluated at the solution: the summed\n", - "difference in flux between all neighbouring source pixels, weighted by the regularization coefficient (which is\n", - "already folded into $H$).\n", - "\n", - "Less smooth solutions have larger values of this term and therefore lower likelihoods." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "regularization_term = np.matmul(\n", - " reconstruction.T, np.matmul(regularization_matrix, reconstruction)\n", - ")\n", - "\n", - "print(regularization_term)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Complexity Terms__\n", - "\n", - "Up to this point, nothing has justified our choice of `regularization_coefficient=1.0`. We cannot choose it using\n", - "the two terms above, because increasing the coefficient smooths the solution more, which *both* worsens the\n", - "chi-squared *and* (for a fixed solution) raises the regularization penalty. Optimizing those two terms alone would\n", - "drive the coefficient to zero and put us right back at the over-fitted mess.\n", - "\n", - "The two log determinant terms, $\\mathrm{ln} \\, [ \\mathrm{det} (F + H) ]$ and $- \\mathrm{ln} \\, [ \\mathrm{det} (H) ]$,\n", - "fix this. Together they measure how *complex* the source reconstruction is -- roughly, how many effective degrees\n", - "of freedom the source uses after regularization correlates its pixels -- and penalize more complex solutions.\n", - "Lowering the regularization coefficient frees the source to use more of its flexibility, increasing this complexity\n", - "penalty.\n", - "\n", - "These terms therefore counteract the chi-squared and regularization terms, so the highest evidence goes to solutions\n", - "which fit the data well with the *simplest* source reconstruction. This is the Occam's razor behaviour that\n", - "tutorial 4 demonstrated empirically." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "log_curvature_reg_matrix_term = np.linalg.slogdet(curvature_reg_matrix)[1]\n", - "log_regularization_matrix_term = np.linalg.slogdet(regularization_matrix)[1]\n", - "\n", - "print(log_curvature_reg_matrix_term)\n", - "print(log_regularization_matrix_term)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Noise Normalization Term__\n", - "\n", - "The likelihood function assumes the imaging data consists of independent Gaussian noise in every image pixel, and\n", - "the final term is the normalization of those Gaussians: the sum of the log of every noise-map value squared.\n", - "\n", - "Because the noise-map is fixed, this term is constant throughout lens modeling and has no impact on the model\n", - "we infer -- it simply normalizes the likelihood." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "noise_normalization = float(np.sum(np.log(2 * np.pi * masked_dataset.noise_map**2.0)))\n", - "\n", - "print(noise_normalization)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Log Evidence__\n", - "\n", - "We can now combine the five terms into the log evidence of the source reconstruction." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "log_evidence = float(\n", - " -0.5\n", - " * (\n", - " chi_squared\n", - " + regularization_term\n", - " + log_curvature_reg_matrix_term\n", - " - log_regularization_matrix_term\n", - " + noise_normalization\n", - " )\n", - ")\n", - "\n", - "print(log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Fit__\n", - "\n", - "Everything above is what the `FitImaging` object does internally when it fits a tracer whose source galaxy has a\n", - "pixelization. We can see this by performing the fit and comparing its `log_evidence` to ours.\n", - "\n", - "The two values are close but not identical, because the real fit improves on our simplified solve in two ways\n", - "mentioned along the way: it uses the positive-only solver (tutorial 3), which forbids the negative source-pixel\n", - "fluxes our unconstrained `np.linalg.solve` permits, and it zeroes the pixels at the edge of the mesh. Neither\n", - "changes the formalism -- the same $f$, $D$, $F$ and $H$ feed a solver with extra constraints." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = al.FitImaging(\n", - " dataset=masked_dataset,\n", - " tracer=tracer,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "print(fit.log_evidence)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Wrap Up__\n", - "\n", - "We have walked through the complete linear algebra of a pixelized source reconstruction:\n", - "\n", - " - The `mapping_matrix` and PSF-blurred mapping matrix $f$, whose columns are the blurred images of each\n", - " source pixel.\n", - "\n", - " - The data vector $D$ and curvature matrix $F$, the noise-weighted overlaps of those images with the data and with\n", - " each other.\n", - "\n", - " - The regularization matrix $H$, which encodes the smoothness prior, and the linear solve $s = [F + H]^{-1} D$ for\n", - " the source reconstruction.\n", - "\n", - " - The five terms of the Suyu et al. 2006 log evidence -- chi-squared, the regularization penalty, the two log\n", - " determinant complexity terms and the noise normalization -- and their Bayesian interpretation as an Occam's\n", - " razor which favours the simplest source reconstruction the data allows.\n", - "\n", - "During lens modeling, this whole calculation is one likelihood evaluation: the non-linear search varies the mass\n", - "model (and, later in this chapter, the pixelization and regularization parameters), and each sample triggers the\n", - "full ray-trace, solve and evidence computation above.\n", - "\n", - "Two simplifications are worth remembering: real fits use over sampling (each image pixel contributes several\n", - "sub-pixel rows to $f$) and **PyAutoLens** uses a positive-only solver for $s$ rather than the unconstrained\n", - "`np.linalg.solve` used here (see tutorial 3). The workspace\n", - "guide `autolens_workspace/*/imaging/features/pixelization/likelihood_function.ipynb` repeats this walk-through with\n", - "lens light included and additional visualization of every step.\n", - "\n", - "In the next tutorial, we return to hands-on territory and look at borders, which deal with the demagnified traced\n", - "coordinates whose relocation we performed in a single line above." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb b/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb deleted file mode 100644 index 2b1c8e5..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb +++ /dev/null @@ -1,788 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 6: Borders\n", - "===================\n", - "\n", - "In the previous tutorials, the source-plane pixel grid perfectly mapped over the traced image-pixel $(y,x)$ coordinates\n", - "in the source plane. If these pixels mapped to a larger area in the source plane, its pixel-grid would automatically\n", - "increase its size so as to cover every source-plane coordinate.\n", - "\n", - "In this tutorial, we will consider how the size of the pixelization grid is chosen and introduce the concept of a\n", - "border. The previous tutorial applied border relocation as a single step of the likelihood algebra -- here we see\n", - "why that step is needed.\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.\n", - "- **Borders:** So, what is a border?\n", - "- **Wrap Up:** Summary of the script and next steps." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "from pathlib import Path\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "we'll use the same strong lensing data as the previous tutorial, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)\n", - "\n", - "dataset_unmasked = dataset" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Borders__\n", - "\n", - "So, what is a border? In the image-plane, a border is the set of exterior pixels in a mask that are at its border.\n", - "\n", - "Lets apply a circular mask to the image and plot the dataset -- the border is the ring of pixels at the mask's edge." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.5,\n", - ")\n", - "dataset = dataset.apply_mask(mask=mask_circular)\n", - "\n", - "border = mask_circular.derive_grid.border\n", - "\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As you can see, for a circular mask the border *is* the edge of the mask (the ring of black dots we're used to\n", - "seeing whenever we plot a mask).\n", - "\n", - "For an annular mask, pixels on its inner edge are not a part of the border, whereas those on its outer edge are." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "mask_annular = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=0.8,\n", - " outer_radius=2.5,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask_annular)\n", - "\n", - "border = mask_annular.derive_grid.border\n", - "\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "A border is therefore *only* the pixels at the exterior edge of a mask\n", - "\n", - "So, what does a border actually do? To show you, we'll need to fit this image with a lens model and inversion. We'll \n", - "use the same convenience function we used in the previous tutorial (to perform a quick source galaxy fit) with the \n", - "options to input a mask and use a border." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def perform_fit_with_source_galaxy_mask_and_border(\n", - " dataset, source_galaxy, mask, settings\n", - "):\n", - " dataset = dataset.apply_mask(mask=mask)\n", - "\n", - " lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - " )\n", - " field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - " )\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])\n", - "\n", - " return al.FitImaging(dataset=dataset, tracer=tracer, settings=settings)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Okay, so lets first look at the mapper without using a border, using the annular mask.\n", - "\n", - "Note how we control the border via the `al.Settings` object's `use_border_relocator` input." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a\n", - "# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is\n", - "# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above.\n", - "mesh_shape = (\n", - " al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE\n", - " else (40, 40)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "fit = perform_fit_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_annular,\n", - " settings=al.Settings(use_border_relocator=False),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Everything looks fine, we get a reconstructed source on a visually appeasing source-plane grid. So, why are we so\n", - "worried about borders? Lets see what happens if we use a circular mask instead." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = perform_fit_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=False),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "aplt.plot_array(\n", - " array=fit.inversion.mapped_reconstructed_operated_data,\n", - " title=\"Inversion Reconstruction\",\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Woah, whats happened? There are lots of additional $(y,x)$ coordinates in the source-plane grid, some of which trace \n", - "to extremely large radii far away from the central regions of the source-plane! These points are the traced image-pixels \n", - "that correspond to the central image-pixels that the annular mask removed (e.g. they were at radii with 0.8\" of the \n", - "centre).\n", - "\n", - "Lets quickly check this by plotting the indexes of these image-pixels." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "So, why is this happening? What is the mass profile physically doing to create these source plane coordinates at \n", - "extremely large radial values? \n", - "\n", - "Towards the centre of the elliptical isothermal mass profile, the density begins to rise very sharply, it becomes\n", - "extremely steep or 'cuspy'. This cuspy behaviour towards its centre causes extremely large deflection angles to be\n", - "calculated.\n", - "\n", - "Central image pixels are therefore subjected to 'demagnification', whereby they trace to extremely large values in\n", - "the source plane!\n", - "\n", - "Physically, this is not a problem, and it is the reason we do not see a 'central image' in most strong lenses, as the \n", - "light-rays which take this path through the centre of the lens are demagnified. However, if the lens galaxy had a less\n", - "steep inner mass distribution (termed a 'core') we would see the central image.\n", - "\n", - "Demagnification is a problem for the pixelization and inversion though, which reconstruct the flux of these \n", - "demagnified pixels just like the other pixels in the image-pixel. There are two negative consequences:\n", - "\n", - " 1) The rectangular pixel-grid that we 'lay over' the source-plane becomes very large, because it expands to include\n", - " the demagnified image-pixels. As a result, larger source-pixels are used to reconstruct the central regions of the\n", - " source-plane (where the source galaxy is actually located), meaning we reconstruct the source-galaxy at a lower\n", - " effective resolution.\n", - "\n", - " 2) The inversion reconstructs the flux of the demagnified image pixels using source-pixels which contain *only*\n", - " demagnified image pixels (these are the source pixels at the edge of the source plane). These source-pixels *should*\n", - " have had other image-pixels traced within them via image-pixels at even larger radii from the centre of the lens\n", - " galaxy. However, these image-pixels are at radii above 2.5\", meaning the circular mask removed them from the inversion.\n", - "\n", - "Lets quickly use a large circular mask to confirm that these pixels exist when we don't mask them." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask_circular_large = al.Mask2D.circular(\n", - " shape_native=dataset_unmasked.shape_native,\n", - " pixel_scales=dataset_unmasked.pixel_scales,\n", - " radius=4.0,\n", - ")\n", - "\n", - "fit = perform_fit_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular_large,\n", - " settings=al.Settings(use_border_relocator=False),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This second point is a *huge* problem and it can introduce extremely dangerous systematics into our source\n", - "reconstruction and lens models.\n", - "\n", - "Borders are the solution to this problem. We simply take the mask's` border in the image-plane that we showed above,\n", - "trace it to the source-plane and relocate all traced image-pixels pixels outside this source-plane border to its edge.\n", - "Lets take a look:" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = perform_fit_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")\n", - "\n", - "\n", - "aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title=\"Source-Plane Mesh Grid\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This successfully addresses both of the issues above! However, you might be thinking, isn't that a bit of a hack? Its \n", - "not really a physical treatment of the ray-tracing, is it?\n", - "\n", - "Well, you are right. However, the *only* physical way to do this would be to use a mask so large that all demangified \n", - "central pixels are surrounded by traced image-pixels. This would require a mask so large the **PyAutoLens** fit would\n", - "become extremely slow. This is not a feasible solution, thus borders provide us with a workaround, one that is \n", - "extensively tested and does not introduce systematic biases into the lens modeling procedure.\n", - "\n", - "To end, lets illustrate how important borders are when modeling multiple lens galaxies. Their complex mass distribution \n", - "and lensing configurations produce nasty edge effects where image pixels not just in the centre of mask, but anywhere \n", - "in the mask, trace beyond the source-plane border.\n", - "\n", - "we'll use new strong lensing data, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - There are two lens galaxies whose `MassProfile`'s are `Isothermal`.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"x2_lens_galaxies\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/lens_x2.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We again must define a mask around this image, lets start with a 2.8\" mask. we'll vary the mask size to illustrate the\n", - "effects of the border in a moment." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_unmasked_x2 = dataset\n", - "\n", - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.8,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask_circular)\n", - "\n", - "border = mask_circular.derive_grid.border\n", - "\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We need to redefine our perform fit function, to use the x2 lens galaxy model." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset, source_galaxy, mask, settings\n", - "):\n", - " dataset = dataset.apply_mask(mask=mask)\n", - "\n", - " lens_galaxy_0 = al.Galaxy(\n", - " redshift=0.5,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, -1.0),\n", - " ell_comps=(0.25, 0.1),\n", - " intensity=0.1,\n", - " effective_radius=0.8,\n", - " sersic_index=2.5,\n", - " ),\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, -1.0), ell_comps=(0.17647, 0.0), einstein_radius=1.0\n", - " ),\n", - " )\n", - "\n", - " lens_galaxy_1 = al.Galaxy(\n", - " redshift=0.5,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 1.0),\n", - " ell_comps=(0.0, 0.1),\n", - " intensity=0.1,\n", - " effective_radius=0.6,\n", - " sersic_index=3.0,\n", - " ),\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 1.0), ell_comps=(0.0, -0.111111), einstein_radius=0.8\n", - " ),\n", - " )\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy_0, lens_galaxy_1, source_galaxy])\n", - "\n", - " return al.FitImaging(dataset=dataset, tracer=tracer, settings=settings)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, lets fit this image using the input model and perform the source reconstruction without a border. As you can see, \n", - "we get many demagnified image pixels which trace well beyond our source-plane border if we don't relocate them!" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked_x2,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=False),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "However, when we relocate them, we get a good-looking source-plane with a well defined border and edge, thus ensuring\n", - "our analysis will be free of systematic biases." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset_unmasked_x2,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Multi-galaxy modeling is rife with border effects, and if you have multiple lens galaxies I heartily recommend you\n", - "keep a close eye on your source-plane borders!\n", - "\n", - "Care must also be taken when choosing the size of your mask. If you don't choose a big enough mask, the border won't\n", - "be able to relocate all of the demagnified image pixels to the border edge.\n", - "\n", - "The fits below repeat the analysis with progressively larger circular masks, so you can see how the mask size\n", - "changes the border and the resulting model image." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.5,\n", - ")\n", - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")\n", - "\n", - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.7,\n", - ")\n", - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")\n", - "\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.9,\n", - ")\n", - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")\n", - "\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "\n", - "mask_circular = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=3.1,\n", - ")\n", - "fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border(\n", - " dataset=dataset,\n", - " source_galaxy=source_galaxy,\n", - " mask=mask_circular,\n", - " settings=al.Settings(use_border_relocator=True),\n", - ")\n", - "\n", - "mapper = fit.inversion.cls_list_from(al.Mapper)[0]\n", - "\n", - "\n", - "aplt.plot_array(array=fit.model_data, title=\"Plane 1 Image\")" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Wrap Up__\n", - "\n", - "To perform inversions, you probably won't think about borders all that often. Borders should pretty much take care of \n", - "themselves.\n", - "\n", - "However, as I showed above, if you don't choose a large enough mask things can go wrong and its important you know what \n", - "borders are, so you can diagnose this potential source of systematics!" - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb b/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb deleted file mode 100644 index 873775f..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb +++ /dev/null @@ -1,515 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 7: Lens Modeling\n", - "=========================\n", - "\n", - "When modeling complex sources with parametric profiles, we quickly entered a regime where our non-linear search was\n", - "faced with a parameter space of dimensionality N=20+ parameters. This made the model-fitting inefficient and likely to\n", - "infer a local maxima.\n", - "\n", - "Inversions do not suffer this problem, meaning they are a very powerful tool for modeling strong lenses. Furthermore,\n", - "they have *more* freedom than parametric light profiles because they do not rely on specific analytic light\n", - "distributions and a symmetric profile shape. This will allow us to fit more complex mass models and ask ever more\n", - "interesting scientific questions!\n", - "\n", - "However, inversions do have some shortcomings that we need to be aware of before we use them for lens modeling. That's\n", - "what we cover in this tutorial.\n", - "\n", - "__Contents__\n", - "\n", - "- **Initial Setup:** We'll use the same strong lensing data as the previous tutorial, where.\n", - "- **Unphysical Solutions:** The code below illustrates a systematic set of solutions called demagnified solutions, which.\n", - "- **Brief Description:** To see the short-comings of an inversion, we begin by performing a fit where the lens galaxy has an.\n", - "- **Light Profiles:** We can also model strong lenses using light profiles and an inversion at the same time.\n", - "- **Wrap Up:** Summary of the script and next steps." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import jax_wrapper # Sets JAX environment before other imports\n", - "\n", - "from autolens import setup_notebook; setup_notebook()\n", - "\n", - "from pathlib import Path\n", - "import autolens as al\n", - "import autolens.plot as aplt" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Initial Setup__\n", - "\n", - "We'll use the same strong lensing data as the previous tutorial, where:\n", - "\n", - " - The lens galaxy's light is omitted.\n", - " - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field.\n", - " - The source galaxy's light is an `Sersic`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"simple__no_lens_light\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Dataset Auto-Simulation__\n", - "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/no_lens_light.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "\n", - "mask = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.5,\n", - ")\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This function fits the imaging data with a tracer, returning a `FitImaging` object." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "\n", - "def perform_fit_with_lens__source_galaxy(dataset, lens_galaxy, source_galaxy, field):\n", - " mask = al.Mask2D.circular_annular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " inner_radius=0.5,\n", - " outer_radius=2.2,\n", - " )\n", - "\n", - " dataset = dataset.apply_mask(mask=mask)\n", - "\n", - " tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field])\n", - "\n", - " return al.FitImaging(dataset=dataset, tracer=tracer)\n" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Unphysical Solutions__\n", - "\n", - "The code below illustrates a systematic set of solutions called demagnified solutions, which negatively impact\n", - "lens modeling using source pixelizations.\n", - "\n", - "Since writing the code below, I have written a full readthedocs page illustrating the issue, which is linked to below.\n", - "I recommend you read this page first, to understand what a demagnified solution is, why it is a problem and how we\n", - "fix it. The code below should then build on this.\n", - "\n", - " https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html\n", - "\n", - "__Brief Description__\n", - "\n", - "To see the short-comings of an inversion, we begin by performing a fit where the lens galaxy has an incorrect \n", - "mass-model (I've reduced its Einstein Radius from 1.6 to 0.8). This is a mass model the non-linear search may sample at \n", - "the beginning of a model-fit." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=0.8,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "fit = perform_fit_with_lens__source_galaxy(\n", - " dataset=dataset, lens_galaxy=lens_galaxy, source_galaxy=source_galaxy, field=field\n", - ")\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "What happened!? This incorrect mass-model provides a really good fit to the image! The residuals and chi-squared-map \n", - "are as good as the ones we saw in the previous tutorials.\n", - "\n", - "How can an incorrect lens model provide such a fit? Well, as I'm sure you noticed, the source has been reconstructed\n", - "as a demagnified version of the image. Clearly, this is not a physical solution or a solution that we want our\n", - "non-linear search to find, but for inversions the reality is these solutions exist.\n", - "\n", - "This is not necessarily problematic for lens modeling. Afterall, the source reconstruction above is extremely complex, \n", - "it requires a lot of source pixels to fit the image accurately and its lack of smoothness will be heavily penalized\n", - "by regularization when we compute the Bayesian evidence. Indeed, its Bayesian evidence is much lower than the true lens\n", - "model solution:" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " mass=al.mp.Isothermal(\n", - " centre=(0.0, 0.0),\n", - " einstein_radius=1.6,\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " ),\n", - ")\n", - "field = al.MassField(\n", - " redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05)\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "correct_fit = perform_fit_with_lens__source_galaxy(\n", - " dataset=dataset, lens_galaxy=lens_galaxy, source_galaxy=source_galaxy, field=field\n", - ")\n", - "\n", - "aplt.subplot_fit_imaging(fit=correct_fit)\n", - "aplt.subplot_fit_imaging_of_planes(fit=correct_fit)\n", - "\n", - "print(\"Bayesian Evidence of Incorrect Fit:\")\n", - "print(fit.log_evidence)\n", - "print(\"Bayesian Evidence of Correct Fit:\")\n", - "print(correct_fit.log_evidence)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The `log_evidence` *is* lower. However, the difference in `log_evidence` is not *that large*. This could be a problem\n", - "for the non-linear search, as it will see many solutions in parameter space with high `log_evidence` values. Furthermore,\n", - "these solutions occupy a *large volume* of parameter space (e.g. everywhere the lens model is wrong). This makes\n", - "it easy for the non-linear search to get lost searching through these unphysical solutions and, unfortunately, inferring\n", - "an incorrect lens model (e.g. a local maxima).\n", - "\n", - "There is no simple fix for this, and it is the price we pay for giving the inversion so much flexibility in how it\n", - "reconstructs the source's light. The solution to this problem? Search chaining, which we covered at the end of\n", - "chapter 2 (tutorials 9-11). In fact, this is the problem that led us to initially conceive of search chaining!\n", - "\n", - "The idea is simple, we write a pipeline that begins by modeling the source galaxy's light using a light profile, thereby\n", - "initializing the priors for the lens galaxy's light and mass. Then, when we switch to an `Inversion` in the next\n", - "search, the mass model starts in the correct regions of parameter space and does not get lost sampling these\n", - "incorrect solutions.\n", - "\n", - "The following paper discusses these solutions in more detail (https://arxiv.org/abs/2012.04665).\n", - "\n", - "__Light Profiles__\n", - "\n", - "We can also model strong lenses using light profiles and an inversion at the same time. We do this when we want to \n", - "simultaneously fit and subtract the lens galaxy's light using a light profile whilst reconstructing the source's\n", - "light using an inversion. \n", - "\n", - "To do this, all we have to do is give the lens galaxy a light profile and use the tracer and fit objects we are\n", - "used to." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "dataset_name = \"lens_sersic\"\n", - "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name\n", - "\n", - "if al.util.dataset.should_simulate(str(dataset_path)):\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.run(\n", - " [sys.executable, \"scripts/simulator/lens_sersic.py\"],\n", - " check=True,\n", - " )\n", - "\n", - "dataset = al.Imaging.from_fits(\n", - " data_path=dataset_path / \"data.fits\",\n", - " noise_map_path=dataset_path / \"noise_map.fits\",\n", - " psf_path=dataset_path / \"psf.fits\",\n", - " pixel_scales=0.1,\n", - ")\n", - "\n", - "mask = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.5,\n", - ")\n", - "\n", - "aplt.subplot_imaging_dataset(dataset=dataset)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "When fitting such an image we now want to include the lens's light in the analysis. Lets update our mask to be \n", - "circular so that it includes the central regions of the image and lens galaxy." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "mask = al.Mask2D.circular(\n", - " shape_native=dataset.shape_native,\n", - " pixel_scales=dataset.pixel_scales,\n", - " radius=2.5,\n", - ")\n", - "\n", - "dataset = dataset.apply_mask(mask=mask)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As I said above, performing this fit is the same as usual, we just give the lens galaxy a `LightProfile`." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 0.0),\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " intensity=1.0,\n", - " effective_radius=0.8,\n", - " sersic_index=4.0,\n", - " ),\n", - " mass=al.mp.Isothermal(centre=(0.0, 0.0), ell_comps=(0.1, 0.0), einstein_radius=1.6),\n", - ")\n", - "\n", - "pixelization = al.Pixelization(\n", - " mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)),\n", - " regularization=al.reg.Constant(coefficient=1.0),\n", - ")\n", - "\n", - "source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization)\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This fit will now subtract the lens galaxy's light from the image and fits the resulting source-only image with the \n", - "inversion. When we plot the image, a new panel on the sub-plot appears showing the model image of the lens galaxy." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "fit = al.FitImaging(dataset=dataset, tracer=tracer)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Of course if the lens subtraction is rubbish so is our fit. We can therefore be sure that our lens model will want to \n", - "fit the lens galaxy's light accurately (below, I've decreased the lens galaxy intensity from 1.0 to 0.5 to show the\n", - "result of a poor lens light subtraction)." - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "lens_galaxy = al.Galaxy(\n", - " redshift=0.5,\n", - " bulge=al.lp.Sersic(\n", - " centre=(0.0, 0.0),\n", - " ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),\n", - " intensity=0.5,\n", - " effective_radius=0.8,\n", - " sersic_index=4.0,\n", - " ),\n", - " mass=al.mp.Isothermal(centre=(0.0, 0.0), ell_comps=(0.1, 0.0), einstein_radius=1.6),\n", - ")\n", - "\n", - "tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy])\n", - "\n", - "fit = al.FitImaging(dataset=dataset, tracer=tracer)\n", - "\n", - "aplt.subplot_fit_imaging(fit=fit)\n", - "aplt.subplot_fit_imaging_of_planes(fit=fit)" - ], - "outputs": [], - "execution_count": null - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Wrap Up__\n", - "\n", - "And with that, we're done. I'll end by pointing out a few things about what we've covered to get you thinking about\n", - "the adaption tutorials later in this chapter.\n", - "\n", - " - When the lens galaxy's light is subtracted perfectly it leaves no residuals. However, if it isn't subtracted\n", - " perfectly it does leave residuals, which will be fitted by the inversion. If the residuals are significant this is\n", - " going to impact the source reconstruction negatively and can lead to some pretty nasty systematics. In the adaption\n", - " tutorials at the end of this chapter, we'll learn how our adaptive analysis can prevent this residual fitting." - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb b/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb index 3edd987..26ef768 100644 --- a/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb +++ b/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb @@ -234,7 +234,7 @@ "4x4 grid) out of the 784 pixels to actually fit the data! The remaining ~750 pixels are doing nothing but fitting\n", "noise.\n", "\n", - "This means that regularization is sub-optimal. In tutorial 4, we discussed how the Bayesian evidence of the \n", + "This means that regularization is sub-optimal. In tutorial 2, we discussed how the Bayesian evidence of the\n", "regularization favours the simplest source solution. That is, the solution which fits the data using the fewest source \n", "pixels. If we are dedicating a large number of source pixels to fitting *nothing*, the source reconstruction is \n", "unnecessarily complex (and therefore is lower `log_evidence` solution).\n", @@ -375,7 +375,7 @@ "fitting just noise. We could achieve even better solutions if the central regions of the source were reconstructed\n", "using more pixels, and fewer source pixels were used in the outskirts of the source plane.\n", "\n", - "Tutorials 10, 11 and 12 show even more advanced and adaptive pixelizations which do just this, by adapting to the\n", + "Tutorials 11 and 12 show even more advanced and adaptive pixelizations which do just this, by adapting to the\n", "source galaxy's morphology rather than the mass model magnification.\n", "\n", "In the mean time, you may wish to experiment with using both rectangular and Delaunay meshes to fit\n", diff --git a/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb b/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb deleted file mode 100644 index 96fff82..0000000 --- a/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Tutorial 9: Model-Fit\n", - "=====================\n", - "\n", - "You should now perform lens modeling using a pixelization, which is described fully in the example:\n", - "\n", - "`autolens_workspace/*/imaging/features/pixelization/modeling.py`\n", - "\n", - "__Wrap Up__\n", - "\n", - "Once complete, you can then move on to the next HowToLens tutorial and gain more insight into adaptive\n", - "pixelizations." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "__Google Colab Setup__\n", - "\n", - "Set up Google Colab as in [the introductory notebook](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb).\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "cellView": "form", - "jupyter": { - "source_hidden": true - } - }, - "outputs": [], - "source": [ - "# @title Set up Google Colab { display-mode: \"form\" }\n", - "try:\n", - " import google.colab\n", - "except ImportError:\n", - " from autolens import setup_colab as _setup_colab\n", - "else:\n", - " import importlib\n", - " import subprocess\n", - " import sys\n", - "\n", - " subprocess.check_call(\n", - " [sys.executable, \"-m\", \"pip\", \"install\", \"autonerves\", \"--no-deps\"]\n", - " )\n", - " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", - "\n", - "_setup_colab.setup(\"howtolens\")" - ] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "\n", - "from autolens import setup_notebook; setup_notebook()\n" - ], - "outputs": [], - "execution_count": null - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.1" - }, - "colab": { - "aiContexts": { - "97746750-6915-569b-a61d-792a6bc69437": { - "id": "97746750-6915-569b-a61d-792a6bc69437", - "name": "PyAutoLens assistant", - "context": "These instructions were prepared by the PyAutoLens assistant\n(https://github.com/PyAutoLabs/autolens_assistant). The reference material at the\nend was written for a coding agent working inside a checkout of that repository.\nHere in Google Colab there is no checkout: ignore any step about repository files,\nhooks, `scripts/` or `wiki/` paths, saving scripts, or terminal tools, and use the\nPyAutoLens knowledge in that material to help with this notebook.\n\nYou are helping someone work through a PyAutoLens notebook (notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb in HowToLens).\nExplain what it does and help them adapt it to their own questions.\n\nCore rules:\n1. Stay with this notebook's API. Only use PyAutoLens calls that appear in the\n notebook or in the reference material below. Never invent class names, functions\n or arguments. If you are unsure whether something exists, say so and suggest\n checking with `dir()` or the PyAutoLens docs (https://pyautolens.readthedocs.io).\n2. Real data needs a check first. Before helping fit real observational data, ask the\n user to plot it and confirm (a) whether extra galaxies, foreground stars or\n artefacts need masking or noise-scaling, and (b) a mask radius that contains all\n of the lensed emission. Never leave the mask radius at its default on real data.\n Simulated data from the workspace is exempt.\n3. Never claim a fit or a cell ran, or what it returned. Only the user's own outputs\n tell you that; ask them to share what they see.\n4. When the answer depends on something you do not know (their data, their goal, what\n a cell printed), ask one focused question rather than guessing.\n5. For multi-step projects (a new lens, a sample of lenses, a paper's analysis), point\n them to the PyAutoLens assistant https://github.com/PyAutoLabs/autolens_assistant,\n which runs in Claude Code or Codex with its full skills and safety checks.\n\n# Reference material: assistant skills\n\n## Skill: al_adaptive_pixelization\n\n---\nname: al_adaptive_pixelization\ndescription: Build a model whose source reconstruction uses an adaptive pixelisation (mesh density tracks source brightness or surface density) and adaptive regularisation (smoothing strength inferred from data, not fixed). Use when a uniform mesh wastes resolution on dim regions and under-resolves bright ones — common for complex arcs and ALMA data. More expressive than `al_build_imaging_model`'s \"pixelised source\" branch, at the cost of more knobs. Pairs with `al_inspect_source_reconstruction` (post-fit inspection). Writes a runnable Python script in scripts/. **Status: stub.**\n---\n\n# Adaptive pixelisation + adaptive regularisation\n\nA fixed-resolution pixelised source treats every region of the source\nplane the same. An adaptive pixelisation concentrates pixels where the\nflux concentrates, and adaptive regularisation lets the smoothness\nstrength vary spatially — both inferred jointly with the lens parameters.\n\nThe wins are sharper at high signal-to-noise and especially for\ninterferometer data where rectangular meshes waste capacity on empty\nsky.\n\nWorkspace path: `autolens_workspace:scripts/imaging/features/pixelization/adaptive.py`,\n`scripts/imaging/features/pixelization/delaunay.py`.\n\n## Ask\n\n- *\"Mesh type — Delaunay (default adaptive), KMeans-Voronoi, Hilbert\n (memory-efficient for groups), rectangular adaptive?\"*\n- *\"Regularisation — constant (single strength), split (different per\n region), brightness-adaptive (strength scales with local source\n flux)?\"*\n- *\"Adapt-image source — do you have a converged base fit to use as the\n adapt-image, or should we bootstrap from a parametric source fit\n first?\"* — either way the source adapt image is capped at S/N 3.0\n before use (see below); the cap applies regardless of which fit it\n came from.\n\n## Adapt image S/N cap (always)\n\nThe Hilbert image-mesh weights and the adaptive regularization pixel signals are both\nmax-normalised — `(adapt_image / max) ** power` — so the brightest peak of a raw\nsignal-to-noise adapt image sets the scale for everything else. Fainter multiply-imaged\nfeatures fall to a few percent of that weight and lose both source-pixel density and\nregularization weight, so the source adapt image is capped at S/N 3.0 wherever it is\nbuilt. The library applies no cap; it is the script's job at every site.\n\nApply it immediately after the dict is built, before `al.AdaptImages(...)` or a Hilbert\n`image_plane_mesh_grid_from(adapt_data=...)`:\n\n```python\ngalaxy_image_name_dict = al.galaxy_name_image_dict_via_result_from(result=result)\n\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsource_adapt_image[source_adapt_image > adapt_image_snr_cap] = adapt_image_snr_cap\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\nRules:\n\n- **Cap a copy, never the dict entry in place.** `.copy()` keeps the class and mask; an\n in-place cap would silently truncate the raw image every later consumer shares.\n- **Anything that needs the raw image binds it before the cap.** The adaptive\n over-sampling map (`np.where(source_image_raw > 3.0, 4, 2)`, see \"Adaptive pixelization\n over-sampling\" below) reads a\n `source_image_raw = galaxy_image_name_dict[\"('galaxies', 'source')\"]` bound above the cap\n block, because the capped image never exceeds the threshold.\n- **Every stage that builds `AdaptImages` from a source image gets the cap** — `source_lp`,\n `source_pix_*`, `light_lp` and `mass_total` alike; the three lines repeat per stage.\n- Scripts with more than one source cap every source key present\n (`\"('galaxies', 'source_0')\"`, `\"('galaxies', 'source_1')\"`, …).\n\n### Interferometer\n\nInterferometer adapt images are real-space *model* images in flux units\n(`use_model_images=True`): the interferometer dirty noise map is a dirty beam rather than a\nnoise map, so dividing by it does not give a usable S/N image. Derive the clip level from a\nbeam-smoothed S/N instead — transform the model image to a dirty image, divide by the\nhomogeneous image-plane noise, and clip the copy at the flux where that S/N crosses 3.0:\n\n```python\nadapt_image_snr_cap = 3.0\n\nsource_adapt_image = galaxy_image_name_dict[\"('galaxies', 'source')\"].copy()\nsigma_pix = np.sqrt(0.5 * np.sum(np.abs(dataset.noise_map.array) ** 2))\ndirty_source = dataset.transformer.image_from(\n visibilities=dataset.transformer.visibilities_from(image=source_adapt_image)\n)\nabove_cap = source_adapt_image.array[\n dirty_source.array / sigma_pix > adapt_image_snr_cap\n]\nif above_cap.size:\n source_adapt_image[source_adapt_image > above_cap.min()] = above_cap.min()\nelse:\n print(\n \"Adapt image S/N cap not applied: no pixel reaches S/N 3.0 in the dirty image.\"\n )\ngalaxy_image_name_dict[\"('galaxies', 'source')\"] = source_adapt_image\n```\n\n`sigma_pix` is the square root of *half* the summed visibility variances, because the dirty\nimage is the real part of the transform.\n\nWorked sites to copy from:\n\n- `autolens_workspace:scripts/guides/modeling/slam_start_here.py` — the canonical SLaM\n template, capped at every stage.\n- `autolens_workspace:scripts/imaging/features/pixelization/delaunay.py` — the cap feeding\n a Hilbert image mesh.\n- `autolens_workspace:scripts/interferometer/features/pixelization/slam.py` — the\n interferometer form above.\n\n## Adaptive pixelization over-sampling (from `source_pix_2`)\n\nEvery SLaM pipeline — imaging, group, multi-galaxy, multi-dataset — over-samples the\npixelization grid adaptively from `source_pix_2` onwards: sub-size 4 where the source is\ndetected, 2 elsewhere. Build the map from the *raw* (pre-cap) source entry and re-apply the\ndataset before the fit is composed; `source_pix_2` and every later stage receive that\ndataset.\n\n```python\nsignal_to_noise_threshold = 3.0\n\nsource_image_raw = al.galaxy_name_image_dict_via_result_from(result=source_pix_result_1)[\n \"('galaxies', 'source')\"\n]\n\nover_sample_size_pixelization = al.Array2D(\n values=np.where(source_image_raw > signal_to_noise_threshold, 4, 2), mask=dataset.mask\n)\n\ndataset = dataset.apply_over_sampling(\n over_sample_size_pixelization=over_sample_size_pixelization\n)\n```\n\n- **The dict entry is already a signal-to-noise map**, so it is thresholded directly.\n `al.galaxy_name_image_dict_via_result_from` with its default `use_model_images=False`\n returns `subtracted_image / noise_map` (its on-disk cache is literally\n `galaxy_images_snr.fits`); only `use_model_images=True` returns flux-unit model images.\n The function's docstring says \"model-image\" and is misleading.\n- **Never do this:** `al.util.over_sample.over_sample_size_via_adapt_from(data=,\n noise_map=...)`. That helper divides by the noise itself, so feeding it an S/N map divides\n twice (~18x inflation on HST-depth data — ~90 % of the mask at sub-size 4 instead of\n ~30 %), and its `signal_to_noise_cut` defaults to 5.0 and silently drops to `max / 2` when\n the map's maximum is below `2 * cut`. The workspace no longer calls it anywhere.\n- **`source_pix_1` is exempt** — it keeps the library default uniform sub-size (4), because\n its adapt image comes from the parametric SOURCE LP fit and is not yet reliable enough to\n steer over-sampling.\n- **Interferometer SLaM does not do this** — a pixelization fit to visibilities cannot be\n over-sampled.\n\n## Branch — Delaunay mesh + adaptive brightness regularisation\n\n> TODO: recipe. Pattern: `pix = al.Pixelization(mesh=al.mesh.Delaunay(...),\n> regularization=al.reg.AdaptiveBrightnessSplit(...))` ; wrap in a\n> `Galaxy`; analysis needs `adapt_images` set from the bootstrap fit.\n> See `PyAutoArray:autoarray/inversion/...` and\n> `PyAutoLens:autolens/imaging/...`.\n\n## Branch — bootstrap workflow\n\nTwo-stage: (1) fit with a parametric source to produce an adapt image,\n(2) refit with the adaptive pixelisation, using the parametric model\nimage as the adapt source.\n\n> TODO: recipe.\n\n## Combine\n\n- [`al_inspect_source_reconstruction`](./al_inspect_source_reconstruction.md)\n — post-fit inspection of the reconstructed source + regularisation\n state.\n- [`al_chain_searches`](./al_chain_searches.md) — the bootstrap is a\n classic two-search chain.\n- [`al_datacube_modeling`](./al_datacube_modeling.md) — datacube\n pixelisation is similar but spectrally extended.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: chapter_3 tutorial_8 adaptive](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb):\n pedagogical adaptive-pixelisation walkthrough.\n- **General reference** — [RTD: overview_3_features](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n pixelisation feature section.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/adaptive.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/adaptive.py):\n the canonical adaptive setup.\n\nSee also [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md)\nfor the underlying inversion theory.\n\n## Skill: al_inspect_source_reconstruction\n\n---\nname: al_inspect_source_reconstruction\ndescription: Inspect a pixelised source reconstruction from a completed fit — source-plane image, mesh / regularisation state, reconstruction error, and the inversion's linear solution. Pixelised sources are common for complex arcs and for ALMA/JVLA visibilities. Use after `al_load_results` has handed you the dataset + tracer; needs to rebuild the `FitImaging` because pixelisation state isn't stored in `tracer.json`.\n---\n\n# Inspecting a pixelised source reconstruction\n\nWhen the source has been reconstructed on a pixel grid (Delaunay / Voronoi /\nrectangular mesh) rather than as a parametric Sersic, the interesting object is the\n**inversion** — the linear solution that mapped source-plane pixels to image-plane\ncounts. Pixelised reconstructions live in `FitImaging.inversion`, *not* in the\nsaved `tracer.json`. To see them you have to rebuild the fit.\n\nFor the theory — what regularisation does, what makes a pixelisation adaptive vs.\nfixed, why the inversion can demagnify pathologically without a positions penalty —\nread [`wiki/core/concepts/inversions_and_pixelizations.md`](../wiki/core/concepts/inversions_and_pixelizations.md).\n\nCanonical reference:\n`autolens_workspace:scripts/imaging/features/pixelization/plot.py`.\n\n## Ask\n\n- *\"What do you want to look at — the source image on its mesh, the regularisation\n matrix structure, the reconstruction error, the data-mapping matrix?\"*\n- *\"Was this a parametric or pixelised fit?\"* — if parametric, this skill doesn't\n apply; use [`al_plot_tracer`](./al_plot_tracer.md) for the source-plane image.\n\n## Saving plots\n\n`autolens.plot` in `2026.5.21+` is a flat module of free functions — the old\n`InversionPlotter` / `MatPlot2D` / `Output` classes are gone. Plot the\ninversion's component arrays directly via `aplt.plot_array`:\n\n```python\nfrom pathlib import Path\nimport autolens as al\nimport autolens.plot as aplt\n\nPLOT_DIR = Path(\"scripts/scratch\") / \"\" # pick a meaningful slug\nPLOT_DIR.mkdir(parents=True, exist_ok=True)\n```\n\nAfter running, the agent quotes `PLOT_DIR.resolve()` and offers\n`open ` — see `_style.md` \"Plot output and path announcement\". The\nfunction-style plot API is documented in\n[`wiki/core/api/plotting.md`](../wiki/core/api/plotting.md).\n\n> ⚠️ **Known regression (still open as of `2026.7.6`).** `Delaunay` and\n> `KNNBarycentric` crash inside `FitImaging` (`'NoneType' object has no attribute\n> 'array'`), and `ConstantSplit` is broken on `RectangularUniform`. Use\n> `al.mesh.RectangularUniform` + `al.reg.Constant` for now; tracking:\n> .\n\n## Branch — source-plane reconstruction\n\nRebuild the fit so the inversion is computed, then plot the components:\n\nThe quickest full view is the fit subplot — when the fit uses an inversion its\nfinal panel *is* the source-plane reconstruction:\n\n```python\n# `dataset` from al_prepare_imaging_data, `tracer` from al_load_results.\nfit = al.FitImaging(dataset=dataset, tracer=tracer)\n\naplt.subplot_fit_imaging(\n fit=fit, output_path=str(PLOT_DIR), output_format=\"png\",\n)\n```\n\nFor component-level access, the inversion exposes (names verified against the\n2026.7 stack):\n\n```python\ninv = fit.inversion\n\n# Image-plane image the linear solution reconstructs (Array2D — plottable):\naplt.plot_array(array=inv.mapped_reconstructed_data,\n output_path=str(PLOT_DIR),\n output_filename=\"mapped_reconstruction\",\n output_format=\"png\")\n\n# Source-plane solution: a 1D vector of per-source-pixel intensities\n# (keyed per mapper in inv.reconstruction_dict). For a RectangularUniform\n# mesh, reshape to the mesh's native 2D shape to plot it.\nreconstruction = inv.reconstruction\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nSource: `PyAutoArray:autoarray/inversion/inversion/`.\n\n## Branch — mesh + regularisation diagnostics\n\nThe previous object-oriented inversion plotter API is removed.\nThe closest current entry point is `aplt.subplot_basis_image`, which renders\nthe mapper's pixelisation overlaid on the image:\n\n```python\naplt.subplot_basis_image(\n inversion=fit.inversion,\n output_path=str(PLOT_DIR), output_format=\"png\",\n)\n\nprint(f\"Saved to: {PLOT_DIR.resolve()}\")\n```\n\nThe mesh-triangulation and regularisation-neighbour graphs no longer have\ndirect plot helpers; build them with NumPy and `aplt.plot_grid` if needed.\n\n## Branch — double source-plane lens (DSPL) / multi-plane pixelisations\n\nFor systems with two source planes (each pixelised independently), the\n`pixelization_index` argument indexes into the planes. See\n`autolens_workspace:scripts/imaging/features/advanced/double_source_plane_lens/plot.py`.\n\n## Quality checks\n\nA healthy pixelised reconstruction:\n\n- Source-plane reconstruction shows recognisable structure (clumps, arms), not white\n noise.\n- Reconstruction error / signal-to-noise is positive across the source.\n- Regularisation weights smoothly decrease toward the edges (for adaptive variants).\n- The reconstructed image-plane model matches the data with featureless residuals\n (see [`al_plot_fit_residuals`](./al_plot_fit_residuals.md)).\n\nPathological signs:\n\n- Source-plane is a single bright pixel — the inversion has demagnified. Add image\n positions and refit.\n- Reconstruction looks like the noise map — regularisation is too low. Raise the\n regularisation coefficient range.\n- Source is unphysically extended beyond the caustic — mass model is wrong; the\n positions penalty isn't holding it in.\n\nConnect to [`al_debug_fit_failure`](./al_debug_fit_failure.md) when any of these\nappear.\n\n## Combine\n\n- [`al_plot_tracer`](./al_plot_tracer.md) — overlay caustics on the source-plane\n reconstruction to confirm signal is inside the caustic.\n- [`al_chain_searches`](./al_chain_searches.md) — the canonical chain for moving from\n a parametric source fit to a pixelised one.\n- [`al_run_slam_pipeline`](./al_run_slam_pipeline.md) — automated pipeline that\n handles the parametric → pixelised transition.\n\n## Further reading\n\n- **Student / new to lensing** — [HowToLens: Reconstructing source light via\n least-squares](https://github.com/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb):\n the inversion at its heart — least-squares solution for source-plane pixel\n intensities. Chapter 3 as a whole covers mappers, regularization, adaptive grids.\n- **General reference** — [RTD: Features overview](https://pyautolens.readthedocs.io/en/latest/overview/overview_3_features.html):\n the pixelization feature sits here alongside MGE / interferometry / shapelets —\n links into deeper docs.\n- **Experienced PyAutoLens user** — [workspace/lens: imaging/features/pixelization/modeling.py](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/modeling.py):\n rectangular-mesh + constant-regularization pixelization model — production\n pattern for extended-arc sources.\n" - } - }, - "selectedAiContext": "97746750-6915-569b-a61d-792a6bc69437" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} \ No newline at end of file diff --git a/scripts/chapter_3_pixelizations/README.md b/scripts/chapter_3_pixelizations/README.md index e184ada..4cd4c8b 100644 --- a/scripts/chapter_3_pixelizations/README.md +++ b/scripts/chapter_3_pixelizations/README.md @@ -1,29 +1,28 @@ -In chapter 3, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. +Look at a resolved lensed arc. Its broad shape may be smooth, but the light along it can contain bright knots, faint extensions and irregular structure. A model might reproduce the overall arc while leaving compact, coherent features in the residual image. -**Colab** links to every tutorial are included. +In Chapter 2, we introduced linear light profiles and multi-Gaussian expansions (MGEs). By combining Gaussians of different widths, an MGE can describe a much more flexible radial brightness distribution than a single Sérsic profile. Gaussian groups with different ellipticities and orientations can also describe changes in flattening and isophotal twists. Fixed widths and linearly solved intensities keep the number of non-linear parameters manageable. -# Files +That flexibility makes MGE a useful modelling tool, but consider the geometry of our worked example. Within each galaxy’s Gaussian group, the components shared a common centre and elliptical shape. Adding more Gaussians gives us finer control over how brightness changes around that centre. It does not give us separate centres for star-forming knots, off-centre clumps or several distinct source components. -- [Tutorial 1: Pixelizations](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb) — Creating a pixel-grid in the source-plane. +We could add offset Gaussian groups. MGEs are not fundamentally restricted to one centre. The practical difficulty is deciding how many groups to use, where to place them and how to fit their geometry as the source becomes more complicated. -- [Tutorial 2: Mappers](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb) — How a pixelization maps source-pixels to image-pixels. +This is where the image residuals become useful. If an MGE captures the broad light distribution but leaves compact structure along the arcs, its source description may need more spatial freedom. Those residuals are not proof of source clumpiness: errors in the mass model, foreground light subtraction, telescope blurring or other aspects of the data treatment can also produce structure. We need to investigate their origin. -- [Tutorial 3: Inversions](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb) — Inverting the mappings to reconstruct the source's light. +In this chapter, we introduce pixelized source reconstruction. Instead of prescribing a light-profile centre and shape for every feature, we describe the source brightness on a mesh. Different regions of that mesh can take different brightness values, allowing the reconstruction to represent more complicated source structure. -- [Tutorial 4: Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb) — Smoothing the source within a Bayesian framework. +The connection to Chapter 2 is direct. There, we solved for Gaussian intensities linearly. Here, for a specified mass model and mesh, we solve for source brightness values using the same underlying advantage: they enter the predicted image linearly. -- [Tutorial 5: Bayesian Formalism](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb) — The linear algebra and Bayesian evidence equations behind pixelized source reconstruction. +This additional freedom also allows the reconstruction to fit noise. We therefore introduce regularization—a prior that controls how freely neighbouring source brightnesses can vary. Pixelization is not assumption-free: the mass model, mesh geometry, resolution and regularization all affect the inferred source. -- [Tutorial 6: Borders](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb) — Preventing highly demagnified image-pixels ruining the inversion. +MGE remains valuable, especially for foreground lens light and initial source fits. Pixelization is the next tool when the source requires more spatial freedom. We will learn how to use these tools together, inspect their reconstructions and recognise when their assumptions need revisiting. -- [Tutorial 7: Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb) — How to use inversions to fit a lens model. +- [Pixelizations, Mappers and Inversions](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb) +- [Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb) +- [Borders](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb) +- [Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb) -- [Tutorial 8: Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb) — A Delaunay mesh which adapts to the mass model's magnification. +The following tutorials explore adaptive meshes and regularization: -- [Tutorial 9: Model Fit](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb) — An example lens modeling pipeline which uses an inversion. - -- [Tutorial 10: Fit Problems](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb) — The shortcomings of our lens models and inversions. - -- [Tutorial 11: Brightness Adaption](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb) — Adapting the pixelization to the source's morphology. - -- [Tutorial 12: Adaptive Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/2026.10.29.1/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb) — Adapting the regularization to the source's morphology. +- [Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.ipynb) +- [Brightness Adaption](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_11_brightness_adaption.ipynb) +- [Adaptive Regularization](https://colab.research.google.com/github/PyAutoLabs/HowToLens/blob/main/notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb) diff --git a/scripts/chapter_3_pixelizations/images/maresca_fig1.png b/scripts/chapter_3_pixelizations/images/maresca_fig1.png new file mode 100755 index 0000000000000000000000000000000000000000..23bd992eac7dea910c2fc8b3bec48a71b2d05b0d GIT binary patch literal 294534 zcmeFZWl&w)5;YouUn80_J>E!^ znB(N2+TrBpYufbWvHbAe@RBXhfT6fHDXaZp4g&lDZ#+Xg ze-MdXsR~06O3+(#=-+D$>N;8c*+z*3k?+pF3$;nEcv`IrpTukiZqS@^g5yOyaGphu zJnfbO)3qcRHxr=|j51f|49gU3xTQ~-|7xHZa`MGeSfahNSM7EBpqw@|s&rGgJw7qk zvoBw=E$ESiOA7D2_mhyUlJX1E223|P$W3_>S>-KF2Zxw^(e2@N*uKJjh5pmUYjiQ; zt4@O@7Y?U@8StT$!1lMmaIG|o_tz_PT5q#kCc_VVTKg@E&_=OPV{Sq9MJ%_E$C4VH zkLN_y`qzV>v}236x5Al{B1gyda2&YeJ19P~3F)oVuA#T&d`tVmqLsL0lMs2l_vrTGun~QWF>S zSz&9~TT61WUG8uD(0n+&-A+8yu{G+yKCYeJY52y;^5fGsC5z9PW>L4J$*EMiehreC z@aplFf8*^8-%y7)J}>TP>eq7v4zoBWTsy?3vQsrD7B?{AR~3Yx0cfQ`o6iWkZQ*v0+aj3X|r z{ghX%zHHKm&XaGsg!KLD;Y|GYq$2G=i(x;sEvE|1;V`1G2a(+(FS_8pgq8;TEsmt& zgl?b9BeYfn=U%|E*U$U5HOYP{=2egQGv#_T&Y{kqtR-}&RW|M_7%)-p;P=sdV3|t6 zXbHXgmOR+%wbZ~T3zkhqSn-Gi77!JbsK5zVe9MFHH7r4ZR=*lgM8W_*?`7KjNpyM> z8BqlV(GuBcx;@FEREYNdN|q!z(5-b{crzpT$+@dr|H%lcelvpTpzQT)P>~cuG--IE z3e!Y1_CIzo5X)68B;NREIcul*qEM`npGr zkcCpO=iZIvy0V`-JbKbGDVmeX{Uq%$_7%85BP4E!v9QbEGMORckWK}7q=-F_S1<`xyn7!0v(hOffV}t2~&33wKvozuICpo#_oLGAL=lO3FKC< z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WmJrW2Tf%H)8}%;&;c|6G*z+t3#Et@(^6e z*5X&wUGaRqg&xt>beE>jfF#~u1FGYzq{wuJYwj_o9y##ky7=Bgy?1-?%h@h97CE3Y zr45GQsed4Zy!U%B2K>gk^#h=W&L-4aG_ex1J+Bsinq0~+KDRNiJ`OT@)^Ct`oj=j0 zEnL!O{UCPvOP;)I&v21!B(k0O*@EhHIpPwJ0 z4;4y8Wy$S}ZWcGFzOK2PUU0|e@Xb-!vCp+QnO%6axMI?+C0?+{smcYrncbb1VW%{Y zg6w-FEm5D9TFiq`TAUiyxOw|6TlQ8BKb?Lv#0(Gk5aE}8b|oe7>{m+Q1}aL$WBAa> zgM%MT44@djt3Ez$XGUpb5&x01vD(-s+XZio_-Zd7Y3<=$Sc*X4uBA*7%!k#0x%wYT zik80pC<(nYz$b>zG@E1ew+u#+90fKV*VS-8B<6(s?PiNjYinoG<}RKG0{|XDG+!pw zGu~of6>ujRB$J;Vr8%Xw*Tj5!ApJN|HnWee4Gr=SZ6{!{^Yz|k?!m)!7BL<1)=AlP z-bien*Fl$e3&1##ezudCG-UpAuC!gnRrA&iIQj~~cm5M$n-g({v|*T%bA>%7VCFIv zlv=*r?Dd#^JdJ-lxh@61i<(7x-Sa)lr&Eoi&&k>wE_T>NArGt#kD>II>LOrsIcDMq z-)!QH3{g^ZplvQ?fhTVq_oRPTC%f`-6K<~0*_g|ZelE%zGr6PdcmqhPyRZFVhE2yT zw!26$zQ2qPVkMec^g}Z&8}#{Z?cR;n$Ur2S8aJ??%gYM3$jj!}|C*55#1pE&w|ya3 se@76J|M4F1|FqToFS=3Dn-Q!N{UP1ZbI#Iyc`DAFJa3+N;@Z7`0;;iWp8x;= literal 0 HcmV?d00001 diff --git a/scripts/chapter_3_pixelizations/introduction b/scripts/chapter_3_pixelizations/introduction index fbfe5a3..1c9ff4d 100755 --- a/scripts/chapter_3_pixelizations/introduction +++ b/scripts/chapter_3_pixelizations/introduction @@ -1,24 +1,17 @@ -So, we've learnt how to model strong lenses and build pipelines that customize the process to our science case. - -However, we ran into a pretty huge barrier when trying to fit complex sources. It required an unwieldy number -of non-linear parameters, and even when we included them, the results were rubbish. The non-linear parameter space -was just too complex, and even a well crafted pipeline couldn't fix the problem. - -In this chapter, we'll learn about pixelizations and inversions. These tools allow us to reconstruct the source-galaxy's -using a pixel-grid. This makes no assumption about the source's morphology, breaking the simplifying assumptions inherent -to analytic light profiles (e.g. symmetry). - -Remarkably, pixels grids use just a couple of non-linear parameters, meaning the 30+ non-linear parameters we required -to fit complex-sources before are going to be reduced to just 3 or 4! - -In particular, you'll learn how we: - -1) Pixelize a source-plane into a set of source-plane pixels that define mappings to image pixels. -2) Invert this source-plane pixelization to fit the strongly lensed source and thus reconstruct its light. -3) Apply a smoothness prior on our source reconstruction, called 'regularization', to ensure our solution is physical. -4) Apply this prior in a Bayesian framework to objectively quantify our source reconstruction's log likelihood. -5) Define a border in the source-plane to prevent pixels tracing outside the source reconstruction. -6) Can use alternative pixelizations that use Delaunay pixels adapted to the lens's mass model. -7) Use these features in PyAutoLens pipelines. - -Sound good? I agree, so lets get on with it. \ No newline at end of file +Look at a resolved lensed arc. Its broad shape may be smooth, but the light along it can contain bright knots, faint extensions and irregular structure. A model might reproduce the overall arc while leaving compact, coherent features in the residual image. + +In Chapter 2, we introduced linear light profiles and multi-Gaussian expansions (MGEs). By combining Gaussians of different widths, an MGE can describe a much more flexible radial brightness distribution than a single Sérsic profile. Gaussian groups with different ellipticities and orientations can also describe changes in flattening and isophotal twists. Fixed widths and linearly solved intensities keep the number of non-linear parameters manageable. + +That flexibility makes MGE a useful modelling tool, but consider the geometry of our worked example. Within each galaxy’s Gaussian group, the components shared a common centre and elliptical shape. Adding more Gaussians gives us finer control over how brightness changes around that centre. It does not give us separate centres for star-forming knots, off-centre clumps or several distinct source components. + +We could add offset Gaussian groups. MGEs are not fundamentally restricted to one centre. The practical difficulty is deciding how many groups to use, where to place them and how to fit their geometry as the source becomes more complicated. + +This is where the image residuals become useful. If an MGE captures the broad light distribution but leaves compact structure along the arcs, its source description may need more spatial freedom. Those residuals are not proof of source clumpiness: errors in the mass model, foreground light subtraction, telescope blurring or other aspects of the data treatment can also produce structure. We need to investigate their origin. + +In this chapter, we introduce pixelized source reconstruction. Instead of prescribing a light-profile centre and shape for every feature, we describe the source brightness on a mesh. Different regions of that mesh can take different brightness values, allowing the reconstruction to represent more complicated source structure. + +The connection to Chapter 2 is direct. There, we solved for Gaussian intensities linearly. Here, for a specified mass model and mesh, we solve for source brightness values using the same underlying advantage: they enter the predicted image linearly. + +This additional freedom also allows the reconstruction to fit noise. We therefore introduce regularization—a prior that controls how freely neighbouring source brightnesses can vary. Pixelization is not assumption-free: the mass model, mesh geometry, resolution and regularization all affect the inferred source. + +MGE remains valuable, especially for foreground lens light and initial source fits. Pixelization is the next tool when the source requires more spatial freedom. We will learn how to use these tools together, inspect their reconstructions and recognise when their assumptions need revisiting. diff --git a/scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py b/scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py deleted file mode 100644 index 0d1344a..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py +++ /dev/null @@ -1,329 +0,0 @@ -""" -Tutorial 10: Fit Problems -========================= - -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! - -Earlier in this chapter (tutorial 8) we investigated two pixelizations: the `RectangularBilinearAdaptDensity` mesh and the -`Delaunay` mesh with an `Overlay` image-mesh. We argued that the latter was better than the former, because it -dedicated more source-pixels to the regions of the source-plane where we had more data, e.g. the high-magnification -regions. Therefore, we could fit the data using fewer source pixels, which improved computational efficiency and -increased the Bayesian evidence. - -So far, we've used just one regularization scheme; `Constant`. As the name suggests, this scheme applies just one -regularization coefficient when comparing source pixel fluxes to apply smoothing. Here is a recap of our discussion -about regularization from tutorial 4: - --------------------------------------------- - -When the inversion reconstructs the source, it does not *only* compute the set of source-pixel fluxes that best-fit -the image. It also regularizes this solution, whereby it goes to every pixel on the rectangular source-plane grid -and computes the different between the reconstructed flux values of every source pixel with its 4 neighboring pixels. -If the difference in flux is large the solution is penalized, reducing its log likelihood. You can think of this as -us applying a 'smoothness prior' on the reconstructed source galaxy's light. - -This smoothing adds a 'penalty term' to the log likelihood of an inversion which is the summed difference between the -reconstructed fluxes of every source-pixel pair multiplied by the `coefficient`. By setting the regularization -coefficient to zero, we set this penalty term to zero, meaning that regularization is completely omitted. - -Why do we need to regularize our solution? We just saw why, if we do not apply this smoothness prior to the source, we -`over-fit` the image and reconstruct a noisy source with lots of extraneous features. This is what the large flux -values located at the exterior regions of the source reconstruction above are. If the inversions's sole aim is to -maximize the log likelihood, it can do this by fitting *everything* accurately, including the noise. - ----------------------------------------------- - -When using a `Constant` regularization scheme, we regularize the source by adding up the difference in fluxes -between all source-pixels multiplied by one single value of the regularization coefficient. This means that every -single source pixel receives the same `level` of regularization, regardless of whether it is reconstructing the -bright central regions of the source or its faint exterior regions. - -In this tutorial, we'll learn why our magnification-based pixelization and constant regularization schemes are not -optimal. We'll inspect fits to three strong lenses, simulated using the same mass profile but with different -sources whose light profiles become gradually more compact. For all 3 fits, we'll use the same source-plane resolution -and a regularization_coefficient that maximize the Bayesian evidence. Thus, these are the `best` source reconstructions -we can hope to achieve when adapting to the magnification. - -__Contents__ - -- **Initial Setup:** we'll use 3 sources whose `effective_radius` and `sersic_index` are changed such that each is more. -- **Mask:** Define the 2D mask applied to the dataset for the model-fit. -- **Simulator:** Now, lets simulate all 3 of our source's as to create `Imaging` data. -- **Fitting:** Fit the lens model to the dataset and inspect the results. -- **Fit Problems:** Lets fit our first source which was simulated using the flattest light profile. -- **Discussion:** Okay, so what did we learn? -- **Wrap Up:** Summary of the script and next steps. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -import autolens as al -import autolens.plot as aplt - -""" -__Initial Setup__ - -we'll use 3 sources whose `effective_radius` and `sersic_index` are changed such that each is more compact that the last. -""" -source_galaxy_flat = al.Galaxy( - redshift=1.0, - bulge=al.lp.Sersic( - centre=(0.0, 0.0), - ell_comps=(0.0, 0.15), - intensity=0.2, - effective_radius=0.5, - sersic_index=1.0, - ), -) - -source_galaxy_compact = al.Galaxy( - redshift=1.0, - bulge=al.lp.Sersic( - centre=(0.0, 0.0), - ell_comps=(0.0, 0.15), - intensity=0.2, - effective_radius=0.2, - sersic_index=2.5, - ), -) - -source_galaxy_super_compact = al.Galaxy( - redshift=1.0, - bulge=al.lp.Sersic( - centre=(0.0, 0.0), - ell_comps=(0.0, 0.15), - intensity=0.2, - effective_radius=0.1, - sersic_index=4.0, - ), -) - -""" -The function below uses each source galaxy to simulate imaging data. It performs the usual tasks we are used to -seeing (make the PSF, galaxies, tracer, etc.). -""" - - -def simulate_for_source_galaxy(source_galaxy): - grid = al.Grid2D.uniform(shape_native=(150, 150), pixel_scales=0.05) - - psf = al.Convolver.from_gaussian( - shape_native=(11, 11), sigma=0.05, pixel_scales=0.05 - ) - - lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), ell_comps=(0.111111, 0.0), einstein_radius=1.6 - ), - ) - - tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) - - simulator = al.SimulatorImaging( - exposure_time=300.0, - psf=psf, - background_sky_level=100.0, - add_poisson_noise_to_data=True, - noise_seed=1, - ) - - return simulator.via_tracer_from(tracer=tracer, grid=grid) - - -""" -__Mask__ - -we'll use a 3.0" mask to fit all three of our sources. -""" -mask = al.Mask2D.circular(shape_native=(150, 150), pixel_scales=0.05, radius=3.0) - -""" -__Simulator__ - -Now, lets simulate all 3 of our source's as to create `Imaging` data. -""" -dataset_source_flat = simulate_for_source_galaxy(source_galaxy=source_galaxy_flat) - -dataset_source_compact = simulate_for_source_galaxy(source_galaxy=source_galaxy_compact) - -dataset_source_super_compact = simulate_for_source_galaxy( - source_galaxy=source_galaxy_super_compact -) - -""" -__Fitting__ - -we'll make one more convenience function which fits the simulated imaging data with a -`RectangularBilinearAdaptDensity` mesh and `Constant` regularization scheme pixelization. - -We'll input the `coefficient` of each fit, so that for each simulated source we regularize it at an appropriate level. -There is nothing new in this function you haven't seen before. -""" - - -def fit_with_Rectangular_from(dataset, mask, coefficient): - dataset = dataset.apply_mask(mask=mask) - - lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), ell_comps=(0.111111, 0.0), einstein_radius=1.6 - ), - ) - - pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(24, 24)), - regularization=al.reg.Constant(coefficient=coefficient), - ) - - source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - - tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) - - return al.FitImaging(dataset=dataset, tracer=tracer) - - -""" -__Fit Problems__ - -Lets fit our first source which was simulated using the flattest light profile. One should note that this uses the -highest regularization coefficient of our 3 fits (as determined by maximizing the Bayesian log evidence). -""" -fit_flat = fit_with_Rectangular_from( - dataset=dataset_source_flat, mask=mask, coefficient=9.2 -) - -mapper = fit_flat.inversion.cls_list_from(al.Mapper)[0] - - -aplt.subplot_fit_imaging(fit=fit_flat) -aplt.subplot_fit_imaging_of_planes(fit=fit_flat) - - -print(fit_flat.log_evidence) - -""" -The fit was *excellent*. There were effectively no residuals in the fit, and the source has been reconstructed using -lots of pixels! Nice! - -Now, lets fit the next source, which is more compact. -""" -fit_compact = fit_with_Rectangular_from( - dataset=dataset_source_compact, mask=mask, coefficient=3.3 -) - -mapper = fit_compact.inversion.cls_list_from(al.Mapper)[0] - - -aplt.subplot_fit_imaging(fit=fit_compact) -aplt.subplot_fit_imaging_of_planes(fit=fit_compact) - -print(fit_compact.log_evidence) - -""" -The fit does not look so good! - -It reconstructs most of the lensed source's structure, but there are two clear blobs in the residual map where -the fit is failing to reconstruct the central regions of the source galaxy. - -Take a second to think about why this might be. Is it the mesh or how the regularization is applying smoothing? - -Finally, lets fit the very compact source. Given that the results for the compact source did not look good, you are -right in thinking this is going to make things even worse. Again, think about why this might be. -""" -fit_super_compact = fit_with_Rectangular_from( - dataset=dataset_source_super_compact, mask=mask, coefficient=3.1 -) - -mapper = fit_super_compact.inversion.cls_list_from(al.Mapper)[0] - - -aplt.subplot_fit_imaging(fit=fit_super_compact) -aplt.subplot_fit_imaging_of_planes(fit=fit_super_compact) - -print(fit_super_compact.log_evidence) - -""" -__Discussion__ - -Okay, so what did we learn? The more compact our source, the worse the fit. This happens even though we are using the -correct lens mass model, telling us that something is going fundamentally wrong with our source reconstruction and -pixelization. Both the mesh and regularization are to blame! - -*Image-Mesh / Mesh*: - -The problem is the same one we discussed in tutorial 8, when we motivated pixelizations which adapt to where the -data constrains the source. - -We are simply not dedicating enough source-pixels to the central regions of the source reconstruction, -e.g. where it's brightest. As the source becomes more compact, the source reconstruction no longer has enough -resolution to resolve its fine-detailed central structure, causing the fit to the image to degrade. - -As we made our sources more compact we went from reconstructing them using ~100 source pixels, to ~20 source pixels -to ~10 source pixels. - -Adapting to the mass model magnification is not the best approach. As we simulated more compact sources the -magnification (which is determined via the mass model) does not change. We therefore reconstructed each source -using fewer and fewer pixels, leading to a worse and worse fit. - -Furthermore, the source galaxies above are located in the highest magnification regions of the source plane! If the -source's were further away from the caustic, the pixelization would use *even less* pixels to reconstruct them. -Clearly, we want to adapt to something else. - -**Regularization**: - -Regularization also causes problems. When using a `Constant` regularization scheme, we regularize the source by -adding up the difference in fluxes between all source-pixels multiplied by one single value, the regularization -coefficient. This means that, every single source pixel receives the same `level` of regularization, regardless of -whether it is reconstructing the bright central regions of the source or its faint exterior regions. - -To visualize this, we are going to plot the `regularization_weights`. - -The `aplt.subplot_fit_imaging` does not have a method that is able to plot this attribute of the `Inversion`. However, -the `aplt.subplot_fit_imaging` has its own `aplt.plot_array` which we can use to make this plot. The benefit of using this -is that it inherits from the `aplt.subplot_fit_imaging` properties like the caustics, so they appear on the figure (this -would not happen if we manually set up an `aplt.plot_array` as we did in previous tutorials. -""" -aplt.plot_array( - array=fit_super_compact.inversion.mapped_reconstructed_operated_data, - title="Inversion", -) - -""" -As you can see, all pixels are regularized with our single input regularization coefficient value. - -This is not the best approach to regularizing the source. In fact, different regions of the source prefer different -levels of regularization: - - 1) In the source's central regions its flux gradient is steepest; the change in flux between two source pixels is - much larger than in the exterior regions where the gradient is flatter (or there is no source flux at all). To - reconstruct the detailed structure of the source's cuspy inner regions, the regularization coefficient needs to - be much lower to avoid over-smoothing. - - 2) On the other hand, the source reconstruction wants to assume a high regularization coefficient further out - because the source's flux gradient is flat (or there is no source signal at all). Higher regularization coefficients - will increase the Bayesian evidence because by smoothing more source-pixels it makes the solution `simpler`, given - that correlating the flux in these source pixels the solution effectively uses fewer source-pixels (e.g. degrees of - freedom). - -This outlines the problem using a constant regularization scheme. Some parts of the reconstructed source demand a -low regularization coefficient whereas other parts want a high value. - -By using a single regularization coefficient, we infer an intermediate regularization coefficient that over-smooths -the source's central regions whilst failing to fully correlate exterior pixels. - -An adaptive regularization scheme, where the regularization coefficient varies from the outskirts to the central -regions, will produce solutions that further increase the Bayesian evidence. - -__Wrap Up__ - -We have motivated an even more adaptive pixelization, where the mesh and regularization scheme adapt to the source's -unlensed morphology. - -The next two tutorials will show **PyAutoLens**'s adapt-model which enables this. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py b/scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py index 8b2d6b3..304ec95 100644 --- a/scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py +++ b/scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py @@ -2,9 +2,8 @@ Tutorial 12: Adaptive Regularization ==================================== -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 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. This raises the same question as before, how do we adapt our regularization scheme to the source before we've reconstructed it? Just like in the last tutorial, we'll use a model image of a strongly lensed source from a previous diff --git a/scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py b/scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py index d8aa31b..22fa938 100644 --- a/scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py +++ b/scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py @@ -1,156 +1,477 @@ """ -Tutorial 1: Pixelizations -========================= - -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. +Tutorial 1: Pixelizations, Mappers and Inversions +================================================= __Contents__ -- **Initial Setup:** Lets setup a lensed source-plane grid, using a lens galaxy and tracer. -- **Mesh:** Next, lets set up a `Mesh` using the `mesh` module. -- **Wrap Up:** Summary of the script and next steps. +- 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 +""" """ +__Opening — Pixelized source reconstruction__ + +Look at a resolved lensed arc. Its broad shape may be smooth, but the light along it can contain bright knots, faint extensions and irregular structure. A model might reproduce the overall arc while leaving compact, coherent features in the residual image. + +In Chapter 2, we introduced linear light profiles and multi-Gaussian expansions (MGEs). By combining Gaussians of different widths, an MGE can describe a much more flexible radial brightness distribution than a single Sérsic profile. Gaussian groups with different ellipticities and orientations can also describe changes in flattening and isophotal twists. Fixed widths and linearly solved intensities keep the number of non-linear parameters manageable. + +That flexibility makes MGE a useful modelling tool, but consider the geometry of our worked example. Within each galaxy’s Gaussian group, the components shared a common centre and elliptical shape. Adding more Gaussians gives us finer control over how brightness changes around that centre. It does not give us separate centres for star-forming knots, off-centre clumps or several distinct source components. + +We could add offset Gaussian groups. MGEs are not fundamentally restricted to one centre. The practical difficulty is deciding how many groups to use, where to place them and how to fit their geometry as the source becomes more complicated. + +This is where the image residuals become useful. If an MGE captures the broad light distribution but leaves compact structure along the arcs, its source description may need more spatial freedom. Those residuals are not proof of source clumpiness: errors in the mass model, foreground light subtraction, telescope blurring or other aspects of the data treatment can also produce structure. We need to investigate their origin. + +In this chapter, we introduce pixelized source reconstruction. Instead of prescribing a light-profile centre and shape for every feature, we describe the source brightness on a mesh. Different regions of that mesh can take different brightness values, allowing the reconstruction to represent more complicated source structure. + +The connection to Chapter 2 is direct. There, we solved for Gaussian intensities linearly. Here, for a specified mass model and mesh, we solve for source brightness values using the same underlying advantage: they enter the predicted image linearly. -from autolens import jax_wrapper # Sets JAX environment before other imports +This additional freedom also allows the reconstruction to fit noise. We therefore introduce regularization—a prior that controls how freely neighbouring source brightnesses can vary. Pixelization is not assumption-free: the mass model, mesh geometry, resolution and regularization all affect the inferred source. -# from autolens import setup_notebook; setup_notebook() +MGE remains valuable, especially for foreground lens light and initial source fits. Pixelization is the next tool when the source requires more spatial freedom. We will learn how to use these tools together, inspect their reconstructions and recognise when their assumptions need revisiting. +__A complex source__ + +We will use a simulated source with several light components at different positions, giving it an asymmetric appearance. The simulation provides both the lensed image and the original source, so we can see what the reconstruction is trying to recover. + +The next figures show these two views. Look at the separate bright regions in the source and how lensing stretches and repeats their structure in the image. + +For observed data, we would only have the lensed image. The source reconstruction would be an inference from that image and our lens model, not an independent observation of the unlensed galaxy. +""" + +from autolens import jax_wrapper + +from pathlib import Path +import subprocess +import sys + +import numpy as np import autolens as al import autolens.plot as aplt +import autoarray.plot as aaplt -""" -__Initial Setup__ +dataset_path = Path("dataset") / "imaging" / "source_complex" -Lets setup a lensed source-plane grid, using a lens galaxy and tracer. +if al.util.dataset.should_simulate(str(dataset_path)): + subprocess.run( + [sys.executable, "scripts/simulator/source_complex.py"], + check=True, + ) -Note how our source galaxy no longer uses a light profile, as we will instead reconstruct its light using a -pixelization. -""" -grid = al.Grid2D.uniform(shape_native=(100, 100), pixel_scales=0.05, over_sample_size=1) +dataset = al.Imaging.from_fits( + data_path=dataset_path / "data.fits", + noise_map_path=dataset_path / "noise_map.fits", + psf_path=dataset_path / "psf.fits", + pixel_scales=0.05, +) + +mask = al.Mask2D.circular_annular( + shape_native=dataset.shape_native, + pixel_scales=dataset.pixel_scales, + inner_radius=0.1, + outer_radius=3.2, +) + +dataset = dataset.apply_mask(mask=mask) +dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1) + +# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25. +mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25) lens_galaxy = al.Galaxy( redshift=0.5, mass=al.mp.Isothermal( centre=(0.0, 0.0), einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), + ell_comps=(0.17647, 0.0), ), ) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) -source_galaxy = al.Galaxy(redshift=1.0) +aplt.subplot_imaging_dataset(dataset=dataset) -tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - -source_plane_grid = tracer.traced_grid_2d_list_from(grid=grid)[1] +input_tracer = al.from_json(file_path=dataset_path / "tracer.json") +source_plot_grid = al.Grid2D.uniform(shape_native=(100, 100), pixel_scales=0.03) +aplt.plot_array( + array=input_tracer.galaxies[-1].image_2d_from(grid=source_plot_grid), + title="Input Source: Separate Bright Components", +) """ -__Mesh__ +__Why a simple source model falls short__ -Next, lets set up a `Mesh` using the `mesh` module. The mesh represents the pixel-grid used by the pixelization -to reconstruct the galaxy. +An MGE can describe flexible radial light distributions, as we saw in Chapter 2. Here we fix a Gaussian group to one common centre and elliptical shape to isolate the missing spatial freedom: adding widths at that centre cannot independently place all the bright regions in this source. -There are multiple `Mesh`'s available. For now, we'll keep it simple and use a rectangular -grid, whose `shape` defines its $(y,x)$ dimensions. +We will compare the simulated image with a model that uses one common-centre MGE group, keeping the lens mass fixed to the values used in the simulation. This is an illustrative fixed-geometry comparison, not an optimized MGE search. The fixed mass cannot compensate for missing source structure. -The `RectangularBilinearAdaptDensity` mesh adapts its pixels to the density of the traced source-plane -grid via the ray-guided transformed uniform (RTU) grid formulation of Enzi et al. (2026) -(https://arxiv.org/abs/2606.30620), which should be cited in published work using this mesh. -Note that whereas that paper pairs the RTU grid with a Gaussian-process source prior, -**PyAutoLens** instead uses its own regularization schemes, introduced later in this chapter. +Inspect the residual map for coherent structure along the arcs. Such structure would show where this source model leaves light unexplained, rather than just the random differences expected from noise. + +**🤖 Ask AI:** If I allowed the lens mass parameters to vary while using this overly simple source model, how could the missing source structure affect the inferred mass distribution? """ -mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25)) + +gaussians = [ + al.lp_linear.Gaussian(centre=(0.0, 0.0), ell_comps=(0.0, 0.0), sigma=sigma) + for sigma in np.logspace(-2, np.log10(2.0), 20) +] +analytic_source = al.Galaxy( + redshift=1.0, bulge=al.lp_basis.Basis(profile_list=gaussians), +) +analytic_fit = al.FitImaging( + dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, analytic_source]), +) +aplt.subplot_fit_imaging(fit=analytic_fit) """ -We now pass the mesh to a `Pixelization`. +Offset Gaussian groups could supply this spatial freedom too, at the cost of choosing and fitting their geometry. MGE remains useful for initial source fits and foreground light. Here we explore a mesh as the next tool for more complicated source structure. + + +__A grid for the source light__ + +A pixelization describes the source using brightness values distributed across a mesh. We infer these values from the image instead of requiring the entire source to follow a small set of analytic profiles. + +We begin with `RectangularUniform`, which places mesh points at regular intervals in the source plane. Its `shape` specifies the number of points along each direction. The next plot shows where these points lie relative to the ray-traced image coordinates. + +The mesh also defines how brightness is interpolated between its points. We will examine this more closely in the next tutorial. For now, the important distinction is that the mesh specifies where we represent the source; it does not yet tell us how bright the source is. + + + +__Following the same image pixels into the source plane__ + +Every unmasked image pixel has an index and a position. Ray tracing changes its position, but preserves its index: image point 100 and traced source point 100 describe the same light path. + +We will highlight two small groups of image pixels and follow them into the source plane. Matching colours identify matching indexes in the two plots. The source-plane points here are ray-traced image coordinates; they are not the points of our source mesh. + +For this demonstration, we use one sample at each image-pixel centre, making the correspondence easy to follow. More accurate image integration can use several samples within each pixel. """ -pixelization = al.Pixelization(mesh=mesh) + +import numpy as np +import autolens as al +import autolens.plot as aplt +import autoarray.plot as aaplt + +dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1) + +# Match the mass model used by the source_complex simulator. +lens_galaxy = al.Galaxy( + redshift=0.5, + mass=al.mp.Isothermal( + centre=(0.0, 0.0), + einstein_radius=1.6, + ell_comps=(0.17647, 0.0), + ), +) + +tracer = al.Tracer( + galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)] +) + +image_grid = dataset.grids.pixelization +source_grid = tracer.traced_grid_2d_list_from(grid=image_grid)[1] + +# Select small groups near two opposite sides of the lens. +image_coordinates = np.asarray(image_grid) +indexes = [ + np.argsort( + np.sum((image_coordinates - position) ** 2, axis=1) + )[:5].tolist() + for position in [(0.0, 1.6), (0.0, -1.6)] +] + +aaplt.plot_grid( + grid=image_grid, + indexes=indexes, + title="Selected Image-Pixel Coordinates", +) +aaplt.plot_grid( + grid=source_grid, + indexes=indexes, + title="The Same Coordinates After Ray Tracing", +) + +for group in indexes: + for index in group: + print( + f"Image index {index}: {np.asarray(image_grid[index])} " + f"-> source position {np.asarray(source_grid[index])}" + ) """ -By itself, a pixelization does not tell us much. It has no grid of $(y,x)$ coordinates, no image, and no information -about the lens we are fitting. +Compare the separation and shape of each group before and after ray tracing. Their indexes remain unchanged even when the lens strongly changes their arrangement. + -This information comes when we use the pixelization to create a `Mapper`, which we -do below using the (traced) source-plane grid that we created above. + +__Where a traced image pixel meets the source mesh__ + +We now place a separate rectangular mesh in the source plane. Its indexes identify the brightness values we will reconstruct. An image-pixel index and a source-mesh index therefore refer to different things. + +A traced image coordinate generally falls between mesh points. With bilinear interpolation, its brightness is calculated from the four surrounding mesh values, weighted according to its position. Falling within one rectangular cell does not mean taking its brightness from just one source point. + +The next cell selects one image pixel and highlights the source mesh points contributing to it. We print their indexes and weights to make this relationship explicit. """ + +mesh = al.mesh.RectangularUniform(shape=mesh_shape) + interpolator = mesh.interpolator_from( - source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None + source_plane_data_grid=source_grid, + source_plane_mesh_grid=None, ) -mapper = al.Mapper(interpolator=interpolator) +mapper = al.Mapper( + interpolator=interpolator, + regularization=al.reg.Constant(coefficient=1.0), +) + +image_index = indexes[0][0] + +# One row describes how source mesh values contribute to this image pixel. +weights = np.asarray(mapper.mapping_matrix[image_index]) +source_indexes = np.flatnonzero(np.abs(weights) > 1.0e-12) + +aaplt.plot_grid( + grid=mapper.source_plane_mesh_grid, + indexes=[source_indexes.tolist()], + title=f"Source Mesh Points Contributing to Image Pixel {image_index}", +) + +print("Ray-traced position:", np.asarray(source_grid[image_index])) +for source_index in source_indexes: + print( + f"Source mesh index {source_index}: " + f"position={np.asarray(mapper.source_plane_mesh_grid[source_index])}, " + f"weight={weights[source_index]:.4f}" + ) """ -This `Mapper` is a `RectangularMapper` -- every `Pixelization` generates its own mapper. -""" -print(type(mapper)) +The mapper stores these relationships for all image pixels. We do not need to construct or solve the mapping matrix by hand; inspecting one row simply exposes what the mapping means. + + + +__One source region, several image regions__ + +We can also follow the mapping in the opposite direction. Select a source mesh point and ask which image pixels receive a contribution from it. +The figure below uses the same colour for a selected source region and its associated image regions. A small source region can contribute to widely separated parts of the image: this is how multiple images constrain a shared source reconstruction. + +The coloured image regions show interpolation support. They are not a strict statement that every traced coordinate falls inside the coloured source cell. """ -By plotting our mapper, we now see our `Pixelization`. + +source_coordinates = np.asarray(mapper.source_plane_mesh_grid) + +# Find the mesh point nearest the source-plane origin. +central_index = int( + np.argmin(np.sum(source_coordinates**2, axis=1)) +) + +pix_indexes = [[central_index]] +mappings = mapper.mappings_from(pix_indexes=pix_indexes) + +aaplt.subplot_image_and_mapper( + mapper=mapper, + image=dataset.data, + regions=mappings, + region_labels=[str(central_index)], + mesh_grid=mapper.source_plane_mesh_grid, +) + +# Now compare two nearby source points with a more distant point. +nearby_indexes = np.argsort( + np.sum( + (source_coordinates - source_coordinates[central_index]) ** 2, + axis=1, + ) +)[:2].tolist() + +offset_index = int( + np.argmin( + np.sum( + (source_coordinates - np.array([0.3, 0.3])) ** 2, + axis=1, + ) + ) +) + +pix_indexes = [nearby_indexes, [offset_index]] +mappings = mapper.mappings_from(pix_indexes=pix_indexes) + +aaplt.subplot_image_and_mapper( + mapper=mapper, + image=dataset.data, + regions=mappings, + region_labels=[str(group) for group in pix_indexes], + mesh_grid=mapper.source_plane_mesh_grid, +) + """ -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") +Try changing `(0.3, 0.3)` to another source position and follow how its image regions change. The number of coloured patches is not necessarily the physical image multiplicity: masking and pixel sampling can split or hide regions. + + + +__Reconstructing the source__ + +We now have a mesh and a description of how its brightness values contribute to the observed image. The next step is to infer those values from the data. This is called an inversion. +For a fixed lens mass model, the source brightnesses enter the predicted image linearly. PyAutoLens uses this property to solve for them together, rather than asking a non-linear search to explore each brightness value individually. + +The next cell evaluates a `FitImaging` using a pixelized source. We keep the lens mass fixed to the simulation values, so this calculation reconstructs the source without searching for a new mass model. + + + +__A first look at regularization__ + +Giving the source many adjustable brightness values lets it represent complex structure, but also gives it freedom to fit noise. We therefore include regularization: a prior that favours smoother source reconstructions. + +For this first reconstruction, we use `Constant` regularization with a fixed coefficient. It discourages large differences between neighbouring mesh values. The data can still support structure, but adding structure comes with a penalty. + +We will keep this setting fixed for the rest of this tutorial. In tutorial 2, we will vary it and see how too little smoothing fits noise, while too much smoothing erases source detail. """ -The `Mapper` contains lots of interesting information about our `Pixelization`, for example its -`source_plane_mesh_grid` tells us where the pixel centres are located. + +pixelization = al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=al.reg.Constant(coefficient=1.0), +) +source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) +fit = al.FitImaging( + dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, source_galaxy]), +) +aplt.subplot_fit_imaging(fit=fit) +aplt.subplot_fit_imaging_of_planes(fit=fit) + """ -print("RectangularBilinearAdaptDensity Grid2D Pixel Centre 1:") -print(mapper.source_plane_mesh_grid[0]) -print("RectangularBilinearAdaptDensity Grid2D Pixel Centre 2:") -print(mapper.source_plane_mesh_grid[1]) -print("RectangularBilinearAdaptDensity Grid2D Pixel Centre 3:") -print(mapper.source_plane_mesh_grid[2]) -print("etc.") +__From source indexes to reconstructed brightnesses__ + +So far, the mapper tells us how source brightness would contribute to the image, but we have not determined those brightnesses. + +The inversion combines these mappings with the observed image, its noise and telescope blurring. It solves for the source brightness values together, including the smoothness prior supplied by regularization. +In this example there is one mapper. Entry `j` of its reconstruction therefore gives the brightness associated with source mesh index `j`. We can print selected values and show their locations on the reconstructed source. """ -We can plot these centre on our grid, to make it look slightly less boring! + +inversion = al.Inversion( + dataset=dataset, + linear_obj_list=[mapper], +) + +reconstruction = np.asarray(inversion.reconstruction) + +for group in pix_indexes: + for source_index in group: + print( + f"Source mesh index {source_index}: " + f"reconstructed brightness={reconstruction[source_index]:.6g}" + ) + +aaplt.plot_mapper( + mapper=mapper, + solution_vector=reconstruction, + mesh_grid=mapper.source_plane_mesh_grid, + regions=[mapping.source_contours for mapping in mappings], + region_labels=[str(group) for group in pix_indexes], + title="Reconstructed Source and Selected Mesh Indexes", +) + """ +These brightnesses are inferred jointly. We do not independently fit each coloured image region: shared source values must explain their contributions across the image, while regularization connects neighbouring source values. + + + +__Turning the reconstructed source back into an image__ -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") +The source reconstruction and the reconstructed image are different objects. The source lives on our source-plane mesh. Mapping its brightness values through the lens produces an image-plane prediction. +The telescope then blurs that prediction. This blurred image is what we compare with the observed data. The inversion already accounts for that blurring when solving for the source; it is not an extra correction applied after an otherwise completed fit. + +The following plots separate these stages. """ -The `Mapper` also has the (source-plane) grid that we passed when we set it up. Lets check they're the same. + +image_before_blurring = inversion.mapped_reconstructed_data +model_image = inversion.mapped_reconstructed_operated_data + +residual_map = dataset.data - model_image +normalized_residual_map = residual_map / dataset.noise_map + +aplt.plot_array( + array=image_before_blurring, + title="Reconstructed Lensed Image Before Telescope Blurring", +) +aplt.plot_array( + array=model_image, + title="Model Image Including Telescope Blurring", +) +aplt.plot_array( + array=residual_map, + title="Residuals: Data Minus Model", +) +aplt.plot_array( + array=normalized_residual_map, + title="Residuals Divided by the Noise", +) + """ -print("Source Grid2D Pixel 1") -print(source_plane_grid[0]) -print(mapper.source_plane_data_grid[0]) -print("Source Grid2D Pixel 2") -print(source_plane_grid[1]) -print(mapper.source_plane_data_grid[1]) -print("etc.") +Compare the source reconstruction with these image-plane plots. A feature in the source can appear in several places in the lensed image, and telescope blurring can make those image features less distinct. + +Inspect the residuals for coherent unexplained structure. A plausible-looking source alone does not establish that the model explains the data. + +**🤖 Ask AI:** Why must the same reconstructed source brightnesses explain all of their associated image regions, rather than allowing each arc to have an independent source reconstruction? + +__Inspecting the reconstruction__ +We will plot the inferred source alongside the model image and residuals. These answer different questions. + +The source reconstruction shows the brightness distribution inferred under our chosen lens model, mesh and regularization. The model image shows how that reconstruction appears after lensing and telescope blurring. The residuals show what remains unexplained in the observed image. + +Compare these residuals with those from the simple source model earlier in the tutorial. Look particularly at the image regions associated with the source’s separate bright components. The comparison will show whether the extra source freedom helps explain those features. + +Because this is a simulation, we can also compare the reconstruction with the input source. We should not expect an exact copy: finite resolution, noise and regularization limit the detail we can recover. """ -We can over-lay this grid on the figure, which is starting to look a bit less boring now! + +aplt.subplot_fit_imaging(fit=analytic_fit) +aplt.subplot_fit_imaging(fit=fit) +aplt.subplot_fit_imaging_of_planes(fit=fit) + """ +__Changing the source resolution__ -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") +The mesh resolution controls how finely we can represent the source. A coarse mesh may merge distinct features, while a finer mesh gives the reconstruction more freedom. +Repeat the reconstruction with mesh shapes of `(15, 15)`, `(25, 25)` and `(35, 35)`, keeping the lens mass and regularization coefficient fixed. Compare the source structure and image residuals in each case, then restore the starting shape of `(25, 25)`. -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") +More mesh points do not necessarily reveal more reliable detail. The data must constrain that detail, and changing the mesh also changes how the regularization acts. This experiment explores the effect of resolution; choosing an appropriate reconstruction requires considering resolution and smoothing together. +**🤖 Ask AI:** When I increase the source mesh resolution, how can I distinguish newly resolved source structure from extra freedom being used to fit noise? """ -Finally, the mapper's mesh grid has lots of information about the pixelization, for example, its arc-second -size and dimensions. -""" -print(mapper.source_plane_mesh_grid.geometry.shape_native_scaled) -print(mapper.source_plane_mesh_grid.geometry.scaled_maxima) -print(mapper.source_plane_mesh_grid.geometry.scaled_minima) + +for shape in ([(6, 6), (8, 8), (10, 10)] if mesh_shape == (8, 8) else [(15, 15), (25, 25), (35, 35)]): + source_galaxy = al.Galaxy( + redshift=1.0, + pixelization=al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=shape), + regularization=al.reg.Constant(coefficient=1.0), + ), + ) + resolution_fit = al.FitImaging( + dataset=dataset, tracer=al.Tracer(galaxies=[lens_galaxy, source_galaxy]), + ) + aplt.subplot_fit_imaging_of_planes(fit=resolution_fit) + aplt.subplot_fit_imaging(fit=resolution_fit) """ -__Wrap Up__ +__Wrap up__ + +We have reconstructed a complex source without prescribing the positions and shapes of its individual light components. -This was a relatively gentle overview of pixelizations, but one that was hopefully easy to follow. Think about the -following questions before moving on to the next tutorial: +The mesh specifies where we represent the source. The mapper connects its brightness values to the observed image through the lens model. The inversion solves for those values, with regularization controlling the freedom to introduce structure. - 1) Look at how the source-grid coordinates are distributed over the rectangular pixel-grid. Are these points - distributed evenly over the rectangular grid's pixels? Do some pixels have a lot more grid-points inside of them? - Do some pixels have no grid-points in them? +Throughout this tutorial, the lens mass was fixed. Later in the chapter, we will vary the mass model and reconstruct the source for each proposed model, allowing the image to constrain both. - 2) The rectangular pixelization's edges are aligned with the most exterior coordinates of the source-grid. This is - intentional -- why do you think this is? +First, we need to understand how interpolation and regularization shape the reconstruction. Tutorial 2 explores these choices and introduces the Bayesian evidence used to compare different levels of smoothing. """ diff --git a/scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py b/scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py new file mode 100644 index 0000000..aec3022 --- /dev/null +++ b/scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py @@ -0,0 +1,557 @@ +""" +Tutorial 2: Bayesian Regularization +=================================== + +__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 +""" + +""" +__Interpolation and Bayesian regularization__ + +So far, we have: + +- Used pixelizations and mappers to connect source mesh points to image pixels. +- Used an inversion to reconstruct the source’s brightness. +- Mapped that reconstruction back into the image, including telescope blurring, to compare it with the data. + +Our explanation of how an inversion works has deliberately left some things unexplained. In particular, you will have noticed the regularization input that we passed when creating our pixelization. We used a coefficient of `1.0`, but have not established why that value should give an appropriate reconstruction. + +This tutorial explores what regularization does and why we need it. We will change its strength, inspect the resulting source reconstructions, and see why obtaining a close fit to the image is not enough on its own. + +First, we will revisit interpolation. It is easy to confuse interpolation with smoothing, because both affect the appearance of the reconstructed source. Understanding the distinction will help us interpret the experiments that follow. + +We use the same complex source as tutorial 1. The lens mass remains fixed to the simulation values, so changes in the reconstruction come from our source modelling choices. +""" + +from autolens import jax_wrapper + +from pathlib import Path +import subprocess +import sys + +import numpy as np +import autolens as al +import autolens.plot as aplt +import autoarray.plot as aaplt + +dataset_path = Path("dataset") / "imaging" / "source_complex" + +if al.util.dataset.should_simulate(str(dataset_path)): + subprocess.run( + [sys.executable, "scripts/simulator/source_complex.py"], + check=True, + ) + +dataset = al.Imaging.from_fits( + data_path=dataset_path / "data.fits", + noise_map_path=dataset_path / "noise_map.fits", + psf_path=dataset_path / "psf.fits", + pixel_scales=0.05, +) + +mask = al.Mask2D.circular_annular( + shape_native=dataset.shape_native, + pixel_scales=dataset.pixel_scales, + inner_radius=0.1, + outer_radius=3.2, +) + +dataset = dataset.apply_mask(mask=mask) +dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1) + +lens_galaxy = al.Galaxy( + redshift=0.5, + mass=al.mp.Isothermal( + centre=(0.0, 0.0), + einstein_radius=1.6, + ell_comps=(0.17647, 0.0), + ), +) + +aplt.subplot_imaging_dataset(dataset=dataset) + +""" +The single sample per image pixel keeps the indexed mapping example straightforward. For scientific modelling, we would also check that our image sampling is sufficiently accurate. + +__Interpolation and our starting reconstruction__ + +Let’s look at our reconstruction from the previous tutorial in more detail. + +The `RectangularUniform` mesh describes the source using brightness values at regularly spaced points. A ray-traced image coordinate generally falls between these points. Its predicted brightness is obtained by combining the four surrounding values, with weights determined by its position. This is bilinear interpolation. + +Interpolation tells us how to calculate brightness between mesh points, but it does not tell us what those mesh values should be. Four neighbouring values could be similar, or one could be much brighter than the others. Both can be interpolated. In the second case, however, the brightness changes much more sharply across the source. + +Regularization influences the brightness values we infer, discouraging variations that are not sufficiently supported by the data. Interpolation then determines how those values contribute between mesh points. + +We are going to evaluate several reconstructions, so the function below keeps their common setup in one place. Only the regularization coefficient changes. +""" + +mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25) + + +def fit_with_coefficient(coefficient): + pixelization = al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=al.reg.Constant(coefficient=coefficient), + ) + + source_galaxy = al.Galaxy( + redshift=1.0, + pixelization=pixelization, + ) + + tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) + + return al.FitImaging(dataset=dataset, tracer=tracer) + + +fit = fit_with_coefficient(coefficient=1.0) + +aplt.subplot_fit_imaging(fit=fit) +aplt.subplot_fit_imaging_of_planes(fit=fit) + +""" +Here is the interpolation calculation for one image pixel. As in tutorial 1, the mapper supplies the contributing source indexes and their weights. This time, we also have reconstructed brightness values, so we can see how the contributions combine. +""" + +mapper = fit.inversion.cls_list_from(al.Mapper)[0] +reconstruction = np.asarray(fit.inversion.reconstruction) + +# Select an image pixel near the right-hand side of the lens. +image_coordinates = np.asarray(mapper.image_plane_data_grid) +image_index = int( + np.argmin( + np.sum((image_coordinates - np.array([0.0, 1.6])) ** 2, axis=1) + ) +) + +weights = np.asarray(mapper.mapping_matrix[image_index]) +source_indexes = np.flatnonzero(np.abs(weights) > 1.0e-12) + +for source_index in source_indexes: + brightness = reconstruction[source_index] + weight = weights[source_index] + print( + f"Source index {source_index}: " + f"brightness={brightness:.5g}, weight={weight:.5g}, " + f"contribution={brightness * weight:.5g}" + ) + +print( + "Combined brightness before telescope blurring:", + float(np.dot(weights, reconstruction)), +) + +""" +This is the image prediction before the PSF redistributes light between image pixels. We are inspecting a small part of the calculation, not replacing the inversion’s treatment of telescope blurring. + +__Reducing regularization__ + +Our starting reconstruction uses a regularization coefficient of `1.0`. Let’s reduce it substantially and examine what changes. + +We use `0.01` rather than exactly zero, retaining a small smoothness penalty. Keep the lens model, mesh and data unchanged: we want to isolate the effect of weakening regularization. +""" + +weak_regularization_fit = fit_with_coefficient(coefficient=0.01) + +aplt.subplot_fit_imaging(fit=weak_regularization_fit) +aplt.subplot_fit_imaging_of_planes(fit=weak_regularization_fit) + +""" +To understand this comparison, we need to look more closely at what regularization actually does. + +When the inversion reconstructs the source, it does not only seek brightness values that reproduce the image. With `Constant` regularization, it also compares neighbouring brightness values on the rectangular source mesh. Interior mesh points have four immediate neighbours. Large differences between their brightnesses contribute a larger penalty. + +You can think of this as applying a **smoothness prior** to the reconstructed source. It expresses a preference for neighbouring regions to have similar brightness, unless the image provides enough evidence for them to differ. + +The penalty depends on squared differences, so positive and negative differences cannot cancel. The coefficient controls its strength. Reducing that coefficient makes a given amount of variation less costly; increasing it makes the same variation more costly. + +In the language of linear algebra, this prior contributes a regularization matrix to the system the inversion solves. We do not need to construct that matrix ourselves to understand its effect. + +Without sufficient regularization, the inversion has greater freedom to fit fluctuations in the observed image, including noise. Some of those fluctuations can be explained by adding irregular structure to the source. The image fit may improve even though the inferred source becomes less faithful to the galaxy that produced the data. + +Inspect the weakly regularized reconstruction for isolated bright values or rapid changes between neighbouring points. Also look at its faint regions, where the image provides less information about the source. + +A few extreme values can dominate the colour scale. We can compare both reconstructions using the starting reconstruction’s brightness range to see the remaining structure more clearly. +""" + +source_vmax = float(np.max(np.asarray(fit.inversion.reconstruction))) + +for label, current_fit in [ + ("Starting Reconstruction", fit), + ("Weak Regularization", weak_regularization_fit), +]: + current_mapper = current_fit.inversion.cls_list_from(al.Mapper)[0] + + aaplt.plot_mapper( + mapper=current_mapper, + solution_vector=current_fit.inversion.reconstruction, + vmin=0.0, + vmax=source_vmax, + zoom_to_brightest=False, + title=label, + ) + +""" +Values above this plotting limit share the highest colour, so use these figures alongside the original plots rather than treating them as the full brightness range. + +The important point is that recovering recognizable source structure does not mean every reconstructed feature is reliable. Genuine structure and noise-fitting can appear in the same reconstruction. + +__Increasing regularization__ + +Now let’s move in the other direction and use a much larger coefficient. + +With stronger regularization, the inversion pays a greater penalty for differences between neighbouring brightnesses. This discourages the sharp variations that can fit noise. However, the real source also contains brightness variations: compact components, bright centres and the changes between those regions and their surroundings. + +Regularization cannot identify which variations are genuine simply by examining the source. The image fit and the prior must work together. If we make the smoothness preference too strong, the reconstruction can lose genuine structure because reproducing it carries too large a penalty. +""" + +strong_regularization_fit = fit_with_coefficient(coefficient=100.0) + +strong_mapper = strong_regularization_fit.inversion.cls_list_from(al.Mapper)[0] + +aaplt.plot_mapper( + mapper=strong_mapper, + solution_vector=strong_regularization_fit.inversion.reconstruction, + vmin=0.0, + vmax=source_vmax, + zoom_to_brightest=False, + title="Strong Regularization", +) + +aplt.subplot_fit_imaging(fit=strong_regularization_fit) + +""" +Compare the bright components with the starting reconstruction. Look for features becoming flatter or merging together, then inspect the corresponding regions of the image residuals. + +This illustrates the difficulty in choosing a coefficient. Too little smoothing can introduce structure that explains noise. Too much can remove structure needed to explain the galaxy. Neither the smoothest source nor the closest possible image fit is automatically the reconstruction we want. + +We can quantify image agreement using chi-squared: the sum of squared residuals divided by their noise variances. +""" + +fit_comparisons = [ + ("Weak", 0.01, weak_regularization_fit), + ("Starting", 1.0, fit), + ("Strong", 100.0, strong_regularization_fit), +] + +for label, coefficient, current_fit in fit_comparisons: + normalized_residuals = np.asarray( + (dataset.data - current_fit.model_data) / dataset.noise_map + ) + + chi_squared = float(np.sum(normalized_residuals**2)) + print(f"{label}: coefficient={coefficient:g}, chi-squared={chi_squared:.3f}") + +""" +A lower chi-squared means closer agreement with the image under the assumed noise map. It does not distinguish fitting genuine structure from fitting noise. This is why choosing the coefficient solely by image agreement would favour giving the source too much freedom. + +**🤖 Ask AI:** Why might a weakly regularized reconstruction have a lower chi-squared but a less trustworthy source than a more strongly regularized reconstruction? + +__Bayesian evidence__ + +For inversions, we therefore need more than image agreement to choose an appropriate level of regularization. + +We use the **Bayesian evidence**, which accounts for both the fit to the image and the source prior. It helps us compare reconstructions that have different amounts of freedom, rather than simply choosing whichever one follows the observed pixel values most closely. + +There are two useful parts to this intuition. + +First, the reconstruction must explain the image. If strong regularization prevents it from reproducing genuine source structure, the resulting residuals count against that choice. Preferring a smooth source is not useful if that source cannot explain the observed arcs. + +Second, allowing a more flexible source comes at a cost. Weak regularization permits many more patterns of brightness across neighbouring mesh points. Some of that extra freedom may be needed to describe the galaxy, but some may only help reproduce the particular noise fluctuations in this image. + +Evidence weighs the improvement in fit against the freedom allowed by the prior. An improvement must be sufficient to justify that additional flexibility. + +This is also why complexity is not simply the number of source mesh points. Our three examples have exactly the same mesh. Stronger regularization ties neighbouring brightnesses together more closely, reducing their freedom to vary independently. We can therefore change the effective flexibility of the reconstruction without changing the number of mesh points. + +Let’s compare the evidence values returned by `FitImaging`. +""" + +log_evidences = [] + +for label, coefficient, current_fit in fit_comparisons: + log_evidence = float(current_fit.log_evidence) + log_evidences.append(log_evidence) + + print( + f"{label}: coefficient={coefficient:g}, " + f"log evidence={log_evidence:.3f}" + ) + +best_index = int(np.argmax(log_evidences)) +best_label, best_coefficient, _ = fit_comparisons[best_index] + +print( + f"\nHighest evidence among these examples: " + f"{best_label}, coefficient={best_coefficient:g}" +) + +""" +Compare this ranking with the source plots and the chi-squared values. The highest evidence need not belong to the reconstruction with the lowest chi-squared, because image agreement is only part of the comparison. + +We still need to inspect the residuals ourselves. Evidence does not explicitly examine their spatial pattern or guarantee that a preferred model is correct. Structured residuals can reveal shortcomings in the source, lens mass, PSF or other assumptions that this three-coefficient comparison does not address. + +For now, we have compared only three choices. The starting value of `1.0` has no special status, and the best of these three is not necessarily the best coefficient overall. Next, we will explore a broader range and see how this choice fits into the wider modelling process. + +__Exploring the regularization coefficient__ + +We have compared weak, moderate and strong regularization, but those three values were chosen to illustrate different behaviours. They do not tell us where the evidence reaches its highest value. + +Let’s explore the coefficient more systematically. We will keep the lens mass, mesh resolution, mask and noise map fixed, and reconstruct the source for a sequence of coefficients. + +Regularization coefficients can span several orders of magnitude, so we use logarithmically spaced values. This gives us comparable coverage between `0.01` and `0.1`, between `0.1` and `1.0`, and so on. + +Every point in this experiment requires a new source reconstruction. We are not taking one reconstructed source and smoothing it by different amounts afterwards. The coefficient changes the problem that the inversion solves. +""" + +import matplotlib.pyplot as plt + +coefficient_grid = np.logspace(-2, 2, 13) + +# Reuse the three reconstructions already calculated. +known_fits = { + 0.01: weak_regularization_fit, + 1.0: fit, + 100.0: strong_regularization_fit, +} + +evidence_grid = [] + +for coefficient in coefficient_grid: + coefficient = float(coefficient) + + if coefficient in known_fits: + current_fit = known_fits[coefficient] + else: + current_fit = fit_with_coefficient(coefficient=coefficient) + + evidence_grid.append(float(current_fit.log_evidence)) + +evidence_grid = np.asarray(evidence_grid) + +if not np.all(np.isfinite(evidence_grid)): + raise ValueError( + "Some evidence values are not finite. Inspect those fits before comparing." + ) + +fig, ax = plt.subplots() +ax.semilogx( + coefficient_grid, + evidence_grid - np.max(evidence_grid), + marker="o", +) +ax.set_xlabel("Regularization coefficient") +ax.set_ylabel("Log evidence relative to the highest sampled value") +ax.set_title("Choosing the Strength of Regularization") +plt.show() + +""" +Look for the part of the curve where the evidence is highest. Moving towards weaker regularization gives the source more freedom; moving towards stronger regularization increasingly restricts its variations. + +We may find a clear peak, a broad region with similar evidence, or a highest value at one end of the range. These outcomes mean different things. A boundary maximum tells us that this experiment has not bracketed the preferred coefficient—we should extend the range before claiming to have located it. + +The plotted points are also discrete samples. Even an interior maximum only identifies the best coefficient we have tried so far. + +__Inspecting the preferred reconstruction__ + +Let’s inspect the reconstruction with the highest evidence in our sampled range. + +It is tempting to treat the highest number as the end of the analysis. However, we should connect that number back to the source and image. We want to understand what this choice preserves, what it smooths away, and what the resulting model still fails to explain. + +Compare it with the weakly and strongly regularized examples. In particular, examine the distinct bright source components and the faint regions between them. Then look at the image residuals where those components are lensed. +""" + +best_index = int(np.argmax(evidence_grid)) +preferred_coefficient = float(coefficient_grid[best_index]) + +if preferred_coefficient in known_fits: + preferred_fit = known_fits[preferred_coefficient] +else: + preferred_fit = fit_with_coefficient( + coefficient=preferred_coefficient + ) + +print("Preferred sampled coefficient:", preferred_coefficient) + +if best_index in (0, len(coefficient_grid) - 1): + print( + "The highest evidence lies at the boundary. " + "Extend the coefficient range before interpreting this as a peak." + ) + +preferred_mapper = preferred_fit.inversion.cls_list_from(al.Mapper)[0] + +aaplt.plot_mapper( + mapper=preferred_mapper, + solution_vector=preferred_fit.inversion.reconstruction, + zoom_to_brightest=False, + title="Source at the Preferred Sampled Coefficient", +) + +aplt.subplot_fit_imaging(fit=preferred_fit) +aplt.subplot_fit_imaging_of_planes(fit=preferred_fit) + +""" +A preferred coefficient does not establish that every visible feature in the source is real. The reconstruction remains conditional on the lens model, source mesh, noise map and telescope blurring. + +Nor does a good-looking source excuse coherent residuals in the image. The source and residual plots provide complementary information: one shows what we inferred, while the other shows what that inference leaves unexplained. + +**🤖 Ask AI:** If the evidence prefers a particular regularization coefficient but the residuals still follow the shape of an arc, what modelling assumptions should I investigate next? + +__What is linear, and what requires a search?__ + +Before going further, let’s separate two parts of the calculation that are easy to confuse. + +For each coefficient we supplied, the inversion solved for the source brightnesses. We did not give a non-linear search hundreds of independent source brightness parameters and ask it to explore their possible combinations. Instead, the source enters the predicted image linearly, allowing these brightnesses to be solved together using linear algebra. + +Regularization is included in that solve. The source is not first reconstructed without a prior and then smoothed afterwards. The inferred brightnesses already reflect the balance between fitting the image and satisfying the smoothness prior. + +Choosing the regularization coefficient is a different problem. We supplied several coefficients, performed an inversion for each, and compared their evidence values. Our loop is a simple grid search over one quantity. + +We can see the difference in scale directly: +""" + +source_brightnesses = np.asarray( + preferred_fit.inversion.reconstruction +) + +print("Number of source mesh values:", preferred_mapper.pixels) +print("Number of reconstructed entries:", source_brightnesses.size) +print("Number of coefficients evaluated:", coefficient_grid.size) + +""" +The reconstruction contains an entry for each source mesh point in this single-mapper example. Some values may be constrained to zero at the mesh boundary, and regularization couples neighbouring values, so the number of entries is not the number of independently constrained source features. + +During lens modelling, the search also changes the mass parameters. Each proposed mass model changes the ray tracing and therefore the mappings between source and image. The source must be reconstructed again for that proposal. + +The sequence is therefore: + +1. Propose the non-linear parameters, including the lens mass and regularization coefficient. +2. Construct the corresponding mappings. +3. Solve for the source brightnesses. +4. Evaluate how well that model explains the data, accounting for the source prior. + +This is what makes pixelized sources practical: the search explores the non-linear model choices, while the inversion handles the many source brightness values. + +__Mesh resolution and regularization belong together__ + +We have held the source mesh at `(25, 25)`. The preferred coefficient we found belongs to that choice of mesh. + +Changing the mesh changes the locations and number of source brightness values, their neighbours, and how they contribute to the image. The same numerical coefficient therefore need not give an equivalent amount of smoothing on another mesh. + +This matters when testing resolution. If we increase the number of source points but keep the coefficient fixed, any change in the reconstruction reflects both the new resolution and its interaction with the prior. We cannot assume that we have made a fair comparison of the best reconstructions available at each resolution. + +Let’s repeat the coefficient experiment for `(15, 15)` and `(35, 35)`, alongside our existing `(25, 25)` results. We extend our helper so the mesh shape is an explicit input. +""" + +def fit_with_coefficient(coefficient, mesh_shape=mesh_shape): + pixelization = al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=al.reg.Constant(coefficient=coefficient), + ) + + source_galaxy = al.Galaxy( + redshift=1.0, + pixelization=pixelization, + ) + + tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) + + return al.FitImaging(dataset=dataset, tracer=tracer) + + +evidence_by_shape = {mesh_shape: evidence_grid} + +for shape in ([(6, 6), (10, 10)] if mesh_shape == (8, 8) else [(15, 15), (35, 35)]): + values = [] + + for coefficient in coefficient_grid: + current_fit = fit_with_coefficient( + coefficient=float(coefficient), + mesh_shape=shape, + ) + values.append(float(current_fit.log_evidence)) + + evidence_by_shape[shape] = np.asarray(values) + +if not all( + np.all(np.isfinite(values)) + for values in evidence_by_shape.values() +): + raise ValueError("Inspect non-finite evidence values before comparing meshes.") + +reference_evidence = max( + float(np.max(values)) + for values in evidence_by_shape.values() +) + +fig, ax = plt.subplots() + +for shape, values in sorted(evidence_by_shape.items()): + ax.semilogx( + coefficient_grid, + values - reference_evidence, + marker="o", + label=f"{shape[0]} × {shape[1]}", + ) + +ax.set_xlabel("Regularization coefficient") +ax.set_ylabel("Log evidence relative to the highest sampled value") +ax.set_title("Mesh Resolution and Regularization") +ax.legend() +plt.show() + +""" +This experiment performs 26 additional reconstructions, so it takes longer than our earlier three-way comparison. + +Look at both the locations and heights of the curves’ maxima. The preferred coefficient may shift as the mesh changes. A finer mesh may help describe source structure, but adding points does not guarantee a higher evidence. + +All three curves use the same image pixels and noise model. We also subtract one common reference evidence, preserving differences between the meshes. Subtracting each curve’s own maximum would hide those differences. + +As before, a boundary maximum means that the coefficient range needs extending. These are controlled resolution checks, not a demonstration that mesh dimensions should become free parameters in every lens-model search. + +__Wrap Up__ + +We can now give the regularization input a more meaningful interpretation. + +The source mesh supplies brightness values that can vary to explain the image. Interpolation defines the brightness between those values. Regularization places a prior on their variation, discouraging unnecessary differences between neighbours. + +Too little regularization can allow the reconstruction to explain noise through spurious source structure. Too much can suppress real structure and leave it visible in the image residuals. Evidence helps compare these choices by accounting for both image agreement and the freedom allowed by the source prior. + +We also saw that the coefficient is not a universal setting. Its appropriate value depends on the dataset, lens model, mesh and regularization scheme. A value that works for one reconstruction should not simply be carried into another analysis without checking it. + +For a final comparison, print the preferred sampled coefficient for each mesh: +""" + +for shape, values in sorted(evidence_by_shape.items()): + index = int(np.argmax(values)) + coefficient = float(coefficient_grid[index]) + boundary = index in (0, len(coefficient_grid) - 1) + + print( + f"Mesh {shape}: coefficient={coefficient:.4g}, " + f"log evidence={values[index]:.3f}" + + (" — boundary maximum; extend the range" if boundary else "") + ) + +# Retain the original mesh's preferred fit for subsequent inspection. +fit = preferred_fit + +""" +Throughout this tutorial, we fixed the lens mass to the simulation values. We have selected source-reconstruction settings under that assumption; we have not inferred the mass or its uncertainty. + +Later, these source reconstructions will sit inside a lens-model search. Before that, the next tutorial examines another practical issue: how the source mesh covers the ray-traced image coordinates, and why a small number of extreme coordinates can affect the resolution available to reconstruct the source. + +For readers who want the underlying equations, the workspace’s [pixelization likelihood guide](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/likelihood_function.py) follows the mapping, blurring, regularization and evidence calculations step by step. That derivation complements the experiments here; it is not required to continue using pixelizations. +""" diff --git a/scripts/chapter_3_pixelizations/tutorial_2_mappers.py b/scripts/chapter_3_pixelizations/tutorial_2_mappers.py deleted file mode 100644 index d044002..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_2_mappers.py +++ /dev/null @@ -1,342 +0,0 @@ -""" -Tutorial 2: Mappers -=================== - -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! - -Therefore, in this tutorial, we'll cover mappers in more detail. - -__Contents__ - -- **Initial Setup:** we'll use new strong lensing data, where. -- **Mappers:** We now setup a `Pixelization` and use it to create a `Mapper` via the tracer`s source-plane grid. -- **Mask:** Define the 2D mask applied to the dataset for the model-fit. -- **Wrap Up:** Summary of the script and next steps. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -from pathlib import Path -import autolens as al -import autolens.plot as aplt -import autoarray.plot as aaplt - -""" -__Initial Setup__ - -we'll use new strong lensing data, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, - over_sample_size_pixelization=1, -) - -""" -Now, lets set up our `Grid2D` (using the image above). -""" -grid = al.Grid2D.uniform( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - over_sample_size=1, -) - -""" -Our `Tracer` will use the same lens galaxy and source galaxy that we used to simulate the imaging data (although, -because we're modeling the source with a pixel-grid, we do not pass the source any light profiles). -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), -) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) - -tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field]) - -source_plane_grid = tracer.traced_grid_2d_list_from(grid=grid)[1] - -""" -__Mappers__ - -We now setup a `Pixelization` and use it to create a `Mapper` via the tracer`s source-plane grid, just like we did in -the previous tutorial. -""" -mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25)) - -pixelization = al.Pixelization(mesh=mesh) - -interpolator = mesh.interpolator_from( - source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None -) - -mapper = al.Mapper(interpolator=interpolator) - - -""" -Lets look at the two things a mapper holds. In the image-plane it has the (y,x) coordinate of every image-pixel it -uses, and in the source-plane it has the rectangular mesh those coordinates land on after being ray-traced by the -tracer. -""" -aplt.plot_array( - array=dataset.data, title="Image", positions=mapper.image_plane_data_grid -) -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") - -""" -The mapper's job is to pair those two things together. Before we look at how it pairs whole source pixels, it helps -to see the simpler, point-level version: take a handful of image-pixel coordinates and follow the *same* coordinates -into the source-plane. - -We do this by giving the `indexes=` input a list of index groups, where each group is drawn in its own colour. The -same colour therefore marks the same coordinates in both planes. -""" -total_points = len(mapper.image_plane_data_grid) - -side = int(round(total_points**0.5)) - -centre = side * (side // 2) + side // 2 - -indexes = [ - [index for index in range(0, 10) if index < total_points], - [ - centre + step * side - for step in range(-5, 5) - if 0 <= centre + step * side < total_points - ], -] - -aaplt.plot_grid( - grid=mapper.image_plane_data_grid, - indexes=indexes, - title="Image-Plane Data Grid", -) -aaplt.plot_grid( - grid=mapper.source_plane_data_grid, - indexes=indexes, - title="Source-Plane Data Grid (Traced)", -) - -""" -The red points, the first ten image-pixels at the very corner of the image, barely move: they are far from the lens -galaxy, so they are hardly deflected. The green points run vertically through the centre of the image, straight -through the lens galaxy, and are dragged a long way -- in the source-plane they no longer form a straight line, and -they pile up near the centre. - -This is only half the story though, because it tells us where individual coordinates go, not which *source pixel* -they end up inside. That is what a mapper actually stores, and it is what we look at next. - -We can now make the mapping appear the other way round. That is, we can input a source-pixel index (of our -rectangular mesh) and ask the mapper which image-pixels land inside it. - -`mapper.mappings_from` answers exactly this. It takes a list of source-pixel index *groups* and returns one `Mapping` -per group. Each `Mapping` carries: - - - `source_contours`: the outline of the source-plane cell(s) in the group. - - `image_contours`: the outlines of the connected regions of image-pixels which map into that group. - -Both are polygons in arc-seconds, so we can draw them straight onto the image and onto the source-plane, in the same -colour. That colour is the whole point: it says "this source region produces these image regions". - -Lets map source pixel 312, the central source-pixel, and draw it in both planes. We clamp the index with -`min(index, mapper.pixels - 1)` so the tutorial still runs if you shrink the mesh. -""" -pix_indexes = [[min(312, mapper.pixels - 1)]] - -mappings = mapper.mappings_from(pix_indexes=pix_indexes) - -aaplt.subplot_image_and_mapper( - mapper=mapper, - image=dataset.data, - regions=mappings, - mesh_grid=mapper.source_plane_mesh_grid, -) - -""" -There we have it, multiple imaging in all its glory. - -On the right, a single small red rectangle: one cell of the source-plane mesh. On the left, that same red appears in -two or more *separate* regions of the image, sitting on the lensed source's ring. The lens galaxy's mass has taken -one patch of source and produced several images of it, and the mapper knows which image-pixels belong to which. - -Notice also that the red regions in the image-plane are wider than a strict "four image pixels per source pixel" -footprint would be. This is because the pairing of image-pixels to source-pixels is not one-to-one: a bilinear -interpolation scheme is used, so an image-pixel which lands near the edge of a source-pixel, but outside it, is still -paired with that source-pixel with a weight. - -Try changing the source-pixel indexes below. This will give you a feel for how different regions of the source-plane -map to the image. -""" -pix_indexes = [ - [min(index, mapper.pixels - 1) for index in group] for group in [[312, 313], [412]] -] - -mappings = mapper.mappings_from(pix_indexes=pix_indexes) - -aaplt.subplot_image_and_mapper( - mapper=mapper, - image=dataset.data, - regions=mappings, - mesh_grid=mapper.source_plane_mesh_grid, -) - -""" -Two groups, two colours. The first group is two neighbouring source pixels, so red covers twice the area of the -source-plane and correspondingly wider arcs in the image. The second group is a single pixel further from the centre -of the source-plane, drawn in green, and its images land somewhere else entirely on the ring. - -This is the key insight of the whole chapter: *every* source pixel has a set of image regions like this, and the -collection of all of them is the "mapping matrix" that an inversion solves. Tutorial 3 puts that matrix to work. - -Okay, so I think we can agree, mapper's map things! More specifically, they map source-plane pixels to multiple pixels -in the observed image of a strong lens. - -__Mask__ - -Finally, lets repeat the steps that we performed above, but now using a masked image. By applying a `Mask2D`, the -mapper only maps image-pixels that are not removed by the mask. This removes the (many) image pixels at the edge of the -image, where the source is not present. These pixels also pad-out the source-plane, thus by removing them our -source-plane reduces in size. - -Lets first see why they are worth removing, by drawing source pixels near the edge of the mesh: -""" -pix_indexes = [ - [min(index, mapper.pixels - 1) for index in group] - for group in [[600, 601, 602, 603, 604], [620, 621, 622, 623, 624]] -] - -mappings = mapper.mappings_from(pix_indexes=pix_indexes) - -aaplt.subplot_image_and_mapper( - mapper=mapper, - image=dataset.data, - regions=mappings, - mesh_grid=mapper.source_plane_mesh_grid, -) - -""" -Both groups sit along the bottom edge of the source-plane mesh, and both map to a single blob in a corner of the -image, far from the lensed source, where there is no signal to reconstruct. They are wasted source pixels: the -inversion has to solve for them, but the data has nothing to say about them. - -Lets use an annular `Mask2D`, which will capture the ring-like shape of the lensed source galaxy. -""" -mask = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=1.0, - outer_radius=2.2, -) - -dataset = dataset.apply_mask(mask=mask) -aplt.plot_array(array=dataset.data, title="Data") - -""" -To create the mapper, we need to trace the masked imaging's grid to the source-plane via the tracer. -""" -tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field]) - -source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1] - -""" -We can now use the masked source-plane grid to create a new `Mapper` (using the same rectangular 25 x 25 pixelization -as before). -""" -interpolator = mesh.interpolator_from( - source_plane_data_grid=source_plane_grid, source_plane_mesh_grid=None -) -mapper = al.Mapper(interpolator=interpolator) - -""" -Lets plot it, including the image-plane grid and source-plane grid, which are now much smaller than before because -the mask has removed the many image pixels at the edge of the image. -""" - - -aplt.plot_array(array=dataset.data, title="Image") - - -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") - -""" -First, look how much closer we are to the source-plane (The axis sizes have decreased from ~ -2.5" -> 2.5" to -~ -0.6" to 0.6"). - -We can more clearly see the diamond of points in the centre of the source-plane (for those who have been reading up, -this diamond is called the `caustic`). - -The source-plane is now only ~1" across instead of ~7", so every source pixel covers a much larger fraction of the -figure and the polygons we drew above are far easier to read. Lets draw four source pixels at once, each in its own -colour. -""" -pix_indexes = [[min(index, mapper.pixels - 1)] for index in [312, 314, 316, 318]] - -mappings = mapper.mappings_from(pix_indexes=pix_indexes) - -aaplt.subplot_image_and_mapper( - mapper=mapper, - image=dataset.data, - regions=mappings, - mesh_grid=mapper.source_plane_mesh_grid, -) - -""" -Four source pixels, four colours, and in the image-plane each colour picks out its own short segments of the ring, -on opposite sides of it. Source pixels which are neighbours in the source-plane produce image regions which are -neighbours along each arc -- the lensing is smooth, and the mapper preserves that. - -The number of image-plane regions each source pixel maps to is the number of multiple images it produces (the mask -can split one arc into more than one region, so treat these counts as a lower bound on the physical multiplicity): -""" -for mapping in mappings: - print( - f"Source pixel {mapping.pix_indexes} maps to {len(mapping.image_regions)} image-plane regions." - ) - -""" -__Wrap Up__ - -In this tutorial, we learnt about mappers, and we used them to understand how the image and source plane map to one -another. Your exercises are: - - 1) Change the einstein radius of the lens galaxy in small increments (e.g. einstein radius 1.6" -> 1.55"). As the - radius deviates from 1.6" (the input value of the simulated lens), what do you notice about where the points map - from the centre of the source-plane (where the source-galaxy is simulated, e.g. (0.0", 0.0"))? - - 2) Think about how this could help us actually model lenses. We have said we're going to reconstruct our source - galaxies on the pixel-grid. So, how does knowing how each pixel maps to the image actually help us? If you've not got - any bright ideas, then worry not, that's exactly what we're going to cover in the next tutorial. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_3_borders.py b/scripts/chapter_3_pixelizations/tutorial_3_borders.py new file mode 100644 index 0000000..ef684c2 --- /dev/null +++ b/scripts/chapter_3_pixelizations/tutorial_3_borders.py @@ -0,0 +1,561 @@ +""" +Tutorial 3: Borders +=================== + +__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 +""" + +""" +__Why the extent of the source mesh matters__ + +In the previous tutorials, we chose how many points our rectangular source mesh contained. However, the number of points is only part of what determines its resolution. We also need to consider how much of the source plane those points cover. + +A `(25, 25)` mesh spread across a small source region can describe finer structure than the same mesh spread across a much larger region. If a few ray-traced coordinates extend far beyond the source, the mesh can expand to accommodate them, leaving fewer points where we actually need to reconstruct the galaxy. + +This tutorial examines how that happens and introduces the border relocator, which provides a practical way to control these extreme coordinates. + +We return to a simpler simulated source so that its morphology does not distract from the geometry. The image contains lensed source light but no foreground lens light. +""" + +from autolens import jax_wrapper + +from pathlib import Path +import subprocess +import sys + +import numpy as np +import autolens as al +import autolens.plot as aplt +import autoarray.plot as aaplt + +dataset_path = Path("dataset") / "imaging" / "simple__no_lens_light" + +if al.util.dataset.should_simulate(str(dataset_path)): + subprocess.run( + [sys.executable, "scripts/simulator/no_lens_light.py"], + check=True, + ) + +dataset_unmasked = al.Imaging.from_fits( + data_path=dataset_path / "data.fits", + noise_map_path=dataset_path / "noise_map.fits", + psf_path=dataset_path / "psf.fits", + pixel_scales=0.1, +) + +dataset_unmasked = dataset_unmasked.apply_over_sampling( + over_sample_size_pixelization=1 +) + +aplt.subplot_imaging_dataset(dataset=dataset_unmasked) + +""" +We will compare two masks with the same outer radius. One includes the centre of the image; the other excludes it. This lets us see what happens when the central image pixels enter the reconstruction. + +__What we mean by a border__ + +The border is the outermost boundary of the unmasked image region. + +For a circular mask, this is straightforward: the border follows the outside of the circle. An annular mask has an inner and an outer edge, but the border used here follows the outer edge. The hole in the middle does not become a second outer border. + +Let’s plot both masks and mark their border coordinates. +""" + +mask_circular = al.Mask2D.circular( + shape_native=dataset_unmasked.shape_native, + pixel_scales=dataset_unmasked.pixel_scales, + radius=2.5, +) + +mask_annular = al.Mask2D.circular_annular( + shape_native=dataset_unmasked.shape_native, + pixel_scales=dataset_unmasked.pixel_scales, + inner_radius=0.8, + outer_radius=2.5, +) + +dataset_circular = dataset_unmasked.apply_mask(mask=mask_circular) +dataset_annular = dataset_unmasked.apply_mask(mask=mask_annular) + +aplt.plot_array( + array=dataset_circular.data, + positions=mask_circular.derive_grid.border, + title="Circular Mask: Outer Border", +) + +aplt.plot_array( + array=dataset_annular.data, + positions=mask_annular.derive_grid.border, + title="Annular Mask: Outer Border", +) + +""" +The outer borders should coincide because the masks share the same outer radius. The difference is inside: the circular mask includes image pixels near the lens centre that the annular mask removes. + +We will keep the masks fixed while comparing the source-plane grids. Choosing the mask and relocating a border are different operations: the mask selects which image pixels enter the fit, while relocation changes how certain coordinates are treated when constructing the source reconstruction. + +__Starting without border relocation__ + +First, let’s reconstruct the source using the annular mask with border relocation explicitly switched off. + +We use the mass model that generated the simulation and a uniform rectangular source mesh. The helper below lets us change the mask and relocation setting while keeping the lens model, mesh shape and regularization coefficient unchanged. +""" + +# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25. +mesh_shape = (8, 8) if dataset_unmasked.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25) + +lens_galaxy = al.Galaxy( + redshift=0.5, + mass=al.mp.Isothermal( + centre=(0.0, 0.0), + einstein_radius=1.6, + ell_comps=al.convert.ell_comps_from( + axis_ratio=0.9, + angle=45.0, + ), + ), +) + +field = al.MassField( + redshift=0.5, + shear=al.mp.ExternalShear( + gamma_1=0.05, + gamma_2=0.05, + ), +) + +pixelization = al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=al.reg.Constant(coefficient=1.0), +) + +source_galaxy = al.Galaxy( + redshift=1.0, + pixelization=pixelization, +) + +tracer = al.Tracer( + galaxies=[lens_galaxy, source_galaxy], + fields=[field], +) + + +def fit_with_mask_and_border(mask, use_border_relocator): + dataset = dataset_unmasked.apply_mask(mask=mask) + + return al.FitImaging( + dataset=dataset, + tracer=tracer, + settings=al.Settings( + use_border_relocator=use_border_relocator, + ), + ) + + +fit_annular = fit_with_mask_and_border( + mask=mask_annular, + use_border_relocator=False, +) + +mapper_annular = fit_annular.inversion.cls_list_from(al.Mapper)[0] + +aaplt.plot_grid( + grid=mapper_annular.source_plane_data_grid, + title="Annular Mask: Ray-Traced Image Coordinates", +) + +aaplt.plot_mapper( + mapper=mapper_annular, + solution_vector=fit_annular.inversion.reconstruction, + mesh_grid=mapper_annular.source_plane_mesh_grid, + zoom_to_brightest=False, + title="Annular Mask: Source Reconstruction", +) + +""" +The first plot shows where the image coordinates land after ray tracing. The second shows the source mesh and the brightnesses inferred on it. + +Look at the coordinate ranges as well as the source itself. These tell us how much source-plane area the mesh is covering. We will use this reconstruction as a reference when we add the central image pixels. + +__Including the central image pixels__ + +Now repeat the calculation with the circular mask, still without border relocation. + +The outer image boundary is unchanged. We are adding the pixels within the central hole of the annulus, rather than extending the image to larger radii. +""" + +fit_circular = fit_with_mask_and_border( + mask=mask_circular, + use_border_relocator=False, +) + +mapper_circular = fit_circular.inversion.cls_list_from(al.Mapper)[0] + +aaplt.plot_grid( + grid=mapper_circular.source_plane_data_grid, + title="Circular Mask: Ray-Traced Image Coordinates", +) + +aaplt.plot_mapper( + mapper=mapper_circular, + solution_vector=fit_circular.inversion.reconstruction, + mesh_grid=mapper_circular.source_plane_mesh_grid, + zoom_to_brightest=False, + title="Circular Mask: Source Reconstruction", +) + +for label, mapper in [ + ("Annular", mapper_annular), + ("Circular", mapper_circular), +]: + coordinates = np.asarray(mapper.source_plane_mesh_grid) + span_y, span_x = np.ptp(coordinates, axis=0) + + print( + f"{label} mesh coordinate spans: " + f"y={span_y:.3f} arcsec, x={span_x:.3f} arcsec" + ) + +""" +Compare the source-plane extent with the annular case. The added image pixels can trace outside the compact region occupied by the other coordinates, causing the rectangular mesh to cover a larger area. + +Both reconstructions still use the same number of mesh points. If the mesh expands, their spacing increases, reducing the resolution available to describe the central source. + +This illustrates why increasing the number of image pixels does not automatically improve a reconstruction with a fixed mesh. We must also consider how those pixels affect the source-plane coverage. + +The two masks contain different data, so this is a geometric comparison—not a direct evidence comparison between otherwise identical fits. + +__Following the central pixels into the source plane__ + +Let’s confirm where the extra source-plane coordinates come from. + +We select two small groups of image pixels: one close to the lens centre and another near the lensed arc. As in tutorial 1, we use the same index groups in both planes, so matching colours identify the same light paths. +""" + +image_coordinates = np.asarray( + mapper_circular.image_plane_data_grid +) + +central_indexes = np.argsort( + np.sum(image_coordinates**2, axis=1) +)[:12].tolist() + +arc_indexes = np.argsort( + np.sum( + (image_coordinates - np.array([0.0, 1.6])) ** 2, + axis=1, + ) +)[:12].tolist() + +index_groups = [central_indexes, arc_indexes] + +aaplt.plot_grid( + grid=mapper_circular.image_plane_data_grid, + indexes=index_groups, + title="Image Coordinates: Central Pixels and Arc Pixels", +) + +aaplt.plot_grid( + grid=mapper_circular.source_plane_data_grid, + indexes=index_groups, + title="The Same Pixels Traced into the Source Plane", +) + +for index in central_indexes[:4]: + print( + f"Image index {index}: " + f"{image_coordinates[index]} -> " + f"{np.asarray(mapper_circular.source_plane_data_grid[index])}" + ) + +""" +The central image coordinates need not map close to the source-plane origin. Their source positions depend on the difference between their image positions and the lens deflections. + +Near the centre of a cuspy mass distribution, a small image region can correspond to a much larger source region. This is demagnification: the image occupies less area than the corresponding source region. It does not require the deflection angle itself to become arbitrarily large. + +For our reconstruction, the practical consequence is that central image pixels can map well outside the region traced by the arcs. The mesh then spends some of its resolution covering those distant positions. + +There is another concern. Source structure reconstructed at those positions may predict other images outside our chosen mask, where we are not comparing the model with the data. The reconstruction is then missing some of the observational constraints that would otherwise act on that structure. + +In the next blocks, we will trace the outer border into the source plane and examine how border relocation handles coordinates beyond it. We will compare the same circularly masked dataset with relocation switched off and on, so that the effect of relocation is isolated. + +**🤖 Ask AI:** Why can a small group of central image pixels change the resolution of a rectangular source mesh, even when most of the observed source light lies in the arcs? + +__Tracing the outer border__ + +We have seen that some central image pixels trace beyond the compact source region. To decide how to handle those coordinates, we first need a reference boundary in the source plane. + +We obtain this from the outer border of the image mask. These are ordinary image coordinates, so we can ray-trace them through the same lens model as every other pixel. Their traced positions describe where the edge of our fitted image region maps into the source plane. + +Let’s highlight the border pixels in the image and follow the same indexes into the source plane. Border relocation is still switched off here, so we are looking at the original ray-traced coordinates. +""" + +border_indexes = mask_circular.derive_indexes.border_slim.tolist() + +aaplt.plot_grid( + grid=mapper_circular.image_plane_data_grid, + indexes=[border_indexes], + title="Image-Plane Coordinates: Outer Border Highlighted", +) + +aaplt.plot_grid( + grid=mapper_circular.source_plane_data_grid, + indexes=[border_indexes], + title="Source-Plane Coordinates: Traced Outer Border Highlighted", +) + +""" +Compare the highlighted border with the central image pixels traced in the previous block. Some image coordinates that were well inside the image mask can land beyond the traced outer border in the source plane. + +This is the important geometric distinction: being inside the image-plane border does not guarantee that a coordinate remains inside its traced counterpart. + +The border relocator uses the traced outer-border coordinates to estimate a source-plane boundary. In the current implementation, this is an ellipse. Coordinates beyond that boundary are moved inward for the source reconstruction, preventing them from extending its coverage unchecked. + +__Switching border relocation on__ + +Let’s repeat the circular-mask fit with border relocation enabled. + +The data, mask, lens mass, mesh shape and regularization coefficient all remain unchanged. This time, the source mesh is constructed using the relocated coordinates. +""" + +fit_relocated = fit_with_mask_and_border( + mask=mask_circular, + use_border_relocator=True, +) + +mapper_relocated = fit_relocated.inversion.cls_list_from(al.Mapper)[0] + +for label, mapper in [ + ("Without Relocation", mapper_circular), + ("With Relocation", mapper_relocated), +]: + aaplt.plot_grid( + grid=mapper.source_plane_data_grid, + indexes=index_groups, + title=f"{label}: Selected Source-Plane Coordinates", + ) + + mesh_coordinates = np.asarray(mapper.source_plane_mesh_grid) + span_y, span_x = np.ptp(mesh_coordinates, axis=0) + + print( + f"{label}: mesh spans " + f"y={span_y:.3f} arcsec, x={span_x:.3f} arcsec" + ) + +""" +Follow the same coloured coordinate groups through the two plots. Coordinates outside the estimated boundary are relocated towards it; those inside remain unchanged. + +If relocation reduces the mesh extent, the same number of source points now covers a smaller area. This can restore resolution in the region where the source is being reconstructed, without increasing the mesh dimensions. + +We can also identify which coordinates moved and display their positions before and after relocation. +""" + +coordinates_before = np.asarray( + mapper_circular.source_plane_data_grid +) +coordinates_after = np.asarray( + mapper_relocated.source_plane_data_grid +) + +displacements = np.linalg.norm( + coordinates_after - coordinates_before, + axis=1, +) +moved_indexes = np.flatnonzero(displacements > 1.0e-8).tolist() + +print("Number of relocated image-pixel coordinates:", len(moved_indexes)) + +if moved_indexes: + aaplt.plot_grid( + grid=mapper_circular.source_plane_data_grid, + indexes=[moved_indexes], + title="Relocated Coordinates: Original Positions", + ) + + aaplt.plot_grid( + grid=mapper_relocated.source_plane_data_grid, + indexes=[moved_indexes], + title="Relocated Coordinates: Positions Used by the Mapper", + ) + +""" +These are still the same image pixels with the same measured brightnesses. Relocation changes their source-plane mapping coordinates; it does not remove them from the fit or move their positions in the observed image. + +__What relocation changes—and what it does not__ + +Border relocation is a numerical treatment of the source reconstruction. It does not change the lens mass profile or the physical deflection calculation. + +That distinction matters. If we ray-trace the image grid directly through the tracer, we recover the original source coordinates. The mapper used by the relocated inversion instead contains the coordinates after the border treatment. + +Let’s compare these explicitly. +""" + +physical_source_grid = tracer.traced_grid_2d_list_from( + grid=dataset_circular.grids.pixelization +)[1] + +physical_coordinates = np.asarray(physical_source_grid) + +print( + "Largest difference between direct ray tracing and the " + "mapper without relocation:", + np.max( + np.linalg.norm( + physical_coordinates - coordinates_before, + axis=1, + ) + ), +) + +if moved_indexes: + index = moved_indexes[0] + + print("Image-pixel index:", index) + print("Directly ray-traced position:", physical_coordinates[index]) + print("Position used after relocation:", coordinates_after[index]) + +""" +We should therefore understand relocation as a practical boundary treatment, not an alternative physical lens equation. It controls how extreme coordinates participate in a reconstruction whose image coverage is finite. + +The next step is to inspect its effect on the inferred source and the model image. We use a common source colour scale so that changes in brightness are not hidden by separately scaled figures. +""" + +source_vmax = max( + float(np.max(np.asarray(current_fit.inversion.reconstruction))) + for current_fit in [fit_circular, fit_relocated] +) + +for label, current_fit in [ + ("Without Relocation", fit_circular), + ("With Relocation", fit_relocated), +]: + mapper = current_fit.inversion.cls_list_from(al.Mapper)[0] + + aaplt.plot_mapper( + mapper=mapper, + solution_vector=current_fit.inversion.reconstruction, + mesh_grid=mapper.source_plane_mesh_grid, + vmin=0.0, + vmax=source_vmax, + zoom_to_brightest=False, + title=f"{label}: Source Reconstruction", + ) + + aplt.plot_array( + array=( + dataset_circular.data - current_fit.model_data + ) / dataset_circular.noise_map, + title=f"{label}: Normalized Residuals", + ) + +""" +Look for changes in the mesh coverage, the source structure and the residuals. A more compact mesh alone does not prove that the model is accurate, and relocation does not guarantee freedom from systematic errors. + +We have also kept the regularization coefficient fixed to isolate the change in configuration. As tutorial 2 showed, changing mesh geometry can alter how regularization acts, so this is a diagnostic comparison rather than a complete optimization of both reconstructions. + +__The mask still needs to cover the lensed source__ + +Border relocation does not replace choosing an appropriate image mask. + +If the mask excludes part of an arc or another image of the source, those pixels do not constrain the reconstruction. Relocating source coordinates cannot recover information that we have excluded from the fit. + +The mask also determines the border from which the source-plane boundary is estimated. Changing its size therefore changes both the image pixels being fitted and the boundary treatment. + +Let’s inspect several circular masks before fitting them. We plot their borders on the full image so that any source light outside the selected region remains visible. +""" + +mask_radii = [2.0, 2.5, 3.0] +masks_by_radius = {} + +for radius in mask_radii: + mask = al.Mask2D.circular( + shape_native=dataset_unmasked.shape_native, + pixel_scales=dataset_unmasked.pixel_scales, + radius=radius, + ) + masks_by_radius[radius] = mask + + aplt.plot_array( + array=dataset_unmasked.data, + positions=mask.derive_grid.border, + title=f"Full Image with Mask Border at {radius:.1f} Arcsec", + ) + +""" +Check whether each border encloses the visible lensed emission with some surrounding background. A mask that follows only the brightest parts can exclude faint extensions that still matter to the reconstruction. + +Now compare the resulting fits with relocation enabled. +""" + +fits_by_radius = {} + +for radius, mask in masks_by_radius.items(): + current_fit = fit_with_mask_and_border( + mask=mask, + use_border_relocator=True, + ) + fits_by_radius[radius] = current_fit + + mapper = current_fit.inversion.cls_list_from(al.Mapper)[0] + + aaplt.plot_mapper( + mapper=mapper, + solution_vector=current_fit.inversion.reconstruction, + mesh_grid=mapper.source_plane_mesh_grid, + zoom_to_brightest=False, + title=f"Source Reconstruction: Mask Radius {radius:.1f} Arcsec", + ) + + aplt.subplot_fit_imaging(fit=current_fit) + +""" +Compare the source structure and residuals, especially where a smaller mask approaches the arcs. If the reconstruction changes substantially as clearly relevant source light enters the mask, the smaller-mask result deserves closer inspection. + +Do not rank these masks by their raw evidence values: they contain different sets of image pixels. The purpose here is to examine coverage and stability, not to select whichever mask produces the largest number. + +**🤖 Ask AI:** Why can a reconstruction appear satisfactory inside a small mask while failing to explain other visible parts of the same lensed source? + +__Wrap up__ + +We began with a rectangular source mesh whose resolution depended on both its number of points and the area they covered. A small number of extreme ray-traced coordinates could expand that area and reduce the resolution available for the source. + +The border relocator uses the traced outer image border to estimate a source-plane boundary, then moves coordinates beyond that boundary inward for the reconstruction. The observed image pixels remain in the fit, and the physical lens model is unchanged. + +In routine modelling, we normally leave this treatment enabled. Knowing what it does is useful when a source mesh extends unexpectedly far from the reconstructed galaxy, or when a reconstruction changes strongly with the mask. + +These issues can also occur in systems with several lens galaxies. Extreme coordinates need not originate only near the centre of the image; they can be associated with other mass concentrations. The same diagnostic applies: follow the image coordinates into the source plane and inspect the boundary and mesh coverage. + +For subsequent inspection, return to our circular mask with radius `2.5` arcsec and relocation enabled. +""" + +dataset = dataset_circular +fit = fit_relocated +mapper = mapper_relocated + +aplt.subplot_fit_imaging(fit=fit) + +aaplt.plot_mapper( + mapper=mapper, + solution_vector=fit.inversion.reconstruction, + mesh_grid=mapper.source_plane_mesh_grid, + zoom_to_brightest=False, + title="Source Reconstruction with Border Relocation Enabled", +) + +""" +We have now examined the source mesh, interpolation, regularization and border treatment while holding the lens mass fixed. + +In the next tutorial, we let the mass model vary. We will see how a pixelized source participates in lens modelling, why its flexibility can admit misleading solutions, and how a sensible starting model helps the search find the relevant region of parameter space. +""" diff --git a/scripts/chapter_3_pixelizations/tutorial_3_inversions.py b/scripts/chapter_3_pixelizations/tutorial_3_inversions.py deleted file mode 100644 index cea05e4..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_3_inversions.py +++ /dev/null @@ -1,351 +0,0 @@ -""" -Tutorial 3: Inversions -====================== - -In the previous two tutorials, we introduced: - - - `Pixelization`'s: which place a pixel-grid in the source-plane. - - `Mappers`'s: which describe how each source-pixel maps to one or more image pixels. - -However, none of this has actually helped us fit strong lens data or reconstruct the source galaxy. This is the subject -of this tutorial, where the process of reconstructing the source's light on the pixelization is called an `Inversion`. - -__Contents__ - -- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where. -- **Pixelization:** Finally, we can now use the `Mapper` to reconstruct the source via an `Inversion`. -- **Positive Only Solver:** Ensuring positive-only solutions for linear light profile intensities. -- **Wrap Up:** Summary of the script and next steps. -- **Detailed Explanation:** If you are interested in a more detailed description of how inversions work, then checkout the file. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -from pathlib import Path -import autolens as al -import autolens.plot as aplt -import autoarray.plot as aaplt - -""" -__Initial Setup__ - -we'll use the same strong lensing data as the previous tutorial, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -""" -Lets create an annular mask which traces the strongly lensed source's ring of light, and apply it to the dataset. -""" -mask = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=0.5, - outer_radius=2.8, -) - -dataset = dataset.apply_mask(mask=mask) - -""" -Now the mask is applied, plotting the data draws it over the image, letting us check the annulus traces the ring of -lensed source light. -""" -aplt.plot_array(array=dataset.data, title="Image Data With Mask Applied") - -""" -We now create the masked source-plane grid via the tracer, as we did in the previous tutorial. -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), -) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) - -tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field]) - -source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1] - -""" -we again use the rectangular pixelization to create the mapper. - -(Ignore the regularization input below for now, we will cover this in the next tutorial). -""" -mesh = al.mesh.RectangularBilinearAdaptDensity(shape=(25, 25)) - -pixelization = al.Pixelization(mesh=mesh) - -interpolator = mesh.interpolator_from( - source_plane_data_grid=source_plane_grid, - source_plane_mesh_grid=None, -) - -mapper = al.Mapper( - interpolator=interpolator, - regularization=al.reg.Constant(coefficient=1.0), -) - - -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") - -""" -__Pixelization__ - -Finally, we can now use the `Mapper` to reconstruct the source via an `Inversion`. I'll explain how this works in a -second, but lets just go ahead and create the inversion first. -""" -inversion = al.Inversion(dataset=dataset, linear_obj_list=[mapper]) - -""" -The inversion has reconstructed the source's light on the rectangular pixel grid, which is called the -`reconstruction`. This source-plane reconstruction can be mapped back to the image-plane to produce the -`mapped_reconstructed_operated_data`. -""" -print(inversion.reconstruction) -print(inversion.mapped_reconstructed_operated_data) - -""" -Both of these can be plotted using an `aplt.plot_array`. - -It is possible for an inversion to have multiple `Mapper`'s, therefore for certain figures we specify the index -of the mapper we wish to plot. In this case, because we only have one mapper we specify the index 0. -""" -aplt.plot_array( - array=inversion.mapped_reconstructed_operated_data, title="Inversion Reconstruction" -) - -""" -There we have it, we have successfully reconstructed the source using a rectangular pixel-grid. Whilst this source -was simple (a blob of light in the centre of the source-plane), inversions come into their own when fitting sources -with complex morphologies. - -Lets use an inversion to reconstruct a complex source! -""" -dataset_name = "source_complex" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/source_complex.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.05, -) - -aplt.plot_array(array=dataset.data, title="Data") - -""" -This code is doing all the same as above (setup the mask, galaxy, tracers, mapper, inversion, etc.). -""" -mask = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=0.1, - outer_radius=3.2, -) - -dataset = dataset.apply_mask(mask=mask) - -aplt.plot_array(array=dataset.data, title="Image Data With Mask Applied") - -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), einstein_radius=1.6, ell_comps=(0.17647, 0.0) - ), -) - -tracer = al.Tracer(galaxies=[lens_galaxy, al.Galaxy(redshift=1.0)], fields=[field]) - -source_plane_grid = tracer.traced_grid_2d_list_from(grid=dataset.grids.pixelization)[1] - -interpolator = mesh.interpolator_from( - source_plane_data_grid=source_plane_grid, - source_plane_mesh_grid=None, -) - -mapper = al.Mapper( - interpolator=interpolator, - regularization=al.reg.Constant(coefficient=1.0), -) - -inversion = al.Inversion(dataset=dataset, linear_obj_list=[mapper]) - -""" -Now lets plot the complex source reconstruction. -""" -aplt.plot_array( - array=inversion.mapped_reconstructed_operated_data, title="Inversion Reconstruction" -) - -""" -Pretty great, huh? If you fitted complex sources using light profiles in the search chaining tutorials at the end of -chapter 2 (tutorials 9-11), you'll remember that getting a model image that looked this good simply *was not possible*. -With an inversion, we can do this with ease and without having to perform model-fitting with 20+ parameters for the -source's light! - -We will now briefly discuss how an inversion actually works, however the explanation I give in this tutorial will be -overly-simplified. To be good at lens modeling you do not need to understand the details of how an inversion works, you -simply need to be able to use an inversion to model a strong lens. - -To begin, lets consider some random mappings between our mapper`s source-pixels and the image. - -`mapper.mappings_from` returns one `Mapping` per group of source-pixels, which we pass straight to -`subplot_image_and_mapper` as `regions=`. Each mapping is drawn in its own colour: the source-plane cell on the right, -and the image-plane regions it maps to on the left. Tutorial 2 covers this in detail. -""" -pix_indexes = [[min(index, mapper.pixels - 1)] for index in [445, 285, 313, 132, 211]] - -mappings = mapper.mappings_from(pix_indexes=pix_indexes) - -aaplt.subplot_image_and_mapper( - mapper=mapper, - image=dataset.data, - regions=mappings, - mesh_grid=mapper.source_plane_mesh_grid, -) - -""" -These mappings are known before the inversion reconstructs the source galaxy, which means before this inversion is -performed we know two key pieces of information: - - 1) The mappings between every source-pixel and sets of image-pixels. - 2) The flux values in every observed image-pixel, which are the values we want to fit successfully. - -It turns out that with these two pieces of information we can linearly solve for the set of source-pixel fluxes that -best-fit (e.g. maximize the log likelihood) our observed image. Essentially, we set up the mappings between source and -image pixels as a large matrix and solve for the source-pixel fluxes in an analogous fashion to how you would solve a -set of simultaneous linear equations. This process is called a `linear inversion`. - -In the language of linear algebra: the mappings form a `mapping matrix` $f$, which together with the data and -noise-map defines a linear system whose solution is the vector of source-pixel fluxes $s$. Tutorial 5 of this -chapter writes this system out in full and computes it step-by-step in code -- for now, the intuition above is all -you need. - -There are three more things about a linear inversion that are worth knowing: - - 1) When performing fits using light profiles, we discussed how a `model_image` was generated by convolving the light - profile images with the data's PSF. A similar blurring operation is incorporated into the inversion, such that it - reconstructs a source (and therefore image) which fully accounts for the telescope optics and effect of the PSF. - - 2) You may be familiar with image sub-gridding, which splits each image-pixel into a sub-pixel (if you are not - familiar then feel free to checkout the optional **HowToLens** tutorial on sub-gridding. If a sub-grid is used, it is - the mapping between every sub-pixel and source-pixel that is computed and used to perform the inversion. This prevents - aliasing effects degrading the image reconstruction. By default **PyAutoLens** uses sub-gridding of degree 4x4. - - 3) The inversion's solution is regularized. But wait, that's what we'll cover in the next tutorial! - -Finally, let me show you how easy it is to fit an image with an `Inversion` using a `FitImaging` object. Instead of -giving the source galaxy a light profile, we simply pass it a `Pixelization` and regularization, and pass it to a -tracer. -""" -# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a -# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is -# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above. -mesh_shape = ( - al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - else (40, 40) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - -""" -Then, like before, we pass the imaging and tracer `FitImaging` object. - -We see some pretty good looking residuals, we must be fitting the lensed source accurately! In fact, we can use the -`subplot_of_planes` method to specifically visualize the inversion and plot the source reconstruction. -""" -fit = al.FitImaging(dataset=dataset, tracer=tracer) - -aplt.subplot_fit_imaging(fit=fit) -aplt.subplot_fit_imaging_of_planes(fit=fit) - -""" -__Positive Only Solver__ - -All pixelized source reconstructions use a positive-only solver, meaning that every source-pixel is only allowed -to reconstruct positive flux values. This ensures that the source reconstruction is physical and that we don't -reconstruct negative flux values that don't exist in the real source galaxy (a common systematic solution in lens -analysis). - -It may be surprising to hear that this is a feature worth pointing out, but it turns out setting up the linear algebra -to enforce positive reconstructions is difficult to make efficient. A lot of development time went into making this -possible, where a bespoke fast non-negative linear solver was developed to achieve this. - -Other methods in the literature often do not use a positive only solver, and therefore suffer from these -unphysical solutions, which can degrade the results of lens model in general. - -__Wrap Up__ - -And, we're done, here are a few questions to get you thinking about inversions: - - 1) The inversion provides the maximum log likelihood solution to the observed image. Is there a problem with seeking - the highest likelihood solution? Is there a risk that we're going to fit other things in the image than just the - lensed source galaxy? What happens if you reduce the `coefficient` of the regularization object above to zero? - - 2) The exterior pixels in the rectangular pixel-grid have no image-pixels in them. However, they are still given a - reconstructed flux. Given these pixels do not map to the data, where is this value coming from? - -__Detailed Explanation__ - -If you are interested in a more detailed description of how inversions work, tutorial 5 of this chapter collects the -full linear algebra in one place. The file -`autolens_workspace/*/imaging/features/pixelization/likelihood_function.ipynb` gives a complementary visual -step-by-step guide of the process alongside equations and references to literature on the subject. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py b/scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py deleted file mode 100644 index ccae8d4..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py +++ /dev/null @@ -1,343 +0,0 @@ -""" -Tutorial 4: Bayesian Regularization -=================================== - -So far, we have: - - - Used pixelizations and mappers to map source-pixels to image-pixels and visa versa. - - Successfully used an inversion to reconstruct a source. - - Seen that this reconstruction provides a good fit of the observed image, providing a high likelihood solution. - -The explanation of *how* an inversion works has so far been overly simplified. You'll have noted the regularization -inputs which we have not so far discussed. This will be the topic of this tutorial, and where inversions become more -conceptually challenging! - -__Contents__ - -- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where. -- **Convenience Function:** we're going to perform a lot of fits using an `Inversion` this tutorial. -- **Pixelization:** Okay, so lets look at our fit from the previous tutorial in more detail. -- **Regularization:** The source reconstruction looks excellent! -- **Bayesian Evidence:** For inversions, we therefore need a different goodness-of-fit measure to choose the appropriate. -- **Detailed Description:** Below, I provide a more detailed discussion of the Bayesian evidence. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -from pathlib import Path -import autolens as al -import autolens.plot as aplt - -""" -__Initial Setup__ - -we'll use the same strong lensing data as the previous tutorial, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -""" -__Convenience Function__ - -we're going to perform a lot of fits using an `Inversion` this tutorial. This would create a lot of code, so to keep -things tidy, I've setup this function which handles it all for us. - -(Borders, which relocate demagnified image pixels in the source-plane, are used behind the scenes here -- we'll be -covering them in tutorial 6.) -""" - - -def perform_fit_with_source_galaxy(dataset, source_galaxy): - mask = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=0.3, - outer_radius=2.6, - ) - - dataset = dataset.apply_mask(mask=mask) - - lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), - ) - field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) - ) - - tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - - return al.FitImaging(dataset=dataset, tracer=tracer) - - -""" -__Pixelization__ - -Okay, so lets look at our fit from the previous tutorial in more detail. we'll use a higher resolution 40 x 40 grid. -""" -# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a -# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is -# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above. -mesh_shape = ( - al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - else (40, 40) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -fit = perform_fit_with_source_galaxy(dataset=dataset, source_galaxy=source_galaxy) - -aplt.subplot_fit_imaging(fit=fit) - -""" -__Regularization__ - -The source reconstruction looks excellent! - -However, the high quality of this solution was possible because I chose a `coefficient` for the regularization input of -1.0. If we reduce this `coefficient` to zero, the source reconstruction goes *very* weird. -""" -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=0.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -no_regularization_fit = perform_fit_with_source_galaxy( - dataset=dataset, source_galaxy=source_galaxy -) - -aplt.subplot_fit_imaging(fit=no_regularization_fit) - -""" -So, what is happening here? Why does reducing the `coefficient` do this to our source reconstruction? First, we need -to understand what regularization actually does! - -When the inversion reconstructs the source, it does not *only* compute the set of source-pixel fluxes that best-fit -the image. It also regularizes this solution, whereby it goes to every pixel on the rectangular source-plane grid -and computes the difference between the reconstructed flux values of every source pixel with its 4 neighboring pixels. -If the difference in flux is large the solution is penalized, reducing its log likelihood. You can think of this as -us applying a 'smoothness prior' on the reconstructed source galaxy's light. - -(In the language of linear algebra, this smoothness prior is encoded in a `regularization matrix` $H$ which is -added to the linear system the inversion solves -- tutorial 5 writes this out in full.) - -This smoothing adds a 'penalty term' to the log likelihood of an inversion which is the summed difference between the -reconstructed fluxes of every source-pixel pair multiplied by the `coefficient`. By setting the regularization -coefficient to zero, we set this penalty term to zero, meaning that regularization is completely omitted. - -Why do we need to regularize our solution? We just saw why, if we do not apply this smoothness prior to the source, we -`over-fit` the image and reconstruct a noisy source with lots of extraneous features. This is what the large flux -values located at the exterior regions of the source reconstruction above are. If the inversions's sole aim is to -maximize the log likelihood, it can do this by fitting *everything* accurately, including the noise. - -If we change the `vmax` and `vmin` variables of the plotting function's `CMap` such that the color-map is restricted to a -narrower range of values, we can see that even without regularization we are still reconstructing the actual source -galaxy. -""" - -aplt.plot_array( - array=fit.inversion.mapped_reconstructed_operated_data, - title="Inversion Reconstruction", -) - -""" -Over-fitting is why regularization is necessary. Solutions like this will completely ruin our attempts to model a -strong lens. By smoothing our source reconstruction we ensure it does not over fit noise in the image. - -So, what happens if we apply a high value for the regularization coefficient? -""" -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=100.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -high_regularization_fit = perform_fit_with_source_galaxy( - dataset=dataset, source_galaxy=source_galaxy -) - -aplt.subplot_fit_imaging(fit=high_regularization_fit) - -aplt.plot_array( - array=fit.inversion.mapped_reconstructed_operated_data, - title="Inversion Reconstruction", -) - -""" -The figure above shows that we completely remove over-fitting. However, we now fit the image data less accurately, -due to the much higher level of smoothing. - -So, we now understand what regularization is and why it is necessary. There is one nagging question that remains, how -do I choose the regularization coefficient value? We can not use the log likelihood, as decreasing the regularization -coefficient will always increase the log likelihood, because less smoothing allows the source reconstruction to fit -the data better. -""" -print("Likelihood Without Regularization:") -print(no_regularization_fit.log_likelihood_with_regularization) -print("Likelihood With Normal Regularization:") -print(fit.log_likelihood_with_regularization) -print("Likelihood With High Regularization:") -print(high_regularization_fit.log_likelihood_with_regularization) - -""" -__Bayesian Evidence__ - -For inversions, we therefore need a different goodness-of-fit measure to choose the appropriate level of regularization. - -For this, we invoke the `Bayesian Evidence`, which quantifies the goodness of the fit as follows: - - - It requires that the residuals of the fit are consistent with Gaussian noise (which is the type of noise expected - in the imaging data). If this Gaussian pattern is not visible in the residuals, the noise must have been over-fitted - by the inversion. The Bayesian evidence will therefore decrease. If the image is fitted poorly due to over smoothing, - the residuals will again not appear Gaussian either, again producing a decrease in the Bayesian evidence value. - - - There can be many solutions which fit the data to the noise level, without over-fitting. To determine the best - solutions from these solutions, the Bayesian evidence therefore also quantifies the complexity of the source - reconstruction. If an inversion requires many pixels and a low level of regularization to achieve a good fit, the - Bayesian evidence will decrease. The evidence penalizes solutions which are complex, which, in a Bayesian sense, are - less probable (you may want to look up `Occam`s Razor`). - -The Bayesian evidence therefore ensures we only invoke a more complex source reconstruction when the data absolutely -necessitates it. - -Lets take a look at the Bayesian evidence of the fits that we performed above, which is accessible from a `FitImaging` -object via the `log_evidence` property: -""" -print("Bayesian Evidence Without Regularization:") -print(no_regularization_fit.log_evidence) -print("Bayesian Evidence With Normal Regularization:") -print(fit.log_evidence) -print("Bayesian Evidence With High Regularization:") -print(high_regularization_fit.log_evidence) - -""" -As expected, the solution that we could see `by-eye` was the best solution corresponds to the highest log evidence -solution. - -__Non-Linear and Linear__ - -Before we end, lets consider which aspects of an inversion are linear and which are non-linear. - -The linear part of the inversion is the step that solves for the reconstruct source pixel fluxes, including accounting -for the smoothing via regularizaton. We do not have to perform a non-linear search to determine the source-pixel -fluxes or compute the Bayesian evidence discussed above. - -However, determining the regularization `coefficient` that maximizes the Bayesian log evidence is a non-linear problem -that requires a non-linear search. The Bayesian evidence also depends on the source grid resolution, which means the -pixel-grid's `shape` parameter may also now become dimensions of non linear parameter space. Nevertheless, these total -only 3 non-linear parameters, far fewer than the 20+ that are required when modeling sources uses light profiles! - -Here are a few questions for you to think about. - - 1) We maximize the log evidence by using simpler source reconstructions. Therefore, decreasing the pixel-grid - size should provide a higher log_evidence, provided it still has sufficiently high resolution to fit the image well - (and provided that the regularization coefficient is set to an appropriate value). Can you increase the log evidence - from the value above by changing these parameters, I've set you up with a code to do so below. -""" -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -fit = perform_fit_with_source_galaxy(dataset=dataset, source_galaxy=source_galaxy) - -print("Previous Bayesian Evidence:") -print(3988.0716851250163) -print("New Bayesian Evidence:") -print(fit.log_evidence) - -aplt.subplot_fit_imaging(fit=fit) - -""" - 2) Can you think of any other ways we might increase the Bayesian evidence even further? In future tutorials we will - learn how **PyAutoLens** can adapt the source reconstruction to the properties of the image so as to maximize the - Bayesian evidence! - -__Detailed Description__ - -Below, I provide a more detailed discussion of the Bayesian evidence. It is not paramount that you understand this to -use **PyAutoLens**, but I recommend you give it a read to get an intuition for how the evidence works. The evidence -itself is a sum of chi-squared, regularization and matrix log-determinant terms -- tutorial 5 derives the exact -expression and computes every term in code. - -The Bayesian log evidence quantifies the following 3 aspects of a fit to strong lens imaging data: - -1) *The quality of the image reconstruction:* The source reconstruction is a linear inversion which uses the observed - values in the image-data to fit it and reconstruct the source. It is in principle able to perfectly reconstruct the - image regardless of the image’s noise or the accuracy of the lens model (e.g. at infinite source resolution without - regularization). The problem is therefore ‘ill-posed’ and this is why regularization is necessary. - - However, this raises the question of what constitutes a ‘good’ solution? The Bayesian evidence defines this by - assuming that the image data consists of independent Gaussian noise in every image pixel. A ‘good’ solution is one - whose chi-squared residuals are consistent with Gaussian noise, producing a reduced chi-squared near 1.0. Solutions - which give a reduced chi-squared below 1 are penalized for being overly complex and fitting the image’s noise, whereas - solutions with a reduced chi-squared above 1 are penalized for not invoking a more complex source model when the data - necessitates it. In both circumstances, these penalties reduce the inferred Bayesian evidence! - -2) *The complexity of the source reconstruction:* The log evidence estimates the number of source pixels that are used - to reconstruct the image, after accounting for their correlation with one another due to regularization. Solutions that - require fewer correlated source pixels increase the Bayesian evidence. Thus, simpler and less complex source - reconstructions are favoured. - -3) *The signal-to-noise (S/N) of the image that is fitted:* The Bayesian evidence favours models which fit higher S/N - realizations of the observed data (where the S/N is determined using the image-pixel variances, e.g. the noise-map). Up - to now, all **PyAutoLens** fits assumed fixed variances, meaning that this aspect of the Bayesian evidence has no impact - on the inferred evidence values. However, adaptive features can invoke functionality that increases the variances - of image-pixels where the lens model fits the data poorly. - - The premise is that whilst increasing the variances of image pixels lowers their S/N values and therefore also - decreases the log evidence, doing so may produce a net increase in log evidence. This occurs when the chi-squared - values of the image pixels whose variances are increased were initially very high (e.g. they were fit poorly by the - lens model). - -__Wrap Up__ - -In summary, the log evidence is maximized for solutions which most accurately reconstruct the highest S/N realization of -the observed image, without over-fitting its noise and using the fewest correlated source pixels. By employing this -framework throughout, **PyAutoLens** objectively determines the final lens model following the principles of Bayesian -analysis and Occam’s Razor. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py b/scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py new file mode 100644 index 0000000..ac675a1 --- /dev/null +++ b/scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py @@ -0,0 +1,803 @@ +""" +Tutorial 4: Lens Modeling +========================= + +__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 +""" + +""" +__Lens modelling with a pixelized source__ + +So far, we have reconstructed sources while keeping the lens mass fixed. We could therefore concentrate on the mesh, mappings and regularization without worrying about whether the lens model itself was correct. + +In a scientific analysis, the mass distribution is usually one of the things we want to measure. Changing it changes the ray tracing, which changes how the source must be reconstructed to explain the image. + +Pixelizations are powerful here because they can describe complicated source structure without requiring us to specify a separate analytic profile for every bright component. The non-linear search explores the lens parameters and regularization settings, while the inversion solves for the source brightnesses. + +However, this flexibility comes with a difficulty. An incorrect mass model can sometimes be compensated for by an unusual source reconstruction. A close fit to the image does not, by itself, establish that we have found the right mass distribution. + +We will investigate this using the familiar simulated lens with no foreground light. Its true Einstein radius is `1.6` arcsec, giving us a reference against which to compare deliberately incorrect models. + +The published example below makes this ambiguity visible before we explore it in code. Compare the reconstructed source structures with their corresponding image fits: a model can describe much of the observed image while assigning it a very different source morphology. + +![Demagnified source solutions, Figure 1 of Maresca et al.](https://raw.githubusercontent.com/PyAutoLabs/HowToLens/main/scripts/chapter_3_pixelizations/images/maresca_fig1.png) + +Figure 1 from [Maresca et al. (2021)](https://arxiv.org/abs/2012.04665), also discussed in the [PyAutoLens demagnified-solutions guide](https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html). We reproduce this figure to illustrate the ambiguity; the experiments below use our own simulated dataset. +""" + +from autolens import jax_wrapper + +from pathlib import Path +import subprocess +import sys + +import numpy as np +import matplotlib.pyplot as plt +import autolens as al +import autolens.plot as aplt +import autoarray.plot as aaplt + +dataset_path = Path("dataset") / "imaging" / "simple__no_lens_light" + +if al.util.dataset.should_simulate(str(dataset_path)): + subprocess.run( + [sys.executable, "scripts/simulator/no_lens_light.py"], + check=True, + ) + +dataset = al.Imaging.from_fits( + data_path=dataset_path / "data.fits", + noise_map_path=dataset_path / "noise_map.fits", + psf_path=dataset_path / "psf.fits", + pixel_scales=0.1, +) + +mask = al.Mask2D.circular( + shape_native=dataset.shape_native, + pixel_scales=dataset.pixel_scales, + radius=2.5, +) + +dataset = dataset.apply_mask(mask=mask) +dataset = dataset.apply_over_sampling(over_sample_size_pixelization=1) + +aplt.subplot_imaging_dataset(dataset=dataset) + +""" +We retain one sample per image pixel for the indexed mapping demonstration below. As before, the sampling accuracy would need checking before interpreting a scientific fit. + +__Giving the inversion an incorrect mass model__ + +Let’s begin with a mass model whose Einstein radius is `0.8` arcsec—half the value used in the simulation. + +Everything else remains fixed, including the mass ellipticity, external shear, mesh dimensions and regularization coefficient. We then ask the inversion to reconstruct whatever source best satisfies this model’s mappings and smoothness prior. + +This is the kind of incorrect mass model that a non-linear search could encounter while exploring a broad parameter range. +""" + +# Match mesh size to capped smoke data; normal tutorial runs retain 25 x 25. +mesh_shape = (8, 8) if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE else (25, 25) + +def fit_at_einstein_radius(einstein_radius, coefficient=1.0): + lens_galaxy = al.Galaxy( + redshift=0.5, + mass=al.mp.Isothermal( + centre=(0.0, 0.0), + einstein_radius=einstein_radius, + ell_comps=al.convert.ell_comps_from( + axis_ratio=0.9, + angle=45.0, + ), + ), + ) + + field = al.MassField( + redshift=0.5, + shear=al.mp.ExternalShear( + gamma_1=0.05, + gamma_2=0.05, + ), + ) + + source_galaxy = al.Galaxy( + redshift=1.0, + pixelization=al.Pixelization( + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=al.reg.Constant(coefficient=coefficient), + ), + ) + + tracer = al.Tracer( + galaxies=[lens_galaxy, source_galaxy], + fields=[field], + ) + + return al.FitImaging( + dataset=dataset, + tracer=tracer, + settings=al.Settings(use_border_relocator=True), + ) + + +incorrect_fit = fit_at_einstein_radius(einstein_radius=0.8) + +aplt.subplot_fit_imaging(fit=incorrect_fit) +aplt.subplot_fit_imaging_of_planes(fit=incorrect_fit) + +""" +Inspect both the image residuals and the reconstructed source. The experiment is designed to show how an inversion can explain some of the observed structure even when the lens mass is substantially wrong. + +Under insufficient deflection, parts of the observed arcs can remain separated in the source plane. Instead of reconstructing one compact galaxy whose light produces multiple images, the inversion can assign brightness to those separate source regions. The source may begin to resemble a less strongly lensed version of the observed image. + +Such solutions are often called **demagnified solutions**. This is a different issue from the demagnified central image coordinates discussed in the borders tutorial: here, the problem concerns an alternative mass-and-source interpretation of the image. + +Border relocation does not remove this modelling ambiguity. + +__Comparing with the correct mass model__ + +Now repeat the reconstruction with the Einstein radius restored to `1.6` arcsec. + +The inversion still has the same mesh dimensions and regularization coefficient. Only the Einstein radius changes. This gives us a controlled comparison of how the mass model affects the source required to explain the image. +""" + +correct_fit = fit_at_einstein_radius(einstein_radius=1.6) + +source_vmax = max( + float(np.max(np.asarray(current_fit.inversion.reconstruction))) + for current_fit in [incorrect_fit, correct_fit] +) + +for label, current_fit in [ + ("Einstein Radius 0.8 Arcsec", incorrect_fit), + ("Einstein Radius 1.6 Arcsec", correct_fit), +]: + mapper = current_fit.inversion.cls_list_from(al.Mapper)[0] + + aaplt.plot_mapper( + mapper=mapper, + solution_vector=current_fit.inversion.reconstruction, + mesh_grid=mapper.source_plane_mesh_grid, + vmin=0.0, + vmax=source_vmax, + zoom_to_brightest=False, + title=label, + ) + + aplt.plot_array( + array=(dataset.data - current_fit.model_data) / dataset.noise_map, + title=f"{label}: Normalized Residuals", + ) + +""" +Compare the source morphology and its coordinate extent. With the correct mass model, the different images of the source should be brought into a mutually consistent source reconstruction. With an incorrect mass model, the inversion may need more extended or fragmented structure to account for them. + +This is where regularization and evidence become important. The inversion’s flexibility does not mean that all source reconstructions are equally preferred. A reconstruction requiring large variations between neighbouring brightnesses is treated differently from one that explains the data with a smoother source. + +Let’s compare image agreement and evidence directly. +""" + +for label, current_fit in [ + ("Incorrect mass model", incorrect_fit), + ("Correct mass model", correct_fit), +]: + normalized_residuals = np.asarray( + (dataset.data - current_fit.model_data) / dataset.noise_map + ) + + print(label) + print(" Chi-squared:", float(np.sum(normalized_residuals**2))) + print(" Log evidence:", float(current_fit.log_evidence)) + +""" +The expected lesson is that image agreement and source plausibility must be considered together. We should inspect the calculated evidence values rather than assume that the correct model wins by a particular amount. + +We have also held the coefficient fixed. A full model search would allow regularization to change, so these two evaluations do not establish the final relative preference after all model parameters have been explored. + +__Seeing how the mass model changes the mappings__ + +The source plots show the outcome, but the mappings help explain why it happens. + +Let’s select two small image regions on opposite sides of the lens and follow them into the source plane under each mass model. The image indexes stay the same: we are examining the same measured pixels through two different ray-tracing calculations. + +To isolate the physical ray tracing, we use the tracer directly. These plots show the coordinates before border relocation. +""" + +image_grid = dataset.grids.pixelization +image_coordinates = np.asarray(image_grid) + +index_groups = [ + np.argsort( + np.sum( + (image_coordinates - np.asarray(position)) ** 2, + axis=1, + ) + )[:8].tolist() + for position in [(0.0, 1.6), (0.0, -1.6)] +] + +aaplt.plot_grid( + grid=image_grid, + indexes=index_groups, + title="The Same Two Image Regions", +) + +for label, current_fit in [ + ("Einstein Radius 0.8 Arcsec", incorrect_fit), + ("Einstein Radius 1.6 Arcsec", correct_fit), +]: + traced_grid = current_fit.tracer.traced_grid_2d_list_from( + grid=image_grid + )[1] + + aaplt.plot_grid( + grid=traced_grid, + indexes=index_groups, + title=f"{label}: Ray-Traced Coordinates", + ) + +""" +Look at the relative positions of the coloured groups. Changing the mass model changes whether image regions can be explained by nearby parts of the source or require brightness in more widely separated regions. + +These groups were chosen to illustrate the geometry, not identified as exact images of the same source feature. We should therefore not expect their traced coordinates to coincide perfectly, even for the correct model. + +For a stronger constraint, we can identify image positions that genuinely correspond to the same source feature and require them to trace close together. We will introduce that idea when preparing the model search. + +**🤖 Ask AI:** How can an incorrect mass model still fit an arc if the source reconstruction is allowed to place light in several separate source regions? + +__Why evidence does not remove the search difficulty__ + +Even if the correct mass model has higher evidence than our deliberately incorrect example, the non-linear search still has to find it. + +A pixelized source can provide tolerable image fits across a broad range of incorrect mass models. This can create competing regions of parameter space that require substantial exploration. Solving the source brightnesses efficiently does not make the remaining non-linear problem trivial or guarantee that a search finds the relevant solution. + +Let’s examine a simple slice through this problem by changing only the Einstein radius. At every value, we reconstruct a new source and calculate its evidence. +""" + +einstein_radii = np.array( + [0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0] +) + +known_fits = { + 0.8: incorrect_fit, + 1.6: correct_fit, +} + +log_evidences = [] + +for einstein_radius in einstein_radii: + einstein_radius = float(einstein_radius) + + if einstein_radius in known_fits: + current_fit = known_fits[einstein_radius] + else: + current_fit = fit_at_einstein_radius( + einstein_radius=einstein_radius + ) + + log_evidences.append(float(current_fit.log_evidence)) + +log_evidences = np.asarray(log_evidences) + +if not np.all(np.isfinite(log_evidences)): + raise ValueError( + "Inspect the non-finite evidence values before interpreting this scan." + ) + +fig, ax = plt.subplots() +ax.plot( + einstein_radii, + log_evidences - np.max(log_evidences), + marker="o", +) +ax.axvline( + 1.6, + color="black", + linestyle="--", + label="Simulation Einstein radius", +) +ax.set_xlabel("Einstein radius (arcsec)") +ax.set_ylabel("Log evidence relative to the highest sampled value") +ax.set_title("A Fixed-Parameter Slice Through Lens-Model Space") +ax.legend() +plt.show() + +""" +This scan shows how the evidence behaves along one restricted direction. It is not a posterior distribution or an uncertainty measurement: the other mass parameters and regularization coefficient remain fixed, and we have sampled only a few radii. + +In a full search, those other parameters can vary together. An incorrect Einstein radius may be partly compensated for by changes in ellipticity, shear or source regularization, creating possibilities that this one-dimensional experiment cannot show. + +A useful strategy is therefore **search chaining**. We begin with a simpler source model to find a plausible region of lens parameter space, then introduce the pixelized source so that the detailed source structure can be reconstructed. + +The initial analytic source is a starting point, not the final description of the galaxy. Its purpose is to help establish the lensing geometry without giving the source enough freedom to reproduce almost any image arrangement. + +In the next blocks, we will turn that idea into a model-search setup and explain how corresponding image positions can help reject misleading solutions. We will also introduce foreground lens light, which must be modelled alongside the pixelized source. + +__Starting with a simpler source model__ + +The misleading reconstructions we have just examined arise because a pixelized source has enough freedom to compensate for some incorrect mass models. + +A useful starting point is therefore a source model with less freedom. We first fit an analytic light profile, using it to establish a plausible lensing geometry. Once that fit has identified a useful region of parameter space, we replace the analytic source with a pixelization. + +This is search chaining, introduced in chapter 2. Here, the reason for chaining is particularly important: we want the pixelized reconstruction to improve the description of the source without beginning its search among a wide range of unrelated mass-and-source configurations. + +We use the multi-Gaussian expansion (MGE) from Chapter 2 as our baseline analytic source. Its fixed Gaussian widths and linearly solved intensities provide radial flexibility while a common centre and elliptical shape keep the geometry manageable. For a more complex galaxy, this first model may leave source structure unexplained. We would inspect those residuals and the inferred geometry before using it to initialize the next search. +""" + +import autofit as af + +mass = af.Model(al.mp.Isothermal) + +# Keep the mass centre fixed for this introductory experiment. +mass.centre = (0.0, 0.0) +mass.einstein_radius = af.UniformPrior( + lower_limit=0.5, + upper_limit=2.5, +) + +lens = af.Model( + al.Galaxy, + redshift=0.5, + mass=mass, +) + +field = af.Model( + al.MassField, + redshift=0.5, + shear=af.Model(al.mp.ExternalShear), +) + +source = af.Model( + al.Galaxy, + redshift=1.0, + bulge=al.model_util.mge_model_from( + mask_radius=2.5, total_gaussians=20, centre_prior_is_uniform=False, + ), +) + +model_1 = af.Collection( + galaxies=af.Collection( + lens=lens, + source=source, + ), + fields=field, +) + +print(model_1.info) + +""" +Unlike our earlier experiments, the Einstein radius, mass ellipticity and external shear are now free. The MGE group’s common centre and elliptical shape are also free. Its Gaussian widths are fixed, and all Gaussian intensities are solved linearly. + +Inspect `model_1.info` to see the complete set of free parameters and their priors. The known simulation values provide a check on the result; they are not supplied as the answer to the search. + +__Running and inspecting the initial search__ + +We now perform a model fit. For each proposal, the search changes the non-linear parameters, predicts the image and evaluates its agreement with the data. + +This is different from calling `FitImaging` with specified parameter values. The search explores alternatives and produces samples that describe the inferred parameter distribution. +""" + +search_1 = af.Nautilus( + path_prefix=Path("howtolens") / "chapter_3" / "tutorial_4", + name="search_1_analytic_source", + unique_tag="simple_no_lens_light", + n_live=100, +) + +analysis_1 = al.AnalysisImaging(dataset=dataset) + +result_1 = search_1.fit( + model=model_1, + analysis=analysis_1, +) + +print(result_1.info) + +initial_fit = result_1.max_log_likelihood_fit + +aplt.subplot_fit_imaging(fit=initial_fit) +aplt.subplot_fit_imaging_of_planes(fit=initial_fit) + +""" +Before continuing, inspect the model image, residuals and source. The purpose of this first fit is to establish a credible starting geometry, so a poor or clearly misleading solution should not simply be passed to the next search. + +For this simulated example, we can also compare the recovered Einstein radius with the input value of `1.6` arcsec. In an observed system, that answer would not be available; we would rely on the fit diagnostics, image configuration and parameter constraints. + +The maximum-likelihood fit is useful for visualization, but it is only one model. The result summary and samples are needed to assess uncertainty and whether the search adequately explored the parameters. + +__Requiring corresponding images to trace together__ + +Search chaining gives us a useful starting point, but we can also impose a simple geometric check. + +If several image positions represent the same source feature, a plausible mass model should trace them close together in the source plane. An incorrect model that reconstructs them as unrelated pieces of source light fails this check. + +The `PositionsLH` object applies a penalty when the traced positions are separated by more than a chosen threshold. Models that bring them within the threshold receive no positions penalty. + +`PositionsLH` penalizes demagnified solutions whose corresponding image positions fail to trace sufficiently close together. + +We can identify corresponding positions manually, but our initial fit also provides a way to estimate them. The following method uses the fitted source centre and mass model to predict its multiple-image positions and constructs a positions constraint for the next search. +""" + +positions_likelihood = result_1.positions_likelihood_from( + factor=3.0, + minimum_threshold=0.2, +) + +positions = positions_likelihood.positions + +print("Image-plane positions:") +print(positions) +print( + "Source-plane separation threshold:", + positions_likelihood.threshold, + "arcsec", +) + +aplt.plot_array( + array=dataset.data, + positions=positions, + title="Multiple-Image Positions Predicted by the Initial Fit", +) + +traced_positions = initial_fit.tracer.traced_grid_2d_list_from( + grid=positions +)[1] + +aaplt.plot_grid( + grid=traced_positions, + title="Predicted Image Positions Traced to the Source Plane", +) + +""" +These positions are predictions from the initial model, not independent measurements. Check that they correspond sensibly to the observed image configuration before using them. + +The threshold should be loose enough to allow the mass model to improve. We are trying to reject grossly inconsistent mappings, not force every subsequent model to reproduce the initial solution exactly. Here, `factor` enlarges the separation estimated from the initial result, while `minimum_threshold` prevents the returned threshold from becoming smaller than `0.2` arcsec. + +This positions penalty is a modelling aid rather than a replacement for the image likelihood. It does not by itself establish that the mass model is correct, and an inappropriate set of positions or an overly restrictive threshold can exclude useful solutions. + +__Replacing the analytic source with a pixelization__ + +We are ready to construct the second model. + +The lens mass and shear remain free, but their priors are initialized from the first result using the prior-passing machinery introduced in chapter 2. The source profile is replaced by a rectangular mesh and a regularization model. + +The distinction between `result_1.model` and `result_1.instance` matters here. Using the model carries free parameters into the next search. Using the instance would instead fix those components to particular fitted values. +""" + +regularization = af.Model(al.reg.Constant) +regularization.coefficient = af.LogUniformPrior( + lower_limit=1.0e-3, + upper_limit=1.0e3, +) + +pixelization = af.Model( + al.Pixelization, + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=regularization, +) + +pixelized_source = af.Model( + al.Galaxy, + redshift=1.0, + pixelization=pixelization, +) + +model_2 = af.Collection( + galaxies=af.Collection( + lens=result_1.model.galaxies.lens, + source=pixelized_source, + ), + fields=result_1.model.fields, +) + +print(model_2.info) + +""" +Inspect the resulting priors rather than assuming that they are suitable simply because they came from an earlier fit. In particular, a restrictive analytic source can bias an initial mass estimate; its result should guide the next search without preventing the mass model from changing. + +The mesh shape stays fixed. The regularization coefficient is now a non-linear parameter, explored alongside the mass and shear parameters. + +The hundreds of source brightnesses do not appear as hundreds of additional search parameters. For each proposal, the inversion reconstructs those values using the proposed mass model and coefficient. + +__Running the pixelized-source search__ + +The second search combines the pixelized model with the positions constraint. + +For each proposed mass model, the analysis checks the positions condition and evaluates the source reconstruction as appropriate. The search can adjust the lens parameters and regularization coefficient, while each inversion solves for the source brightnesses. +""" + +analysis_2 = al.AnalysisImaging( + dataset=dataset, + positions_likelihood_list=[positions_likelihood], + settings=al.Settings(use_border_relocator=True), +) + +search_2 = af.Nautilus( + path_prefix=Path("howtolens") / "chapter_3" / "tutorial_4", + name="search_2_pixelized_source", + unique_tag="simple_no_lens_light", + n_live=100, +) + +result_2 = search_2.fit( + model=model_2, + analysis=analysis_2, +) + +print(result_2.info) + +pixelized_fit = result_2.max_log_likelihood_fit + +aplt.subplot_fit_imaging(fit=pixelized_fit) +aplt.subplot_fit_imaging_of_planes(fit=pixelized_fit) + +""" +Compare this result with the analytic-source fit. Inspect the source structure and image residuals, then examine how the inferred mass parameters and their uncertainties have changed. + +For this simple simulated source, an MGE can already describe its smooth light distribution, so a pixelization need not produce a dramatic improvement. Its value becomes clearer for irregular sources that cannot be described adequately by the initial profile. This example teaches the modelling procedure without requiring that extra complication. + +We can also check whether the displayed pixelized model satisfies the positions threshold. +""" + +final_source_positions = pixelized_fit.tracer.traced_grid_2d_list_from( + grid=positions +)[1] + +coordinates = np.asarray(final_source_positions) +separations = np.linalg.norm( + coordinates[:, None, :] - coordinates[None, :, :], + axis=-1, +) +maximum_separation = float(np.max(separations)) + +print( + "Maximum source-plane separation:", + maximum_separation, + "arcsec", +) +print( + "Positions threshold:", + positions_likelihood.threshold, + "arcsec", +) +print( + "Within threshold:", + maximum_separation <= positions_likelihood.threshold, +) + +""" +Passing this check means the selected positions trace sufficiently close together under this model. It does not replace inspecting the residuals, uncertainties or search behaviour. + +We have now performed a chained fit with a pixelized source and a free mass model. The next blocks introduce foreground lens light, explaining how its analytic profiles are fitted alongside the source reconstruction and why errors in that light model can affect the inferred source. + +__Establishing the foreground light model__ + +We can model the foreground lens galaxy’s light and reconstruct a pixelized background source within the same fit. The foreground light profile and the lensed source contribute together to the predicted image. + +However, fitting everything from the outset gives the search several problems to solve at once. It must establish the mass distribution, separate foreground light from source light, and choose an appropriate source reconstruction. + +Search chaining helps us approach these problems in stages. We begin with MGE light models for both galaxies, following Chapter 2. This simpler source description provides a useful starting lens geometry and lets us establish the foreground light model before introducing a pixelization. + +Let’s perform that initial fit using a simulated dataset containing foreground lens light. This is a new dataset, so we run a new search rather than reuse the result from our earlier no-lens-light example. +""" + +from pathlib import Path +import subprocess +import sys + +import autofit as af +import autolens as al +import autolens.plot as aplt + +foreground_dataset_path = Path("dataset") / "imaging" / "lens_sersic" + +if al.util.dataset.should_simulate(str(foreground_dataset_path)): + subprocess.run( + [sys.executable, "scripts/simulator/lens_sersic.py"], + check=True, + ) + +foreground_dataset = al.Imaging.from_fits( + data_path=foreground_dataset_path / "data.fits", + noise_map_path=foreground_dataset_path / "noise_map.fits", + psf_path=foreground_dataset_path / "psf.fits", + pixel_scales=0.1, +) + +mask = al.Mask2D.circular( + shape_native=foreground_dataset.shape_native, + pixel_scales=foreground_dataset.pixel_scales, + radius=2.5, +) +foreground_dataset = foreground_dataset.apply_mask(mask=mask) + +over_sample_size = al.util.over_sample.over_sample_size_via_radial_bins_from( + grid=foreground_dataset.grid, + sub_size_list=[32, 8, 2], + radial_list=[0.3, 0.6], + centre_list=[(0.0, 0.0)], +) +foreground_dataset = foreground_dataset.apply_over_sampling( + over_sample_size_lp=over_sample_size, + over_sample_size_pixelization=2, +) + +aplt.subplot_imaging_dataset(dataset=foreground_dataset) + +lens_bulge = al.model_util.mge_model_from( + mask_radius=2.5, total_gaussians=20, gaussian_per_basis=2, + centre_prior_is_uniform=True, + sigma_min=foreground_dataset.pixel_scales[0] / 10.0, +) +for gaussian in lens_bulge.profile_list: + gaussian.centre = (0.0, 0.0) + +mass = af.Model(al.mp.Isothermal) +mass.centre = (0.0, 0.0) +mass.einstein_radius = af.UniformPrior( + lower_limit=0.5, + upper_limit=2.5, +) + +lens = af.Model( + al.Galaxy, + redshift=0.5, + bulge=lens_bulge, + mass=mass, +) + +source = af.Model( + al.Galaxy, + redshift=1.0, + bulge=al.model_util.mge_model_from( + mask_radius=2.5, total_gaussians=20, centre_prior_is_uniform=False, + ), +) + +field = af.Model( + al.MassField, + redshift=0.5, + shear=af.Model(al.mp.ExternalShear), +) + +foreground_model_1 = af.Collection( + galaxies=af.Collection(lens=lens, source=source), + fields=field, +) + +foreground_search_1 = af.Nautilus( + path_prefix=Path("howtolens") / "chapter_3" / "tutorial_4", + name="foreground_search_1_analytic_source", + unique_tag="lens_sersic", + n_live=100, +) + +foreground_analysis_1 = al.AnalysisImaging( + dataset=foreground_dataset, +) + +foreground_result_1 = foreground_search_1.fit( + model=foreground_model_1, + analysis=foreground_analysis_1, +) + +print(foreground_result_1.info) + +aplt.subplot_fit_imaging( + fit=foreground_result_1.max_log_likelihood_fit, +) +aplt.subplot_fit_imaging_of_planes( + fit=foreground_result_1.max_log_likelihood_fit, +) + +""" +We fix the foreground light and mass centres for this introductory example, while allowing their other parameters to vary. The foreground MGE uses two Gaussian groups, which can have different elliptical shapes; the source uses one. Their Gaussian widths are fixed and all Gaussian intensities are solved linearly. + +Before continuing, inspect the foreground model and residuals. We want a satisfactory description of the lens light and a plausible source geometry. For an irregular source, the analytic profile may leave structure unexplained, but obvious foreground residuals should not simply be passed into the next stage. + +This is a genuine non-linear search, so it will take longer than evaluating a single `FitImaging`. + +__Using that result in the pixelized-source fit__ + +We now replace the analytic source with a pixelization and carry the foreground model into the second search. + +The distinction between `.model` and `.instance` is useful here. We use `.instance` to hold the foreground profile’s fitted shape fixed, reducing the number of non-linear parameters the next search must explore. We use `.model` for the mass and shear so that they remain free, with priors passed from the first result. + +Because the foreground MGE uses linear Gaussian profiles, fixing its geometry does **not** fix its intensities. The second fit solves all Gaussian intensities alongside the pixelized source brightnesses. The foreground subtraction can therefore adjust without reopening the non-linear Gaussian geometry. + +Search chaining also supplies the initial geometry from which we construct the positions constraint. **`PositionsLH` penalizes demagnified solutions whose corresponding image positions fail to trace sufficiently close together.** +""" + +lens = af.Model( + al.Galaxy, + redshift=0.5, + bulge=foreground_result_1.instance.galaxies.lens.bulge, + mass=foreground_result_1.model.galaxies.lens.mass, +) + +regularization = af.Model(al.reg.Constant) +regularization.coefficient = af.LogUniformPrior( + lower_limit=1.0e-3, + upper_limit=1.0e3, +) + +source = af.Model( + al.Galaxy, + redshift=1.0, + pixelization=af.Model( + al.Pixelization, + mesh=al.mesh.RectangularUniform(shape=mesh_shape), + regularization=regularization, + ), +) + +foreground_model_2 = af.Collection( + galaxies=af.Collection(lens=lens, source=source), + fields=foreground_result_1.model.fields, +) + +foreground_positions_likelihood = ( + foreground_result_1.positions_likelihood_from( + factor=3.0, + minimum_threshold=0.2, + ) +) + +aplt.plot_array( + array=foreground_dataset.data, + positions=foreground_positions_likelihood.positions, + title="Positions Predicted by the Initial Foreground-Light Fit", +) + +print(foreground_model_2.info) + +foreground_analysis_2 = al.AnalysisImaging( + dataset=foreground_dataset, + positions_likelihood_list=[foreground_positions_likelihood], + settings=al.Settings(use_border_relocator=True), +) + +foreground_search_2 = af.Nautilus( + path_prefix=Path("howtolens") / "chapter_3" / "tutorial_4", + name="foreground_search_2_pixelized_source", + unique_tag="lens_sersic", + n_live=100, +) + +foreground_result_2 = foreground_search_2.fit( + model=foreground_model_2, + analysis=foreground_analysis_2, +) + +print(foreground_result_2.info) + +aplt.subplot_fit_imaging( + fit=foreground_result_2.max_log_likelihood_fit, +) +aplt.subplot_fit_imaging_of_planes( + fit=foreground_result_2.max_log_likelihood_fit, +) + +""" +Inspect the predicted positions before running the second search, as we did earlier. They come from the initial model and should sensibly represent the multiple-image configuration. + +The second search now starts with an established foreground light shape and lens geometry. It can refine the mass and regularization while reconstructing the source, rather than solving the entire problem from broad initial priors. + +Compare the two results, paying attention to the foreground subtraction, source reconstruction and residuals. If the fixed foreground shape leaves significant residuals, a later chained search can free its parameters again. Fixing it is a useful intermediate step, not a requirement that the initial light model must remain unchanged throughout the analysis. + +__Wrap Up__ + +This completes the practical chain: fit MGE lens and source light, carry forward the foreground geometry and mass priors, then fit a pixelized source with the positions constraint. +""" diff --git a/scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py b/scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py deleted file mode 100644 index f0dca00..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py +++ /dev/null @@ -1,649 +0,0 @@ -""" -Tutorial 5: Bayesian Formalism -============================== - -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. - -This tutorial collects the linear algebra behind all of that in one place. It is the counterpart of chapter 1's -tutorial 3 on the lensing formalism: the hands-on tutorials built intuition, and now we write down the equations. -We will construct, step-by-step and in code, every matrix and vector the inversion uses, solve for the source -reconstruction ourselves and compute the Bayesian evidence by hand, comparing our answer at the end to the -`FitImaging` object which performs this calculation internally. - -None of this is required to *use* **PyAutoLens** for lens modeling. However, if you publish results which use a -pixelization, this is the calculation your paper's likelihood function section will describe, and understanding it -removes any sense that the source reconstruction is a "black box". - -The formalism follows Warren & Dye 2003 (https://arxiv.org/abs/astro-ph/0302587), hereafter WD03, with the data -vector notation of Nightingale & Dye 2015 (https://arxiv.org/abs/1412.7436), hereafter N15. The Bayesian evidence -was derived by Suyu et al. 2006 (https://arxiv.org/abs/astro-ph/0601493) and translated to **PyAutoLens** notation -in Dye et al. 2008 (https://arxiv.org/abs/0804.4002). - -__Contents__ - -- **Initial Setup:** Load the dataset, mask it and disable over sampling so the algebra stays simple. -- **Mesh Shape:** Fix the rectangular mesh's shape and note why edge pixels are zeroed. -- **Ray Tracing:** Trace the masked image-pixel coordinates to the source-plane via the lens equation. -- **Border Relocation:** Relocate demagnified coordinates that trace far outside the source-plane border. -- **Source Pixel Centres:** Overlay the rectangular mesh over the traced coordinates. -- **Interpolation:** Pair every traced image-pixel with source pixels via bilinear interpolation. -- **Mapper:** Package the interpolation into a `Mapper` describing all image-to-source mappings. -- **Mapping Matrix:** Express the mappings as the 2D matrix $f$. -- **Blurred Mapping Matrix:** Convolve every column of $f$ with the imaging PSF. -- **Data Vector:** Compute the data vector $D$ from the blurred mapping matrix, data and noise-map. -- **Curvature Matrix:** Compute the curvature matrix $F$. -- **Unregularized Solve:** Solve $s = F^{-1} D$ and see the over-fitted mess this produces. -- **Regularization Matrix:** Compute the regularization matrix $H$ encoding the smoothness prior. -- **Source Reconstruction:** Solve the regularized system $s = [F + H]^{-1} D$. -- **Image Reconstruction:** Map the reconstruction back to the image-plane via the blurred mapping matrix. -- **Likelihood Function:** The five terms which combine into the log evidence. -- **Chi Squared:** The goodness-of-fit of the reconstructed image to the data. -- **Regularization Term:** The penalty $s^{T} H s$ applied by the smoothness prior. -- **Complexity Terms:** The log determinant terms which penalize complex source reconstructions. -- **Noise Normalization Term:** The Gaussian noise normalization. -- **Log Evidence:** Combine all five terms into the log evidence. -- **Fit:** Compare our by-hand log evidence to the `FitImaging` object's internal calculation. -- **Wrap Up:** Summary and next steps. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -import matplotlib.pyplot as plt -import numpy as np -from pathlib import Path - -import autolens as al -import autolens.plot as aplt - -""" -__Initial Setup__ - -we'll use the same strong lensing data as the previous tutorials, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. - -Because the lens galaxy's light is omitted, the data is already "lens subtracted". WD03 make the same assumption, -so in the equations below the lens light model $b_{j}$ is zero everywhere. For a lens with light, one simply computes -the lens galaxy's PSF-convolved image first and subtracts it from the data before the steps below (the workspace -guide referenced at the end shows this in full). -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -__Mask__ - -The likelihood is only evaluated within a mask, which we define as a 3.0" circle containing all of the lensed -source's light. -""" -mask = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=3.0, -) - -masked_dataset = dataset.apply_mask(mask=mask) - -aplt.subplot_imaging_dataset(dataset=masked_dataset) - -""" -__Over Sampling__ - -Over sampling splits every image pixel into a sub-grid of sub-pixels, each of which is traced to the source-plane -and paired with source pixels individually. It improves accuracy, but it also multiplies the number of rows in every -matrix below by the number of sub-pixels. - -To keep the algebra as easy to follow as possible, we disable over sampling by setting both sub-grid sizes to 1, so -each image pixel is represented by the single coordinate at its centre. -""" -masked_dataset = masked_dataset.apply_over_sampling( - over_sample_size_lp=1, - over_sample_size_pixelization=1, -) - -""" -__Mesh Shape__ - -The `mesh_shape` defines the number of pixels in the rectangular mesh used to reconstruct the source, set below -to 20 x 20 = 400 source pixels. - -We use the `RectangularUniform` mesh, where all rectangular source pixels have the same size, rather than the -`RectangularBilinearAdaptDensity` mesh used in the previous tutorials. The uniform mesh keeps the geometry simple, and every -equation below applies unchanged to the adaptive meshes -- only the source pixel centres move. - -By default, source pixels at the edge of the mesh are forced to solutions of zero flux by the linear algebra solver. -This prevents unphysical solutions where the mesh edge lights up to fit residuals, and does not change any of the -formalism below. -""" -mesh_pixels_yx = 20 -mesh_shape = (mesh_pixels_yx, mesh_pixels_yx) - -""" -__Tracer__ - -We use the same lens system mass model as the previous tutorials (an `Isothermal` galaxy plus a separate `ExternalShear` field, the true -model of the simulated data) and a source galaxy whose `Pixelization` pairs the `RectangularUniform` mesh with -`Constant` regularization (whose role appears later, when we reach the matrix $H$). -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), -) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularUniform(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - -r""" -__Ray Tracing__ - -Every 2D (y,x) image-plane coordinate $\theta$ is ray-traced to its source-plane coordinate $\beta$ by subtracting -the deflection angles $\alpha$ of the mass profiles, via the lens equation we met in chapter 1: - - $\beta = \theta - \alpha(\theta)$ - -The pixelization uses its own grid of coordinates, `masked_dataset.grids.pixelization`, with one coordinate at the -centre of every masked image pixel (because we disabled over sampling above). We trace this grid to the source-plane, -taking the final entry of the traced grid list (the source-plane). -""" -traced_grid_pixelization = tracer.traced_grid_2d_list_from( - grid=masked_dataset.grids.pixelization -)[-1] - -aplt.plot_grid(grid=traced_grid_pixelization, title="Traced Source-Plane Grid") - -""" -__Border Relocation__ - -Coordinates which pass close to the mass profile's centre are heavily demagnified and can trace to the far outskirts -of the source-plane. - -We relocate these coordinates to the edge of the source-plane border (defined via the border of the image-plane -mask), exactly as tutorial 6 explains in detail (see also figure 2 of https://arxiv.org/abs/1708.07377). This stops -a handful of demagnified coordinates stretching the mesh over a huge, empty region of the source-plane. -""" -from autoarray.inversion.mesh.border_relocator import BorderRelocator - -border_relocator = BorderRelocator(mask=masked_dataset.mask, sub_size=1) - -relocated_grid = border_relocator.relocated_grid_from(grid=traced_grid_pixelization) - -aplt.plot_grid(grid=relocated_grid, title="Relocated Source-Plane Grid") - -""" -__Source Pixel Centres__ - -To reconstruct the source on a `RectangularUniform` mesh, we need the centres of its rectangular source pixels. - -We compute these by overlaying a uniform rectangular grid over the relocated traced grid, sized so the mesh fully -contains the region of the source-plane the traced image-pixels cover, without wasted edge pixels beyond it. -""" -from autoarray.inversion.mesh.mesh.rectangular_rtu_adapt_density import ( - overlay_grid_from, -) - -mesh_grid = overlay_grid_from( - shape_native=mesh_shape, grid=al.Grid2DIrregular(relocated_grid) -) - -""" -__Interpolation__ - -We now combine the two grids to create an `Interpolator`, which describes how every traced image-pixel coordinate -maps to the rectangular mesh pixels. - -For a rectangular mesh the scheme is bilinear interpolation: every image pixel maps to the rectangular pixel it -lands in *and* its three nearest neighbours, with weights set by how close the coordinate is to each pixel centre. -Interpolation is what lets the mesh reconstruct smooth source morphologies. We can print the mappings and weights of -the first image pixel to confirm it pairs with four source pixels. -""" -interpolator = pixelization.mesh.interpolator_from( - source_plane_data_grid=relocated_grid, - source_plane_mesh_grid=mesh_grid, -) - -print(interpolator.mappings[0]) -print(interpolator.weights[0]) - -""" -__Mapper__ - -The interpolator creates a `Mapper`, the object tutorials 1 and 2 introduced. It packages up the mapping between -every image pixel and every rectangular source pixel. - -The key attribute is `pix_indexes_for_sub_slim_index`, mapping every image-pixel index (`sub_slim_index`) to the -source-pixel indexes (`pix_indexes`) it interpolates onto, alongside the number of mappings per image pixel and -their interpolation weights. -""" -mapper = al.Mapper(interpolator=interpolator) - -pix_indexes_for_sub_slim_index = mapper.pix_indexes_for_sub_slim_index - -print(pix_indexes_for_sub_slim_index[0:9]) -print(mapper.pix_sizes_for_sub_slim_index[0:9]) -print(mapper.pix_weights_for_sub_slim_index[0:9]) - -""" -__Mapping Matrix__ - -The `mapping_matrix` expresses these image-pixel to source-pixel mappings as a single 2D matrix, with -dimensions `(total_image_pixels, total_source_pixels)`. - -Each column is the "image" of one source pixel: entries are the interpolation weights for image pixels which map to -that source pixel and zero everywhere else. -""" -mapping_matrix = al.util.mapper.mapping_matrix_from( - pix_indexes_for_sub_slim_index=pix_indexes_for_sub_slim_index, - pix_size_for_sub_slim_index=mapper.pix_sizes_for_sub_slim_index, - pix_weights_for_sub_slim_index=mapper.pix_weights_for_sub_slim_index, - pixels=mapper.pixels, - total_mask_pixels=mapper.source_plane_data_grid.mask.pixels_in_mask, - slim_index_for_sub_slim_index=mapper.slim_index_for_sub_slim_index, - sub_fraction=mapper.over_sampler.sub_fraction, -) - -plt.imshow(mapping_matrix, aspect=(mapping_matrix.shape[1] / mapping_matrix.shape[0])) -plt.show() -plt.close() - -""" -Because each column is an image of zeros and interpolation weights, we can plot any column as a 2D image showing all -image pixels its source pixel maps to. For a source pixel near the mesh centre these image pixels trace the multiple -images of that patch of the source. -""" -source_pixel_index = 210 - -array_2d = al.Array2D( - values=mapping_matrix[:, source_pixel_index], mask=masked_dataset.mask -) - -aplt.plot_array(array=array_2d, title="Image of Source Pixel 210") - -""" -__Blurred Mapping Matrix__ - -The imaging data is blurred by the telescope's PSF, so the model must be too. Since each column of the mapping -matrix is an image, we simply convolve each column with the PSF via 2D convolution. - -This produces the `blurred_mapping_matrix`, with the same dimensions `(total_image_pixels, total_source_pixels)`. - -In WD03 this matrix is denoted $f_{ij}$, where $i$ runs over all $I$ source pixels and $j$ over all $J$ image -pixels. For example: - - - $f_{0, 2} = 0.3$ indicates that image-pixel $2$ maps to source-pixel $0$ with a weight of $0.3$ after PSF - convolution. - - $f_{4, 8} = 0$ indicates that image-pixel $8$ does not map to source-pixel $4$, even after PSF convolution. - -(The indexing of the code's `mapping_matrix` is transposed relative to WD03's $f$: image pixels are the first index -in the code, but the second index in the equations.) - -PSF blurring has an important consequence: whereas before, no two source pixels shared an image pixel, blurring -correlates neighbouring columns, so the images of nearby source pixels now overlap. -""" -blurred_mapping_matrix = masked_dataset.psf.convolved_mapping_matrix_from( - mapping_matrix=mapping_matrix, mask=masked_dataset.mask -) - -plt.imshow( - blurred_mapping_matrix, - aspect=(blurred_mapping_matrix.shape[1] / blurred_mapping_matrix.shape[0]), -) -plt.colorbar() -plt.show() -plt.close() - -r""" -__Data Vector (D)__ - -We now pose the reconstruction as a linear inversion, converting the blurred mapping matrix, data and noise-map -into two objects: the data vector $D$ and the curvature matrix $F$. - -The data vector has dimensions `(total_source_pixels,)` and is given by (WD03 / N15): - - $\vec{D}_{i} = \sum_{j=1}^{J} f_{ij} (d_{j} - b_{j}) / \sigma_{j}^2 \, \, .$ - -Where: - - - $d_{j}$ are the image-pixel data values. - - $b_{j}$ are the lens light model values ($d_{j} - b_{j}$ is the lens-subtracted image; zero for this dataset). - - $\sigma_{j}^2$ are the statistical uncertainties of each image pixel. - -Each entry of $D$ is therefore the noise-weighted overlap between one source pixel's blurred image and the data: -it measures how much evidence the data provides for flux in that source pixel, with the PSF fully accounted for. -""" -data_vector = al.util.inversion_imaging.data_vector_via_blurred_mapping_matrix_from( - blurred_mapping_matrix=blurred_mapping_matrix, - image=np.array(masked_dataset.data), - noise_map=np.array(masked_dataset.noise_map), -) - -plt.imshow( - data_vector.reshape(data_vector.shape[0], 1), aspect=10.0 / data_vector.shape[0] -) -plt.colorbar() -plt.show() -plt.close() - -r""" -__Curvature Matrix (F)__ - -The curvature matrix has dimensions `(total_source_pixels, total_source_pixels)` and is given by (WD03): - - ${F}_{ik} = \sum_{j=1}^{J} f_{ij} f_{kj} / \sigma_{j}^2 \, \, .$ - -Every entry of $F$ is the noise-weighted overlap between the blurred images of two source pixels: $F_{ik}$ sums the -product of columns $i$ and $k$ of $f$ over all image pixels. For $F_{ik}$ to be non-zero, source pixels $i$ and $k$ -must share at least one image pixel, which (interpolation aside) only happens because of PSF blurring. - -$F$ describes how degenerate pairs of source pixels are with one another: two source pixels whose blurred images -overlap heavily can trade flux between themselves whilst fitting the data almost equally well. -""" -curvature_matrix = al.util.inversion.curvature_matrix_via_mapping_matrix_from( - mapping_matrix=blurred_mapping_matrix, noise_map=masked_dataset.noise_map -) - -plt.imshow(curvature_matrix) -plt.colorbar() -plt.show() -plt.close() - -r""" -__Unregularized Solve__ - -The inversion seeks the source-pixel fluxes $s$ (a vector with one entry per source pixel) that minimize the -chi-squared: - - $\chi^2 = \sum_{j=1}^{J} \bigg[ \frac{(\sum_{i=1}^{I} s_{i} f_{ij}) + b_{j} - d_{j}}{\sigma_{j}} \bigg]^2$ - -Setting the derivative of $\chi^2$ with respect to each $s_{i}$ to zero gives the linear system whose solution is -(equation 5 of WD03): - - $s = F^{-1} D$ - -We can solve this directly with NumPy. (Without regularization the curvature matrix is often singular, so the loop -below adds a tiny value to its diagonal to avoid a `LinAlgError` -- it is a numerical crutch, not part of the -formalism.) -""" -for i in range(curvature_matrix.shape[0]): - curvature_matrix[i, i] += 1e-8 - -reconstruction = np.linalg.solve(curvature_matrix, data_vector) - -print(reconstruction) - -r""" -The reconstructed source-pixel fluxes are a noisy, unsmooth mess -- exactly the over-fitting we saw in tutorial 4 -when we set the regularization coefficient to zero. The linear inversion is fitting the noise in the data, because -this system of equations is ill-posed: we need a smoothness prior. - -__Regularization Matrix (H)__ - -Regularization adds a linear regularization term $G_{L}$ to the merit function we minimize (equation 11 of WD03): - - $G = \chi^2 + \lambda \, G_{L}$ - -where $\lambda$ is the `regularization_coefficient` controlling the degree of smoothing. The `Constant` scheme uses -gradient regularization (equation 14 of WD03): - - $G_{L} = \sum_{i}^{I} \sum_{n=1}^{N} [s_{i} - s_{i, n}]^2$ - -In words: for every source pixel, compare its flux with each of its $N$ neighbours $n$, and penalize solutions where -the differences are large. This is precisely the "smoothness prior" of tutorial 4, now written as an equation. - -To fold this into the linear algebra we define the regularization matrix $H$, with -dimensions `(total_source_pixels, total_source_pixels)` (equation 13 of WD03): - - $H_{ik} = \frac{1}{2} \frac{\partial^{2} G_{L}}{\partial s_{i} \partial s_{k}}$ - -$H$ has the coefficient $\lambda$ folded into it. Its non-zero off-diagonal entries mark pairs of source pixels -which are neighbours and therefore regularized with one another; most entries are zero because most source pixels -are not neighbours. -""" -regularization_matrix = al.util.regularization.constant_regularization_matrix_from( - coefficient=source_galaxy.pixelization.regularization.coefficient, - neighbors=mapper.neighbors, - neighbors_sizes=mapper.neighbors.sizes, -) - -plt.imshow(regularization_matrix) -plt.colorbar() -plt.show() -plt.close() - -""" -__Source Reconstruction (s)__ - -$H$ enters the linear system as follows (equation 12 of WD03): - - $s = [F + H]^{-1} D$ - -We add the two matrices and solve again. The diagonal jitter used above is no longer needed, because $H$ makes the -system well-posed. -""" -curvature_reg_matrix = np.add(curvature_matrix, regularization_matrix) - -reconstruction = np.linalg.solve(curvature_reg_matrix, data_vector) - -print(reconstruction) - -""" -The reconstructed fluxes are now smooth and physical: regularization has suppressed the noisy solution and the -reconstruction actually looks like a galaxy, without over-fitting the noise. - -__Image Reconstruction__ - -Using the reconstructed source-pixel fluxes, we map the source back to the image-plane via the blurred mapping -matrix (so the reconstructed image includes PSF blurring) to produce the model image of the lensed source. -""" -mapped_reconstructed_data = ( - al.util.inversion.mapped_reconstructed_data_via_mapping_matrix_from( - mapping_matrix=blurred_mapping_matrix, reconstruction=reconstruction - ) -) - -mapped_reconstructed_data = al.Array2D( - values=mapped_reconstructed_data, mask=masked_dataset.mask -) - -aplt.plot_array(array=mapped_reconstructed_data, title="Reconstructed Image") - -r""" -__Likelihood Function__ - -We now quantify the goodness-of-fit of the source reconstruction, computing the quantity tutorial 4 called the -Bayesian evidence. The log evidence consists of five terms: - - $-2 \, \mathrm{ln} \, \epsilon = \chi^2 + s^{T} H s + \mathrm{ln} \, [ \mathrm{det} (F + H) ] - \mathrm{ln} \, [ \mathrm{det} (H) ] + \sum_{j=1}^{J} \mathrm{ln} \, [2 \pi (\sigma_{j})^2 ] \, .$ - -This expression was first derived by Suyu et al. 2006 (https://arxiv.org/abs/astro-ph/0601493), equation (19), and -is given in **PyAutoLens** notation by Dye et al. 2008 (https://arxiv.org/abs/0804.4002), equation (5). - -We now compute each term in turn. - -__Chi Squared__ - -The first term is the $\chi^2$ statistic from the merit function above, computed as: - - - `model_data` = the reconstructed image of the lensed source (plus the lens light model, zero here). - - `residual_map` = (`data` - `model_data`) - - `normalized_residual_map` = (`data` - `model_data`) / `noise_map` - - `chi_squared_map` = (`normalized_residual_map`) ** 2.0 - - `chi_squared` = sum(`chi_squared_map`) - -High chi-squared values indicate image pixels the reconstruction fits poorly, lowering the likelihood. -""" -model_image = mapped_reconstructed_data - -residual_map = masked_dataset.data - model_image -normalized_residual_map = residual_map / masked_dataset.noise_map -chi_squared_map = normalized_residual_map**2.0 - -chi_squared = np.sum(chi_squared_map) - -print(chi_squared) - -r""" -__Regularization Term__ - -The second term, $s^{T} H s$, is the $\lambda \, G_{L}$ regularization penalty evaluated at the solution: the summed -difference in flux between all neighbouring source pixels, weighted by the regularization coefficient (which is -already folded into $H$). - -Less smooth solutions have larger values of this term and therefore lower likelihoods. -""" -regularization_term = np.matmul( - reconstruction.T, np.matmul(regularization_matrix, reconstruction) -) - -print(regularization_term) - -r""" -__Complexity Terms__ - -Up to this point, nothing has justified our choice of `regularization_coefficient=1.0`. We cannot choose it using -the two terms above, because increasing the coefficient smooths the solution more, which *both* worsens the -chi-squared *and* (for a fixed solution) raises the regularization penalty. Optimizing those two terms alone would -drive the coefficient to zero and put us right back at the over-fitted mess. - -The two log determinant terms, $\mathrm{ln} \, [ \mathrm{det} (F + H) ]$ and $- \mathrm{ln} \, [ \mathrm{det} (H) ]$, -fix this. Together they measure how *complex* the source reconstruction is -- roughly, how many effective degrees -of freedom the source uses after regularization correlates its pixels -- and penalize more complex solutions. -Lowering the regularization coefficient frees the source to use more of its flexibility, increasing this complexity -penalty. - -These terms therefore counteract the chi-squared and regularization terms, so the highest evidence goes to solutions -which fit the data well with the *simplest* source reconstruction. This is the Occam's razor behaviour that -tutorial 4 demonstrated empirically. -""" -log_curvature_reg_matrix_term = np.linalg.slogdet(curvature_reg_matrix)[1] -log_regularization_matrix_term = np.linalg.slogdet(regularization_matrix)[1] - -print(log_curvature_reg_matrix_term) -print(log_regularization_matrix_term) - -""" -__Noise Normalization Term__ - -The likelihood function assumes the imaging data consists of independent Gaussian noise in every image pixel, and -the final term is the normalization of those Gaussians: the sum of the log of every noise-map value squared. - -Because the noise-map is fixed, this term is constant throughout lens modeling and has no impact on the model -we infer -- it simply normalizes the likelihood. -""" -noise_normalization = float(np.sum(np.log(2 * np.pi * masked_dataset.noise_map**2.0))) - -print(noise_normalization) - -""" -__Log Evidence__ - -We can now combine the five terms into the log evidence of the source reconstruction. -""" -log_evidence = float( - -0.5 - * ( - chi_squared - + regularization_term - + log_curvature_reg_matrix_term - - log_regularization_matrix_term - + noise_normalization - ) -) - -print(log_evidence) - -""" -__Fit__ - -Everything above is what the `FitImaging` object does internally when it fits a tracer whose source galaxy has a -pixelization. We can see this by performing the fit and comparing its `log_evidence` to ours. - -The two values are close but not identical, because the real fit improves on our simplified solve in two ways -mentioned along the way: it uses the positive-only solver (tutorial 3), which forbids the negative source-pixel -fluxes our unconstrained `np.linalg.solve` permits, and it zeroes the pixels at the edge of the mesh. Neither -changes the formalism -- the same $f$, $D$, $F$ and $H$ feed a solver with extra constraints. -""" -fit = al.FitImaging( - dataset=masked_dataset, - tracer=tracer, - settings=al.Settings(use_border_relocator=True), -) - -print(fit.log_evidence) - -aplt.subplot_fit_imaging(fit=fit) - -""" -__Wrap Up__ - -We have walked through the complete linear algebra of a pixelized source reconstruction: - - - The `mapping_matrix` and PSF-blurred mapping matrix $f$, whose columns are the blurred images of each - source pixel. - - - The data vector $D$ and curvature matrix $F$, the noise-weighted overlaps of those images with the data and with - each other. - - - The regularization matrix $H$, which encodes the smoothness prior, and the linear solve $s = [F + H]^{-1} D$ for - the source reconstruction. - - - The five terms of the Suyu et al. 2006 log evidence -- chi-squared, the regularization penalty, the two log - determinant complexity terms and the noise normalization -- and their Bayesian interpretation as an Occam's - razor which favours the simplest source reconstruction the data allows. - -During lens modeling, this whole calculation is one likelihood evaluation: the non-linear search varies the mass -model (and, later in this chapter, the pixelization and regularization parameters), and each sample triggers the -full ray-trace, solve and evidence computation above. - -Two simplifications are worth remembering: real fits use over sampling (each image pixel contributes several -sub-pixel rows to $f$) and **PyAutoLens** uses a positive-only solver for $s$ rather than the unconstrained -`np.linalg.solve` used here (see tutorial 3). The workspace -guide `autolens_workspace/*/imaging/features/pixelization/likelihood_function.ipynb` repeats this walk-through with -lens light included and additional visualization of every step. - -In the next tutorial, we return to hands-on territory and look at borders, which deal with the demagnified traced -coordinates whose relocation we performed in a single line above. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_6_borders.py b/scripts/chapter_3_pixelizations/tutorial_6_borders.py deleted file mode 100644 index d875ba5..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_6_borders.py +++ /dev/null @@ -1,515 +0,0 @@ -""" -Tutorial 6: Borders -=================== - -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. - -In this tutorial, we will consider how the size of the pixelization grid is chosen and introduce the concept of a -border. The previous tutorial applied border relocation as a single step of the likelihood algebra -- here we see -why that step is needed. - -__Contents__ - -- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where. -- **Borders:** So, what is a border? -- **Wrap Up:** Summary of the script and next steps. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -from pathlib import Path -import autolens as al -import autolens.plot as aplt - -""" -__Initial Setup__ - -we'll use the same strong lensing data as the previous tutorial, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -aplt.subplot_imaging_dataset(dataset=dataset) - -dataset_unmasked = dataset - -""" -__Borders__ - -So, what is a border? In the image-plane, a border is the set of exterior pixels in a mask that are at its border. - -Lets apply a circular mask to the image and plot the dataset -- the border is the ring of pixels at the mask's edge. -""" -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.5, -) -dataset = dataset.apply_mask(mask=mask_circular) - -border = mask_circular.derive_grid.border - - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -As you can see, for a circular mask the border *is* the edge of the mask (the ring of black dots we're used to -seeing whenever we plot a mask). - -For an annular mask, pixels on its inner edge are not a part of the border, whereas those on its outer edge are. -""" - -mask_annular = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=0.8, - outer_radius=2.5, -) - -dataset = dataset.apply_mask(mask=mask_annular) - -border = mask_annular.derive_grid.border - - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -A border is therefore *only* the pixels at the exterior edge of a mask - -So, what does a border actually do? To show you, we'll need to fit this image with a lens model and inversion. We'll -use the same convenience function we used in the previous tutorial (to perform a quick source galaxy fit) with the -options to input a mask and use a border. -""" - - -def perform_fit_with_source_galaxy_mask_and_border( - dataset, source_galaxy, mask, settings -): - dataset = dataset.apply_mask(mask=mask) - - lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), - ) - field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) - ) - - tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - - return al.FitImaging(dataset=dataset, tracer=tracer, settings=settings) - - -""" -Okay, so lets first look at the mapper without using a border, using the annular mask. - -Note how we control the border via the `al.Settings` object's `use_border_relocator` input. -""" -# `PYAUTO_SMALL_DATASETS=1` (the CI smoke harness) caps the data to a 16 x 16 image, where a -# 40 x 40 mesh reconstructs 1600 source pixels from a few dozen image pixels. The mesh is -# capped alongside the data; a normal full-resolution run keeps the 40 x 40 grid described above. -mesh_shape = ( - al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - if dataset.shape_native == al.util.dataset.SMALL_DATASETS_SHAPE_NATIVE - else (40, 40) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -fit = perform_fit_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked, - source_galaxy=source_galaxy, - mask=mask_annular, - settings=al.Settings(use_border_relocator=False), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -""" -Everything looks fine, we get a reconstructed source on a visually appeasing source-plane grid. So, why are we so -worried about borders? Lets see what happens if we use a circular mask instead. -""" -fit = perform_fit_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=False), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - -aplt.plot_array( - array=fit.inversion.mapped_reconstructed_operated_data, - title="Inversion Reconstruction", -) - -""" -Woah, whats happened? There are lots of additional $(y,x)$ coordinates in the source-plane grid, some of which trace -to extremely large radii far away from the central regions of the source-plane! These points are the traced image-pixels -that correspond to the central image-pixels that the annular mask removed (e.g. they were at radii with 0.8" of the -centre). - -Lets quickly check this by plotting the indexes of these image-pixels. -""" -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") - -""" -So, why is this happening? What is the mass profile physically doing to create these source plane coordinates at -extremely large radial values? - -Towards the centre of the elliptical isothermal mass profile, the density begins to rise very sharply, it becomes -extremely steep or 'cuspy'. This cuspy behaviour towards its centre causes extremely large deflection angles to be -calculated. - -Central image pixels are therefore subjected to 'demagnification', whereby they trace to extremely large values in -the source plane! - -Physically, this is not a problem, and it is the reason we do not see a 'central image' in most strong lenses, as the -light-rays which take this path through the centre of the lens are demagnified. However, if the lens galaxy had a less -steep inner mass distribution (termed a 'core') we would see the central image. - -Demagnification is a problem for the pixelization and inversion though, which reconstruct the flux of these -demagnified pixels just like the other pixels in the image-pixel. There are two negative consequences: - - 1) The rectangular pixel-grid that we 'lay over' the source-plane becomes very large, because it expands to include - the demagnified image-pixels. As a result, larger source-pixels are used to reconstruct the central regions of the - source-plane (where the source galaxy is actually located), meaning we reconstruct the source-galaxy at a lower - effective resolution. - - 2) The inversion reconstructs the flux of the demagnified image pixels using source-pixels which contain *only* - demagnified image pixels (these are the source pixels at the edge of the source plane). These source-pixels *should* - have had other image-pixels traced within them via image-pixels at even larger radii from the centre of the lens - galaxy. However, these image-pixels are at radii above 2.5", meaning the circular mask removed them from the inversion. - -Lets quickly use a large circular mask to confirm that these pixels exist when we don't mask them. -""" -mask_circular_large = al.Mask2D.circular( - shape_native=dataset_unmasked.shape_native, - pixel_scales=dataset_unmasked.pixel_scales, - radius=4.0, -) - -fit = perform_fit_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked, - source_galaxy=source_galaxy, - mask=mask_circular_large, - settings=al.Settings(use_border_relocator=False), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -""" -This second point is a *huge* problem and it can introduce extremely dangerous systematics into our source -reconstruction and lens models. - -Borders are the solution to this problem. We simply take the mask's` border in the image-plane that we showed above, -trace it to the source-plane and relocate all traced image-pixels pixels outside this source-plane border to its edge. -Lets take a look: -""" -fit = perform_fit_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - - -aplt.plot_grid(grid=mapper.source_plane_mesh_grid, title="Source-Plane Mesh Grid") - -""" -This successfully addresses both of the issues above! However, you might be thinking, isn't that a bit of a hack? Its -not really a physical treatment of the ray-tracing, is it? - -Well, you are right. However, the *only* physical way to do this would be to use a mask so large that all demangified -central pixels are surrounded by traced image-pixels. This would require a mask so large the **PyAutoLens** fit would -become extremely slow. This is not a feasible solution, thus borders provide us with a workaround, one that is -extensively tested and does not introduce systematic biases into the lens modeling procedure. - -To end, lets illustrate how important borders are when modeling multiple lens galaxies. Their complex mass distribution -and lensing configurations produce nasty edge effects where image pixels not just in the centre of mask, but anywhere -in the mask, trace beyond the source-plane border. - -we'll use new strong lensing data, where: - - - The lens galaxy's light is omitted. - - There are two lens galaxies whose `MassProfile`'s are `Isothermal`. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "x2_lens_galaxies" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/lens_x2.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -""" -We again must define a mask around this image, lets start with a 2.8" mask. we'll vary the mask size to illustrate the -effects of the border in a moment. -""" -dataset_unmasked_x2 = dataset - -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.8, -) - -dataset = dataset.apply_mask(mask=mask_circular) - -border = mask_circular.derive_grid.border - - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -We need to redefine our perform fit function, to use the x2 lens galaxy model. -""" - - -def perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset, source_galaxy, mask, settings -): - dataset = dataset.apply_mask(mask=mask) - - lens_galaxy_0 = al.Galaxy( - redshift=0.5, - bulge=al.lp.Sersic( - centre=(0.0, -1.0), - ell_comps=(0.25, 0.1), - intensity=0.1, - effective_radius=0.8, - sersic_index=2.5, - ), - mass=al.mp.Isothermal( - centre=(0.0, -1.0), ell_comps=(0.17647, 0.0), einstein_radius=1.0 - ), - ) - - lens_galaxy_1 = al.Galaxy( - redshift=0.5, - bulge=al.lp.Sersic( - centre=(0.0, 1.0), - ell_comps=(0.0, 0.1), - intensity=0.1, - effective_radius=0.6, - sersic_index=3.0, - ), - mass=al.mp.Isothermal( - centre=(0.0, 1.0), ell_comps=(0.0, -0.111111), einstein_radius=0.8 - ), - ) - - tracer = al.Tracer(galaxies=[lens_galaxy_0, lens_galaxy_1, source_galaxy]) - - return al.FitImaging(dataset=dataset, tracer=tracer, settings=settings) - - -""" -Now, lets fit this image using the input model and perform the source reconstruction without a border. As you can see, -we get many demagnified image pixels which trace well beyond our source-plane border if we don't relocate them! -""" -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked_x2, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=False), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -""" -However, when we relocate them, we get a good-looking source-plane with a well defined border and edge, thus ensuring -our analysis will be free of systematic biases. -""" -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset_unmasked_x2, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -""" -Multi-galaxy modeling is rife with border effects, and if you have multiple lens galaxies I heartily recommend you -keep a close eye on your source-plane borders! - -Care must also be taken when choosing the size of your mask. If you don't choose a big enough mask, the border won't -be able to relocate all of the demagnified image pixels to the border edge. - -The fits below repeat the analysis with progressively larger circular masks, so you can see how the mask size -changes the border and the resulting model image. -""" -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.5, -) -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.7, -) -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.9, -) -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -mask_circular = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=3.1, -) -fit = perform_fit_x2_lenses_with_source_galaxy_mask_and_border( - dataset=dataset, - source_galaxy=source_galaxy, - mask=mask_circular, - settings=al.Settings(use_border_relocator=True), -) - -mapper = fit.inversion.cls_list_from(al.Mapper)[0] - - -aplt.plot_array(array=fit.model_data, title="Plane 1 Image") - -""" -__Wrap Up__ - -To perform inversions, you probably won't think about borders all that often. Borders should pretty much take care of -themselves. - -However, as I showed above, if you don't choose a large enough mask things can go wrong and its important you know what -borders are, so you can diagnose this potential source of systematics! -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py b/scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py deleted file mode 100644 index 5fa85e6..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py +++ /dev/null @@ -1,318 +0,0 @@ -""" -Tutorial 7: Lens Modeling -========================= - -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. - -Inversions do not suffer this problem, meaning they are a very powerful tool for modeling strong lenses. Furthermore, -they have *more* freedom than parametric light profiles because they do not rely on specific analytic light -distributions and a symmetric profile shape. This will allow us to fit more complex mass models and ask ever more -interesting scientific questions! - -However, inversions do have some shortcomings that we need to be aware of before we use them for lens modeling. That's -what we cover in this tutorial. - -__Contents__ - -- **Initial Setup:** We'll use the same strong lensing data as the previous tutorial, where. -- **Unphysical Solutions:** The code below illustrates a systematic set of solutions called demagnified solutions, which. -- **Brief Description:** To see the short-comings of an inversion, we begin by performing a fit where the lens galaxy has an. -- **Light Profiles:** We can also model strong lenses using light profiles and an inversion at the same time. -- **Wrap Up:** Summary of the script and next steps. - -""" - -from autolens import jax_wrapper # Sets JAX environment before other imports - -# from autolens import setup_notebook; setup_notebook() - -from pathlib import Path -import autolens as al -import autolens.plot as aplt - -""" -__Initial Setup__ - -We'll use the same strong lensing data as the previous tutorial, where: - - - The lens galaxy's light is omitted. - - The lens system uses an `Isothermal` galaxy mass profile and a separate `ExternalShear` field. - - The source galaxy's light is an `Sersic`. -""" -dataset_name = "simple__no_lens_light" -dataset_path = Path("dataset") / "imaging" / dataset_name - -""" -__Dataset Auto-Simulation__ - -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. -""" -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/no_lens_light.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -mask = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.5, -) - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -This function fits the imaging data with a tracer, returning a `FitImaging` object. -""" - - -def perform_fit_with_lens__source_galaxy(dataset, lens_galaxy, source_galaxy, field): - mask = al.Mask2D.circular_annular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - inner_radius=0.5, - outer_radius=2.2, - ) - - dataset = dataset.apply_mask(mask=mask) - - tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy], fields=[field]) - - return al.FitImaging(dataset=dataset, tracer=tracer) - - -""" -__Unphysical Solutions__ - -The code below illustrates a systematic set of solutions called demagnified solutions, which negatively impact -lens modeling using source pixelizations. - -Since writing the code below, I have written a full readthedocs page illustrating the issue, which is linked to below. -I recommend you read this page first, to understand what a demagnified solution is, why it is a problem and how we -fix it. The code below should then build on this. - - https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html - -__Brief Description__ - -To see the short-comings of an inversion, we begin by performing a fit where the lens galaxy has an incorrect -mass-model (I've reduced its Einstein Radius from 1.6 to 0.8). This is a mass model the non-linear search may sample at -the beginning of a model-fit. -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=0.8, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), -) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -fit = perform_fit_with_lens__source_galaxy( - dataset=dataset, lens_galaxy=lens_galaxy, source_galaxy=source_galaxy, field=field -) - -aplt.subplot_fit_imaging(fit=fit) -aplt.subplot_fit_imaging_of_planes(fit=fit) - -""" -What happened!? This incorrect mass-model provides a really good fit to the image! The residuals and chi-squared-map -are as good as the ones we saw in the previous tutorials. - -How can an incorrect lens model provide such a fit? Well, as I'm sure you noticed, the source has been reconstructed -as a demagnified version of the image. Clearly, this is not a physical solution or a solution that we want our -non-linear search to find, but for inversions the reality is these solutions exist. - -This is not necessarily problematic for lens modeling. Afterall, the source reconstruction above is extremely complex, -it requires a lot of source pixels to fit the image accurately and its lack of smoothness will be heavily penalized -by regularization when we compute the Bayesian evidence. Indeed, its Bayesian evidence is much lower than the true lens -model solution: -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - mass=al.mp.Isothermal( - centre=(0.0, 0.0), - einstein_radius=1.6, - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - ), -) -field = al.MassField( - redshift=0.5, shear=al.mp.ExternalShear(gamma_1=0.05, gamma_2=0.05) -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -correct_fit = perform_fit_with_lens__source_galaxy( - dataset=dataset, lens_galaxy=lens_galaxy, source_galaxy=source_galaxy, field=field -) - -aplt.subplot_fit_imaging(fit=correct_fit) -aplt.subplot_fit_imaging_of_planes(fit=correct_fit) - -print("Bayesian Evidence of Incorrect Fit:") -print(fit.log_evidence) -print("Bayesian Evidence of Correct Fit:") -print(correct_fit.log_evidence) - -""" -The `log_evidence` *is* lower. However, the difference in `log_evidence` is not *that large*. This could be a problem -for the non-linear search, as it will see many solutions in parameter space with high `log_evidence` values. Furthermore, -these solutions occupy a *large volume* of parameter space (e.g. everywhere the lens model is wrong). This makes -it easy for the non-linear search to get lost searching through these unphysical solutions and, unfortunately, inferring -an incorrect lens model (e.g. a local maxima). - -There is no simple fix for this, and it is the price we pay for giving the inversion so much flexibility in how it -reconstructs the source's light. The solution to this problem? Search chaining, which we covered at the end of -chapter 2 (tutorials 9-11). In fact, this is the problem that led us to initially conceive of search chaining! - -The idea is simple, we write a pipeline that begins by modeling the source galaxy's light using a light profile, thereby -initializing the priors for the lens galaxy's light and mass. Then, when we switch to an `Inversion` in the next -search, the mass model starts in the correct regions of parameter space and does not get lost sampling these -incorrect solutions. - -The following paper discusses these solutions in more detail (https://arxiv.org/abs/2012.04665). - -__Light Profiles__ - -We can also model strong lenses using light profiles and an inversion at the same time. We do this when we want to -simultaneously fit and subtract the lens galaxy's light using a light profile whilst reconstructing the source's -light using an inversion. - -To do this, all we have to do is give the lens galaxy a light profile and use the tracer and fit objects we are -used to. -""" -dataset_name = "lens_sersic" -dataset_path = Path("dataset") / "imaging" / dataset_name - -if al.util.dataset.should_simulate(str(dataset_path)): - import subprocess - import sys - - subprocess.run( - [sys.executable, "scripts/simulator/lens_sersic.py"], - check=True, - ) - -dataset = al.Imaging.from_fits( - data_path=dataset_path / "data.fits", - noise_map_path=dataset_path / "noise_map.fits", - psf_path=dataset_path / "psf.fits", - pixel_scales=0.1, -) - -mask = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.5, -) - -aplt.subplot_imaging_dataset(dataset=dataset) - -""" -When fitting such an image we now want to include the lens's light in the analysis. Lets update our mask to be -circular so that it includes the central regions of the image and lens galaxy. -""" -mask = al.Mask2D.circular( - shape_native=dataset.shape_native, - pixel_scales=dataset.pixel_scales, - radius=2.5, -) - -dataset = dataset.apply_mask(mask=mask) - -""" -As I said above, performing this fit is the same as usual, we just give the lens galaxy a `LightProfile`. -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - bulge=al.lp.Sersic( - centre=(0.0, 0.0), - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - intensity=1.0, - effective_radius=0.8, - sersic_index=4.0, - ), - mass=al.mp.Isothermal(centre=(0.0, 0.0), ell_comps=(0.1, 0.0), einstein_radius=1.6), -) - -pixelization = al.Pixelization( - mesh=al.mesh.RectangularBilinearAdaptDensity(shape=(20, 20)), - regularization=al.reg.Constant(coefficient=1.0), -) - -source_galaxy = al.Galaxy(redshift=1.0, pixelization=pixelization) - -tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) - -""" -This fit will now subtract the lens galaxy's light from the image and fits the resulting source-only image with the -inversion. When we plot the image, a new panel on the sub-plot appears showing the model image of the lens galaxy. -""" -fit = al.FitImaging(dataset=dataset, tracer=tracer) - -aplt.subplot_fit_imaging(fit=fit) -aplt.subplot_fit_imaging_of_planes(fit=fit) - -""" -Of course if the lens subtraction is rubbish so is our fit. We can therefore be sure that our lens model will want to -fit the lens galaxy's light accurately (below, I've decreased the lens galaxy intensity from 1.0 to 0.5 to show the -result of a poor lens light subtraction). -""" -lens_galaxy = al.Galaxy( - redshift=0.5, - bulge=al.lp.Sersic( - centre=(0.0, 0.0), - ell_comps=al.convert.ell_comps_from(axis_ratio=0.9, angle=45.0), - intensity=0.5, - effective_radius=0.8, - sersic_index=4.0, - ), - mass=al.mp.Isothermal(centre=(0.0, 0.0), ell_comps=(0.1, 0.0), einstein_radius=1.6), -) - -tracer = al.Tracer(galaxies=[lens_galaxy, source_galaxy]) - -fit = al.FitImaging(dataset=dataset, tracer=tracer) - -aplt.subplot_fit_imaging(fit=fit) -aplt.subplot_fit_imaging_of_planes(fit=fit) - -""" -__Wrap Up__ - -And with that, we're done. I'll end by pointing out a few things about what we've covered to get you thinking about -the adaption tutorials later in this chapter. - - - When the lens galaxy's light is subtracted perfectly it leaves no residuals. However, if it isn't subtracted - perfectly it does leave residuals, which will be fitted by the inversion. If the residuals are significant this is - going to impact the source reconstruction negatively and can lead to some pretty nasty systematics. In the adaption - tutorials at the end of this chapter, we'll learn how our adaptive analysis can prevent this residual fitting. -""" diff --git a/scripts/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.py b/scripts/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.py index 78882a9..0c8a5dd 100644 --- a/scripts/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.py +++ b/scripts/chapter_3_pixelizations/tutorial_8_adaptive_pixelization.py @@ -137,7 +137,7 @@ 4x4 grid) out of the 784 pixels to actually fit the data! The remaining ~750 pixels are doing nothing but fitting noise. -This means that regularization is sub-optimal. In tutorial 4, we discussed how the Bayesian evidence of the +This means that regularization is sub-optimal. In tutorial 2, we discussed how the Bayesian evidence of the regularization favours the simplest source solution. That is, the solution which fits the data using the fewest source pixels. If we are dedicating a large number of source pixels to fitting *nothing*, the source reconstruction is unnecessarily complex (and therefore is lower `log_evidence` solution). @@ -223,7 +223,7 @@ fitting just noise. We could achieve even better solutions if the central regions of the source were reconstructed using more pixels, and fewer source pixels were used in the outskirts of the source plane. -Tutorials 10, 11 and 12 show even more advanced and adaptive pixelizations which do just this, by adapting to the +Tutorials 11 and 12 show even more advanced and adaptive pixelizations which do just this, by adapting to the source galaxy's morphology rather than the mass model magnification. In the mean time, you may wish to experiment with using both rectangular and Delaunay meshes to fit diff --git a/scripts/chapter_3_pixelizations/tutorial_9_model_fit.py b/scripts/chapter_3_pixelizations/tutorial_9_model_fit.py deleted file mode 100755 index c6b5206..0000000 --- a/scripts/chapter_3_pixelizations/tutorial_9_model_fit.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Tutorial 9: Model-Fit -===================== - -You should now perform lens modeling using a pixelization, which is described fully in the example: - -`autolens_workspace/*/imaging/features/pixelization/modeling.py` - -__Wrap Up__ - -Once complete, you can then move on to the next HowToLens tutorial and gain more insight into adaptive -pixelizations. -""" - -# from autolens import setup_notebook; setup_notebook() diff --git a/workspace_index.json b/workspace_index.json index ced3372..ef81a78 100644 --- a/workspace_index.json +++ b/workspace_index.json @@ -401,22 +401,6 @@ "summary": "Throughout this chapter, we have fitted the data using just one non-linear search. The previous tutorial discussed the run-time cost of doing this: with a single search, the dimensionality of the model, the priors on its parameters and the search settings must all be juggled at once, leaving us little flexibility to trade them off against one another.", "title": "Tutorial 9: Search Chaining" }, - { - "contents": [ - "Initial Setup", - "Mask", - "Simulator", - "Fitting", - "Fit Problems", - "Discussion", - "Wrap Up" - ], - "cross_refs": [], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_10_fit_problems.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_10_fit_problems.py", - "summary": "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!", - "title": "Tutorial 10: Fit Problems" - }, { "contents": [ "Initial Setup", @@ -442,124 +426,92 @@ "cross_refs": [], "notebook": "notebooks/chapter_3_pixelizations/tutorial_12_adaptive_regularization.ipynb", "path": "scripts/chapter_3_pixelizations/tutorial_12_adaptive_regularization.py", - "summary": "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.", + "summary": "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.", "title": "Tutorial 12: Adaptive Regularization" }, { "contents": [ - "Initial Setup", - "Mesh", - "Wrap Up" + "Opening \u2014 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" ], "cross_refs": [], "notebook": "notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb", "path": "scripts/chapter_3_pixelizations/tutorial_1_pixelizations.py", - "summary": "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.", - "title": "Tutorial 1: Pixelizations" + "summary": "(no summary in script docstring)", + "title": "Tutorial 1: Pixelizations, Mappers and Inversions" }, { "contents": [ - "Initial Setup", - "Mappers", - "Mask", - "Wrap Up" - ], - "cross_refs": [], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_2_mappers.py", - "summary": "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!", - "title": "Tutorial 2: Mappers" - }, - { - "contents": [ - "Initial Setup", - "Pixelization", - "Positive Only Solver", - "Wrap Up", - "Detailed Explanation" + "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" ], "cross_refs": [ - "/imaging/features/pixelization/likelihood_function.ipynb" + "//github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/imaging/features/pixelization/likelihood_function.py" ], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_3_inversions.py", - "summary": "In the previous two tutorials, we introduced:", - "title": "Tutorial 3: Inversions" + "notebook": "notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb", + "path": "scripts/chapter_3_pixelizations/tutorial_2_bayesian_regularization.py", + "summary": "(no summary in script docstring)", + "title": "Tutorial 2: Bayesian Regularization" }, { "contents": [ - "Initial Setup", - "Convenience Function", - "Pixelization", - "Regularization", - "Bayesian Evidence", - "Detailed Description" + "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\u2014and what it does not", + "The mask still needs to cover the lensed source", + "Wrap up" ], "cross_refs": [], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_4_bayesian_regularization.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_4_bayesian_regularization.py", - "summary": "So far, we have:", - "title": "Tutorial 4: Bayesian Regularization" - }, - { - "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" - ], - "cross_refs": [ - "/imaging/features/pixelization/likelihood_function.ipynb" - ], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_5_bayesian_formalism.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_5_bayesian_formalism.py", - "summary": "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.", - "title": "Tutorial 5: Bayesian Formalism" - }, - { - "contents": [ - "Initial Setup", - "Borders", - "Wrap Up" + "notebook": "notebooks/chapter_3_pixelizations/tutorial_3_borders.ipynb", + "path": "scripts/chapter_3_pixelizations/tutorial_3_borders.py", + "summary": "(no summary in script docstring)", + "title": "Tutorial 3: Borders" + }, + { + "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" ], "cross_refs": [], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_6_borders.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_6_borders.py", - "summary": "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.", - "title": "Tutorial 6: Borders" - }, - { - "contents": [ - "Initial Setup", - "Unphysical Solutions", - "Brief Description", - "Light Profiles", - "Wrap Up" - ], - "cross_refs": [], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_7_lens_modeling.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_7_lens_modeling.py", - "summary": "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.", - "title": "Tutorial 7: Lens Modeling" + "notebook": "notebooks/chapter_3_pixelizations/tutorial_4_lens_modeling.ipynb", + "path": "scripts/chapter_3_pixelizations/tutorial_4_lens_modeling.py", + "summary": "(no summary in script docstring)", + "title": "Tutorial 4: Lens Modeling" }, { "contents": [ @@ -575,16 +527,6 @@ "summary": "In this tutorial we will introduce a new `Pixelization` object, which uses an `Overlay` image-mesh and a `Delaunay` mesh.", "title": "Tutorial 8: Adaptive Pixelization" }, - { - "contents": [], - "cross_refs": [ - "/imaging/features/pixelization/modeling.py" - ], - "notebook": "notebooks/chapter_3_pixelizations/tutorial_9_model_fit.ipynb", - "path": "scripts/chapter_3_pixelizations/tutorial_9_model_fit.py", - "summary": "You should now perform lens modeling using a pixelization, which is described fully in the example:", - "title": "Tutorial 9: Model-Fit" - }, { "contents": [ "Initial Setup",