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

Set default drift time as nan #700

Merged
merged 5 commits into from
Oct 20, 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
7 changes: 6 additions & 1 deletion straxen/plugins/event_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class EventBasics(strax.Plugin):
The main S2 and alternative S2 are given by the largest two S2-Peaks
within the event. By default this is also true for S1.
"""
__version__ = '1.2.0'
__version__ = '1.2.1'

depends_on = ('events',
'peak_basics',
Expand Down Expand Up @@ -271,6 +271,11 @@ def set_nan_defaults(buffer):
else:
buffer[field][:] = np.nan

# set nan for drift time related quantities
for field in buffer.dtype.names:
if "drift_time" in field:
buffer[field][:] = np.nan

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
WPS362 Found assignment to a subscript slice


def compute(self, events, peaks):
result = np.zeros(len(events), dtype=self.dtype)
self.set_nan_defaults(result)
Expand Down