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

Fix nveto processing #491

Merged
merged 5 commits into from
Jul 28, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions strax/processing/peak_splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ def __call__(self, peaks, records, to_pe, data_type,
strax.compute_widths(new_peaks)
elif data_type == 'hitlets':
# Add record fields here
new_peaks = strax.get_hitlets_data(new_peaks, records, to_pe)

new_peaks = strax.sort_by_time(new_peaks) # Hitlets are not necessarily sorted after splitting
new_peaks = strax.get_hitlets_data(new_peaks, records, to_pe)
# ... and recurse (if needed)
new_peaks = self(new_peaks, records, to_pe, data_type,
do_iterations=do_iterations - 1,
min_area=min_area, **kwargs)
if np.any(new_peaks['length'] == 0):
raise ValueError('Want to add a new zero-length peak after splitting!')

peaks = strax.sort_by_time(np.concatenate([peaks[~is_split],
new_peaks]))

Expand Down