Skip to content

Commit

Permalink
fixing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-ferrari committed Jan 10, 2024
1 parent 01a264f commit 9201c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flamedisx/lxe_blocks/s2_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def _simulate(self, d):
p=np.nan_to_num(self.gimme_numpy('s2_survival_p')).clip(0., 1.))

def _annotate(self, d):
# TODO: this assumes the spread from the double PE effect is subdominant
# TODO: copied from double PE effect
s2_survival_probability = self.gimme_numpy('s2_survival_p')
for suffix, intify in (('min', np.floor),
('max', np.ceil),
('mle', lambda x: x)):
d['s2_raw_' + suffix] = \
intify(d['s2_raw_after_loss_' + suffix].values
/ (1 + s2_survival_p))
/ (1 + s2_survival_probability))

0 comments on commit 9201c89

Please sign in to comment.