Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion autolens/analysis/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def should_plot(name):
grid=grid,
output_path=output_path,
output_format=fmt,
title_prefix=self.title_prefix,
)

if should_plot("fits_tracer"):
Expand Down Expand Up @@ -104,10 +105,11 @@ def should_plot(name):
if isinstance(fmt, (list, tuple)):
fmt = fmt[0]

_title = f"{self.title_prefix.rstrip()} Image With Positions" if self.title_prefix else "Image With Positions"
plot_array(
array=image,
positions=[pos_arr],
title="Image With Positions",
title=_title,
output_path=str(self.image_path),
output_filename="image_with_positions",
output_format=fmt,
Expand Down
14 changes: 11 additions & 3 deletions autolens/imaging/model/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ def should_plot(name):
plane_index=plane_index,
image_plane_lines=ip_lines, image_plane_line_colors=ip_colors,
source_plane_lines=sp_lines, source_plane_line_colors=sp_colors,
title_prefix=self.title_prefix,
)
else:
subplot_fit(
fit, output_path=output_path, output_format=fmt,
image_plane_lines=ip_lines, image_plane_line_colors=ip_colors,
source_plane_lines=sp_lines, source_plane_line_colors=sp_colors,
title_prefix=self.title_prefix,
)

if quick_update:
Expand All @@ -100,6 +102,7 @@ def should_plot(name):
fit, output_path=output_path, output_format=fmt,
image_plane_lines=ip_lines, image_plane_line_colors=ip_colors,
source_plane_lines=sp_lines, source_plane_line_colors=sp_colors,
title_prefix=self.title_prefix,
)

if should_plot("subplot_fit_log10"):
Expand All @@ -111,18 +114,21 @@ def should_plot(name):
plane_index=plane_index,
image_plane_lines=ip_lines, image_plane_line_colors=ip_colors,
source_plane_lines=sp_lines, source_plane_line_colors=sp_colors,
title_prefix=self.title_prefix,
)
else:
subplot_fit_log10(
fit, output_path=output_path, output_format=fmt,
image_plane_lines=ip_lines, image_plane_line_colors=ip_colors,
source_plane_lines=sp_lines, source_plane_line_colors=sp_colors,
title_prefix=self.title_prefix,
)
except ValueError:
pass

if should_plot("subplot_of_planes"):
subplot_of_planes(fit, output_path=output_path, output_format=fmt)
subplot_of_planes(fit, output_path=output_path, output_format=fmt,
title_prefix=self.title_prefix)

if should_plot("fits_fit"):
fits_fit(fit=fit, output_path=self.image_path)
Expand Down Expand Up @@ -154,9 +160,11 @@ def should_plot(name):
fmt = self.fmt

if should_plot("subplot_fit") or quick_update:
subplot_fit_combined(fit_list, output_path=output_path, output_format=fmt)
subplot_fit_combined(fit_list, output_path=output_path, output_format=fmt,
title_prefix=self.title_prefix)

if quick_update:
return

subplot_fit_combined_log10(fit_list, output_path=output_path, output_format=fmt)
subplot_fit_combined_log10(fit_list, output_path=output_path, output_format=fmt,
title_prefix=self.title_prefix)
Loading
Loading