Skip to content

Commit

Permalink
improve inversion subplot
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Jan 18, 2024
1 parent 08352cc commit 6600a30
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions autoarray/inversion/plot/inversion_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,40 @@ def subplot_of_mapper(
auto_filename
The default filename of the output subplot if written to hard-disk.
"""
self.open_subplot_figure(number_subplots=9)
self.open_subplot_figure(number_subplots=12)

mapper_image_plane_mesh_grid = self.include_2d._mapper_image_plane_mesh_grid

self.include_2d._mapper_image_plane_mesh_grid = False

self.mat_plot_2d.plot_array(
array=self.inversion.data,
visuals_2d=self.get_visuals_2d_for_data(),
auto_labels=AutoLabels(title=f" Data"),
)

self.figures_2d_of_pixelization(
pixelization_index=mapper_index, reconstructed_image=True
)

contour_original = self.mat_plot_2d.contour

self.mat_plot_2d.use_log10 = True
self.mat_plot_2d.contour = False

self.mat_plot_2d.plot_array(
array=self.inversion.data,
visuals_2d=self.get_visuals_2d_for_data(),
auto_labels=AutoLabels(title=f" Data"),
)

self.figures_2d_of_pixelization(
pixelization_index=mapper_index, reconstructed_image=True
)

self.mat_plot_2d.use_log10 = False
self.mat_plot_2d.contour = contour_original

self.include_2d._mapper_image_plane_mesh_grid = True
self.figures_2d_of_pixelization(
pixelization_index=mapper_index, reconstructed_image=True
Expand All @@ -266,14 +291,6 @@ def subplot_of_mapper(
self.figures_2d_of_pixelization(
pixelization_index=mapper_index, reconstruction=True
)
self.figures_2d_of_pixelization(pixelization_index=mapper_index, errors=True)

try:
self.figures_2d_of_pixelization(
pixelization_index=mapper_index, regularization_weights=True
)
except IndexError:
pass

self.set_title(label="Source Reconstruction (Unzoomed)")
self.figures_2d_of_pixelization(
Expand All @@ -283,11 +300,20 @@ def subplot_of_mapper(
)
self.set_title(label=None)

self.figures_2d_of_pixelization(pixelization_index=mapper_index, errors=True)
self.set_title(label="Errors (Unzoomed)")
self.figures_2d_of_pixelization(
pixelization_index=mapper_index, errors=True, zoom_to_brightest=False
)


try:
self.figures_2d_of_pixelization(
pixelization_index=mapper_index, regularization_weights=True
)
except IndexError:
pass

self.set_title(label="Regularization Weights (Unzoomed)")
try:
self.figures_2d_of_pixelization(
Expand Down

0 comments on commit 6600a30

Please sign in to comment.