diff --git a/tests/test_moffat.py b/tests/test_moffat.py index 78d2f0db60..97e8d218e6 100644 --- a/tests/test_moffat.py +++ b/tests/test_moffat.py @@ -24,8 +24,9 @@ from galsim_test_helpers import * path, filename = os.path.split(__file__) -imgdir = os.path.join(path, "SBProfile_comparison_images") # Directory containing the reference - # images. +# Directory containing the reference images. +imgdir = os.path.join(path, "SBProfile_comparison_images") + @timer def test_moffat(): @@ -198,7 +199,11 @@ def test_moffat_maxk(): rtol = 1.e-7 if psf.trunc == 0 else 3.e-3 fk = psf.kValue(psf.maxk,0).real/psf.flux print(f'{psf.beta} \t {int(psf.trunc)} \t {thresh:.1e} \t {fk:.3e}') - np.testing.assert_allclose(abs(psf.kValue(psf.maxk,0).real)/psf.flux, thresh, rtol=rtol) + if hasattr(galsim, "_galsim"): + rtol_fac = 10.0 + else: + rtol_fac = 1.0 + np.testing.assert_allclose(abs(psf.kValue(psf.maxk,0).real)/psf.flux, thresh, rtol=rtol * rtol_fac) @timer