Skip to content

Commit 28a2e85

Browse files
Jammy2211Jammy2211
authored andcommitted
small fix
1 parent b7095e4 commit 28a2e85

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

autoarray/inversion/plot/inversion_plotters.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,22 @@ def figures_2d(self, reconstructed_operated_data: bool = False):
7979
Whether to make a 2D plot (via `imshow`) of the reconstructed image data.
8080
"""
8181
if reconstructed_operated_data:
82-
self.mat_plot_2d.plot_array(
83-
array=self.inversion.mapped_reconstructed_operated_data,
84-
visuals_2d=self.visuals_2d,
85-
auto_labels=AutoLabels(
86-
title="Reconstructed Image", filename="reconstructed_operated_data"
87-
),
88-
)
82+
try:
83+
self.mat_plot_2d.plot_array(
84+
array=self.inversion.mapped_reconstructed_operated_data,
85+
visuals_2d=self.visuals_2d,
86+
auto_labels=AutoLabels(
87+
title="Reconstructed Image", filename="reconstructed_operated_data"
88+
),
89+
)
90+
except AttributeError:
91+
self.mat_plot_2d.plot_array(
92+
array=self.inversion.mapped_reconstructed_data,
93+
visuals_2d=self.visuals_2d,
94+
auto_labels=AutoLabels(
95+
title="Reconstructed Image", filename="reconstructed_data"
96+
),
97+
)
8998

9099
def figures_2d_of_pixelization(
91100
self,

0 commit comments

Comments
 (0)