Skip to content

Commit

Permalink
Use rng to make test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Aug 31, 2023
1 parent e7aec44 commit bcf6e39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_phase_psf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcf6e39

Please sign in to comment.