From bcf6e39ae1ab7f7823877054a2f4d43faa3a6354 Mon Sep 17 00:00:00 2001 From: Mike Jarvis Date: Thu, 31 Aug 2023 03:00:50 -0400 Subject: [PATCH] Use rng to make test deterministic --- tests/test_phase_psf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_phase_psf.py b/tests/test_phase_psf.py index 1d7849f898..7535d1d938 100644 --- a/tests/test_phase_psf.py +++ b/tests/test_phase_psf.py @@ -1543,7 +1543,8 @@ def test_convolve_phasepsf(): obj = galsim.Convolve(star * sed, psf1, psf2) bandpass = galsim.Bandpass('LSST_r.dat', wave_type='nm') obj = obj.withFlux(10, bandpass) - im = obj.drawImage(bandpass, method='phot', n_photons=10) + rng = galsim.BaseDeviate(1234) + im = obj.drawImage(bandpass, method='phot', n_photons=10, rng=rng) # The main thing is that it works. But check that flux makes sense. assert im.array.sum() == 10