We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1329d7 commit 3624566Copy full SHA for 3624566
1 file changed
jax_galsim/photon_array.py
@@ -93,6 +93,14 @@ def __init__(
93
self._Ntot = _JAX_GALSIM_PHOTON_ARRAY_SIZE or N
94
self._Ntot = cast_to_int(self._Ntot)
95
96
+ if _JAX_GALSIM_PHOTON_ARRAY_SIZE is not None:
97
+ equinox.error_if(
98
+ jnp.array(N),
99
+ jnp.array(N > _JAX_GALSIM_PHOTON_ARRAY_SIZE),
100
+ f"The given photon array size {N} is larger than "
101
+ f"the allowed total size {_JAX_GALSIM_PHOTON_ARRAY_SIZE}.",
102
+ )
103
+
104
if _nokeep is not None:
105
self._nokeep = _nokeep
106
else:
0 commit comments