From 253341a96a598dc7822135b77c69c6b48b7d863c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 17:28:44 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20rectangular=20mesh=20split=20follow-up?= =?UTF-8?q?=20=E2=80=94=20docs=20+=20prior-config=20key=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Downstream of PyAutoArray#462 (rectangular Bilinear/RTU mesh split, task PyAutoArray#461): - docs/api/pixelization.rst lists all four adaptive rectangular classes. - exc.py docstring updated to the RTU name. - test_autolens/config/priors/pixelizations.yaml: the stale "rectangular.RectangularAdaptDensity" module-prefixed key never resolved (autonerves matches the real module path via endswith); rekeyed to rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity and rectangular_rtu_adapt_density.RectangularRTUAdaptDensity. Full test suite: 532 passed against merged PyAutoArray + PyAutoGalaxy mains. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WtMqU3JfmyJh8GvB7jT4Et --- autolens/exc.py | 2 +- docs/api/pixelization.rst | 5 ++- .../config/priors/pixelizations.yaml | 43 ++++++++++--------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/autolens/exc.py b/autolens/exc.py index 5e9c4e831..05ca7c0f3 100644 --- a/autolens/exc.py +++ b/autolens/exc.py @@ -32,7 +32,7 @@ class PixelizationException(af.exc.FitException): """ Raises exceptions associated with the `inversion/pixelization` modules and `Pixelization` classes. - For example if a `RectangularAdaptDensity` mesh has dimensions below 3x3. + For example if a `RectangularRTUAdaptDensity` mesh has dimensions below 3x3. This exception overwrites `autoarray.exc.PixelizationException` in order to add a `FitException`. This means that if this exception is raised during a model-fit in the analysis class's `log_likelihood_function` that model diff --git a/docs/api/pixelization.rst b/docs/api/pixelization.rst index 2e221603b..fad2102a8 100644 --- a/docs/api/pixelization.rst +++ b/docs/api/pixelization.rst @@ -46,7 +46,10 @@ Mesh [ag.mesh] :template: custom-class-template.rst :recursive: - RectangularAdaptDensity + RectangularBilinearAdaptDensity + RectangularBilinearAdaptImage + RectangularRTUAdaptDensity + RectangularRTUAdaptImage Delaunay Regularization [ag.reg] diff --git a/test_autolens/config/priors/pixelizations.yaml b/test_autolens/config/priors/pixelizations.yaml index 236268359..ad57b6bb7 100644 --- a/test_autolens/config/priors/pixelizations.yaml +++ b/test_autolens/config/priors/pixelizations.yaml @@ -50,27 +50,6 @@ delaunay.DelaunayMagnification: width_modifier: type: Absolute value: 8.0 -rectangular.RectangularAdaptDensity: - shape_0: - limits: - lower: 3.0 - upper: inf - lower_limit: 20.0 - type: Uniform - upper_limit: 45.0 - width_modifier: - type: Absolute - value: 8.0 - shape_1: - limits: - lower: 3.0 - upper: inf - lower_limit: 20.0 - type: Uniform - upper_limit: 45.0 - width_modifier: - type: Absolute - value: 8.0 voronoi.VoronoiBrightnessImage: pixels: limits: @@ -123,3 +102,25 @@ voronoi.VoronoiMagnification: width_modifier: type: Absolute value: 8.0 +rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity: &id001 + shape_0: + limits: + lower: 3.0 + upper: inf + lower_limit: 20.0 + type: Uniform + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 + shape_1: + limits: + lower: 3.0 + upper: inf + lower_limit: 20.0 + type: Uniform + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 +rectangular_rtu_adapt_density.RectangularRTUAdaptDensity: *id001