From 6f8c9d11620507ae86e002ebb523c63ffd973583 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 2 Apr 2026 13:47:19 +0100 Subject: [PATCH 1/3] fix --- autolens/analysis/plotter.py | 13 ------------- autolens/imaging/plot/fit_imaging_plots.py | 1 + 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/autolens/analysis/plotter.py b/autolens/analysis/plotter.py index 088bc6bfb..180008973 100644 --- a/autolens/analysis/plotter.py +++ b/autolens/analysis/plotter.py @@ -10,7 +10,6 @@ from autolens.lens.tracer import Tracer from autolens.lens.plot.tracer_plots import ( - subplot_tracer, subplot_galaxies_images, fits_tracer, fits_source_plane_images, @@ -67,18 +66,6 @@ def should_plot(name): output_path = str(self.image_path) fmt = self.fmt - if should_plot("subplot_tracer"): - subplot_tracer( - tracer=tracer, - grid=grid, - output_path=output_path, - output_format=fmt, - image_plane_lines=image_plane_lines, - image_plane_line_colors=image_plane_line_colors, - source_plane_lines=source_plane_lines, - source_plane_line_colors=source_plane_line_colors, - ) - if should_plot("subplot_galaxies_images"): subplot_galaxies_images( tracer=tracer, diff --git a/autolens/imaging/plot/fit_imaging_plots.py b/autolens/imaging/plot/fit_imaging_plots.py index 59908304d..ebd1b281a 100644 --- a/autolens/imaging/plot/fit_imaging_plots.py +++ b/autolens/imaging/plot/fit_imaging_plots.py @@ -713,6 +713,7 @@ def subplot_tracer_from_fit( else: axes_flat[1].axis("off") + # Panel 2: Source Plane (No Zoom) (same as subplot_fit panel 12) _plot_source_plane(fit, axes_flat[2], final_plane_index, zoom_to_brightest=False, colormap=colormap, title="Source Plane (No Zoom)", From eaca83c26dc515cb0eaf9d5a85d1f8f4bbcc8a71 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 2 Apr 2026 14:20:45 +0100 Subject: [PATCH 2/3] Add interferometer tracer subplot, fix grid and curve colors - Add subplot_tracer_from_fit to interferometer plots (9-panel tracer subplot matching imaging behaviour) - Use galaxy_image_dict for source model image panel so pixelized sources render correctly - Replace Zoom2D/from_extent grid with real_space_mask.derive_grid.all_false across all interferometer plot functions to fix shifted grids - Change critical curve colors: tangential=white, radial=yellow Co-Authored-By: Claude Opus 4.6 (1M context) --- autolens/imaging/plot/fit_imaging_plots.py | 4 +- autolens/interferometer/model/plotter.py | 13 +- autolens/interferometer/model/visualizer.py | 5 +- .../plot/fit_interferometer_plots.py | 152 ++++++++++++++++-- autolens/plot/__init__.py | 1 + 5 files changed, 151 insertions(+), 24 deletions(-) diff --git a/autolens/imaging/plot/fit_imaging_plots.py b/autolens/imaging/plot/fit_imaging_plots.py index ebd1b281a..37d7d2544 100644 --- a/autolens/imaging/plot/fit_imaging_plots.py +++ b/autolens/imaging/plot/fit_imaging_plots.py @@ -42,11 +42,11 @@ def _compute_critical_curve_lines(tracer, grid): _rad_ca_lines = _to_lines(list(rad_ca) if rad_ca is not None else []) or [] image_plane_lines = (_tan_cc_lines + _rad_cc_lines) or None image_plane_line_colors = ( - ["black"] * len(_tan_cc_lines) + ["white"] * len(_rad_cc_lines) + ["white"] * len(_tan_cc_lines) + ["yellow"] * len(_rad_cc_lines) ) source_plane_lines = (_tan_ca_lines + _rad_ca_lines) or None source_plane_line_colors = ( - ["black"] * len(_tan_ca_lines) + ["white"] * len(_rad_ca_lines) + ["white"] * len(_tan_ca_lines) + ["yellow"] * len(_rad_ca_lines) ) return image_plane_lines, image_plane_line_colors, source_plane_lines, source_plane_line_colors except Exception: diff --git a/autolens/interferometer/model/plotter.py b/autolens/interferometer/model/plotter.py index f03911f45..4d7b7c4ee 100644 --- a/autolens/interferometer/model/plotter.py +++ b/autolens/interferometer/model/plotter.py @@ -14,6 +14,7 @@ subplot_fit, subplot_fit_dirty_images, subplot_fit_real_space, + subplot_tracer_from_fit, _compute_critical_curve_lines, ) from autolens.analysis.plotter import Plotter @@ -59,10 +60,7 @@ def should_plot(name): # Use pre-computed critical curves if provided, otherwise compute once here. if image_plane_lines is None and source_plane_lines is None: tracer = fit.tracer_linear_light_profiles_to_light_profiles - _zoom = aa.Zoom2D(mask=fit.dataset.real_space_mask) - _cc_grid = aa.Grid2D.from_extent( - extent=_zoom.extent_from(buffer=0), shape_native=_zoom.shape_native - ) + _cc_grid = fit.dataset.real_space_mask.derive_grid.all_false ip_lines, ip_colors, sp_lines, sp_colors = _compute_critical_curve_lines(tracer, _cc_grid) else: ip_lines, ip_colors, sp_lines, sp_colors = ( @@ -77,6 +75,13 @@ def should_plot(name): source_plane_lines=sp_lines, source_plane_line_colors=sp_colors, ) + if plot_setting(section="tracer", name="subplot_tracer"): + subplot_tracer_from_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, + ) + if should_plot("subplot_fit_dirty_images") or quick_update: subplot_fit_dirty_images( fit, output_path=output_path, output_format=fmt, diff --git a/autolens/interferometer/model/visualizer.py b/autolens/interferometer/model/visualizer.py index 830f67ba3..f367db3b7 100644 --- a/autolens/interferometer/model/visualizer.py +++ b/autolens/interferometer/model/visualizer.py @@ -101,10 +101,7 @@ def visualize( ) # Compute grid and critical curves once for all plot functions. - zoom = ag.Zoom2D(mask=fit.dataset.real_space_mask) - grid = ag.Grid2D.from_extent( - extent=zoom.extent_from(buffer=0), shape_native=zoom.shape_native - ) + grid = fit.dataset.real_space_mask.derive_grid.all_false ip_lines, ip_colors, sp_lines, sp_colors = _compute_critical_curve_lines( tracer, grid ) diff --git a/autolens/interferometer/plot/fit_interferometer_plots.py b/autolens/interferometer/plot/fit_interferometer_plots.py index 9b745b434..39dc75a4b 100644 --- a/autolens/interferometer/plot/fit_interferometer_plots.py +++ b/autolens/interferometer/plot/fit_interferometer_plots.py @@ -35,11 +35,11 @@ def _compute_critical_curve_lines(tracer, grid): _rad_ca_lines = _to_lines(list(rad_ca) if rad_ca is not None else []) or [] image_plane_lines = (_tan_cc_lines + _rad_cc_lines) or None image_plane_line_colors = ( - ["black"] * len(_tan_cc_lines) + ["white"] * len(_rad_cc_lines) + ["white"] * len(_tan_cc_lines) + ["yellow"] * len(_rad_cc_lines) ) source_plane_lines = (_tan_ca_lines + _rad_ca_lines) or None source_plane_line_colors = ( - ["black"] * len(_tan_ca_lines) + ["white"] * len(_rad_ca_lines) + ["white"] * len(_tan_ca_lines) + ["yellow"] * len(_rad_ca_lines) ) return image_plane_lines, image_plane_line_colors, source_plane_lines, source_plane_line_colors except Exception: @@ -171,10 +171,7 @@ def subplot_fit( if image_plane_lines is None and source_plane_lines is None: tracer = fit.tracer_linear_light_profiles_to_light_profiles - _zoom = aa.Zoom2D(mask=fit.dataset.real_space_mask) - _cc_grid = aa.Grid2D.from_extent( - extent=_zoom.extent_from(buffer=0), shape_native=_zoom.shape_native - ) + _cc_grid = fit.dataset.real_space_mask.derive_grid.all_false image_plane_lines, image_plane_line_colors, source_plane_lines, source_plane_line_colors = ( _compute_critical_curve_lines(tracer, _cc_grid) ) @@ -294,10 +291,7 @@ def subplot_fit_dirty_images( """ if image_plane_lines is None: tracer = fit.tracer_linear_light_profiles_to_light_profiles - _zoom = aa.Zoom2D(mask=fit.dataset.real_space_mask) - _cc_grid = aa.Grid2D.from_extent( - extent=_zoom.extent_from(buffer=0), shape_native=_zoom.shape_native - ) + _cc_grid = fit.dataset.real_space_mask.derive_grid.all_false image_plane_lines, image_plane_line_colors, _, _ = ( _compute_critical_curve_lines(tracer, _cc_grid) ) @@ -364,10 +358,7 @@ def subplot_fit_real_space( if fit.inversion is None: # Parametric source: image-plane model image + source-plane image - zoom = aa.Zoom2D(mask=fit.dataset.real_space_mask) - grid = aa.Grid2D.from_extent( - extent=zoom.extent_from(buffer=0), shape_native=zoom.shape_native - ) + grid = fit.dataset.real_space_mask.derive_grid.all_false image = tracer.image_2d_from(grid=grid) plot_array(array=image, ax=axes_flat[0], title="Image", colormap=colormap) @@ -386,3 +377,136 @@ def subplot_fit_real_space( plt.tight_layout() save_figure(fig, path=output_path, filename="fit_real_space", format=output_format) + + +def subplot_tracer_from_fit( + fit, + output_path: Optional[str] = None, + output_format: str = "png", + colormap: Optional[str] = None, + image_plane_lines=None, + image_plane_line_colors=None, + source_plane_lines=None, + source_plane_line_colors=None, +): + """ + Produce a 9-panel tracer subplot derived from a `FitInterferometer` object. + + Panels (3x3 = 9 axes): + 0: Dirty Model Image with critical curves + 1: Source Model Image (dirty, image-plane projection) with critical curves + 2: Source plane (no zoom) with caustics + 3: Lens image (log10) with critical curves + 4: Convergence (log10) + 5: Potential (log10) + 6: Deflections Y with critical curves + 7: Deflections X with critical curves + 8: Magnification with critical curves + + Parameters + ---------- + fit : FitInterferometer + The interferometer fit whose best-fit tracer is visualised. + output_path : str, optional + Directory in which to save the figure. If ``None`` the figure is + not saved to disk. + output_format : str, optional + Image format passed to :func:`~autoarray.plot.utils.save_figure`. + colormap : str, optional + Matplotlib colormap name applied to all image panels. + """ + from autogalaxy.operate.lens_calc import LensCalc + + final_plane_index = len(fit.tracer.planes) - 1 + tracer = fit.tracer_linear_light_profiles_to_light_profiles + + # --- grid from real-space mask (matches imaging behaviour) --- + grid = fit.dataset.real_space_mask.derive_grid.all_false + + if image_plane_lines is None and source_plane_lines is None: + image_plane_lines, image_plane_line_colors, source_plane_lines, source_plane_line_colors = ( + _compute_critical_curve_lines(tracer, grid) + ) + + traced_grids = tracer.traced_grid_2d_list_from(grid=grid) + lens_galaxies = ag.Galaxies(galaxies=tracer.planes[0]) + lens_image = lens_galaxies.image_2d_from(grid=traced_grids[0]) + + deflections = tracer.deflections_yx_2d_from(grid=grid) + deflections_y = aa.Array2D(values=deflections.slim[:, 0], mask=grid.mask) + deflections_x = aa.Array2D(values=deflections.slim[:, 1], mask=grid.mask) + + magnification = LensCalc.from_mass_obj(tracer).magnification_2d_from(grid=grid) + + fig, axes = plt.subplots(3, 3, figsize=conf_subplot_figsize(3, 3)) + axes_flat = list(axes.flatten()) + + # Panel 0: Dirty Model Image + plot_array(array=fit.dirty_model_image, ax=axes_flat[0], title="Dirty Model Image", + lines=image_plane_lines, line_colors=image_plane_line_colors, + colormap=colormap) + + # Panel 1: Lensed source image (image-plane projection). + # Use galaxy_image_dict so that pixelized (inversion) sources are included. + try: + galaxy_image_dict = fit.galaxy_image_dict + source_galaxies_list = tracer.planes[final_plane_index] + source_model_img = sum( + galaxy_image_dict[galaxy] + for galaxy in source_galaxies_list + if galaxy in galaxy_image_dict + ) + if np.all(source_model_img == 0): + source_model_img = None + except Exception: + source_model_img = None + if source_model_img is not None: + plot_array(array=source_model_img, ax=axes_flat[1], title="Source Model Image", + colormap=colormap, + lines=image_plane_lines, line_colors=image_plane_line_colors) + else: + axes_flat[1].axis("off") + + # Panel 2: Source Plane (No Zoom) with caustics + _plot_source_plane(fit, axes_flat[2], final_plane_index, zoom_to_brightest=False, + colormap=colormap, title="Source Plane (No Zoom)", + lines=source_plane_lines, line_colors=source_plane_line_colors) + + # Panel 3: Lens Image (log10) + plot_array(array=lens_image, ax=axes_flat[3], title="Lens Image", + lines=image_plane_lines, line_colors=image_plane_line_colors, + colormap=colormap, use_log10=True) + + # Panel 4: Convergence (log10) + try: + convergence = tracer.convergence_2d_from(grid=grid) + plot_array(array=convergence, ax=axes_flat[4], title="Convergence", + colormap=colormap, use_log10=True) + except Exception: + axes_flat[4].axis("off") + + # Panel 5: Potential (log10) + try: + potential = tracer.potential_2d_from(grid=grid) + plot_array(array=potential, ax=axes_flat[5], title="Potential", + colormap=colormap, use_log10=True) + except Exception: + axes_flat[5].axis("off") + + # Panel 6: Deflections Y + plot_array(array=deflections_y, ax=axes_flat[6], title="Deflections Y", + lines=image_plane_lines, line_colors=image_plane_line_colors, + colormap=colormap) + + # Panel 7: Deflections X + plot_array(array=deflections_x, ax=axes_flat[7], title="Deflections X", + lines=image_plane_lines, line_colors=image_plane_line_colors, + colormap=colormap) + + # Panel 8: Magnification + plot_array(array=magnification, ax=axes_flat[8], title="Magnification", + lines=image_plane_lines, line_colors=image_plane_line_colors, + colormap=colormap) + + plt.tight_layout() + save_figure(fig, path=output_path, filename="tracer", format=output_format) diff --git a/autolens/plot/__init__.py b/autolens/plot/__init__.py index 14c29ba46..4c9a4ca4a 100644 --- a/autolens/plot/__init__.py +++ b/autolens/plot/__init__.py @@ -53,6 +53,7 @@ from autolens.interferometer.plot.fit_interferometer_plots import ( subplot_fit as subplot_fit_interferometer, subplot_fit_real_space as subplot_fit_interferometer_real_space, + subplot_tracer_from_fit as subplot_fit_interferometer_tracer, ) from autolens.point.plot.fit_point_plots import subplot_fit as subplot_fit_point from autolens.point.plot.point_dataset_plots import subplot_dataset as subplot_point_dataset From 16dcb2e61a51d5d21e445b34d64772589df1d7dc Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 2 Apr 2026 18:08:42 +0100 Subject: [PATCH 3/3] Visualization overhaul: interferometer tracer, plot consolidation, fits API - Add subplot_tracer_from_fit for interferometer plots - Use galaxy_image_dict for source model image (supports pixelizations) - Fix interferometer grid to use real_space_mask.derive_grid.all_false - Change critical curve colors: tangential=white, radial=yellow - Remove curves from deflection/magnification panels - Source plane No Zoom now uses mask-extent grid (not full image) - Consolidate plot_array/plot_grid imports through autogalaxy - Export fits_array, fits_imaging, fits_interferometer - Remove flip_for_ds9 config Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 53 +++++++++++-------- autolens/analysis/plotter.py | 2 +- autolens/imaging/plot/fit_imaging_plots.py | 16 ++++-- .../plot/fit_interferometer_plots.py | 15 ++++-- autolens/lens/plot/sensitivity_plots.py | 2 +- autolens/lens/plot/subhalo_plots.py | 2 +- autolens/lens/plot/tracer_plots.py | 2 +- autolens/plot/__init__.py | 9 ++-- autolens/point/plot/fit_point_plots.py | 2 +- autolens/point/plot/point_dataset_plots.py | 2 +- test_autolens/config/general.yaml | 2 - 11 files changed, 65 insertions(+), 42 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a1e338899..eab483c1a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,33 +9,44 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co pip install -e ".[dev]" ``` -### Run Tests -```bash -# All tests -python -m pytest test_autolens/ +### Run Tests +```bash +# All tests +python -m pytest test_autolens/ # Single test file python -m pytest test_autolens/lens/test_tracer.py -# With output -python -m pytest test_autolens/imaging/test_fit_imaging.py -s -``` - -### Codex / sandboxed runs - -When running Python from Codex or any restricted environment, set writable cache directories so `numba` and `matplotlib` do not fail on unwritable home or source-tree paths: - -```bash -NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autolens/ -``` - -This workspace is often imported from `/mnt/c/...` and Codex may not be able to write to module `__pycache__` directories or `/home/jammy/.cache`, which can cause import-time `numba` caching failures without this override. - -### Formatting -```bash -black autolens/ +# With output +python -m pytest test_autolens/imaging/test_fit_imaging.py -s +``` + +### Codex / sandboxed runs + +When running Python from Codex or any restricted environment, set writable cache directories so `numba` and `matplotlib` do not fail on unwritable home or source-tree paths: + +```bash +NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autolens/ +``` + +This workspace is often imported from `/mnt/c/...` and Codex may not be able to write to module `__pycache__` directories or `/home/jammy/.cache`, which can cause import-time `numba` caching failures without this override. + +### Formatting +```bash +black autolens/ +``` + +### Plot Output Mode + +Set `PYAUTOARRAY_OUTPUT_MODE=1` to capture every figure produced by a script into numbered PNG files in `./output_mode//`. This is useful for visually inspecting all plots from an integration test without needing a display. + +```bash +PYAUTOARRAY_OUTPUT_MODE=1 python scripts/my_script.py +# -> ./output_mode/my_script/0_fit.png, 1_tracer.png, ... ``` +When this env var is set, all `save_figure`, `subplot_save`, and `_save_subplot` calls are intercepted — the normal output path is bypassed and figures are written sequentially to the output_mode directory instead. + ## Architecture **PyAutoLens** is the gravitational lensing layer built on top of PyAutoGalaxy. It adds multi-plane ray-tracing, the `Tracer` object, and lensing-specific fit classes. It depends on: diff --git a/autolens/analysis/plotter.py b/autolens/analysis/plotter.py index 180008973..673a3b2d9 100644 --- a/autolens/analysis/plotter.py +++ b/autolens/analysis/plotter.py @@ -14,7 +14,7 @@ fits_tracer, fits_source_plane_images, ) -from autoarray.plot.array import plot_array +from autogalaxy.plot.plot_utils import plot_array class Plotter(AgPlotter): diff --git a/autolens/imaging/plot/fit_imaging_plots.py b/autolens/imaging/plot/fit_imaging_plots.py index 37d7d2544..163ebaed4 100644 --- a/autolens/imaging/plot/fit_imaging_plots.py +++ b/autolens/imaging/plot/fit_imaging_plots.py @@ -6,7 +6,8 @@ import autoarray as aa import autogalaxy as ag -from autoarray.plot.array import plot_array, _zoom_array_2d +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 numpy_lines as _to_lines from autoarray.inversion.mappers.abstract import Mapper @@ -134,9 +135,17 @@ def _plot_source_plane(fit, ax, plane_index, zoom_to_brightest=True, """ tracer = fit.tracer_linear_light_profiles_to_light_profiles if not tracer.planes[plane_index].has(cls=aa.Pixelization): + if zoom_to_brightest: + grid = fit.mask.derive_grid.all_false + else: + zoom = aa.Zoom2D(mask=fit.mask) + grid = aa.Grid2D.from_extent( + extent=zoom.extent_from(buffer=0), + shape_native=zoom.shape_native, + ) image = plane_image_from( galaxies=tracer.planes[plane_index], - grid=fit.mask.derive_grid.all_false, + grid=grid, zoom_to_brightest=zoom_to_brightest, ) plot_array( @@ -743,17 +752,14 @@ def subplot_tracer_from_fit( # Panel 6: Deflections Y plot_array(array=deflections_y, ax=axes_flat[6], title="Deflections Y", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) # Panel 7: Deflections X plot_array(array=deflections_x, ax=axes_flat[7], title="Deflections X", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) # Panel 8: Magnification plot_array(array=magnification, ax=axes_flat[8], title="Magnification", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) plt.tight_layout() diff --git a/autolens/interferometer/plot/fit_interferometer_plots.py b/autolens/interferometer/plot/fit_interferometer_plots.py index 39dc75a4b..c63ae7cb9 100644 --- a/autolens/interferometer/plot/fit_interferometer_plots.py +++ b/autolens/interferometer/plot/fit_interferometer_plots.py @@ -6,7 +6,7 @@ import autoarray as aa import autogalaxy as ag -from autoarray.plot.array import plot_array +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 numpy_lines as _to_lines @@ -91,9 +91,17 @@ def _plot_source_plane(fit, ax, plane_index, zoom_to_brightest=True, tracer = fit.tracer_linear_light_profiles_to_light_profiles if not tracer.planes[plane_index].has(cls=aa.Pixelization): + if zoom_to_brightest: + grid = fit.dataset.real_space_mask.derive_grid.all_false + else: + zoom = aa.Zoom2D(mask=fit.dataset.real_space_mask) + grid = aa.Grid2D.from_extent( + extent=zoom.extent_from(buffer=0), + shape_native=zoom.shape_native, + ) image = plane_image_from( galaxies=tracer.planes[plane_index], - grid=fit.dataset.real_space_mask.derive_grid.all_false, + grid=grid, zoom_to_brightest=zoom_to_brightest, ) plot_array( @@ -495,17 +503,14 @@ def subplot_tracer_from_fit( # Panel 6: Deflections Y plot_array(array=deflections_y, ax=axes_flat[6], title="Deflections Y", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) # Panel 7: Deflections X plot_array(array=deflections_x, ax=axes_flat[7], title="Deflections X", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) # Panel 8: Magnification plot_array(array=magnification, ax=axes_flat[8], title="Magnification", - lines=image_plane_lines, line_colors=image_plane_line_colors, colormap=colormap) plt.tight_layout() diff --git a/autolens/lens/plot/sensitivity_plots.py b/autolens/lens/plot/sensitivity_plots.py index bc2440d13..04759f80a 100644 --- a/autolens/lens/plot/sensitivity_plots.py +++ b/autolens/lens/plot/sensitivity_plots.py @@ -5,7 +5,7 @@ import autoarray as aa -from autoarray.plot.array import plot_array +from autogalaxy.plot.plot_utils import plot_array from autoarray.plot.utils import save_figure diff --git a/autolens/lens/plot/subhalo_plots.py b/autolens/lens/plot/subhalo_plots.py index ee3e35875..c758b796d 100644 --- a/autolens/lens/plot/subhalo_plots.py +++ b/autolens/lens/plot/subhalo_plots.py @@ -2,7 +2,7 @@ import matplotlib.pyplot as plt from typing import Optional -from autoarray.plot.array import plot_array +from autogalaxy.plot.plot_utils import plot_array from autoarray.plot.utils import save_figure from autolens.imaging.plot.fit_imaging_plots import _plot_source_plane diff --git a/autolens/lens/plot/tracer_plots.py b/autolens/lens/plot/tracer_plots.py index c8a837099..b8f0238f1 100644 --- a/autolens/lens/plot/tracer_plots.py +++ b/autolens/lens/plot/tracer_plots.py @@ -5,7 +5,7 @@ import autoarray as aa import autogalaxy as ag -from autoarray.plot.array import plot_array +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 numpy_positions as _to_positions diff --git a/autolens/plot/__init__.py b/autolens/plot/__init__.py index 4c9a4ca4a..c6ad6bc55 100644 --- a/autolens/plot/__init__.py +++ b/autolens/plot/__init__.py @@ -5,14 +5,17 @@ # --------------------------------------------------------------------------- # Standalone plot helpers (autoarray) # --------------------------------------------------------------------------- -from autoarray.plot.array import plot_array -from autoarray.plot.grid import plot_grid +from autogalaxy.plot.plot_utils import plot_array, plot_grid, fits_array from autoarray.dataset.plot.imaging_plots import ( subplot_imaging_dataset, subplot_imaging_dataset_list, + fits_imaging, +) +from autoarray.dataset.plot.interferometer_plots import ( + subplot_interferometer_dirty_images, + fits_interferometer, ) -from autoarray.dataset.plot.interferometer_plots import subplot_interferometer_dirty_images # --------------------------------------------------------------------------- # Galaxy / profile subplots (autogalaxy) diff --git a/autolens/point/plot/fit_point_plots.py b/autolens/point/plot/fit_point_plots.py index 2507f9aee..b07b2dba2 100644 --- a/autolens/point/plot/fit_point_plots.py +++ b/autolens/point/plot/fit_point_plots.py @@ -36,7 +36,7 @@ def subplot_fit( output_format : str, optional Image format passed to :func:`~autoarray.plot.utils.save_figure`. """ - from autoarray.plot.grid import plot_grid + from autogalaxy.plot.plot_utils import plot_grid from autoarray.plot.yx import plot_yx has_fluxes = fit.dataset.fluxes is not None diff --git a/autolens/point/plot/point_dataset_plots.py b/autolens/point/plot/point_dataset_plots.py index 6bc99e845..2cc63adec 100644 --- a/autolens/point/plot/point_dataset_plots.py +++ b/autolens/point/plot/point_dataset_plots.py @@ -32,7 +32,7 @@ def subplot_dataset( output_format : str, optional Image format passed to :func:`~autoarray.plot.utils.save_figure`. """ - from autoarray.plot.grid import plot_grid + from autogalaxy.plot.plot_utils import plot_grid from autoarray.plot.yx import plot_yx has_fluxes = dataset.fluxes is not None diff --git a/test_autolens/config/general.yaml b/test_autolens/config/general.yaml index 61d2f5452..1a7a58c5d 100644 --- a/test_autolens/config/general.yaml +++ b/test_autolens/config/general.yaml @@ -1,7 +1,5 @@ analysis: n_cores: 1 -fits: - flip_for_ds9: false psf: use_fft_default: false # If True, PSFs are convolved using FFTs by default, which is faster and uses less memory in all cases except for very small PSFs, False uses direct convolution. hpc: