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

Move get_window_size factor of merged_s2s as untracked configuration #1209

Merged
merged 1 commit into from
Jun 26, 2023
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
11 changes: 9 additions & 2 deletions straxen/plugins/merged_s2s/merged_s2s.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,22 @@ class MergedS2s(strax.OverlapWindowPlugin):
help='Digitize the sum waveform of the top array separately'
)

merged_s2s_get_window_size_factor = straxen.URLConfig(
default=5,
type=int,
track=False,
help='Factor of the window size for the merged_s2s plugin'
dachengx marked this conversation as resolved.
Show resolved Hide resolved
)

def setup(self):
self.to_pe = self.gain_model

def infer_dtype(self):
return strax.unpack_dtype(self.deps['peaklets'].dtype_for('peaklets'))

def get_window_size(self):
return 5 * (int(self.s2_merge_gap_thresholds[0][1])
+ self.s2_merge_max_duration)
return self.merged_s2s_get_window_size_factor * (
int(self.s2_merge_gap_thresholds[0][1]) + self.s2_merge_max_duration)

def compute(self, peaklets, lone_hits):
if self.merge_without_s1:
Expand Down
Loading