This repository was archived by the owner on May 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpy3gui.py
63 lines (56 loc) · 2.15 KB
/
py3gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/python
import os
import sys
__file__ = os.path.abspath(sys.argv[0])
if __name__ == '__main__':
__import__('iwafgui').Splash(
os.path.join(os.path.dirname(__file__), 'logo.gif')
)
import pylab
from iwafgui import Iwaf, MultiBrowse, Arguments, Action, Browse, Quit
from py3testweights import testWeights
from py3generatefeatureweights import generateFeatureWeights
from py3diagnosticplot import diagnosticPlot
def main(argv = []):
Iwaf(
title = 'Py3GUI',
size = (550, 550),
contents = [
MultiBrowse('flist', 'Select Training Data',
[('Standard Data Files', '.dat'), ('Pickle Files', '.pk')]),
Arguments(
'generation-args',
[
('responsewindow', 'Response Window [begin end] (ms): ',
'0 800'),
('channelset', 'Channel Set: ', '1:8'),
('randompercent', '% Random Sample for Training: ',
'100'),
('decimationfrequency', 'Decimation Frequency (Hz): ',
'20'),
('classificationmethod', 'Classification Method: ',
['SWLDA']),
('maxmodelfeatures', 'Max Model Features: ',
'60'),
('penter', 'Threshold to Add Features: ', '0.1'),
('premove', 'Threshold to Remove Features: ', '0.15'),
('removeanomalies', 'Attempt to Remove Anomalies: ', False),
]
),
Action('Generate Feature Weights', generateFeatureWeights),
Browse('weightfile', 'Use weights from: '),
Action('Diagnostic Plot', diagnosticPlot),
Arguments(
'test-args',
[
('matrixshape', 'Matrix Shape: ', '6x6'),
('repetitions', 'Repetitions: ', '1:15'),
]
),
Action('Test Weights', testWeights),
Quit(lambda: pylab.close('all') or True),
]
).mainloop()
if __name__ == '__main__':
import sys
main(sys.argv[1:])