From ec828c825ce913edf6f5c6a4c6869b33c9d9b649 Mon Sep 17 00:00:00 2001 From: Samuel Watkins <35979561+slwatkins@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:58:45 -0700 Subject: [PATCH] fix threshold_off setting threshold_on between 3 and 5 sigma removes erroneous self._resolution (which is also undefined) --- src/splendaq/daq/_offline_trigger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/splendaq/daq/_offline_trigger.py b/src/splendaq/daq/_offline_trigger.py index 3b92961..3c6870d 100644 --- a/src/splendaq/daq/_offline_trigger.py +++ b/src/splendaq/daq/_offline_trigger.py @@ -475,8 +475,9 @@ def acquire_pulses(self, template, psd, threshold_on, tchan, threshold_off=None, if abs(self._nthreshold_on) > 5: self._nthreshold_off = threshold_on - sign * 2 elif abs(self._nthreshold_on) > 3: - self._nthreshold_off = 3 * sign * self._resolution - else: self._nthreshold_off = threshold_on + self._nthreshold_off = 3 * sign + else: + self._nthreshold_off = threshold_on else: self._nthreshold_off = threshold_off