From af95eefd849eeec6ab62099b784b9029ef9dc663 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 3 Apr 2026 14:43:30 +0100 Subject: [PATCH] Use configurable output_format default from autoarray config Change all output_format defaults from "png" to None, resolved at runtime via autoarray's _conf_output_format() which reads from general.yaml. Co-Authored-By: Claude Opus 4.6 (1M context) --- autolens/imaging/plot/fit_imaging_plots.py | 16 ++++++++-------- .../plot/fit_interferometer_plots.py | 8 ++++---- autolens/lens/plot/sensitivity_plots.py | 6 +++--- autolens/lens/plot/subhalo_plots.py | 4 ++-- autolens/lens/plot/tracer_plots.py | 6 +++--- autolens/point/plot/fit_point_plots.py | 2 +- autolens/point/plot/point_dataset_plots.py | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/autolens/imaging/plot/fit_imaging_plots.py b/autolens/imaging/plot/fit_imaging_plots.py index 163ebaed4..fdd4b850d 100644 --- a/autolens/imaging/plot/fit_imaging_plots.py +++ b/autolens/imaging/plot/fit_imaging_plots.py @@ -183,7 +183,7 @@ def _plot_source_plane(fit, ax, plane_index, zoom_to_brightest=True, def subplot_fit( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, plane_index: Optional[int] = None, image_plane_lines=None, @@ -327,7 +327,7 @@ def subplot_fit( def subplot_fit_x1_plane( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, ): """ @@ -391,7 +391,7 @@ def subplot_fit_x1_plane( def subplot_fit_log10( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, plane_index: Optional[int] = None, image_plane_lines=None, @@ -515,7 +515,7 @@ def subplot_fit_log10( def subplot_fit_log10_x1_plane( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, ): """ @@ -576,7 +576,7 @@ def subplot_fit_log10_x1_plane( def subplot_of_planes( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, plane_index: Optional[int] = None, ): @@ -644,7 +644,7 @@ def subplot_of_planes( def subplot_tracer_from_fit( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, image_plane_lines=None, image_plane_line_colors=None, @@ -769,7 +769,7 @@ def subplot_tracer_from_fit( def subplot_fit_combined( fit_list: List, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, ): """ @@ -851,7 +851,7 @@ def subplot_fit_combined( def subplot_fit_combined_log10( fit_list: List, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, ): """ diff --git a/autolens/interferometer/plot/fit_interferometer_plots.py b/autolens/interferometer/plot/fit_interferometer_plots.py index c63ae7cb9..7dc9ea37d 100644 --- a/autolens/interferometer/plot/fit_interferometer_plots.py +++ b/autolens/interferometer/plot/fit_interferometer_plots.py @@ -137,7 +137,7 @@ def _plot_source_plane(fit, ax, plane_index, zoom_to_brightest=True, def subplot_fit( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, image_plane_lines=None, image_plane_line_colors=None, @@ -271,7 +271,7 @@ def subplot_fit( def subplot_fit_dirty_images( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, image_plane_lines=None, @@ -328,7 +328,7 @@ def subplot_fit_dirty_images( def subplot_fit_real_space( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, source_plane_lines=None, source_plane_line_colors=None, @@ -390,7 +390,7 @@ def subplot_fit_real_space( def subplot_tracer_from_fit( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, image_plane_lines=None, image_plane_line_colors=None, diff --git a/autolens/lens/plot/sensitivity_plots.py b/autolens/lens/plot/sensitivity_plots.py index 04759f80a..a6b6bf803 100644 --- a/autolens/lens/plot/sensitivity_plots.py +++ b/autolens/lens/plot/sensitivity_plots.py @@ -15,7 +15,7 @@ def subplot_tracer_images( tracer_no_perturb, source_image, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, ): @@ -119,7 +119,7 @@ def subplot_sensitivity( result, data_subtracted, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, ): @@ -247,7 +247,7 @@ def subplot_sensitivity( def subplot_figures_of_merit_grid( result, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log_evidences: bool = True, remove_zeros: bool = True, diff --git a/autolens/lens/plot/subhalo_plots.py b/autolens/lens/plot/subhalo_plots.py index c758b796d..de979ac82 100644 --- a/autolens/lens/plot/subhalo_plots.py +++ b/autolens/lens/plot/subhalo_plots.py @@ -11,7 +11,7 @@ def subplot_detection_imaging( result, fit_imaging_with_subhalo, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, use_log_evidences: bool = True, @@ -102,7 +102,7 @@ def subplot_detection_fits( fit_imaging_no_subhalo, fit_imaging_with_subhalo, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, ): """ diff --git a/autolens/lens/plot/tracer_plots.py b/autolens/lens/plot/tracer_plots.py index b8f0238f1..758757c38 100644 --- a/autolens/lens/plot/tracer_plots.py +++ b/autolens/lens/plot/tracer_plots.py @@ -105,7 +105,7 @@ def subplot_tracer( tracer, grid: aa.type.Grid2DLike, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, positions=None, @@ -195,7 +195,7 @@ def subplot_lensed_images( tracer, grid: aa.type.Grid2DLike, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, ): @@ -249,7 +249,7 @@ def subplot_galaxies_images( tracer, grid: aa.type.Grid2DLike, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, colormap: Optional[str] = None, use_log10: bool = False, ): diff --git a/autolens/point/plot/fit_point_plots.py b/autolens/point/plot/fit_point_plots.py index b07b2dba2..2d50ceff6 100644 --- a/autolens/point/plot/fit_point_plots.py +++ b/autolens/point/plot/fit_point_plots.py @@ -8,7 +8,7 @@ def subplot_fit( fit, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, image_plane_lines=None, image_plane_line_colors=None, source_plane_lines=None, diff --git a/autolens/point/plot/point_dataset_plots.py b/autolens/point/plot/point_dataset_plots.py index 2cc63adec..662b25143 100644 --- a/autolens/point/plot/point_dataset_plots.py +++ b/autolens/point/plot/point_dataset_plots.py @@ -8,7 +8,7 @@ def subplot_dataset( dataset, output_path: Optional[str] = None, - output_format: str = "png", + output_format: str = None, ): """ Produce a subplot visualising a `PointDataset`.