summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index c3a1547..a2596d3 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -7,11 +7,20 @@ from scipy.cluster.vq import kmeans2
import struct
import sys
import tarfile
-from dfatool import AEMRAnalyzer
+from dfatool import Analysis, RawData
if __name__ == '__main__':
filename = sys.argv[1]
- analyzer = AEMRAnalyzer(filename)
+ raw_data = RawData(filename)
- analyzer.preprocess()
+ preprocessed_data = raw_data.get_preprocessed_data()
+ print(preprocessed_data)
+ foo = Analysis(preprocessed_data)
+ res = foo.analyze()
+ print(res)
+ for key in res.keys():
+ print(key)
+ for subkey in res[key].keys():
+ if subkey != 'isa' and len(res[key][subkey]) > 0:
+ print(' {:s}: {:f}'.format(subkey, np.mean(res[key][subkey])))
sys.exit(0)