diff options
-rw-r--r-- | lib/lennart/DataProcessor.py | 5 | ||||
-rw-r--r-- | lib/pelt.py | 3 | ||||
-rw-r--r-- | lib/runner.py | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py index 67c6fb6..319b37f 100644 --- a/lib/lennart/DataProcessor.py +++ b/lib/lennart/DataProcessor.py @@ -166,11 +166,6 @@ class DataProcessor: :return: List of modified timestamps (float list) """ endFactor = 1 + (end_offset / ((end_timestamp - end_offset) - start_timestamp)) - # print( - # f"({end_timestamp} + {end_offset} - {start_timestamp}) / ({end_timestamp} - {start_timestamp}) == {endFactor}" - # ) - # Manuelles endFactor += 0.0001 macht es merklich besser - # print(f"endFactor = {endFactor}") # endFactor assumes that the end of the first sync pulse is at timestamp 0. # Then, timestamps with drift := timestamps * endFactor. # As this is not the case (the first sync pulse ends at start_timestamp > 0), we shift the data by first diff --git a/lib/pelt.py b/lib/pelt.py index 518bef7..8858533 100644 --- a/lib/pelt.py +++ b/lib/pelt.py @@ -10,8 +10,7 @@ def PELT_get_changepoints(algo, penalty): return res -# calculates the raw_states for measurement measurement. num_measurement is used to identify the -# return value +# calculates the raw_states for a measurement. num_measurement is used to identify the return value # penalty, model and jump are directly passed to pelt def PELT_get_raw_states(num_measurement, algo, penalty): changepoints = algo.predict(pen=penalty) diff --git a/lib/runner.py b/lib/runner.py index 72d222d..ebb2fb2 100644 --- a/lib/runner.py +++ b/lib/runner.py @@ -208,6 +208,8 @@ class EnergyTraceLogicAnalyzerMonitor(EnergyTraceMonitor): self.sig.forceStopMeasure() time.sleep(0.2) sync_data = self.sig.getData() + # TODO ensure that sync_data.getDict()["timestamps"] is not empty + # (if it is, communication with the LA was broken the entire time) with open(self.log_file, "w") as fp: json.dump(sync_data.getDict(), fp) |