From f6f853e6e4af181f3297cfc77bead14f6c235b3a Mon Sep 17 00:00:00 2001 From: jochenstahn Date: Wed, 27 Nov 2024 08:29:33 +0100 Subject: [PATCH] commented VERY time consuming control output: events per pulse --- libeos/file_reader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libeos/file_reader.py b/libeos/file_reader.py index e2930ae..143994e 100644 --- a/libeos/file_reader.py +++ b/libeos/file_reader.py @@ -199,7 +199,7 @@ class AmorData: cpp, t_bins = np.histogram(self.wallTime_e, self.pulseTimeS) np.savetxt('tme.hst', np.vstack((self.pulseTimeS[:-1], cpp, self.monitorPerPulse[:-1])).T) - self.average_events_per_pulse() + #self.average_events_per_pulse() # for debugging only. VERY time consuming!!! self.monitor_threshold() @@ -241,6 +241,7 @@ class AmorData: nextPulseTime += chopperPeriod self.pulseTimeS = np.append(self.pulseTimeS, tt) nextPulseTime = self.pulseTimeS[-1] + chopperPeriod + print(f'# == number of pulses: {np.shape(self.pulseTimeS)[0]}') def get_current_per_pulse(self, pulseTimeS, currentTimeS, currents): # add currents for early pulses and current time value after last pulse (j+1) @@ -255,7 +256,6 @@ class AmorData: #print(f' {i} {pulseTimeS[i]} {pulseCurrentS[i]}') return pulseCurrentS - def associate_pulse_with_monitor(self): if self.config.monitorType == 'p': # protonCharge self.currentTime -= np.int64(self.seriesStartTime) @@ -283,7 +283,7 @@ class AmorData: if self.config.monitorType == 'p': for i, time in enumerate(self.pulseTimeS): events = np.shape(self.wallTime_e[self.wallTime_e == time])[0] - #print(f' {i:6.0f} {events:6.0f} {self.monitorPerPulse[i]:6.2f}') + logging.info(f'pulse: {i:6.0f}, events: {events:6.0f}, monitor: {self.monitorPerPulse[i]:6.2f}') def monitor_threshold(self): if self.config.monitorType == 'p': # fix to check for file compatibility