Skip to content

Commit

Permalink
adjust tol
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Oct 17, 2023
1 parent 6523ab5 commit 269096d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_moffat.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ def test_moffat_maxk():
galsim.Moffat(beta=12.9, scale_radius=11, flux=23, trunc=1000),
]
threshs = [1.e-3, 1.e-4, 0.03]
print('beta \t trunc \t thresh \t kValue(maxk)')
print('beta \t trunc \t thresh \t kValue(maxk) \t maxk')
for psf in psfs:
for thresh in threshs:
psf = psf.withGSParams(maxk_threshold=thresh)
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}')
print(f'{psf.beta} \t {int(psf.trunc)} \t {thresh:.1e} \t {fk:.3e} \t {psf.maxk:.3e}')
np.testing.assert_allclose(abs(psf.kValue(psf.maxk,0).real)/psf.flux, thresh, rtol=rtol)


Expand Down

0 comments on commit 269096d

Please sign in to comment.