diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/loader/energytrace.py | 2 | ||||
-rw-r--r-- | lib/loader/generic.py | 8 | ||||
-rw-r--r-- | lib/loader/keysight.py | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/lib/loader/energytrace.py b/lib/loader/energytrace.py index 0386b99..9d13819 100644 --- a/lib/loader/energytrace.py +++ b/lib/loader/energytrace.py @@ -651,6 +651,7 @@ class EnergyTraceWithLogicAnalyzer(ExternalTimerSync): self.errors = list() self.sync_min_duration = 0.7 + self.sync_max_duration = 1.3 self.sync_min_low_count = 3 self.sync_min_high_count = 1 self.sync_power = 0.011 @@ -723,6 +724,7 @@ class EnergyTraceWithTimer(ExternalTimerSync): self.errors = list() self.sync_min_duration = 0.7 + self.sync_max_duration = 1.3 self.sync_min_low_count = 3 self.sync_min_high_count = 1 self.sync_power = 0.011 diff --git a/lib/loader/generic.py b/lib/loader/generic.py index 67535bc..22fb5d9 100644 --- a/lib/loader/generic.py +++ b/lib/loader/generic.py @@ -50,7 +50,7 @@ class ExternalTimerSync: # * self.data (e.g. power readings) # * self.timestamps (timstamps in seconds) # * self.sync_min_high_count, self.sync_min_low_count: outlier handling in synchronization pulse detection - # * self.sync_power, self.sync_min_duration: synchronization pulse parameters. one pulse before the measurement, two pulses afterwards + # * self.sync_power, self.sync_min_duration, self.sync_max_duration: synchronization pulse parameters. one pulse before the measurement, two pulses afterwards # expected_trace must contain online timestamps # TODO automatically determine sync_power if it is None def analyze_states(self, expected_trace, repeat_id, online_timestamps=None): @@ -79,7 +79,11 @@ class ExternalTimerSync: if high_count >= self.sync_min_high_count and sync_start is None: sync_start = high_ts elif low_count >= self.sync_min_low_count and sync_start is not None: - if low_ts - sync_start > self.sync_min_duration: + if ( + self.sync_min_duration + < low_ts - sync_start + < self.sync_max_duration + ): sync_end = low_ts sync_timestamps.append((sync_start, sync_end)) sync_start = None diff --git a/lib/loader/keysight.py b/lib/loader/keysight.py index 98d09b4..5825049 100644 --- a/lib/loader/keysight.py +++ b/lib/loader/keysight.py @@ -82,6 +82,7 @@ class DLog(ExternalTimerSync): self.errors = list() self.sync_min_duration = 0.7 + self.sync_max_duration = 1.3 self.sync_min_low_count = 3 self.sync_min_high_count = 3 |