@@ -46,6 +46,9 @@ def subplot_imaging_dataset(
4646 grid, positions, lines
4747 Optional overlays forwarded to every panel.
4848 """
49+ if isinstance (output_format , (list , tuple )):
50+ output_format = output_format [0 ]
51+
4952 from autoarray .plot .array import plot_array
5053
5154 fig , axes = plt .subplots (3 , 3 , figsize = (21 , 21 ))
@@ -133,51 +136,6 @@ def subplot_imaging_dataset(
133136 subplot_save (fig , output_path , output_filename , output_format )
134137
135138
136- def subplot_imaging (
137- dataset ,
138- output_path = None ,
139- output_filename : str = "subplot_dataset" ,
140- output_format = "png" ,
141- ):
142- """
143- 1×n subplot of core ``Imaging`` dataset components.
144-
145- Panels: Data | Noise Map | Signal-To-Noise Map | PSF (if present)
146-
147- Parameters
148- ----------
149- dataset
150- An ``Imaging`` dataset instance.
151- output_path
152- Directory to save the figure. ``None`` calls ``plt.show()``.
153- output_filename
154- Base filename without extension.
155- output_format
156- File format string or list, e.g. ``"png"`` or ``["png"]``.
157- """
158- if isinstance (output_format , (list , tuple )):
159- output_format = output_format [0 ]
160-
161- panels = [
162- (dataset .data , "Data" ),
163- (dataset .noise_map , "Noise Map" ),
164- (dataset .signal_to_noise_map , "Signal-To-Noise Map" ),
165- ]
166- try :
167- panels .append ((dataset .psf .kernel , "PSF" ))
168- except Exception :
169- pass
170-
171- from autoarray .plot .array import plot_array
172-
173- n = len (panels )
174- fig , axes = plt .subplots (1 , n , figsize = (7 * n , 7 ))
175- axes_flat = list (axes .flatten ()) if n > 1 else [axes ]
176- for i , (array , title ) in enumerate (panels ):
177- plot_array (array , ax = axes_flat [i ], title = title )
178- plt .tight_layout ()
179- subplot_save (fig , output_path , output_filename , output_format )
180-
181139
182140def subplot_imaging_dataset_list (
183141 dataset_list ,
0 commit comments