summaryrefslogtreecommitdiff
path: root/bin/analyze-archive.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-07-08 15:09:55 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-07-08 15:09:55 +0200
commit67f44728a1dd9a3c786bd5602bd1ac0834ebd8ea (patch)
tree3551ea8147b8408a852cd9f11f988f0fbf0c5fbe /bin/analyze-archive.py
parentc4598ca93a72d5176d4488813d38abcaad571123 (diff)
RawData: load ptalog if available
Diffstat (limited to 'bin/analyze-archive.py')
-rwxr-xr-xbin/analyze-archive.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 74a2d41..5c7c97e 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -377,9 +377,12 @@ if __name__ == "__main__":
if raw_data.version <= 1:
data_source = "MIMOSA"
elif raw_data.version == 2:
- data_source = "MSP430 EnergyTrace, sync={}".format(
- raw_data.ptalog["opt"]["energytrace"]["sync"]
- )
+ if raw_data.ptalog and "sync" in raw_data.ptalog["opt"]["energytrace"]:
+ data_source = "MSP430 EnergyTrace, sync={}".format(
+ raw_data.ptalog["opt"]["energytrace"]["sync"]
+ )
+ else:
+ data_source = "MSP430 EnergyTrace"
print(f" Data source ID: {raw_data.version} ({data_source})")
preprocessed_data = raw_data.get_preprocessed_data()