From c78d5412d5363549b3b358bd62263b665ad8b484 Mon Sep 17 00:00:00 2001 From: Artur Glavic Date: Wed, 25 Feb 2026 15:50:37 +0100 Subject: [PATCH] replace recreation of pulse times based on packet time differences --- eos/file_reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eos/file_reader.py b/eos/file_reader.py index 0110544..ddad9db 100644 --- a/eos/file_reader.py +++ b/eos/file_reader.py @@ -406,7 +406,9 @@ class AmorEventData(AmorHeader): logging.warning(' no chopper trigger data available, using event steram instead') startTime = np.array(self.hdf['/entry1/Amor/detector/data/event_time_zero'][0], dtype=np.int64) stopTime = np.array(self.hdf['/entry1/Amor/detector/data/event_time_zero'][-2], dtype=np.int64) - pulseTimeS = np.arange(startTime, stopTime, self.timing.tau*1e9, dtype=np.int64) + ptime_unique = np.unique(packets.time) + min_time_step = (ptime_unique[1:]-ptime_unique[:-1]).min() + pulseTimeS = np.arange(startTime, stopTime, min_time_step, 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