diff --git a/autolens/aggregator/__init__.py b/autolens/aggregator/__init__.py index 8ab42a0c8..b34e80ea5 100644 --- a/autolens/aggregator/__init__.py +++ b/autolens/aggregator/__init__.py @@ -21,3 +21,10 @@ from autogalaxy.aggregator.ellipse.fit_ellipse import FitEllipseAgg from autolens.aggregator.subhalo import SubhaloAgg + +from autolens.aggregator.subplot import SubplotDataset as subplot_dataset +from autolens.aggregator.subplot import SubplotTracer as subplot_tracer +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 +from autolens.aggregator.subplot import FITSFit as fits_fits diff --git a/autolens/aggregator/fit_imaging.py b/autolens/aggregator/fit_imaging.py index b750b12ef..97d98f105 100644 --- a/autolens/aggregator/fit_imaging.py +++ b/autolens/aggregator/fit_imaging.py @@ -67,7 +67,6 @@ def _fit_imaging_from( dataset_model_list, adapt_images_list, ): - fit_dataset_list.append( FitImaging( dataset=dataset, diff --git a/autolens/aggregator/fit_interferometer.py b/autolens/aggregator/fit_interferometer.py index 50c953c42..f0baf2729 100644 --- a/autolens/aggregator/fit_interferometer.py +++ b/autolens/aggregator/fit_interferometer.py @@ -69,7 +69,6 @@ def _fit_interferometer_from( dataset_model_list, adapt_images_list, ): - fit_dataset_list.append( FitInterferometer( dataset=dataset, diff --git a/autolens/aggregator/subplot.py b/autolens/aggregator/subplot.py new file mode 100644 index 000000000..d8b0d948c --- /dev/null +++ b/autolens/aggregator/subplot.py @@ -0,0 +1,100 @@ +from enum import Enum + + +class FITSTracer(Enum): + """ + The HDUs that can be extracted from the fit.fits file. + """ + + convergence = "CONVERGENCE" + potential = "POTENTIAL" + deflections_y = "DEFLECTIONS_Y" + deflections_x = "DEFLECTIONS_X" + + +class FITSFit(Enum): + """ + The HDUs that can be extracted from the fit.fits file. + """ + + model_image = "MODEL_IMAGE" + residual_map = "RESIDUAL_MAP" + normalized_residual_map = "NORMALIZED_RESIDUAL_MAP" + chi_squared_map = "CHI_SQUARED_MAP" + + +class SubplotDataset(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) + data_log_10 = (1, 0) + noise_map = (2, 0) + psf = (0, 1) + psf_log_10 = (1, 1) + signal_to_noise_map = (2, 1) + over_sample_size_lp = (0, 2) + over_sample_size_pixelization = (1, 2) + + +class SubplotTracer(Enum): + """ + The subplots that can be extracted from the subplot_tracer image. + + The values correspond to the position of the subplot in the 3x3 grid. + """ + + image = (0, 0) + source_image = (1, 0) + source_plane_image = (2, 0) + lens_light_image = (1, 0) + convergence = (1, 1) + potential = (1, 2) + magnification = (0, 2) + deflections_y = (1, 2) + deflections_x = (2, 2) + + +class SubplotFit(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) + data_source_scale = (1, 0) + signal_to_noise_map = (2, 0) + model_image = (3, 0) + lens_light_model = (1, 0) + lens_light_subtracted_image = (1, 1) + source_model_image = (1, 2) + source_plane_image_zoom = (1, 3) + normalized_residual_map = (2, 0) + normalized_residual_map_one_sigma = (2, 1) + chi_squared_map = (2, 2) + source_plane_image = (2, 3) + + +class SubplotFitLog10(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) + data_source_scale = (1, 0) + signal_to_noise_map = (2, 0) + model_image = (3, 0) + lens_light_model = (1, 0) + lens_light_subtracted_image = (1, 1) + source_model_image = (1, 2) + source_plane_image_zoom = (1, 3) + normalized_residual_map = (2, 0) + normalized_residual_map_one_sigma = (2, 1) + chi_squared_map = (2, 2) + source_plane_image = (2, 3) diff --git a/autolens/analysis/positions.py b/autolens/analysis/positions.py index 76a791a92..90a7cfe84 100644 --- a/autolens/analysis/positions.py +++ b/autolens/analysis/positions.py @@ -61,7 +61,7 @@ def log_likelihood_function_positions_overwrite( def output_positions_info(self, output_path: str, tracer: Tracer): """ - Outputs a `positions.info` file which summarizes the positions penalty term for a model fit, including: + Outputs a `positions.info` file which summarises the positions penalty term for a model fit, including: - The arc second coordinates of the lensed source multiple images used for the model-fit. - The radial distance of these coordinates from (0.0, 0.0).