summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-01-18 14:27:20 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-01-18 14:27:20 +0100
commita561a91f16ac97a8cabc04a5e99be277e0351982 (patch)
treead13d4c9353f34ee401584ffa3fd5456be6adc5f
parentd78b72e0c132cb0bb88fa9a7bd01c4f68b36ffb9 (diff)
energytrace drift compensation: stretch datapoints
-rw-r--r--lib/lennart/DataProcessor.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py
index e6bcac6..1fea0db 100644
--- a/lib/lennart/DataProcessor.py
+++ b/lib/lennart/DataProcessor.py
@@ -219,7 +219,9 @@ class DataProcessor:
# TODO die Anzahl Changepoints ist a priori bekannt, es könnte mit ruptures.Dynp statt ruptures.Pelt besser funktionieren.
# Vielleicht sollte man auch "rbf" statt "l1" nutzen.
# "rbf" und "l2" scheinen ähnlich gut zu funktionieren, l2 ist schneller.
- pelt = PELT(with_multiprocessing=False)
+ # PELT does not find changepoints for transitions which span just four or five data points (i.e., transitions shorter than ~2ms).
+ # Workaround: Double the data rate passed to PELT by interpolation ("stretch=2")
+ pelt = PELT(with_multiprocessing=False, stretch=2)
expected_transition_start_timestamps = sync_timestamps[::2]
transition_start_candidate_weights = list()
drift = 0