summaryrefslogtreecommitdiff
path: root/lib/lennart
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-01-08 09:27:48 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-01-08 09:27:48 +0100
commita9bcdbac59c5061c836805b35940360fb3535618 (patch)
tree6d25eb832b5d95a36a451503b7283b5c00d6b0c6 /lib/lennart
parenta0165f6957904ba45c5d40475bcb687a02536083 (diff)
model transition power, not energy
in contrast to duration/energy, duration/power are independent
Diffstat (limited to 'lib/lennart')
-rw-r--r--lib/lennart/DataProcessor.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py
index e2cfbd2..b969d5c 100644
--- a/lib/lennart/DataProcessor.py
+++ b/lib/lennart/DataProcessor.py
@@ -82,10 +82,7 @@ class DataProcessor:
if sync_start is not None:
if (pre_outliers_ts - sync_start) > self.power_sync_len:
datasync_timestamps.append(
- (
- sync_start,
- pre_outliers_ts,
- )
+ (sync_start, pre_outliers_ts)
)
sync_start = None
@@ -187,7 +184,7 @@ class DataProcessor:
if et_timestamps_start <= index <= et_timestamps_end:
candidate_indexes.append(index)
- if len(candidate_indexes) >= 2:
+ if len(candidate_indexes) == 2:
drift = self.et_timestamps[candidate_indexes[0]] - expected_start_ts
compensated_timestamps.append(expected_start_ts + drift)