diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-02-07 10:58:05 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-02-07 10:58:49 +0100 |
commit | 32a38a781f55453b4fe7c480a1d118834f2f236d (patch) | |
tree | e17ca4c484a1b158c5e0b8d779e7fc65ea3d95bd /bin | |
parent | cfe740a107964c805451ad0a59eeff0049d5bac1 (diff) |
Rename EnergyModel to PTAModel
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 4 | ||||
-rwxr-xr-x | bin/test.py | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index dbfe0d1..307cbd2 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -5,7 +5,7 @@ import json import plotter import re import sys -from dfatool import EnergyModel, RawData +from dfatool import PTAModel, RawData from dfatool import soft_cast_int, is_numeric, gplearn_to_function opts = {} @@ -147,7 +147,7 @@ if __name__ == '__main__': raw_data = RawData(args) preprocessed_data = raw_data.get_preprocessed_data() - model = EnergyModel(preprocessed_data, + model = PTAModel(preprocessed_data, ignore_trace_indexes = ignored_trace_indexes, discard_outliers = discard_outliers, function_override = function_override, diff --git a/bin/test.py b/bin/test.py index 0b015f4..ae72df2 100755 --- a/bin/test.py +++ b/bin/test.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -from dfatool import EnergyModel, RawData, analytic +from dfatool import PTAModel, RawData, analytic import unittest class TestStaticModel(unittest.TestCase): def test_model_singlefile_rf24(self): raw_data = RawData(['../data/20170220_164723_RF24_int_A.tar']) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'POWERDOWN RX STANDBY1 TX'.split(' ')) self.assertEqual(model.transitions(), 'begin epilogue powerDown powerUp setDataRate_num setPALevel_num startListening stopListening write_nb'.split(' ')) static_model = model.get_static() @@ -72,7 +72,7 @@ class TestStaticModel(unittest.TestCase): def test_model_singlefile_mmparam(self): raw_data = RawData(['../data/20161221_123347_mmparam.tar']) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'OFF ON'.split(' ')) self.assertEqual(model.transitions(), 'off setBrightness'.split(' ')) static_model = model.get_static() @@ -100,7 +100,7 @@ class TestStaticModel(unittest.TestCase): ] raw_data = RawData(testfiles) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'ACTIVE POWEROFF'.split(' ')) self.assertEqual(model.transitions(), 'getTemp setHyst setOS shutdown start'.split(' ')) static_model = model.get_static() @@ -129,7 +129,7 @@ class TestStaticModel(unittest.TestCase): ] raw_data = RawData(testfiles) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'DISABLED ENABLED'.split(' ')) self.assertEqual(model.transitions(), 'clear disable enable ioInit sendLine toggleVCOM'.split(' ')) static_model = model.get_static() @@ -161,7 +161,7 @@ class TestStaticModel(unittest.TestCase): ] raw_data = RawData(testfiles) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'B G OFF R'.split(' ')) self.assertEqual(model.transitions(), 'blue green off red'.split(' ')) static_model = model.get_static() @@ -193,7 +193,7 @@ class TestStaticModel(unittest.TestCase): ] raw_data = RawData(testfiles) preprocessed_data = raw_data.get_preprocessed_data(verbose = False) - model = EnergyModel(preprocessed_data, verbose = False) + model = PTAModel(preprocessed_data, verbose = False) self.assertEqual(model.states(), 'IDLE RX SLEEP SLEEP_EWOR SYNTH_ON TX XOFF'.split(' ')) self.assertEqual(model.transitions(), 'crystal_off eWOR idle init prepare_xmit receive send setSymbolRate setTxPower sleep txDone'.split(' ')) static_model = model.get_static() |