We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7290b93 + cbeca2e commit 0ec1493Copy full SHA for 0ec1493
9 files changed
autolens/aggregator/subplot.py
@@ -17,7 +17,7 @@ class FITSFit(Enum):
17
The HDUs that can be extracted from the fit.fits file.
18
"""
19
20
- model_image = "MODEL_IMAGE"
+ model_data = "MODEL_DATA"
21
residual_map = "RESIDUAL_MAP"
22
normalized_residual_map = "NORMALIZED_RESIDUAL_MAP"
23
chi_squared_map = "CHI_SQUARED_MAP"
@@ -68,7 +68,7 @@ class SubplotFit(Enum):
68
data = (0, 0)
69
data_source_scale = (1, 0)
70
signal_to_noise_map = (2, 0)
71
- model_image = (3, 0)
+ model_data = (3, 0)
72
lens_light_model = (1, 0)
73
lens_light_subtracted_image = (1, 1)
74
source_model_image = (1, 2)
@@ -89,7 +89,7 @@ class SubplotFitLog10(Enum):
89
90
91
92
93
94
95
autolens/analysis/plotter_interface.py
@@ -65,14 +65,20 @@ def should_plot(name):
65
tracer_plotter.subplot_galaxies_images()
66
67
if should_plot("fits_tracer"):
+
+ zoom = aa.Zoom2D(mask=grid.mask)
+ mask = zoom.mask_2d_from(buffer=1)
+ grid_zoom = aa.Grid2D.from_mask(mask=mask)
+ image_list = [
+ tracer.convergence_2d_from(grid=grid_zoom).native,
75
+ tracer.potential_2d_from(grid=grid_zoom).native,
76
+ tracer.deflections_yx_2d_from(grid=grid_zoom).native[:, :, 0],
77
+ tracer.deflections_yx_2d_from(grid=grid_zoom).native[:, :, 1],
78
+ ]
79
80
hdu_list = hdu_list_for_output_from(
- values_list=[
- grid.mask.astype("float"),
- tracer.convergence_2d_from(grid=grid).native,
- tracer.potential_2d_from(grid=grid).native,
- tracer.deflections_yx_2d_from(grid=grid).native[:, :, 0],
- tracer.deflections_yx_2d_from(grid=grid).native[:, :, 1],
- ],
81
+ values_list=[image_list[0].mask.astype("float")] + image_list,
82
ext_name_list=[
83
"mask",
84
"convergence",
autolens/config/visualize/plots.yaml
@@ -38,7 +38,7 @@ tracer: # Settings for plots of tracers (e.g.
38
inversion: # Settings for plots of inversions (e.g. InversionPlotter).
39
subplot_inversion: true # Plot subplot of all quantities in each inversion (e.g. reconstrucuted image, reconstruction)?
40
subplot_mappings: true # Plot subplot of the image-to-source pixels mappings of each pixelization?
41
- fits_reconstruction: false # output reconstruction.fits containing the reconstructed pixelization and noise map on the adaptive mesh?
+ csv_reconstruction: false # output reconstruction.csv containing the source-plane mesh y, x, reconstruction and noise map values.
42
43
adapt: # Settings for plots of adapt images used by adaptive pixelizations.
44
subplot_adapt_images: true # Plot subplot showing each adapt image used for adaptive pixelization?
autolens/imaging/model/visualizer.py
@@ -102,8 +102,10 @@ def visualize(
102
103
tracer = fit.tracer_linear_light_profiles_to_light_profiles
104
105
- extent = fit.data.extent_of_zoomed_array(buffer=0)
106
- shape_native = fit.data.zoomed_around_mask(buffer=0).shape_native
+ zoom = ag.Zoom2D(mask=fit.mask)
107
+ extent = zoom.extent_from(buffer=0)
108
+ shape_native = zoom.shape_native
109
110
grid = ag.Grid2D.from_extent(extent=extent, shape_native=shape_native)
111
autolens/imaging/plot/fit_imaging_plotters.py
@@ -80,12 +80,11 @@ def tracer_plotter(self) -> TracerPlotter:
Returns an `TracerPlotter` corresponding to the `Tracer` in the `FitImaging`.
- extent = self.fit.data.extent_of_zoomed_array(buffer=0)
- shape_native = self.fit.data.zoomed_around_mask(buffer=0).shape_native
+ zoom = aa.Zoom2D(mask=self.fit.mask)
85
86
grid = aa.Grid2D.from_extent(
87
- extent=extent,
88
- shape_native=shape_native
+ extent=zoom.extent_from(buffer=0),
+ shape_native=zoom.shape_native
)
return TracerPlotter(
test_autolens/analysis/test_plotter_interface.py
@@ -33,7 +33,7 @@ def test__tracer(
33
file_path=path.join(plot_path, "tracer.fits"), hdu=0
34
35
36
- assert image.shape == (7, 7)
+ assert image.shape == (5, 5)
37
def test__image_with_positions(
test_autolens/imaging/model/test_plotter_interface_imaging.py
@@ -34,13 +34,13 @@ def test__fit_imaging(
file_path=path.join(plot_path, "fit.fits"), hdu=0
image = al.ndarray_via_fits_from(
file_path=path.join(plot_path, "model_galaxy_images.fits"), hdu=0
45
def test__fit_imaging_combined(
46
fit_imaging_x2_plane_inversion_7x7, plot_path, plot_patch
test_autolens/interferometer/model/files/dirty_images.fits
203 KB
test_autolens/interferometer/model/test_plotter_interface_interferometer.py
@@ -36,7 +36,7 @@ def test__fit_interferometer(
file_path=path.join(plot_path, "dirty_images.fits"), hdu=0
0 commit comments