Second pulseTimeS fallback
Unit Testing / test (3.10) (push) Successful in 51s
Unit Testing / test (3.11) (push) Successful in 52s
Unit Testing / test (3.12) (push) Successful in 51s
Unit Testing / test (3.8) (push) Successful in 52s
Unit Testing / test (3.9) (push) Successful in 54s

This commit is contained in:
2026-07-09 09:04:14 +02:00
parent 069188eda6
commit 59c08411b3
+8 -2
View File
@@ -519,10 +519,16 @@ class AmorEventData(AmorHeader):
if np.shape(chopper1TriggerTime)[0] > 2:
startTime = chopper1TriggerTime[0]
pulseTimeS = chopper1TriggerTime
else:
logging.critical(' No chopper trigger data available, using event steram instead, pulse filtering will fail!')
elif self._beam_monitor.time.shape[0] > 1:
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!')
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)
pulseTimeS = np.arange(startTime, stopTime, self.timing.tau*1e9, dtype=np.int64)
pulses = np.recarray(pulseTimeS.shape, dtype=PULSE_TYPE)
pulses.time = pulseTimeS
pulses.monitor = 1. # default is monitor pulses as it requires no calculation