summaryrefslogtreecommitdiff
path: root/lib/loader.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-10-19 14:28:43 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-10-19 14:28:43 +0200
commitdb41acafd2abeca153c9f552e82cd26968092cb3 (patch)
tree8e4a0bb6ede8de2a805aa0c9e0d32c4f7afe5a05 /lib/loader.py
parentf308a519edecd8ee92f2fe18552620a569f48d3b (diff)
ET+LA: add --plot-traces support, actually calculate standard deviation.
Jungejungejungejungejunge...
Diffstat (limited to 'lib/loader.py')
-rw-r--r--lib/loader.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/loader.py b/lib/loader.py
index e004fe1..94a76b3 100644
--- a/lib/loader.py
+++ b/lib/loader.py
@@ -1656,8 +1656,6 @@ class EnergyTraceWithLogicAnalyzer:
self.sync_data = SigrokResult.fromString(log_data[0])
self.energy_data = EnergyInterface.getDataFromString(str(log_data[1]))
- pass
-
def analyze_states(self, traces, offline_index: int):
"""
Split log data into states and transitions and return duration, energy, and mean power for each element.
@@ -1693,9 +1691,13 @@ class EnergyTraceWithLogicAnalyzer:
dp = DataProcessor(sync_data=self.sync_data, energy_data=self.energy_data)
dp.run()
energy_trace_new = list()
- energy_trace_new.extend(dp.getStatesdfatool(state_sleep=self.state_duration))
+ energy_trace_new.extend(
+ dp.getStatesdfatool(
+ state_sleep=self.state_duration, with_traces=self.with_traces
+ )
+ )
# Uncomment to plot traces
- # dp.plot() # <- plot traces with sync annotatons
+ # dp.plot() # <- plot traces with sync annotatons
# dp.plot(names) # <- plot annotated traces (with state/transition names)
energy_trace_new = energy_trace_new[4:]