summaryrefslogtreecommitdiff
path: root/bin/analyze-archive.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/analyze-archive.py')
-rwxr-xr-xbin/analyze-archive.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index a9ef3bc..0882883 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -41,10 +41,11 @@ if __name__ == '__main__':
ignored_trace_indexes = None
discard_outliers = None
+ function_override = {}
try:
raw_opts, args = getopt.getopt(sys.argv[1:], "",
- 'plot ignored-trace-indexes= discard-outliers='.split(' '))
+ 'plot ignored-trace-indexes= discard-outliers= function-override='.split(' '))
for option, parameter in raw_opts:
optname = re.sub(r'^--', '', option)
@@ -58,6 +59,11 @@ if __name__ == '__main__':
if 'discard-outliers' in opts:
discard_outliers = float(opts['discard-outliers'])
+ if 'function-override' in opts:
+ for function_desc in opts['function-override'].split(';'):
+ state_or_tran, attribute, *function_str = function_desc.split(' ')
+ function_override[(state_or_tran, attribute)] = ' '.join(function_str)
+
except getopt.GetoptError as err:
print(err)
sys.exit(2)
@@ -67,7 +73,8 @@ if __name__ == '__main__':
preprocessed_data = raw_data.get_preprocessed_data()
model = EnergyModel(preprocessed_data,
ignore_trace_indexes = ignored_trace_indexes,
- discard_outliers = discard_outliers)
+ discard_outliers = discard_outliers,
+ function_override = function_override)
print('--- simple static model ---')
static_model = model.get_static()