diff --git a/eos/file_reader.py b/eos/file_reader.py index 331a4cf..5871d6a 100644 --- a/eos/file_reader.py +++ b/eos/file_reader.py @@ -520,11 +520,11 @@ class AmorEventData(AmorHeader): startTime = chopper1TriggerTime[0] pulseTimeS = chopper1TriggerTime elif self._beam_monitor.time.shape[0] > 1: - logging.critical(' No chopper trigger data available, using first monitor time!') + logging.critical(' No chopper trigger data available, using first monitor time!') startTime = np.array(self._beam_monitor.time[0], dtype=np.int64) pulseTimeS = self._beam_monitor.time else: - logging.critical(' No chopper trigger data available, using event steram instead, pulse filtering will fail!') + logging.critical(' No chopper trigger data available, using event steram instead, pulse filtering will fail!') data_group = self.hdf[self.hdf_paths['data'][0]] startTime = np.array(data_group['event_time_zero'][0], dtype=np.int64) stopTime = np.array(data_group['event_time_zero'][-2], dtype=np.int64) diff --git a/eos/reduction_reflectivity.py b/eos/reduction_reflectivity.py index eb49f78..72c9a2f 100644 --- a/eos/reduction_reflectivity.py +++ b/eos/reduction_reflectivity.py @@ -46,7 +46,10 @@ class ReflectivityReduction: self.normevent_actions |= eh.AssociatePulseWithMonitor(self.config.experiment.monitorType) if self.config.experiment.monitorType in [MonitorType.proton_charge, MonitorType.debug]: self.normevent_actions |= ea.ExtractWalltime() - self.normevent_actions |= eh.FilterMonitorThreshold(self.config.experiment.lowCurrentThreshold) + if self.config.experiment.lowCurrentThreshold>0: + self.normevent_actions |= eh.FilterMonitorThreshold(self.config.experiment.lowCurrentThreshold) + else: + logging.debug(' low current threashold disabled') self.normevent_actions |= eh.FilterStrangeTimes() self.normevent_actions |= ea.MergeFrames() self.normevent_actions |= ea.AnalyzePixelIDs(self.config.experiment.yRange) @@ -61,9 +64,10 @@ class ReflectivityReduction: self.dataevent_time_correction = eh.CorrectSeriesTime(0) # will be set from first dataset self.dataevent_actions |= self.dataevent_time_correction self.dataevent_actions |= eh.AssociatePulseWithMonitor(self.config.experiment.monitorType) - if self.config.experiment.monitorType in [MonitorType.proton_charge or MonitorType.debug]: + if self.config.experiment.monitorType in [MonitorType.proton_charge, MonitorType.debug]: # the filtering only makes sense if using actual monitor data, not time - self.dataevent_actions |= eh.FilterMonitorThreshold(self.config.experiment.lowCurrentThreshold) + if self.config.experiment.lowCurrentThreshold>0: + self.dataevent_actions |= eh.FilterMonitorThreshold(self.config.experiment.lowCurrentThreshold) self.dataevent_actions |= eh.FilterStrangeTimes() self.dataevent_actions |= ea.MergeFrames(extractNeutronPulses=self.config.reduction.extractNeutronPulses) self.dataevent_actions |= ea.AnalyzePixelIDs(self.config.experiment.yRange)