@@ -398,22 +398,23 @@ def test__convolve_image():
398398 assert blurred_masked_image_via_scipy == pytest .approx (blurred_masked_im_1 .array , 1e-4 )
399399
400400
401- def test__compare_to_full_2d_convolution__no_blurring_image ():
401+ def test__convolve_image_no_blurring ():
402402 # Setup a blurred data, using the PSF to perform the convolution in 2D, then masks it to make a 1d array.
403403
404- import scipy .signal
405-
406404 mask = aa .Mask2D .circular (
407405 shape_native = (30 , 30 ), pixel_scales = (1.0 , 1.0 ), radius = 4.0
408406 )
409- kernel = aa .Kernel2D .no_mask (values = np .arange (49 ).reshape (7 , 7 ), pixel_scales = 1.0 )
410- image = aa .Array2D .no_mask (values = np .arange (900 ).reshape (30 , 30 ), pixel_scales = 1.0 )
407+
408+ import scipy .signal
409+
410+ kernel = np .arange (49 ).reshape (7 , 7 )
411+ image = np .arange (900 ).reshape (30 , 30 )
411412
412413 blurring_mask = mask .derive_mask .blurring_from (
413- kernel_shape_native = kernel .shape_native
414+ kernel_shape_native = kernel .shape
414415 )
415416 blurred_image_via_scipy = scipy .signal .convolve2d (
416- image . native * blurring_mask , kernel . native , mode = "same"
417+ image * blurring_mask , kernel , mode = "same"
417418 )
418419 blurred_image_via_scipy = aa .Array2D .no_mask (
419420 values = blurred_image_via_scipy , pixel_scales = 1.0
@@ -424,11 +425,14 @@ def test__compare_to_full_2d_convolution__no_blurring_image():
424425
425426 # Now reproduce this data using the frame convolver_image
426427
428+ kernel = aa .Kernel2D .no_mask (values = np .arange (49 ).reshape (7 , 7 ), pixel_scales = 1.0 )
429+ image = aa .Array2D .no_mask (values = np .arange (900 ).reshape (30 , 30 ), pixel_scales = 1.0 )
430+
427431 masked_image = aa .Array2D (values = image .native , mask = mask )
428432
429433 blurred_masked_im_1 = kernel .convolve_image_no_blurring (image = masked_image )
430434
431- assert blurred_masked_image_via_scipy == pytest .approx (blurred_masked_im_1 , 1e-4 )
435+ assert blurred_masked_image_via_scipy == pytest .approx (blurred_masked_im_1 . array , 1e-4 )
432436
433437
434438def test__convolve_mapping_matrix ():
0 commit comments