From 3913c6881eb85d408dc10d5e771d2f4ddbebc92d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 17:26:29 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20rectangular=20mesh=20split=20follow-up?= =?UTF-8?q?=20=E2=80=94=20RTU/Bilinear=20prior=20configs=20+=20docs?= 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): - Packaged prior defaults: config/priors/mesh/rectangular_adapt_*.yaml -> rectangular_rtu_adapt_*.yaml plus new rectangular_bilinear_adapt_*.yaml (same priors — the Bilinear meshes have no kernel hyperparameters). - docs/api/pixelization.rst lists all four adaptive rectangular classes. - exc.py docstring updated to the RTU name. - test config pixelizations.json keys: the stale "rectangular." module-prefixed keys never resolved (autonerves matches on the real module path via endswith); rekeyed to rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity and rectangular_rtu_adapt_density.RectangularRTUAdaptDensity. Full test suite: 1102 passed against merged PyAutoArray main. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WtMqU3JfmyJh8GvB7jT4Et --- .../rectangular_bilinear_adapt_density.yaml | 21 ++++++++++ .../rectangular_bilinear_adapt_image.yaml | 40 +++++++++++++++++++ ...aml => rectangular_rtu_adapt_density.yaml} | 2 +- ....yaml => rectangular_rtu_adapt_image.yaml} | 2 +- autogalaxy/exc.py | 2 +- docs/api/pixelization.rst | 5 ++- .../config/summary/priors/pixelizations.json | 24 ++++++++--- .../config/summary/priors/pixelizations.json | 24 ++++++++--- 8 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_density.yaml create mode 100644 autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_image.yaml rename autogalaxy/config/priors/mesh/{rectangular_adapt_density.yaml => rectangular_rtu_adapt_density.yaml} (92%) rename autogalaxy/config/priors/mesh/{rectangular_adapt_image.yaml => rectangular_rtu_adapt_image.yaml} (96%) diff --git a/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_density.yaml b/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_density.yaml new file mode 100644 index 00000000..903f9637 --- /dev/null +++ b/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_density.yaml @@ -0,0 +1,21 @@ +RectangularBilinearAdaptDensity: + shape_0: + type: Uniform + lower_limit: 20.0 + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 + limits: + lower: 3.0 + upper: inf + shape_1: + type: Uniform + lower_limit: 20.0 + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 + limits: + lower: 3.0 + upper: inf \ No newline at end of file diff --git a/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_image.yaml b/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_image.yaml new file mode 100644 index 00000000..f147e0ec --- /dev/null +++ b/autogalaxy/config/priors/mesh/rectangular_bilinear_adapt_image.yaml @@ -0,0 +1,40 @@ +RectangularBilinearAdaptImage: + shape_0: + type: Uniform + lower_limit: 20.0 + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 + limits: + lower: 3.0 + upper: inf + shape_1: + type: Uniform + lower_limit: 20.0 + upper_limit: 45.0 + width_modifier: + type: Absolute + value: 8.0 + limits: + lower: 3.0 + upper: inf + weight_power: + type : Uniform + lower_limit: 0.0 + upper_limit: 10.0 + width_modifier: + type: Absolute + value: 2.0 + limits: + lower: -100.0 + upper: 100.0 + weight_floor: + type: LogUniform + lower_limit: 0.00001 + upper_limit: 1.0 + width_modifier: + type: Absolute + limits: + lower: 0.0 + upper: inf \ No newline at end of file diff --git a/autogalaxy/config/priors/mesh/rectangular_adapt_density.yaml b/autogalaxy/config/priors/mesh/rectangular_rtu_adapt_density.yaml similarity index 92% rename from autogalaxy/config/priors/mesh/rectangular_adapt_density.yaml rename to autogalaxy/config/priors/mesh/rectangular_rtu_adapt_density.yaml index a8902d80..2bfdb496 100644 --- a/autogalaxy/config/priors/mesh/rectangular_adapt_density.yaml +++ b/autogalaxy/config/priors/mesh/rectangular_rtu_adapt_density.yaml @@ -1,4 +1,4 @@ -RectangularAdaptDensity: +RectangularRTUAdaptDensity: shape_0: type: Uniform lower_limit: 20.0 diff --git a/autogalaxy/config/priors/mesh/rectangular_adapt_image.yaml b/autogalaxy/config/priors/mesh/rectangular_rtu_adapt_image.yaml similarity index 96% rename from autogalaxy/config/priors/mesh/rectangular_adapt_image.yaml rename to autogalaxy/config/priors/mesh/rectangular_rtu_adapt_image.yaml index 2c6e52d9..c8ae45d6 100644 --- a/autogalaxy/config/priors/mesh/rectangular_adapt_image.yaml +++ b/autogalaxy/config/priors/mesh/rectangular_rtu_adapt_image.yaml @@ -1,4 +1,4 @@ -RectangularAdaptImage: +RectangularRTUAdaptImage: shape_0: type: Uniform lower_limit: 20.0 diff --git a/autogalaxy/exc.py b/autogalaxy/exc.py index ce3f91f1..f17bab7e 100644 --- a/autogalaxy/exc.py +++ b/autogalaxy/exc.py @@ -51,7 +51,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 43e9ff1f..0da8ab16 100644 --- a/docs/api/pixelization.rst +++ b/docs/api/pixelization.rst @@ -49,7 +49,10 @@ Mesh [ag.mesh] :template: custom-class-template.rst :recursive: - RectangularAdaptDensity + RectangularBilinearAdaptDensity + RectangularBilinearAdaptImage + RectangularRTUAdaptDensity + RectangularRTUAdaptImage Delaunay Regularization [ag.reg] diff --git a/test_autogalaxy/profiles/config/summary/priors/pixelizations.json b/test_autogalaxy/profiles/config/summary/priors/pixelizations.json index ecb04ad7..98d8e00c 100644 --- a/test_autogalaxy/profiles/config/summary/priors/pixelizations.json +++ b/test_autogalaxy/profiles/config/summary/priors/pixelizations.json @@ -1,5 +1,12 @@ { - "rectangular.RectangularAdaptDensity": { + "Voronoi": { + "pixels": { + "type": "Uniform", + "lower_limit": 0.0, + "upper_limit": 1.0 + } + }, + "rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity": { "shape_0": { "type": "Uniform", "lower_limit": 10.0, @@ -11,11 +18,16 @@ "upper_limit": 30.0 } }, - "Voronoi": { - "pixels": { + "rectangular_rtu_adapt_density.RectangularRTUAdaptDensity": { + "shape_0": { "type": "Uniform", - "lower_limit": 0.0, - "upper_limit": 1.0 + "lower_limit": 10.0, + "upper_limit": 30.0 + }, + "shape_1": { + "type": "Uniform", + "lower_limit": 10.0, + "upper_limit": 30.0 } } -} \ No newline at end of file +} diff --git a/test_autogalaxy/profiles/mass/config/summary/priors/pixelizations.json b/test_autogalaxy/profiles/mass/config/summary/priors/pixelizations.json index ecb04ad7..98d8e00c 100644 --- a/test_autogalaxy/profiles/mass/config/summary/priors/pixelizations.json +++ b/test_autogalaxy/profiles/mass/config/summary/priors/pixelizations.json @@ -1,5 +1,12 @@ { - "rectangular.RectangularAdaptDensity": { + "Voronoi": { + "pixels": { + "type": "Uniform", + "lower_limit": 0.0, + "upper_limit": 1.0 + } + }, + "rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity": { "shape_0": { "type": "Uniform", "lower_limit": 10.0, @@ -11,11 +18,16 @@ "upper_limit": 30.0 } }, - "Voronoi": { - "pixels": { + "rectangular_rtu_adapt_density.RectangularRTUAdaptDensity": { + "shape_0": { "type": "Uniform", - "lower_limit": 0.0, - "upper_limit": 1.0 + "lower_limit": 10.0, + "upper_limit": 30.0 + }, + "shape_1": { + "type": "Uniform", + "lower_limit": 10.0, + "upper_limit": 30.0 } } -} \ No newline at end of file +}