From 9d85878935dff9be17380605a91bc001b26bf711 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 5 Nov 2025 13:27:37 +0000 Subject: [PATCH] all customization for single plane fits complete --- autolens/aggregator/__init__.py | 1 + autolens/aggregator/subplot.py | 15 +++++++++++++++ autolens/imaging/plot/fit_imaging_plotters.py | 9 ++++++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/autolens/aggregator/__init__.py b/autolens/aggregator/__init__.py index 1f156b3c0..4ba8ba7d1 100644 --- a/autolens/aggregator/__init__.py +++ b/autolens/aggregator/__init__.py @@ -24,6 +24,7 @@ from autolens.aggregator.subplot import SubplotDataset as subplot_dataset from autolens.aggregator.subplot import SubplotTracer as subplot_tracer +from autolens.aggregator.subplot import SubplotFitX1Plane as subplot_fit_x1_plane from autolens.aggregator.subplot import SubplotFit as subplot_fit from autolens.aggregator.subplot import SubplotFitLog10 as subplot_fit_log10 from autolens.aggregator.subplot import FITSTracer as fits_tracer diff --git a/autolens/aggregator/subplot.py b/autolens/aggregator/subplot.py index 670913860..aea258ea0 100644 --- a/autolens/aggregator/subplot.py +++ b/autolens/aggregator/subplot.py @@ -58,6 +58,21 @@ class SubplotTracer(Enum): deflections_x = (2, 2) +class SubplotFitX1Plane(Enum): + """ + The subplots that can be extracted from the subplot_fit image. + + The values correspond to the position of the subplot in the 4x3 grid. + """ + + data = (0, 0) + signal_to_noise_map = (1, 0) + model_data = (2, 0) + lens_light_subtracted_image = (0, 1) + lens_light_subtracted_image_zero = (0, 1) + normalized_residual_map = (0, 2) + + class SubplotFit(Enum): """ The subplots that can be extracted from the subplot_fit image. diff --git a/autolens/imaging/plot/fit_imaging_plotters.py b/autolens/imaging/plot/fit_imaging_plotters.py index 2f2787cbc..4efb0d6ce 100644 --- a/autolens/imaging/plot/fit_imaging_plotters.py +++ b/autolens/imaging/plot/fit_imaging_plotters.py @@ -431,14 +431,17 @@ def subplot_fit_x1_plane(self): self.set_title(label="Lens Light Subtracted Image") self.figures_2d(normalized_residual_map=True) + self.mat_plot_2d.cmap.kwargs["vmin"] = 0.0 + self.set_title(label="Subtracted Image Zero Minimum") + self.figures_2d(normalized_residual_map=True) + self.mat_plot_2d.cmap.kwargs.pop("vmin") + self.residuals_symmetric_cmap = True self.set_title(label="Normalized Residual Map") self.figures_2d(normalized_residual_map=True) self.set_title(label=None) - self.figures_2d(chi_squared_map=True) - - self.mat_plot_2d.output.subplot_to_figure(auto_filename="subplot_fit") + self.mat_plot_2d.output.subplot_to_figure(auto_filename="subplot_fit_x1_plane") self.close_subplot_figure() def subplot_fit_log10_x1_plane(self):