Skip to content

Commit

Permalink
Make sure CDF goes to 1 smoothly (#261)
Browse files Browse the repository at this point in the history
* Make sure CDF goes to 1 smoothly

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
HenningSE and pre-commit-ci[bot] authored Sep 12, 2024
1 parent d622926 commit beb8b43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fuse/plugins/pmt_and_daq/pmt_response_and_daq.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ def init_pmt_current_templates(self):

# Interpolate on cdf ensures that each spe pulse would sum up to 1 pe*sample duration^-1
pe_pulse_function = interp1d(
self.pe_pulse_ts, np.cumsum(self.pe_pulse_ys), bounds_error=False, fill_value=(0, 1)
self.pe_pulse_ts,
np.cumsum(self.pe_pulse_ys) / np.sum(self.pe_pulse_ys),
bounds_error=False,
fill_value=(0, 1),
)

# Samples are always multiples of sample_duration
Expand Down

0 comments on commit beb8b43

Please sign in to comment.