summaryrefslogtreecommitdiff
path: root/lib/lennart/DataProcessor.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-10-22 11:18:05 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-10-22 11:18:05 +0200
commit9f85fc2f2678c491d1ae8d42995fae0fb931f1fe (patch)
treec8aa0d99a7112ed295f0d3758a386540187480fd /lib/lennart/DataProcessor.py
parentac81f1a0d9ddcadc7cf5990919a03652e4bc04ee (diff)
unfuck LA<->ET drift calculation
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 7546128..8d762e7 100644
--- a/lib/lennart/DataProcessor.py
+++ b/lib/lennart/DataProcessor.py
@@ -117,10 +117,16 @@ class DataProcessor:
)
with_offset = np.array(time_stamp_data) + start_offset
+ logger.debug(
+ f"Measurement area with offset: LA timestamp range [{with_offset[2]}, {with_offset[-8]}]"
+ )
with_drift = self.addDrift(
with_offset, end_timestamp, end_offset, start_timestamp
)
+ logger.debug(
+ f"Measurement area with drift: LA timestamp range [{with_drift[2]}, {with_drift[-8]}]"
+ )
self.modified_timestamps = with_drift
@@ -150,7 +156,7 @@ class DataProcessor:
:param start_timestamp: Timestamp of last EnergyTrace datapoint at the first sync point
:return: List of modified timestamps (float list)
"""
- endFactor = 1 + (end_offset / (end_timestamp - start_timestamp))
+ endFactor = 1 + (end_offset / ((end_timestamp - end_offset) - start_timestamp))
# print(
# f"({end_timestamp} + {end_offset} - {start_timestamp}) / ({end_timestamp} - {start_timestamp}) == {endFactor}"
# )
@@ -216,7 +222,7 @@ class DataProcessor:
label="Synchronisationsignale mit Driftfaktor",
)
- plt.xlabel("Zeit [s]")
+ plt.xlabel("Zeit von EnergyTrace [s]")
plt.ylabel("Leistung [W]")
leg = plt.legend()