Skip to content

Commit

Permalink
Make random test deterministic (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobuddel authored Nov 24, 2024
2 parents dde7c34 + 603d61e commit fbe8ce9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scopesim/tests/tests_effects/test_FVPSF.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def test_circular_fvpsf(self, basic_circular_fvpsf, mock_path):
nax1, nax2 = centre_fov.header["NAXIS1"], centre_fov.header["NAXIS2"]
centre_fov.hdu.data = np.zeros((nax2, nax1))

x, y = np.random.randint(6, nax1-6, (2, 150))
rng = np.random.RandomState(42)
x, y = rng.randint(6, nax1-6, (2, 150))
centre_fov.hdu.data[x, y] = 1
# centre_fov.hdu.data[6:nax1-6:10, 6:nax1-6:10] = 1
centre_fov.fields = [1]
Expand Down

0 comments on commit fbe8ce9

Please sign in to comment.