Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protection for empty waveforms #776

Merged
merged 7 commits into from
Mar 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions invisible_cities/detsim/buffer_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def find_signal_start(wfs : Union[pd.Series, np.ndarray],
eng_sum = wfs.sum()
indices = indices_and_wf_above_threshold(eng_sum,
bin_threshold).indices
if len(indices) == 0: return []
## Just using this and the stand_off for now
## taking first above sum threshold.
## !! To-do: make more robust with min int? or similar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really not worth opening a separate PR for it, so, while we're touching this file, could you please add a single commit which fixes all the to-dos in this file (and any others that you are already touching in this PR), changing them to this precise spelling: TODO (exactly four characters, all uppercase, no spaces, no dashes). This is because many development tools recognize TODO and can help managing them.

Expand Down