From a561a91f16ac97a8cabc04a5e99be277e0351982 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 18 Jan 2021 14:27:20 +0100 Subject: energytrace drift compensation: stretch datapoints --- lib/lennart/DataProcessor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3