Skip to content

Commit

Permalink
Handle cases where more than 2 billion photons enter a pixel. (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly authored Dec 6, 2024
1 parent 09f9d75 commit 72f0084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion romanisim/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def simulate_counts_generic(image, exptime, objlist=None, psf=None,
rng_numpy_seed = rng.raw()
rng_numpy = np.random.default_rng(rng_numpy_seed)
image.array[:, :] = rng_numpy.binomial(
image.array.astype('i4'), flat / maxflat)
np.clip(image.array, 0, 2**31 - 1).astype('i4'), flat / maxflat)

if dark is not None:
workim = image * 0
Expand Down

0 comments on commit 72f0084

Please sign in to comment.