Skip to content

Commit cfc73ea

Browse files
committed
test: roll back more changes
1 parent 2fe5a42 commit cfc73ea

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

tests/test_draw.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -527,24 +527,21 @@ def test_drawKImage():
527527
"""Test the various optional parameters to the drawKImage function.
528528
In particular test the parameters image, and scale in various combinations.
529529
"""
530-
maxk_threshold = 1.e-4
531-
N = 1174
532-
Ns = 37
533-
534530
# We use a Moffat profile with beta = 1.5, since its real-space profile is
535531
# flux / (2 pi rD^2) * (1 + (r/rD)^2)^3/2
536532
# and the 2-d Fourier transform of that is
537533
# flux * exp(-rD k)
538534
# So this should draw in Fourier space the same image as the Exponential drawn in
539535
# test_drawImage().
540536
obj = galsim.Moffat(flux=test_flux, beta=1.5, scale_radius=0.5)
541-
obj = obj.withGSParams(maxk_threshold=maxk_threshold)
537+
obj = obj.withGSParams(maxk_threshold=1.e-4)
542538

543539
# First test drawKImage() with no kwargs. It should:
544540
# - create new images
545541
# - return the new images
546542
# - set the scale to 2pi/(N*obj.nyquist_scale)
547543
im1 = obj.drawKImage()
544+
N = 1174
548545
np.testing.assert_equal(im1.bounds, galsim.BoundsI(-N/2,N/2,-N/2,N/2),
549546
"obj.drawKImage() produced image with wrong bounds")
550547
stepk = obj.stepk
@@ -566,7 +563,7 @@ def test_drawKImage():
566563
# - also return that image
567564
# - set the scale to obj.stepk
568565
# - zero out any existing data
569-
im3 = galsim.ImageCD(N-25,N-25)
566+
im3 = galsim.ImageCD(1149,1149)
570567
im4 = obj.drawKImage(im3)
571568
np.testing.assert_almost_equal(im3.scale, stepk, 9,
572569
"obj.drawKImage(im3) produced image with wrong scale")
@@ -614,7 +611,7 @@ def test_drawKImage():
614611
np.testing.assert_almost_equal(CalculateScale(im7), 2, 1,
615612
"Measured wrong scale after obj.drawKImage(dx)")
616613
# This image is smaller because not using nyquist scale for stepk
617-
np.testing.assert_equal(im7.bounds, galsim.BoundsI(-Ns,Ns,-Ns,Ns),
614+
np.testing.assert_equal(im7.bounds, galsim.BoundsI(-37,37,-37,37),
618615
"obj.drawKImage(dx) produced image with wrong bounds")
619616

620617
# Test if we provide an image with a defined scale. It should:

0 commit comments

Comments
 (0)