summaryrefslogtreecommitdiff
path: root/lib/lennart/DataProcessor.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-10-19 11:47:53 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-10-19 11:47:53 +0200
commitf308a519edecd8ee92f2fe18552620a569f48d3b (patch)
tree612ff2a73b6a37f10aa625c8570999a908590b62 /lib/lennart/DataProcessor.py
parent675032e99a02a1d1157305eb4e200b373a196f2a (diff)
debug log
Diffstat (limited to 'lib/lennart/DataProcessor.py')
-rw-r--r--lib/lennart/DataProcessor.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py
index df3f41c..58cc705 100644
--- a/lib/lennart/DataProcessor.py
+++ b/lib/lennart/DataProcessor.py
@@ -1,3 +1,8 @@
+import logging
+
+logger = logging.getLogger(__name__)
+
+
class DataProcessor:
def __init__(self, sync_data, energy_data):
"""
@@ -84,7 +89,7 @@ class DataProcessor:
(sync_start / 1_000_000, pre_outliers_ts / 1_000_000)
)
- # print("SYNC SPOTS: ", datasync_timestamps)
+ logger.debug(f"Synchronization areas: {datasync_timestamps}")
# print(time_stamp_data[2])
start_offset = datasync_timestamps[0][1] - time_stamp_data[2]
@@ -92,9 +97,15 @@ class DataProcessor:
end_offset = datasync_timestamps[-2][0] - (time_stamp_data[-8] + start_offset)
end_timestamp = datasync_timestamps[-2][0]
- print(start_timestamp, end_timestamp)
+ logger.debug(
+ f"Measurement area: LA timestamp range [{start_timestamp}, {end_timestamp}]"
+ )
+ logger.debug(f"Start/End offsets: {start_offset} / {end_offset}")
- # print(start_offset, start_timestamp, end_offset, end_timestamp)
+ if end_offset > 10:
+ logger.warning(
+ f"synchronization end_offset == {end_offset}. It should be no more than a few seconds."
+ )
with_offset = self.addOffset(time_stamp_data, start_offset)