Skip to content

Commit 0ff79d6

Browse files
Jammy2211Jammy2211
authored andcommitted
remove disable_fft_pad and imaigng plotter sends psf.kernel to plot
1 parent 35b09e0 commit 0ff79d6

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

autoarray/dataset/imaging/simulator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,12 @@ def via_image_from(
192192
psf=self.psf,
193193
noise_map=noise_map,
194194
check_noise_map=False,
195-
disable_fft_pad=True,
196195
)
197196

198197
if over_sample_size is not None:
199198

200199
dataset = dataset.apply_over_sampling(
201-
over_sample_size_lp=over_sample_size.native, disable_fft_pad=True
200+
over_sample_size_lp=over_sample_size.native,
202201
)
203202

204203
return dataset

autoarray/dataset/plot/imaging_plotters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def figures_2d(
9393

9494
if psf:
9595
self.mat_plot_2d.plot_array(
96-
array=self.dataset.psf,
96+
array=self.dataset.psf.kernel,
9797
visuals_2d=self.visuals_2d,
9898
auto_labels=AutoLabels(
9999
title=title_str or f"Point Spread Function",

test_autoarray/dataset/imaging/test_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test__output_to_fits(imaging_7x7, test_data_path):
173173

174174

175175
def test__apply_mask(imaging_7x7, mask_2d_7x7, psf_3x3):
176-
masked_imaging_7x7 = imaging_7x7.apply_mask(mask=mask_2d_7x7, disable_fft_pad=True)
176+
masked_imaging_7x7 = imaging_7x7.apply_mask(mask=mask_2d_7x7)
177177

178178
assert (masked_imaging_7x7.data.slim == np.ones(9)).all()
179179

@@ -310,5 +310,5 @@ def test__psf_not_odd_x_odd_kernel__raises_error():
310310
psf = aa.Convolver(kernel=kernel)
311311

312312
dataset = aa.Imaging(
313-
data=image, noise_map=noise_map, psf=psf, disable_fft_pad=True
313+
data=image, noise_map=noise_map, psf=psf,
314314
)

test_autoarray/fit/test_fit_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test__figure_of_merit__with_noise_covariance_matrix_in_dataset(
6666

6767
def test__grid_offset_via_data_model(imaging_7x7, mask_2d_7x7, model_image_7x7):
6868

69-
masked_imaging_7x7 = imaging_7x7.apply_mask(mask=mask_2d_7x7, disable_fft_pad=True)
69+
masked_imaging_7x7 = imaging_7x7.apply_mask(mask=mask_2d_7x7)
7070

7171
fit = aa.m.MockFitImaging(
7272
dataset=masked_imaging_7x7,

test_autoarray/inversion/inversion/imaging/test_inversion_imaging_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ def test__data_vector_via_weighted_data_two_methods_agree():
192192
noise_map = np.random.uniform(size=mask.shape_native)
193193
noise_map = aa.Array2D(values=noise_map, mask=mask)
194194

195-
kernel = aa.Convolver.from_gaussian(
195+
convolver = aa.Convolver.from_gaussian(
196196
shape_native=(7, 7), pixel_scales=mask.pixel_scales, sigma=1.0, normalize=True
197197
)
198198

199-
psf = kernel
199+
psf = convolver
200200

201201
mesh = aa.mesh.RectangularUniform(shape=(20, 20))
202202

@@ -239,7 +239,7 @@ def test__data_vector_via_weighted_data_two_methods_agree():
239239

240240
psf_weighted_data = aa.util.inversion_imaging.psf_weighted_data_from(
241241
weight_map_native=weight_map.native.array,
242-
kernel_native=kernel.native.array,
242+
kernel_native=convolver.kernel.native.array,
243243
native_index_for_slim_index=mask.derive_indexes.native_for_slim.astype(
244244
"int"
245245
),

0 commit comments

Comments
 (0)