summaryrefslogtreecommitdiff
path: root/lib/lennart/DataProcessor.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lennart/DataProcessor.py')
-rw-r--r--lib/lennart/DataProcessor.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py
index e45fba3..fe9ae80 100644
--- a/lib/lennart/DataProcessor.py
+++ b/lib/lennart/DataProcessor.py
@@ -495,9 +495,15 @@ class DataProcessor:
end_left_sync = end_right_sync - 1
start_left_diff = expected_start_ts - candidates[start_left_sync]
- start_right_diff = candidates[start_right_sync] - expected_start_ts
+ if start_right_sync < len(candidates):
+ start_right_diff = candidates[start_right_sync] - expected_start_ts
+ else:
+ start_right_diff = np.inf
end_left_diff = expected_end_ts - candidates[end_left_sync]
- end_right_diff = candidates[end_right_sync] - expected_end_ts
+ if end_right_sync < len(candidates):
+ end_right_diff = candidates[end_right_sync] - expected_end_ts
+ else:
+ end_right_diff = np.inf
drift_candidates = (
start_left_diff,