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
18 changes: 9 additions & 9 deletions autolens/imaging/plot/fit_imaging_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from autogalaxy.plot.plot_utils import plot_array
from autoarray.plot.array import _zoom_array_2d
from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize
from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize, tight_layout
from autoarray.plot.utils import numpy_lines as _to_lines
from autoarray.inversion.mappers.abstract import Mapper
from autoarray.inversion.plot.mapper_plots import plot_mapper
Expand Down Expand Up @@ -320,7 +320,7 @@ def subplot_fit(
vmax=source_vmax)

hide_unused_axes(axes_flat)
plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename=f"fit{plane_index_tag}", format=output_format)


Expand Down Expand Up @@ -384,7 +384,7 @@ def subplot_fit_x1_plane(
plot_array(array=norm_resid, ax=axes_flat[5], title="Normalized Residual Map",
colormap=colormap, vmin=-_abs_max, vmax=_abs_max, cb_unit=r"$\sigma$")

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_x1_plane", format=output_format)


Expand Down Expand Up @@ -508,7 +508,7 @@ def subplot_fit_log10(
lines=source_plane_lines, line_colors=source_plane_line_colors,
vmax=source_vmax)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename=f"fit_log10{plane_index_tag}", format=output_format)


Expand Down Expand Up @@ -569,7 +569,7 @@ def subplot_fit_log10_x1_plane(
plot_array(array=fit.chi_squared_map, ax=axes_flat[5], title="Chi-Squared Map",
colormap=colormap, use_log10=True, cb_unit=r"$\chi^2$")

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_log10", format=output_format)


Expand Down Expand Up @@ -637,7 +637,7 @@ def subplot_of_planes(

_plot_source_plane(fit, axes_flat[3], pidx, colormap=colormap)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename=f"fit_of_plane_{pidx}", format=output_format)


Expand Down Expand Up @@ -762,7 +762,7 @@ def subplot_tracer_from_fit(
plot_array(array=magnification, ax=axes_flat[8], title="Magnification",
colormap=colormap)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="tracer", format=output_format)


Expand Down Expand Up @@ -844,7 +844,7 @@ def subplot_fit_combined(
plot_array(array=fit.normalized_residual_map, ax=row_axes[5],
title="Normalized Residual Map", colormap=colormap, cb_unit=r"$\sigma$")

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_combined", format=output_format)


Expand Down Expand Up @@ -920,7 +920,7 @@ def subplot_fit_combined_log10(
plot_array(array=fit.normalized_residual_map, ax=row_axes[5],
title="Normalized Residual Map", colormap=colormap, cb_unit=r"$\sigma$")

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_combined_log10", format=output_format)


Expand Down
10 changes: 5 additions & 5 deletions autolens/interferometer/plot/fit_interferometer_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from autogalaxy.plot.plot_utils import plot_array
from autoarray.plot.yx import plot_yx
from autoarray.plot.utils import save_figure, conf_subplot_figsize
from autoarray.plot.utils import save_figure, conf_subplot_figsize, tight_layout
from autoarray.plot.utils import numpy_lines as _to_lines
from autoarray.inversion.mappers.abstract import Mapper
from autoarray.inversion.plot.mapper_plots import plot_mapper
Expand Down Expand Up @@ -264,7 +264,7 @@ def subplot_fit(
lines=source_plane_lines,
line_colors=source_plane_line_colors)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit", format=output_format)


Expand Down Expand Up @@ -321,7 +321,7 @@ def subplot_fit_dirty_images(
plot_array(array=fit.dirty_chi_squared_map, ax=axes_flat[5],
title="Dirty Chi-Squared Map", colormap=colormap, cb_unit=r"$\chi^2$")

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_dirty_images", format=output_format)


Expand Down Expand Up @@ -383,7 +383,7 @@ def subplot_fit_real_space(
title="Source Reconstruction",
lines=source_plane_lines, line_colors=source_plane_line_colors)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit_real_space", format=output_format)


Expand Down Expand Up @@ -513,5 +513,5 @@ def subplot_tracer_from_fit(
plot_array(array=magnification, ax=axes_flat[8], title="Magnification",
colormap=colormap)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="tracer", format=output_format)
8 changes: 4 additions & 4 deletions autolens/lens/plot/sensitivity_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import autoarray as aa

from autogalaxy.plot.plot_utils import plot_array
from autoarray.plot.utils import save_figure
from autoarray.plot.utils import save_figure, tight_layout


def subplot_tracer_images(
Expand Down Expand Up @@ -111,7 +111,7 @@ def subplot_tracer_images(
title="Residual Map (Subhalo - No Subhalo)",
colormap=colormap, use_log10=use_log10, lines=no_perturb_cc_lines)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="lensed_images", format=output_format)


Expand Down Expand Up @@ -240,7 +240,7 @@ def subplot_sensitivity(
except (TypeError, AttributeError):
pass

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="sensitivity", format=output_format)


Expand Down Expand Up @@ -288,5 +288,5 @@ def subplot_figures_of_merit_grid(
fig, ax = plt.subplots(1, 1, figsize=(7, 7))
plot_array(array=figures_of_merit, ax=ax, title="Increase in Log Evidence",
colormap=colormap)
plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="sensitivity", format=output_format)
6 changes: 3 additions & 3 deletions autolens/lens/plot/subhalo_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Optional

from autogalaxy.plot.plot_utils import plot_array
from autoarray.plot.utils import save_figure
from autoarray.plot.utils import save_figure, tight_layout
from autolens.imaging.plot.fit_imaging_plots import _plot_source_plane


Expand Down Expand Up @@ -94,7 +94,7 @@ def subplot_detection_imaging(
colormap=colormap,
)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="detection_imaging", format=output_format)


Expand Down Expand Up @@ -173,5 +173,5 @@ def subplot_detection_fits(
_plot_source_plane(fit_imaging_with_subhalo, axes[1][2], plane_index=1,
colormap=colormap)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="detection_fits", format=output_format)
8 changes: 4 additions & 4 deletions autolens/lens/plot/tracer_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import autogalaxy as ag

from autogalaxy.plot.plot_utils import plot_array
from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize
from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize, tight_layout
from autoarray.plot.utils import numpy_positions as _to_positions


Expand Down Expand Up @@ -187,7 +187,7 @@ def subplot_tracer(
lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap)

hide_unused_axes(axes_flat)
plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="tracer", format=output_format)


Expand Down Expand Up @@ -241,7 +241,7 @@ def subplot_lensed_images(
use_log10=use_log10,
)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="lensed_images", format=output_format)


Expand Down Expand Up @@ -328,7 +328,7 @@ def subplot_galaxies_images(
)
idx += 1

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="galaxies_images", format=output_format)


Expand Down
4 changes: 2 additions & 2 deletions autolens/point/plot/fit_point_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
from typing import Optional

from autoarray.plot.utils import save_figure, conf_subplot_figsize
from autoarray.plot.utils import save_figure, conf_subplot_figsize, tight_layout


def subplot_fit(
Expand Down Expand Up @@ -81,5 +81,5 @@ def subplot_fit(
output_format=output_format,
)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="fit", format=output_format)
4 changes: 2 additions & 2 deletions autolens/point/plot/point_dataset_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
from typing import Optional

from autoarray.plot.utils import save_figure, conf_subplot_figsize
from autoarray.plot.utils import save_figure, conf_subplot_figsize, tight_layout


def subplot_dataset(
Expand Down Expand Up @@ -69,5 +69,5 @@ def subplot_dataset(
output_format=output_format,
)

plt.tight_layout()
tight_layout()
save_figure(fig, path=output_path, filename="dataset_point", format=output_format)
Loading