44from autoarray .plot .visuals .two_d import Visuals2D
55from autoarray .plot .mat_plot .two_d import MatPlot2D
66from autoarray .plot .auto_labels import AutoLabels
7- from autoarray .plot .abstract_plotters import Plotter
7+ from autoarray .plot .abstract_plotters import AbstractPlotter
88from autoarray .dataset .imaging .dataset import Imaging
99
1010
11- class ImagingPlotterMeta (Plotter ):
11+ class ImagingPlotterMeta (AbstractPlotter ):
1212 def __init__ (
1313 self ,
1414 dataset : Imaging ,
15- get_visuals_2d : Callable ,
1615 mat_plot_2d : MatPlot2D = None ,
1716 visuals_2d : Visuals2D = None ,
1817 ):
@@ -31,8 +30,6 @@ def __init__(
3130 ----------
3231 dataset
3332 The imaging dataset the plotter plots.
34- get_visuals_2d
35- A function which extracts from the `Imaging` the 2D visuals which are plotted on figures.
3633 mat_plot_2d
3734 Contains objects which wrap the matplotlib function calls that make 2D plots.
3835 visuals_2d
@@ -42,7 +39,6 @@ def __init__(
4239 super ().__init__ (mat_plot_2d = mat_plot_2d , visuals_2d = visuals_2d )
4340
4441 self .dataset = dataset
45- self .get_visuals_2d = get_visuals_2d
4642
4743 @property
4844 def imaging (self ):
@@ -84,21 +80,21 @@ def figures_2d(
8480 if data :
8581 self .mat_plot_2d .plot_array (
8682 array = self .dataset .data ,
87- visuals_2d = self .get_visuals_2d () ,
83+ visuals_2d = self .visuals_2d ,
8884 auto_labels = AutoLabels (title = title_str or f" Data" , filename = "data" ),
8985 )
9086
9187 if noise_map :
9288 self .mat_plot_2d .plot_array (
9389 array = self .dataset .noise_map ,
94- visuals_2d = self .get_visuals_2d () ,
90+ visuals_2d = self .visuals_2d ,
9591 auto_labels = AutoLabels (title_str or f"Noise-Map" , filename = "noise_map" ),
9692 )
9793
9894 if psf :
9995 self .mat_plot_2d .plot_array (
10096 array = self .dataset .psf ,
101- visuals_2d = self .get_visuals_2d () ,
97+ visuals_2d = self .visuals_2d ,
10298 auto_labels = AutoLabels (
10399 title = title_str or f"Point Spread Function" ,
104100 filename = "psf" ,
@@ -109,7 +105,7 @@ def figures_2d(
109105 if signal_to_noise_map :
110106 self .mat_plot_2d .plot_array (
111107 array = self .dataset .signal_to_noise_map ,
112- visuals_2d = self .get_visuals_2d () ,
108+ visuals_2d = self .visuals_2d ,
113109 auto_labels = AutoLabels (
114110 title = title_str or f"Signal-To-Noise Map" ,
115111 filename = "signal_to_noise_map" ,
@@ -120,7 +116,7 @@ def figures_2d(
120116 if over_sample_size_lp :
121117 self .mat_plot_2d .plot_array (
122118 array = self .dataset .grids .over_sample_size_lp ,
123- visuals_2d = self .get_visuals_2d () ,
119+ visuals_2d = self .visuals_2d ,
124120 auto_labels = AutoLabels (
125121 title = title_str or f"Over Sample Size (Light Profiles)" ,
126122 filename = "over_sample_size_lp" ,
@@ -131,7 +127,7 @@ def figures_2d(
131127 if over_sample_size_pixelization :
132128 self .mat_plot_2d .plot_array (
133129 array = self .dataset .grids .over_sample_size_pixelization ,
134- visuals_2d = self .get_visuals_2d () ,
130+ visuals_2d = self .visuals_2d ,
135131 auto_labels = AutoLabels (
136132 title = title_str or f"Over Sample Size (Pixelization)" ,
137133 filename = "over_sample_size_pixelization" ,
@@ -220,7 +216,7 @@ def subplot_dataset(self):
220216 self .mat_plot_2d .use_log10 = use_log10_original
221217
222218
223- class ImagingPlotter (Plotter ):
219+ class ImagingPlotter (AbstractPlotter ):
224220 def __init__ (
225221 self ,
226222 dataset : Imaging ,
@@ -254,14 +250,10 @@ def __init__(
254250
255251 self ._imaging_meta_plotter = ImagingPlotterMeta (
256252 dataset = self .dataset ,
257- get_visuals_2d = self .get_visuals_2d ,
258253 mat_plot_2d = self .mat_plot_2d ,
259254 visuals_2d = self .visuals_2d ,
260255 )
261256
262257 self .figures_2d = self ._imaging_meta_plotter .figures_2d
263258 self .subplot = self ._imaging_meta_plotter .subplot
264259 self .subplot_dataset = self ._imaging_meta_plotter .subplot_dataset
265-
266- def get_visuals_2d (self ):
267- return self .get_2d .via_mask_from (mask = self .dataset .mask )
0 commit comments