@@ -1317,19 +1317,11 @@ def test_fft():
13171317 np .testing .assert_array_almost_equal (xim .array , xim2 .array )
13181318
13191319 # Now use drawKImage (as above in test_drawKImage) to get a more realistic k-space image
1320- # NB. It is useful to have this come out not a multiple of 4, since some of the
1321- # calculation needs to be different when N/2 is odd.
1322- if is_jax_galsim ():
1323- maxk_threshold = 0.78e-3
1324- N = 912
1325- Nfft = 1024
1326- else :
1327- maxk_threshold = 1.e-4
1328- N = 1174
1329- Nfft = 1536
13301320 obj = galsim .Moffat (flux = test_flux , beta = 1.5 , scale_radius = 0.5 )
1331- obj = obj .withGSParams (maxk_threshold = maxk_threshold )
1321+ obj = obj .withGSParams (maxk_threshold = 1.e-4 )
13321322 im1 = obj .drawKImage ()
1323+ N = 1174 # NB. It is useful to have this come out not a multiple of 4, since some of the
1324+ # calculation needs to be different when N/2 is odd.
13331325 np .testing .assert_equal (im1 .bounds , galsim .BoundsI (- N / 2 ,N / 2 ,- N / 2 ,N / 2 ),
13341326 "obj.drawKImage() produced image with wrong bounds" )
13351327 nyq_scale = obj .nyquist_scale
@@ -1356,7 +1348,7 @@ def test_fft():
13561348 # If we give both a good size to use and match up the scales, then they should produce the
13571349 # same thing.
13581350 N = galsim .Image .good_fft_size (N )
1359- assert N == Nfft
1351+ assert N == 1536 == 3 * 2 ** 9
13601352 kscale = 2. * np .pi / (N * nyq_scale )
13611353 im2 = obj .drawKImage (nx = N + 1 , ny = N + 1 , scale = kscale )
13621354 im2_real = im2 .calculate_inverse_fft ()
0 commit comments