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 missing return to stop plugin in case of empty input #216

Merged
merged 3 commits into from
May 16, 2024
Merged
Changes from all commits
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
3 changes: 2 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 @@ -26,7 +26,7 @@ class PMTResponseAndDAQ(FuseBaseDownChunkingPlugin):
length (if needed). Finally the data is saved as raw_records.
"""

__version__ = "0.1.4"
__version__ = "0.1.5"

depends_on = ("photon_summary", "pulse_ids", "pulse_windows")

Expand Down Expand Up @@ -220,6 +220,7 @@ def compute(self, propagated_photons, pulse_windows, start, end):
log.debug("No photons or pulse windows found for chunk!")

yield self.chunk(start=start, end=end, data=np.zeros(0, dtype=self.dtype))
return # Exit early

# Split into "sub-chunks"
pulse_gaps = pulse_windows["time"][1:] - strax.endtime(pulse_windows)[:-1]
Expand Down