1- from typing import List
1+ from typing import List , Optional
22
33import autoarray .plot as aplt
44
@@ -19,7 +19,7 @@ class PlotterInterfaceImaging(PlotterInterface):
1919 imaging_combined = AgPlotterInterfaceImaging .imaging_combined
2020
2121 def fit_imaging (
22- self , fit : FitImaging ,
22+ self , fit : FitImaging , visuals_2d_of_planes_list : Optional [ aplt . Visuals2D ] = None
2323 ):
2424 """
2525 Visualizes a `FitImaging` object, which fits an imaging dataset.
@@ -45,7 +45,7 @@ def fit_imaging(
4545 mat_plot_2d = self .mat_plot_2d_from ()
4646
4747 fit_plotter = FitImagingPlotter (
48- fit = fit , mat_plot_2d = mat_plot_2d , include_2d = self . include_2d
48+ fit = fit , mat_plot_2d = mat_plot_2d , visuals_2d_of_planes_list = visuals_2d_of_planes_list ,
4949 )
5050
5151 fit_plotter .subplot_tracer ()
@@ -56,7 +56,7 @@ def should_plot(name):
5656 mat_plot_2d = self .mat_plot_2d_from ()
5757
5858 fit_plotter = FitImagingPlotter (
59- fit = fit , mat_plot_2d = mat_plot_2d , include_2d = self . include_2d
59+ fit = fit , mat_plot_2d = mat_plot_2d , visuals_2d_of_planes_list = visuals_2d_of_planes_list ,
6060 )
6161
6262 plane_indexes_to_plot = [i for i in fit .tracer .plane_indexes_with_images if i != 0 ]
@@ -72,6 +72,7 @@ def should_plot(name):
7272 fit_plotter .subplot_fit ()
7373
7474 if should_plot ("subplot_fit_log10" ):
75+
7576 try :
7677 if len (fit .tracer .planes ) > 2 :
7778 for plane_index in plane_indexes_to_plot :
@@ -81,6 +82,7 @@ def should_plot(name):
8182 except ValueError :
8283 pass
8384
85+
8486 if should_plot ("subplot_of_planes" ):
8587 fit_plotter .subplot_of_planes ()
8688
@@ -92,7 +94,7 @@ def should_plot(name):
9294
9395 fits_to_fits (should_plot = should_plot , image_path = self .image_path , fit = fit )
9496
95- def fit_imaging_combined (self , fit_list : List [FitImaging ]):
97+ def fit_imaging_combined (self , fit_list : List [FitImaging ], visuals_2d_of_planes_list : Optional [ aplt . Visuals2D ] = None ):
9698 """
9799 Output visualization of all `FitImaging` objects in a summed combined analysis, typically during or after a
98100 model-fit is performed.
@@ -119,7 +121,7 @@ def should_plot(name):
119121
120122 fit_plotter_list = [
121123 FitImagingPlotter (
122- fit = fit , mat_plot_2d = mat_plot_2d , include_2d = self . include_2d
124+ fit = fit , mat_plot_2d = mat_plot_2d , visuals_2d_of_planes_list = visuals_2d_of_planes_list ,
123125 )
124126 for fit in fit_list
125127 ]
0 commit comments