diff --git a/flamedisx/lxe_blocks/s2_loss.py b/flamedisx/lxe_blocks/s2_loss.py index 8b3f92ea5..85b4af3ac 100644 --- a/flamedisx/lxe_blocks/s2_loss.py +++ b/flamedisx/lxe_blocks/s2_loss.py @@ -34,7 +34,7 @@ def _compute(self, data_tensor, ptensor, def _simulate(self, d): d['s2_raw_after_loss'] = stats.binom.rvs( - n=np.clip(d['s2_raw'], 1e-15, np.float32.max).astype(dtype=np.int32), + n=d['s2_raw'].astype(dtype=np.int32), p=np.nan_to_num(self.gimme_numpy('s2_survival_p')).clip(0., 1.)) def _annotate(self, d):