summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-11-02 13:28:40 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-11-02 13:28:40 +0100
commitc7a7b48c6739e193ba24eec4d41082271df164ce (patch)
treeca01ada66ac02395999310f84bf8f4a61d1aa049 /bin
parentc179546f74807882f4dff47c8a969741f2dba1a7 (diff)
Simplify PELT usage. remove kneedle, refactor code
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index fec5620..eca98c4 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -250,12 +250,7 @@ def plot_traces(preprocessed_data, sot_name):
traces = [traces[i] for i in indexes]
plotter.plot_xy(
- timestamps,
- traces,
- xlabel="t [s]",
- ylabel="P [W]",
- title=sot_name,
- family=True,
+ timestamps, traces, xlabel="t [s]", ylabel="P [W]", title=sot_name, family=True
)
@@ -495,7 +490,10 @@ if __name__ == "__main__":
if args.with_substates != "":
for kv in args.with_substates.split(","):
k, v = kv.split("=")
- arg_dict[k] = v
+ try:
+ arg_dict[k] = float(v)
+ except ValueError:
+ arg_dict[k] = v
args.with_substates = arg_dict
if args.plot_traces: