@@ -0,0 +1,5 | |||
|
1 | from ui_project import * | |
|
2 | from ui_voltage import * | |
|
3 | from ui_spectra import * | |
|
4 | from ui_spectra_heis import * | |
|
5 | from ui_correlation import * No newline at end of file |
@@ -0,0 +1,45 | |||
|
1 | ||
|
2 | from PyQt4 import QtCore, QtGui | |
|
3 | ||
|
4 | try: | |
|
5 | _fromUtf8 = QtCore.QString.fromUtf8 | |
|
6 | except AttributeError: | |
|
7 | def _fromUtf8(s): | |
|
8 | return s | |
|
9 | ||
|
10 | try: | |
|
11 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
|
12 | def _translate(context, text, disambig): | |
|
13 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
|
14 | except AttributeError: | |
|
15 | def _translate(context, text, disambig): | |
|
16 | return QtGui.QApplication.translate(context, text, disambig) | |
|
17 | ||
|
18 | class Ui_CorrelationTab(object): | |
|
19 | ||
|
20 | def setupUi(self): | |
|
21 | ||
|
22 | self.tabCorrelation = QtGui.QWidget() | |
|
23 | self.tabCorrelation.setObjectName(_fromUtf8("tabCorrelation")) | |
|
24 | self.gridLayout_13 = QtGui.QGridLayout(self.tabCorrelation) | |
|
25 | self.gridLayout_13.setObjectName(_fromUtf8("gridLayout_13")) | |
|
26 | self.tabWidgetCorrelation = QtGui.QTabWidget(self.tabCorrelation) | |
|
27 | self.tabWidgetCorrelation.setObjectName(_fromUtf8("tabWidgetCorrelation")) | |
|
28 | self.tabopCorrelation = QtGui.QWidget() | |
|
29 | self.tabopCorrelation.setObjectName(_fromUtf8("tabopCorrelation")) | |
|
30 | self.tabWidgetCorrelation.addTab(self.tabopCorrelation, _fromUtf8("")) | |
|
31 | self.tabopCorrelation1 = QtGui.QWidget() | |
|
32 | self.tabopCorrelation1.setObjectName(_fromUtf8("tabopCorrelation1")) | |
|
33 | self.tabWidgetCorrelation.addTab(self.tabopCorrelation1, _fromUtf8("")) | |
|
34 | self.gridLayout_13.addWidget(self.tabWidgetCorrelation, 0, 0, 1, 1) | |
|
35 | ||
|
36 | self.tabWidgetProject.addTab(self.tabCorrelation, _fromUtf8("")) | |
|
37 | ||
|
38 | self.tabWidgetCorrelation.setCurrentIndex(0) | |
|
39 | ||
|
40 | def retranslateUi(self): | |
|
41 | ||
|
42 | self.tabWidgetCorrelation.setTabText(self.tabWidgetCorrelation.indexOf(self.tabopCorrelation), _translate("MainWindow", "Operation", None)) | |
|
43 | self.tabWidgetCorrelation.setTabText(self.tabWidgetCorrelation.indexOf(self.tabopCorrelation1), _translate("MainWindow", "Graphics", None)) | |
|
44 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabCorrelation), _translate("MainWindow", "Correlation", None)) | |
|
45 | No newline at end of file |
@@ -0,0 +1,171 | |||
|
1 | ||
|
2 | from PyQt4 import QtCore, QtGui | |
|
3 | ||
|
4 | try: | |
|
5 | _fromUtf8 = QtCore.QString.fromUtf8 | |
|
6 | except AttributeError: | |
|
7 | def _fromUtf8(s): | |
|
8 | return s | |
|
9 | ||
|
10 | try: | |
|
11 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
|
12 | def _translate(context, text, disambig): | |
|
13 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
|
14 | except AttributeError: | |
|
15 | def _translate(context, text, disambig): | |
|
16 | return QtGui.QApplication.translate(context, text, disambig) | |
|
17 | ||
|
18 | class Ui_ProjectTab(object): | |
|
19 | ||
|
20 | def setupUi(self): | |
|
21 | ||
|
22 | self.tabProject = QtGui.QWidget() | |
|
23 | self.tabProject.setObjectName(_fromUtf8("tabProject")) | |
|
24 | self.gridLayout_15 = QtGui.QGridLayout(self.tabProject) | |
|
25 | self.gridLayout_15.setObjectName(_fromUtf8("gridLayout_15")) | |
|
26 | self.frame = QtGui.QFrame(self.tabProject) | |
|
27 | self.frame.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
28 | self.frame.setFrameShadow(QtGui.QFrame.Raised) | |
|
29 | self.frame.setObjectName(_fromUtf8("frame")) | |
|
30 | self.gridLayout_2 = QtGui.QGridLayout(self.frame) | |
|
31 | self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) | |
|
32 | self.label = QtGui.QLabel(self.frame) | |
|
33 | self.label.setObjectName(_fromUtf8("label")) | |
|
34 | self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) | |
|
35 | self.proName = QtGui.QLineEdit(self.frame) | |
|
36 | self.proName.setObjectName(_fromUtf8("proName")) | |
|
37 | self.gridLayout_2.addWidget(self.proName, 0, 1, 1, 8) | |
|
38 | self.label_11 = QtGui.QLabel(self.frame) | |
|
39 | self.label_11.setObjectName(_fromUtf8("label_11")) | |
|
40 | self.gridLayout_2.addWidget(self.label_11, 1, 0, 1, 1) | |
|
41 | self.proComDataType = QtGui.QComboBox(self.frame) | |
|
42 | self.proComDataType.setObjectName(_fromUtf8("proComDataType")) | |
|
43 | self.proComDataType.addItem(_fromUtf8("")) | |
|
44 | self.proComDataType.addItem(_fromUtf8("")) | |
|
45 | self.proComDataType.addItem(_fromUtf8("")) | |
|
46 | self.gridLayout_2.addWidget(self.proComDataType, 1, 1, 1, 5) | |
|
47 | self.proDataType = QtGui.QLineEdit(self.frame) | |
|
48 | self.proDataType.setObjectName(_fromUtf8("proDataType")) | |
|
49 | self.gridLayout_2.addWidget(self.proDataType, 1, 6, 1, 3) | |
|
50 | self.label_15 = QtGui.QLabel(self.frame) | |
|
51 | self.label_15.setObjectName(_fromUtf8("label_15")) | |
|
52 | self.gridLayout_2.addWidget(self.label_15, 2, 0, 1, 1) | |
|
53 | self.proToolPath = QtGui.QToolButton(self.frame) | |
|
54 | self.proToolPath.setObjectName(_fromUtf8("proToolPath")) | |
|
55 | self.gridLayout_2.addWidget(self.proToolPath, 2, 1, 1, 1) | |
|
56 | self.proDataPath = QtGui.QLineEdit(self.frame) | |
|
57 | self.proDataPath.setObjectName(_fromUtf8("proDataPath")) | |
|
58 | self.gridLayout_2.addWidget(self.proDataPath, 2, 2, 1, 7) | |
|
59 | self.label_23 = QtGui.QLabel(self.frame) | |
|
60 | self.label_23.setObjectName(_fromUtf8("label_23")) | |
|
61 | self.gridLayout_2.addWidget(self.label_23, 3, 0, 1, 1) | |
|
62 | self.proComReadMode = QtGui.QComboBox(self.frame) | |
|
63 | self.proComReadMode.setObjectName(_fromUtf8("proComReadMode")) | |
|
64 | self.proComReadMode.addItem(_fromUtf8("")) | |
|
65 | self.proComReadMode.addItem(_fromUtf8("")) | |
|
66 | self.gridLayout_2.addWidget(self.proComReadMode, 3, 1, 1, 2) | |
|
67 | self.label_33 = QtGui.QLabel(self.frame) | |
|
68 | self.label_33.setObjectName(_fromUtf8("label_33")) | |
|
69 | self.gridLayout_2.addWidget(self.label_33, 3, 5, 1, 2) | |
|
70 | self.proDelay = QtGui.QLineEdit(self.frame) | |
|
71 | self.proDelay.setObjectName(_fromUtf8("proDelay")) | |
|
72 | self.gridLayout_2.addWidget(self.proDelay, 3, 8, 1, 1) | |
|
73 | self.label_32 = QtGui.QLabel(self.frame) | |
|
74 | self.label_32.setObjectName(_fromUtf8("label_32")) | |
|
75 | self.gridLayout_2.addWidget(self.label_32, 4, 0, 1, 1) | |
|
76 | self.proComWalk = QtGui.QComboBox(self.frame) | |
|
77 | self.proComWalk.setObjectName(_fromUtf8("proComWalk")) | |
|
78 | self.proComWalk.addItem(_fromUtf8("")) | |
|
79 | self.proComWalk.addItem(_fromUtf8("")) | |
|
80 | self.gridLayout_2.addWidget(self.proComWalk, 4, 1, 1, 8) | |
|
81 | self.proLoadButton = QtGui.QPushButton(self.frame) | |
|
82 | self.proLoadButton.setObjectName(_fromUtf8("proLoadButton")) | |
|
83 | self.gridLayout_2.addWidget(self.proLoadButton, 5, 0, 1, 9) | |
|
84 | self.label_10 = QtGui.QLabel(self.frame) | |
|
85 | self.label_10.setObjectName(_fromUtf8("label_10")) | |
|
86 | self.gridLayout_2.addWidget(self.label_10, 3, 3, 1, 1) | |
|
87 | self.proSet = QtGui.QLineEdit(self.frame) | |
|
88 | self.proSet.setObjectName(_fromUtf8("proSet")) | |
|
89 | self.gridLayout_2.addWidget(self.proSet, 3, 4, 1, 1) | |
|
90 | self.gridLayout_15.addWidget(self.frame, 0, 0, 1, 1) | |
|
91 | self.frame_2 = QtGui.QFrame(self.tabProject) | |
|
92 | self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
93 | self.frame_2.setFrameShadow(QtGui.QFrame.Raised) | |
|
94 | self.frame_2.setObjectName(_fromUtf8("frame_2")) | |
|
95 | self.gridLayout_10 = QtGui.QGridLayout(self.frame_2) | |
|
96 | self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) | |
|
97 | self.label_27 = QtGui.QLabel(self.frame_2) | |
|
98 | self.label_27.setObjectName(_fromUtf8("label_27")) | |
|
99 | self.gridLayout_10.addWidget(self.label_27, 0, 0, 1, 1) | |
|
100 | self.proComStartDate = QtGui.QComboBox(self.frame_2) | |
|
101 | self.proComStartDate.setObjectName(_fromUtf8("proComStartDate")) | |
|
102 | self.gridLayout_10.addWidget(self.proComStartDate, 0, 1, 1, 1) | |
|
103 | self.label_28 = QtGui.QLabel(self.frame_2) | |
|
104 | self.label_28.setObjectName(_fromUtf8("label_28")) | |
|
105 | self.gridLayout_10.addWidget(self.label_28, 1, 0, 1, 1) | |
|
106 | self.proComEndDate = QtGui.QComboBox(self.frame_2) | |
|
107 | self.proComEndDate.setObjectName(_fromUtf8("proComEndDate")) | |
|
108 | self.gridLayout_10.addWidget(self.proComEndDate, 1, 1, 1, 1) | |
|
109 | self.label_2 = QtGui.QLabel(self.frame_2) | |
|
110 | self.label_2.setObjectName(_fromUtf8("label_2")) | |
|
111 | self.gridLayout_10.addWidget(self.label_2, 2, 0, 1, 1) | |
|
112 | self.proStartTime = QtGui.QTimeEdit(self.frame_2) | |
|
113 | self.proStartTime.setObjectName(_fromUtf8("proStartTime")) | |
|
114 | self.gridLayout_10.addWidget(self.proStartTime, 2, 1, 1, 1) | |
|
115 | self.label_3 = QtGui.QLabel(self.frame_2) | |
|
116 | self.label_3.setObjectName(_fromUtf8("label_3")) | |
|
117 | self.gridLayout_10.addWidget(self.label_3, 3, 0, 1, 1) | |
|
118 | self.proEndTime = QtGui.QTimeEdit(self.frame_2) | |
|
119 | self.proEndTime.setObjectName(_fromUtf8("proEndTime")) | |
|
120 | self.gridLayout_10.addWidget(self.proEndTime, 3, 1, 1, 1) | |
|
121 | self.label_30 = QtGui.QLabel(self.frame_2) | |
|
122 | self.label_30.setObjectName(_fromUtf8("label_30")) | |
|
123 | self.gridLayout_10.addWidget(self.label_30, 4, 0, 1, 1) | |
|
124 | self.proDescription = QtGui.QTextEdit(self.frame_2) | |
|
125 | self.proDescription.setObjectName(_fromUtf8("proDescription")) | |
|
126 | self.gridLayout_10.addWidget(self.proDescription, 4, 1, 1, 1) | |
|
127 | self.gridLayout_15.addWidget(self.frame_2, 1, 0, 1, 1) | |
|
128 | self.frame_3 = QtGui.QFrame(self.tabProject) | |
|
129 | self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
130 | self.frame_3.setFrameShadow(QtGui.QFrame.Raised) | |
|
131 | self.frame_3.setObjectName(_fromUtf8("frame_3")) | |
|
132 | self.gridLayout_14 = QtGui.QGridLayout(self.frame_3) | |
|
133 | self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14")) | |
|
134 | self.proOk = QtGui.QPushButton(self.frame_3) | |
|
135 | self.proOk.setObjectName(_fromUtf8("proOk")) | |
|
136 | self.gridLayout_14.addWidget(self.proOk, 0, 0, 1, 1) | |
|
137 | self.proClear = QtGui.QPushButton(self.frame_3) | |
|
138 | self.proClear.setObjectName(_fromUtf8("proClear")) | |
|
139 | self.gridLayout_14.addWidget(self.proClear, 0, 1, 1, 1) | |
|
140 | self.gridLayout_15.addWidget(self.frame_3, 2, 0, 1, 1) | |
|
141 | ||
|
142 | self.tabWidgetProject.addTab(self.tabProject, _fromUtf8("")) | |
|
143 | ||
|
144 | def retranslateUi(self): | |
|
145 | ||
|
146 | self.label.setText(_translate("MainWindow", "Project Name :", None)) | |
|
147 | self.label_11.setText(_translate("MainWindow", "DataType :", None)) | |
|
148 | self.proComDataType.setItemText(0, _translate("MainWindow", "Voltage", None)) | |
|
149 | self.proComDataType.setItemText(1, _translate("MainWindow", "Spectra", None)) | |
|
150 | self.proComDataType.setItemText(2, _translate("MainWindow", "Fits", None)) | |
|
151 | self.label_15.setText(_translate("MainWindow", "DataPath :", None)) | |
|
152 | self.proToolPath.setText(_translate("MainWindow", "...", None)) | |
|
153 | self.label_23.setText(_translate("MainWindow", "Read Mode:", None)) | |
|
154 | self.proComReadMode.setItemText(0, _translate("MainWindow", "Offline", None)) | |
|
155 | self.proComReadMode.setItemText(1, _translate("MainWindow", "Online", None)) | |
|
156 | self.label_33.setText(_translate("MainWindow", "Delay:", None)) | |
|
157 | self.label_32.setText(_translate("MainWindow", "Walk :", None)) | |
|
158 | self.proComWalk.setItemText(0, _translate("MainWindow", "On Files", None)) | |
|
159 | self.proComWalk.setItemText(1, _translate("MainWindow", "On Folder", None)) | |
|
160 | self.proLoadButton.setText(_translate("MainWindow", "Load", None)) | |
|
161 | self.label_10.setText(_translate("MainWindow", "Set:", None)) | |
|
162 | self.label_27.setText(_translate("MainWindow", "Star Date:", None)) | |
|
163 | self.label_28.setText(_translate("MainWindow", "End Date:", None)) | |
|
164 | self.label_2.setText(_translate("MainWindow", "Start Time:", None)) | |
|
165 | self.label_3.setText(_translate("MainWindow", "End Time:", None)) | |
|
166 | self.label_30.setText(_translate("MainWindow", "Description:", None)) | |
|
167 | self.proOk.setText(_translate("MainWindow", "Ok", None)) | |
|
168 | self.proClear.setText(_translate("MainWindow", "Clear", None)) | |
|
169 | ||
|
170 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabProject), _translate("MainWindow", "Project", None)) | |
|
171 | No newline at end of file |
@@ -0,0 +1,415 | |||
|
1 | from PyQt4 import QtCore, QtGui | |
|
2 | ||
|
3 | try: | |
|
4 | _fromUtf8 = QtCore.QString.fromUtf8 | |
|
5 | except AttributeError: | |
|
6 | def _fromUtf8(s): | |
|
7 | return s | |
|
8 | ||
|
9 | try: | |
|
10 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
|
11 | def _translate(context, text, disambig): | |
|
12 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
|
13 | except AttributeError: | |
|
14 | def _translate(context, text, disambig): | |
|
15 | return QtGui.QApplication.translate(context, text, disambig) | |
|
16 | ||
|
17 | class Ui_SpectraTab(object): | |
|
18 | ||
|
19 | def setupUi(self): | |
|
20 | ||
|
21 | self.tabSpectra = QtGui.QWidget() | |
|
22 | self.tabSpectra.setObjectName(_fromUtf8("tabSpectra")) | |
|
23 | self.gridLayout_7 = QtGui.QGridLayout(self.tabSpectra) | |
|
24 | self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) | |
|
25 | self.frame_5 = QtGui.QFrame(self.tabSpectra) | |
|
26 | self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
27 | self.frame_5.setFrameShadow(QtGui.QFrame.Raised) | |
|
28 | self.frame_5.setObjectName(_fromUtf8("frame_5")) | |
|
29 | self.gridLayout_18 = QtGui.QGridLayout(self.frame_5) | |
|
30 | self.gridLayout_18.setObjectName(_fromUtf8("gridLayout_18")) | |
|
31 | self.specOpOk = QtGui.QPushButton(self.frame_5) | |
|
32 | self.specOpOk.setObjectName(_fromUtf8("specOpOk")) | |
|
33 | self.gridLayout_18.addWidget(self.specOpOk, 0, 0, 1, 1) | |
|
34 | self.specGraphClear = QtGui.QPushButton(self.frame_5) | |
|
35 | self.specGraphClear.setObjectName(_fromUtf8("specGraphClear")) | |
|
36 | self.gridLayout_18.addWidget(self.specGraphClear, 0, 1, 1, 1) | |
|
37 | self.gridLayout_7.addWidget(self.frame_5, 1, 1, 1, 1) | |
|
38 | self.tabWidgetSpectra = QtGui.QTabWidget(self.tabSpectra) | |
|
39 | self.tabWidgetSpectra.setObjectName(_fromUtf8("tabWidgetSpectra")) | |
|
40 | self.tabopSpectra = QtGui.QWidget() | |
|
41 | self.tabopSpectra.setObjectName(_fromUtf8("tabopSpectra")) | |
|
42 | self.gridLayout_5 = QtGui.QGridLayout(self.tabopSpectra) | |
|
43 | self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) | |
|
44 | self.specOpCebCrossSpectra = QtGui.QCheckBox(self.tabopSpectra) | |
|
45 | self.specOpCebCrossSpectra.setObjectName(_fromUtf8("specOpCebCrossSpectra")) | |
|
46 | self.gridLayout_5.addWidget(self.specOpCebCrossSpectra, 4, 0, 1, 2) | |
|
47 | self.specOpComChannel = QtGui.QComboBox(self.tabopSpectra) | |
|
48 | self.specOpComChannel.setObjectName(_fromUtf8("specOpComChannel")) | |
|
49 | self.specOpComChannel.addItem(_fromUtf8("")) | |
|
50 | self.specOpComChannel.addItem(_fromUtf8("")) | |
|
51 | self.gridLayout_5.addWidget(self.specOpComChannel, 8, 0, 1, 2) | |
|
52 | self.specOpChannel = QtGui.QLineEdit(self.tabopSpectra) | |
|
53 | self.specOpChannel.setObjectName(_fromUtf8("specOpChannel")) | |
|
54 | self.gridLayout_5.addWidget(self.specOpChannel, 8, 3, 1, 2) | |
|
55 | self.specOpComHeights = QtGui.QComboBox(self.tabopSpectra) | |
|
56 | self.specOpComHeights.setObjectName(_fromUtf8("specOpComHeights")) | |
|
57 | self.specOpComHeights.addItem(_fromUtf8("")) | |
|
58 | self.specOpComHeights.addItem(_fromUtf8("")) | |
|
59 | self.gridLayout_5.addWidget(self.specOpComHeights, 11, 0, 1, 2) | |
|
60 | self.specOpHeights = QtGui.QLineEdit(self.tabopSpectra) | |
|
61 | self.specOpHeights.setObjectName(_fromUtf8("specOpHeights")) | |
|
62 | self.gridLayout_5.addWidget(self.specOpHeights, 11, 3, 1, 2) | |
|
63 | self.specOpIncoherent = QtGui.QLineEdit(self.tabopSpectra) | |
|
64 | self.specOpIncoherent.setObjectName(_fromUtf8("specOpIncoherent")) | |
|
65 | self.gridLayout_5.addWidget(self.specOpIncoherent, 13, 3, 1, 2) | |
|
66 | self.specOpCebRemoveDC = QtGui.QCheckBox(self.tabopSpectra) | |
|
67 | self.specOpCebRemoveDC.setObjectName(_fromUtf8("specOpCebRemoveDC")) | |
|
68 | self.gridLayout_5.addWidget(self.specOpCebRemoveDC, 14, 0, 1, 2) | |
|
69 | self.specOpCebHeights = QtGui.QCheckBox(self.tabopSpectra) | |
|
70 | self.specOpCebHeights.setObjectName(_fromUtf8("specOpCebHeights")) | |
|
71 | self.gridLayout_5.addWidget(self.specOpCebHeights, 9, 0, 1, 1) | |
|
72 | self.specOpCebChannel = QtGui.QCheckBox(self.tabopSpectra) | |
|
73 | self.specOpCebChannel.setObjectName(_fromUtf8("specOpCebChannel")) | |
|
74 | self.gridLayout_5.addWidget(self.specOpCebChannel, 7, 0, 1, 1) | |
|
75 | self.specOppairsList = QtGui.QLineEdit(self.tabopSpectra) | |
|
76 | self.specOppairsList.setObjectName(_fromUtf8("specOppairsList")) | |
|
77 | self.gridLayout_5.addWidget(self.specOppairsList, 6, 3, 1, 2) | |
|
78 | self.specOpnFFTpoints = QtGui.QLineEdit(self.tabopSpectra) | |
|
79 | self.specOpnFFTpoints.setObjectName(_fromUtf8("specOpnFFTpoints")) | |
|
80 | self.gridLayout_5.addWidget(self.specOpnFFTpoints, 2, 3, 1, 2) | |
|
81 | self.label_31 = QtGui.QLabel(self.tabopSpectra) | |
|
82 | self.label_31.setObjectName(_fromUtf8("label_31")) | |
|
83 | self.gridLayout_5.addWidget(self.label_31, 6, 0, 1, 2) | |
|
84 | self.label_26 = QtGui.QLabel(self.tabopSpectra) | |
|
85 | self.label_26.setObjectName(_fromUtf8("label_26")) | |
|
86 | self.gridLayout_5.addWidget(self.label_26, 2, 0, 1, 2) | |
|
87 | self.specOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectra) | |
|
88 | self.specOpCebIncoherent.setObjectName(_fromUtf8("specOpCebIncoherent")) | |
|
89 | self.gridLayout_5.addWidget(self.specOpCebIncoherent, 12, 0, 1, 1) | |
|
90 | self.specOpCobIncInt = QtGui.QComboBox(self.tabopSpectra) | |
|
91 | self.specOpCobIncInt.setObjectName(_fromUtf8("specOpCobIncInt")) | |
|
92 | self.specOpCobIncInt.addItem(_fromUtf8("")) | |
|
93 | self.specOpCobIncInt.addItem(_fromUtf8("")) | |
|
94 | self.gridLayout_5.addWidget(self.specOpCobIncInt, 13, 0, 1, 2) | |
|
95 | spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
96 | self.gridLayout_5.addItem(spacerItem9, 12, 3, 1, 1) | |
|
97 | self.specOpCebRadarfrequency = QtGui.QCheckBox(self.tabopSpectra) | |
|
98 | self.specOpCebRadarfrequency.setObjectName(_fromUtf8("specOpCebRadarfrequency")) | |
|
99 | self.gridLayout_5.addWidget(self.specOpCebRadarfrequency, 0, 0, 1, 2) | |
|
100 | spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
101 | self.gridLayout_5.addItem(spacerItem10, 9, 3, 1, 1) | |
|
102 | spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
103 | self.gridLayout_5.addItem(spacerItem11, 7, 3, 1, 1) | |
|
104 | self.specOpRadarfrequency = QtGui.QLineEdit(self.tabopSpectra) | |
|
105 | self.specOpRadarfrequency.setObjectName(_fromUtf8("specOpRadarfrequency")) | |
|
106 | self.gridLayout_5.addWidget(self.specOpRadarfrequency, 0, 3, 1, 2) | |
|
107 | spacerItem12 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
108 | self.gridLayout_5.addItem(spacerItem12, 4, 3, 1, 1) | |
|
109 | self.label_21 = QtGui.QLabel(self.tabopSpectra) | |
|
110 | self.label_21.setObjectName(_fromUtf8("label_21")) | |
|
111 | self.gridLayout_5.addWidget(self.label_21, 1, 0, 1, 1) | |
|
112 | self.specOpProfiles = QtGui.QLineEdit(self.tabopSpectra) | |
|
113 | self.specOpProfiles.setObjectName(_fromUtf8("specOpProfiles")) | |
|
114 | self.gridLayout_5.addWidget(self.specOpProfiles, 1, 3, 1, 2) | |
|
115 | self.specOpCebRemoveInt = QtGui.QCheckBox(self.tabopSpectra) | |
|
116 | self.specOpCebRemoveInt.setObjectName(_fromUtf8("specOpCebRemoveInt")) | |
|
117 | self.gridLayout_5.addWidget(self.specOpCebRemoveInt, 15, 0, 1, 1) | |
|
118 | spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
119 | self.gridLayout_5.addItem(spacerItem13, 15, 3, 1, 1) | |
|
120 | self.label_70 = QtGui.QLabel(self.tabopSpectra) | |
|
121 | self.label_70.setObjectName(_fromUtf8("label_70")) | |
|
122 | self.gridLayout_5.addWidget(self.label_70, 3, 0, 1, 1) | |
|
123 | self.specOpCebgetNoise = QtGui.QCheckBox(self.tabopSpectra) | |
|
124 | self.specOpCebgetNoise.setObjectName(_fromUtf8("specOpCebgetNoise")) | |
|
125 | self.gridLayout_5.addWidget(self.specOpCebgetNoise, 16, 0, 1, 1) | |
|
126 | self.specOpippFactor = QtGui.QLineEdit(self.tabopSpectra) | |
|
127 | self.specOpippFactor.setObjectName(_fromUtf8("specOpippFactor")) | |
|
128 | self.gridLayout_5.addWidget(self.specOpippFactor, 3, 3, 1, 2) | |
|
129 | self.specOpComRemoveDC = QtGui.QComboBox(self.tabopSpectra) | |
|
130 | self.specOpComRemoveDC.setObjectName(_fromUtf8("specOpComRemoveDC")) | |
|
131 | self.specOpComRemoveDC.addItem(_fromUtf8("")) | |
|
132 | self.specOpComRemoveDC.addItem(_fromUtf8("")) | |
|
133 | self.gridLayout_5.addWidget(self.specOpComRemoveDC, 14, 3, 1, 2) | |
|
134 | self.specOpgetNoise = QtGui.QLineEdit(self.tabopSpectra) | |
|
135 | self.specOpgetNoise.setObjectName(_fromUtf8("specOpgetNoise")) | |
|
136 | self.gridLayout_5.addWidget(self.specOpgetNoise, 16, 3, 1, 2) | |
|
137 | self.tabWidgetSpectra.addTab(self.tabopSpectra, _fromUtf8("")) | |
|
138 | self.tabgraphSpectra = QtGui.QWidget() | |
|
139 | self.tabgraphSpectra.setObjectName(_fromUtf8("tabgraphSpectra")) | |
|
140 | self.gridLayout_9 = QtGui.QGridLayout(self.tabgraphSpectra) | |
|
141 | self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) | |
|
142 | self.label_44 = QtGui.QLabel(self.tabgraphSpectra) | |
|
143 | self.label_44.setObjectName(_fromUtf8("label_44")) | |
|
144 | self.gridLayout_9.addWidget(self.label_44, 10, 0, 1, 1) | |
|
145 | spacerItem14 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
146 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) | |
|
147 | self.label_20 = QtGui.QLabel(self.tabgraphSpectra) | |
|
148 | self.label_20.setObjectName(_fromUtf8("label_20")) | |
|
149 | self.gridLayout_9.addWidget(self.label_20, 21, 0, 1, 1) | |
|
150 | self.specGraphSaveRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
151 | self.specGraphSaveRTInoise.setText(_fromUtf8("")) | |
|
152 | self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise")) | |
|
153 | self.gridLayout_9.addWidget(self.specGraphSaveRTInoise, 13, 4, 1, 1) | |
|
154 | self.specGgraphmagnitud = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
155 | self.specGgraphmagnitud.setObjectName(_fromUtf8("specGgraphmagnitud")) | |
|
156 | self.gridLayout_9.addWidget(self.specGgraphmagnitud, 20, 1, 1, 7) | |
|
157 | self.specGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
158 | self.specGraphSaveSpectra.setText(_fromUtf8("")) | |
|
159 | self.specGraphSaveSpectra.setObjectName(_fromUtf8("specGraphSaveSpectra")) | |
|
160 | self.gridLayout_9.addWidget(self.specGraphSaveSpectra, 6, 4, 1, 1) | |
|
161 | self.specGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
162 | self.specGgraphChannelList.setObjectName(_fromUtf8("specGgraphChannelList")) | |
|
163 | self.gridLayout_9.addWidget(self.specGgraphChannelList, 15, 1, 1, 7) | |
|
164 | self.label_25 = QtGui.QLabel(self.tabgraphSpectra) | |
|
165 | self.label_25.setObjectName(_fromUtf8("label_25")) | |
|
166 | self.gridLayout_9.addWidget(self.label_25, 2, 0, 1, 1) | |
|
167 | self.specGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
168 | self.specGgraphTminTmax.setObjectName(_fromUtf8("specGgraphTminTmax")) | |
|
169 | self.gridLayout_9.addWidget(self.specGgraphTminTmax, 21, 1, 1, 7) | |
|
170 | spacerItem15 = QtGui.QSpacerItem(28, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
171 | self.gridLayout_9.addItem(spacerItem15, 27, 6, 1, 2) | |
|
172 | spacerItem16 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
173 | self.gridLayout_9.addItem(spacerItem16, 3, 5, 1, 1) | |
|
174 | self.label_42 = QtGui.QLabel(self.tabgraphSpectra) | |
|
175 | self.label_42.setObjectName(_fromUtf8("label_42")) | |
|
176 | self.gridLayout_9.addWidget(self.label_42, 9, 0, 1, 1) | |
|
177 | self.label_16 = QtGui.QLabel(self.tabgraphSpectra) | |
|
178 | self.label_16.setObjectName(_fromUtf8("label_16")) | |
|
179 | self.gridLayout_9.addWidget(self.label_16, 18, 0, 1, 1) | |
|
180 | self.label_17 = QtGui.QLabel(self.tabgraphSpectra) | |
|
181 | self.label_17.setObjectName(_fromUtf8("label_17")) | |
|
182 | self.gridLayout_9.addWidget(self.label_17, 19, 0, 1, 1) | |
|
183 | self.label_18 = QtGui.QLabel(self.tabgraphSpectra) | |
|
184 | self.label_18.setObjectName(_fromUtf8("label_18")) | |
|
185 | self.gridLayout_9.addWidget(self.label_18, 20, 0, 1, 1) | |
|
186 | self.specGgraphFreq = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
187 | self.specGgraphFreq.setObjectName(_fromUtf8("specGgraphFreq")) | |
|
188 | self.gridLayout_9.addWidget(self.specGgraphFreq, 16, 1, 1, 7) | |
|
189 | self.specGgraphHeight = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
190 | self.specGgraphHeight.setObjectName(_fromUtf8("specGgraphHeight")) | |
|
191 | self.gridLayout_9.addWidget(self.specGgraphHeight, 18, 1, 1, 7) | |
|
192 | spacerItem17 = QtGui.QSpacerItem(49, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
193 | self.gridLayout_9.addItem(spacerItem17, 27, 0, 1, 1) | |
|
194 | self.label_24 = QtGui.QLabel(self.tabgraphSpectra) | |
|
195 | self.label_24.setObjectName(_fromUtf8("label_24")) | |
|
196 | self.gridLayout_9.addWidget(self.label_24, 0, 0, 1, 1) | |
|
197 | self.specGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
198 | self.specGraphPrefix.setObjectName(_fromUtf8("specGraphPrefix")) | |
|
199 | self.gridLayout_9.addWidget(self.specGraphPrefix, 2, 1, 1, 7) | |
|
200 | self.specGgraphDbsrange = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
201 | self.specGgraphDbsrange.setObjectName(_fromUtf8("specGgraphDbsrange")) | |
|
202 | self.gridLayout_9.addWidget(self.specGgraphDbsrange, 19, 1, 1, 7) | |
|
203 | self.label_46 = QtGui.QLabel(self.tabgraphSpectra) | |
|
204 | self.label_46.setObjectName(_fromUtf8("label_46")) | |
|
205 | self.gridLayout_9.addWidget(self.label_46, 11, 0, 1, 1) | |
|
206 | self.label_22 = QtGui.QLabel(self.tabgraphSpectra) | |
|
207 | self.label_22.setObjectName(_fromUtf8("label_22")) | |
|
208 | self.gridLayout_9.addWidget(self.label_22, 16, 0, 1, 1) | |
|
209 | self.specGraphPath = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
210 | self.specGraphPath.setObjectName(_fromUtf8("specGraphPath")) | |
|
211 | self.gridLayout_9.addWidget(self.specGraphPath, 0, 1, 1, 6) | |
|
212 | self.label_41 = QtGui.QLabel(self.tabgraphSpectra) | |
|
213 | self.label_41.setObjectName(_fromUtf8("label_41")) | |
|
214 | self.gridLayout_9.addWidget(self.label_41, 8, 0, 1, 1) | |
|
215 | self.specGraphToolPath = QtGui.QToolButton(self.tabgraphSpectra) | |
|
216 | self.specGraphToolPath.setObjectName(_fromUtf8("specGraphToolPath")) | |
|
217 | self.gridLayout_9.addWidget(self.specGraphToolPath, 0, 7, 1, 1) | |
|
218 | self.label_6 = QtGui.QLabel(self.tabgraphSpectra) | |
|
219 | self.label_6.setObjectName(_fromUtf8("label_6")) | |
|
220 | self.gridLayout_9.addWidget(self.label_6, 15, 0, 1, 1) | |
|
221 | self.label_40 = QtGui.QLabel(self.tabgraphSpectra) | |
|
222 | self.label_40.setObjectName(_fromUtf8("label_40")) | |
|
223 | self.gridLayout_9.addWidget(self.label_40, 6, 0, 1, 1) | |
|
224 | self.specGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
225 | self.specGraphCebSpectraplot.setText(_fromUtf8("")) | |
|
226 | self.specGraphCebSpectraplot.setObjectName(_fromUtf8("specGraphCebSpectraplot")) | |
|
227 | self.gridLayout_9.addWidget(self.specGraphCebSpectraplot, 6, 2, 1, 1) | |
|
228 | self.specGraphCebCrossSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
229 | self.specGraphCebCrossSpectraplot.setText(_fromUtf8("")) | |
|
230 | self.specGraphCebCrossSpectraplot.setObjectName(_fromUtf8("specGraphCebCrossSpectraplot")) | |
|
231 | self.gridLayout_9.addWidget(self.specGraphCebCrossSpectraplot, 8, 2, 1, 1) | |
|
232 | self.specGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
233 | self.specGraphCebRTIplot.setText(_fromUtf8("")) | |
|
234 | self.specGraphCebRTIplot.setObjectName(_fromUtf8("specGraphCebRTIplot")) | |
|
235 | self.gridLayout_9.addWidget(self.specGraphCebRTIplot, 9, 2, 1, 1) | |
|
236 | self.specGraphCebCoherencmap = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
237 | self.specGraphCebCoherencmap.setText(_fromUtf8("")) | |
|
238 | self.specGraphCebCoherencmap.setObjectName(_fromUtf8("specGraphCebCoherencmap")) | |
|
239 | self.gridLayout_9.addWidget(self.specGraphCebCoherencmap, 10, 2, 1, 1) | |
|
240 | self.specGraphPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
241 | self.specGraphPowerprofile.setText(_fromUtf8("")) | |
|
242 | self.specGraphPowerprofile.setObjectName(_fromUtf8("specGraphPowerprofile")) | |
|
243 | self.gridLayout_9.addWidget(self.specGraphPowerprofile, 11, 2, 1, 1) | |
|
244 | self.specGraphSaveCross = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
245 | self.specGraphSaveCross.setText(_fromUtf8("")) | |
|
246 | self.specGraphSaveCross.setObjectName(_fromUtf8("specGraphSaveCross")) | |
|
247 | self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, 4, 1, 1) | |
|
248 | self.specGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
249 | self.specGraphftpSpectra.setText(_fromUtf8("")) | |
|
250 | self.specGraphftpSpectra.setObjectName(_fromUtf8("specGraphftpSpectra")) | |
|
251 | self.gridLayout_9.addWidget(self.specGraphftpSpectra, 6, 6, 1, 1) | |
|
252 | spacerItem18 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
253 | self.gridLayout_9.addItem(spacerItem18, 4, 3, 1, 1) | |
|
254 | self.specGraphSavePowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
255 | self.specGraphSavePowerprofile.setText(_fromUtf8("")) | |
|
256 | self.specGraphSavePowerprofile.setObjectName(_fromUtf8("specGraphSavePowerprofile")) | |
|
257 | self.gridLayout_9.addWidget(self.specGraphSavePowerprofile, 11, 4, 1, 1) | |
|
258 | self.specGraphSaveCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
259 | self.specGraphSaveCoherencemap.setText(_fromUtf8("")) | |
|
260 | self.specGraphSaveCoherencemap.setObjectName(_fromUtf8("specGraphSaveCoherencemap")) | |
|
261 | self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, 4, 1, 1) | |
|
262 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
263 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 1, 1) | |
|
264 | self.specGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
265 | self.specGgraphftpratio.setObjectName(_fromUtf8("specGgraphftpratio")) | |
|
266 | self.gridLayout_9.addWidget(self.specGgraphftpratio, 23, 1, 1, 7) | |
|
267 | self.label_43 = QtGui.QLabel(self.tabgraphSpectra) | |
|
268 | self.label_43.setObjectName(_fromUtf8("label_43")) | |
|
269 | self.gridLayout_9.addWidget(self.label_43, 3, 2, 2, 1) | |
|
270 | self.specGraphftpCross = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
271 | self.specGraphftpCross.setText(_fromUtf8("")) | |
|
272 | self.specGraphftpCross.setObjectName(_fromUtf8("specGraphftpCross")) | |
|
273 | self.gridLayout_9.addWidget(self.specGraphftpCross, 8, 6, 1, 1) | |
|
274 | self.label_29 = QtGui.QLabel(self.tabgraphSpectra) | |
|
275 | self.label_29.setObjectName(_fromUtf8("label_29")) | |
|
276 | self.gridLayout_9.addWidget(self.label_29, 23, 0, 1, 1) | |
|
277 | self.label_47 = QtGui.QLabel(self.tabgraphSpectra) | |
|
278 | self.label_47.setObjectName(_fromUtf8("label_47")) | |
|
279 | self.gridLayout_9.addWidget(self.label_47, 3, 4, 2, 1) | |
|
280 | self.specGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
281 | self.specGraphftpRTIplot.setText(_fromUtf8("")) | |
|
282 | self.specGraphftpRTIplot.setObjectName(_fromUtf8("specGraphftpRTIplot")) | |
|
283 | self.gridLayout_9.addWidget(self.specGraphftpRTIplot, 9, 6, 1, 1) | |
|
284 | self.specGraphftpCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
285 | self.specGraphftpCoherencemap.setText(_fromUtf8("")) | |
|
286 | self.specGraphftpCoherencemap.setObjectName(_fromUtf8("specGraphftpCoherencemap")) | |
|
287 | self.gridLayout_9.addWidget(self.specGraphftpCoherencemap, 10, 6, 1, 1) | |
|
288 | self.specGraphftpPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
289 | self.specGraphftpPowerprofile.setText(_fromUtf8("")) | |
|
290 | self.specGraphftpPowerprofile.setObjectName(_fromUtf8("specGraphftpPowerprofile")) | |
|
291 | self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, 6, 1, 1) | |
|
292 | self.label_19 = QtGui.QLabel(self.tabgraphSpectra) | |
|
293 | self.label_19.setObjectName(_fromUtf8("label_19")) | |
|
294 | self.gridLayout_9.addWidget(self.label_19, 3, 6, 2, 2) | |
|
295 | self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
296 | self.specGraphSaveRTIplot.setText(_fromUtf8("")) | |
|
297 | self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot")) | |
|
298 | self.gridLayout_9.addWidget(self.specGraphSaveRTIplot, 9, 4, 1, 1) | |
|
299 | self.label_45 = QtGui.QLabel(self.tabgraphSpectra) | |
|
300 | self.label_45.setObjectName(_fromUtf8("label_45")) | |
|
301 | self.gridLayout_9.addWidget(self.label_45, 13, 0, 1, 1) | |
|
302 | self.specGraphftpRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
303 | self.specGraphftpRTInoise.setText(_fromUtf8("")) | |
|
304 | self.specGraphftpRTInoise.setObjectName(_fromUtf8("specGraphftpRTInoise")) | |
|
305 | self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, 6, 1, 1) | |
|
306 | self.specGraphCebRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
307 | self.specGraphCebRTInoise.setText(_fromUtf8("")) | |
|
308 | self.specGraphCebRTInoise.setObjectName(_fromUtf8("specGraphCebRTInoise")) | |
|
309 | self.gridLayout_9.addWidget(self.specGraphCebRTInoise, 13, 2, 1, 1) | |
|
310 | self.label_48 = QtGui.QLabel(self.tabgraphSpectra) | |
|
311 | self.label_48.setObjectName(_fromUtf8("label_48")) | |
|
312 | self.gridLayout_9.addWidget(self.label_48, 22, 0, 1, 1) | |
|
313 | self.specGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
314 | self.specGgraphTimeRange.setObjectName(_fromUtf8("specGgraphTimeRange")) | |
|
315 | self.gridLayout_9.addWidget(self.specGgraphTimeRange, 22, 1, 1, 7) | |
|
316 | self.tabWidgetSpectra.addTab(self.tabgraphSpectra, _fromUtf8("")) | |
|
317 | self.taboutputSpectra = QtGui.QWidget() | |
|
318 | self.taboutputSpectra.setObjectName(_fromUtf8("taboutputSpectra")) | |
|
319 | self.gridLayout_11 = QtGui.QGridLayout(self.taboutputSpectra) | |
|
320 | self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11")) | |
|
321 | self.label_39 = QtGui.QLabel(self.taboutputSpectra) | |
|
322 | self.label_39.setObjectName(_fromUtf8("label_39")) | |
|
323 | self.gridLayout_11.addWidget(self.label_39, 0, 0, 1, 1) | |
|
324 | self.specOutputComData = QtGui.QComboBox(self.taboutputSpectra) | |
|
325 | self.specOutputComData.setObjectName(_fromUtf8("specOutputComData")) | |
|
326 | self.specOutputComData.addItem(_fromUtf8("")) | |
|
327 | self.gridLayout_11.addWidget(self.specOutputComData, 0, 2, 1, 2) | |
|
328 | self.label_34 = QtGui.QLabel(self.taboutputSpectra) | |
|
329 | self.label_34.setObjectName(_fromUtf8("label_34")) | |
|
330 | self.gridLayout_11.addWidget(self.label_34, 1, 0, 1, 1) | |
|
331 | self.specOutputPath = QtGui.QLineEdit(self.taboutputSpectra) | |
|
332 | self.specOutputPath.setObjectName(_fromUtf8("specOutputPath")) | |
|
333 | self.gridLayout_11.addWidget(self.specOutputPath, 1, 2, 1, 1) | |
|
334 | spacerItem20 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
335 | self.gridLayout_11.addItem(spacerItem20, 4, 2, 1, 1) | |
|
336 | self.specOutputToolPath = QtGui.QToolButton(self.taboutputSpectra) | |
|
337 | self.specOutputToolPath.setObjectName(_fromUtf8("specOutputToolPath")) | |
|
338 | self.gridLayout_11.addWidget(self.specOutputToolPath, 1, 3, 1, 1) | |
|
339 | self.specOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectra) | |
|
340 | self.specOutputblocksperfile.setObjectName(_fromUtf8("specOutputblocksperfile")) | |
|
341 | self.gridLayout_11.addWidget(self.specOutputblocksperfile, 2, 2, 1, 1) | |
|
342 | self.label_9 = QtGui.QLabel(self.taboutputSpectra) | |
|
343 | self.label_9.setObjectName(_fromUtf8("label_9")) | |
|
344 | self.gridLayout_11.addWidget(self.label_9, 2, 0, 1, 2) | |
|
345 | self.label_38 = QtGui.QLabel(self.taboutputSpectra) | |
|
346 | self.label_38.setObjectName(_fromUtf8("label_38")) | |
|
347 | self.gridLayout_11.addWidget(self.label_38, 3, 0, 1, 1) | |
|
348 | self.specOutputprofileperblock = QtGui.QLineEdit(self.taboutputSpectra) | |
|
349 | self.specOutputprofileperblock.setObjectName(_fromUtf8("specOutputprofileperblock")) | |
|
350 | self.gridLayout_11.addWidget(self.specOutputprofileperblock, 3, 2, 1, 1) | |
|
351 | self.tabWidgetSpectra.addTab(self.taboutputSpectra, _fromUtf8("")) | |
|
352 | self.gridLayout_7.addWidget(self.tabWidgetSpectra, 0, 1, 1, 1) | |
|
353 | ||
|
354 | self.tabWidgetProject.addTab(self.tabSpectra, _fromUtf8("")) | |
|
355 | ||
|
356 | self.tabWidgetSpectra.setCurrentIndex(0) | |
|
357 | ||
|
358 | def retranslateUi(self): | |
|
359 | ||
|
360 | self.specOpOk.setText(_translate("MainWindow", "Ok", None)) | |
|
361 | self.specGraphClear.setText(_translate("MainWindow", "Clear", None)) | |
|
362 | self.specOpCebCrossSpectra.setText(_translate("MainWindow", "Select Cross Spectra", None)) | |
|
363 | self.specOpComChannel.setItemText(0, _translate("MainWindow", "Value", None)) | |
|
364 | self.specOpComChannel.setItemText(1, _translate("MainWindow", "Index", None)) | |
|
365 | self.specOpComHeights.setItemText(0, _translate("MainWindow", "Value", None)) | |
|
366 | self.specOpComHeights.setItemText(1, _translate("MainWindow", "Index", None)) | |
|
367 | self.specOpCebRemoveDC.setText(_translate("MainWindow", "Remove DC", None)) | |
|
368 | self.specOpCebHeights.setText(_translate("MainWindow", "Select Heights", None)) | |
|
369 | self.specOpCebChannel.setText(_translate("MainWindow", "Select Channel", None)) | |
|
370 | self.label_31.setText(_translate("MainWindow", "x-y pairs", None)) | |
|
371 | self.label_26.setText(_translate("MainWindow", "nFFTPoints", None)) | |
|
372 | self.specOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Integration", None)) | |
|
373 | self.specOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) | |
|
374 | self.specOpCobIncInt.setItemText(1, _translate("MainWindow", "Profiles", None)) | |
|
375 | self.specOpCebRadarfrequency.setText(_translate("MainWindow", "Radar Frequency", None)) | |
|
376 | self.label_21.setText(_translate("MainWindow", "Profiles", None)) | |
|
377 | self.specOpCebRemoveInt.setText(_translate("MainWindow", "Remove Interference", None)) | |
|
378 | self.label_70.setText(_translate("MainWindow", "IppFactor", None)) | |
|
379 | self.specOpCebgetNoise.setText(_translate("MainWindow", "Get Noise", None)) | |
|
380 | self.specOpComRemoveDC.setItemText(0, _translate("MainWindow", "Mode 1", None)) | |
|
381 | self.specOpComRemoveDC.setItemText(1, _translate("MainWindow", "Mode 2", None)) | |
|
382 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabopSpectra), _translate("MainWindow", "Operation", None)) | |
|
383 | ||
|
384 | self.label_44.setText(_translate("MainWindow", "Coherence Map", None)) | |
|
385 | self.label_20.setText(_translate("MainWindow", "Tmin, Tmax:", None)) | |
|
386 | self.label_25.setText(_translate("MainWindow", "Prefix", None)) | |
|
387 | self.label_42.setText(_translate("MainWindow", "RTI Plot", None)) | |
|
388 | self.label_16.setText(_translate("MainWindow", "Height range", None)) | |
|
389 | self.label_17.setText(_translate("MainWindow", "dB range", None)) | |
|
390 | self.label_18.setText(_translate("MainWindow", "Magnitud ", None)) | |
|
391 | self.label_24.setText(_translate("MainWindow", "Path", None)) | |
|
392 | self.label_46.setText(_translate("MainWindow", "Power Profile", None)) | |
|
393 | self.label_22.setText(_translate("MainWindow", "Freq/Vel:", None)) | |
|
394 | self.label_41.setText(_translate("MainWindow", "Cross Spectra Plot", None)) | |
|
395 | self.specGraphToolPath.setText(_translate("MainWindow", "...", None)) | |
|
396 | self.label_6.setText(_translate("MainWindow", "Channel List:", None)) | |
|
397 | self.label_40.setText(_translate("MainWindow", "Spectra Plot", None)) | |
|
398 | self.label_43.setText(_translate("MainWindow", "Show", None)) | |
|
399 | self.label_29.setText(_translate("MainWindow", "Wr Period:", None)) | |
|
400 | self.label_47.setText(_translate("MainWindow", "Save", None)) | |
|
401 | self.label_19.setText(_translate("MainWindow", "ftp", None)) | |
|
402 | self.label_45.setText(_translate("MainWindow", "Noise", None)) | |
|
403 | self.label_48.setText(_translate("MainWindow", "Time Range:", None)) | |
|
404 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabgraphSpectra), _translate("MainWindow", "Graphics", None)) | |
|
405 | ||
|
406 | self.label_39.setText(_translate("MainWindow", "Type:", None)) | |
|
407 | self.specOutputComData.setItemText(0, _translate("MainWindow", ".pdata", None)) | |
|
408 | self.label_34.setText(_translate("MainWindow", "Path:", None)) | |
|
409 | self.specOutputToolPath.setText(_translate("MainWindow", "...", None)) | |
|
410 | self.label_9.setText(_translate("MainWindow", "Blocks per File: ", None)) | |
|
411 | self.label_38.setText(_translate("MainWindow", "Profile per Block: ", None)) | |
|
412 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.taboutputSpectra), _translate("MainWindow", "Output", None)) | |
|
413 | ||
|
414 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectra), _translate("MainWindow", "Spectra", None)) | |
|
415 | No newline at end of file |
@@ -0,0 +1,240 | |||
|
1 | from PyQt4 import QtCore, QtGui | |
|
2 | ||
|
3 | try: | |
|
4 | _fromUtf8 = QtCore.QString.fromUtf8 | |
|
5 | except AttributeError: | |
|
6 | def _fromUtf8(s): | |
|
7 | return s | |
|
8 | ||
|
9 | try: | |
|
10 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
|
11 | def _translate(context, text, disambig): | |
|
12 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
|
13 | except AttributeError: | |
|
14 | def _translate(context, text, disambig): | |
|
15 | return QtGui.QApplication.translate(context, text, disambig) | |
|
16 | ||
|
17 | class Ui_SpectraHeisTab(object): | |
|
18 | ||
|
19 | def setupUi(self): | |
|
20 | ||
|
21 | self.tabSpectraHeis = QtGui.QWidget() | |
|
22 | self.tabSpectraHeis.setObjectName(_fromUtf8("tabSpectraHeis")) | |
|
23 | self.gridLayout_23 = QtGui.QGridLayout(self.tabSpectraHeis) | |
|
24 | self.gridLayout_23.setObjectName(_fromUtf8("gridLayout_23")) | |
|
25 | self.frame_6 = QtGui.QFrame(self.tabSpectraHeis) | |
|
26 | self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
27 | self.frame_6.setFrameShadow(QtGui.QFrame.Raised) | |
|
28 | self.frame_6.setObjectName(_fromUtf8("frame_6")) | |
|
29 | self.gridLayout_22 = QtGui.QGridLayout(self.frame_6) | |
|
30 | self.gridLayout_22.setObjectName(_fromUtf8("gridLayout_22")) | |
|
31 | self.specHeisGraphClear = QtGui.QPushButton(self.frame_6) | |
|
32 | self.specHeisGraphClear.setObjectName(_fromUtf8("specHeisGraphClear")) | |
|
33 | self.gridLayout_22.addWidget(self.specHeisGraphClear, 0, 1, 1, 1) | |
|
34 | self.specHeisOpOk = QtGui.QPushButton(self.frame_6) | |
|
35 | self.specHeisOpOk.setObjectName(_fromUtf8("specHeisOpOk")) | |
|
36 | self.gridLayout_22.addWidget(self.specHeisOpOk, 0, 0, 1, 1) | |
|
37 | self.gridLayout_23.addWidget(self.frame_6, 1, 0, 1, 1) | |
|
38 | self.tabWidgetSpectraHeis = QtGui.QTabWidget(self.tabSpectraHeis) | |
|
39 | self.tabWidgetSpectraHeis.setObjectName(_fromUtf8("tabWidgetSpectraHeis")) | |
|
40 | self.tabopSpectraHeis = QtGui.QWidget() | |
|
41 | self.tabopSpectraHeis.setObjectName(_fromUtf8("tabopSpectraHeis")) | |
|
42 | self.gridLayout_21 = QtGui.QGridLayout(self.tabopSpectraHeis) | |
|
43 | self.gridLayout_21.setObjectName(_fromUtf8("gridLayout_21")) | |
|
44 | spacerItem21 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
45 | self.gridLayout_21.addItem(spacerItem21, 0, 1, 1, 1) | |
|
46 | self.specHeisOpCobIncInt = QtGui.QComboBox(self.tabopSpectraHeis) | |
|
47 | self.specHeisOpCobIncInt.setObjectName(_fromUtf8("specHeisOpCobIncInt")) | |
|
48 | self.specHeisOpCobIncInt.addItem(_fromUtf8("")) | |
|
49 | self.gridLayout_21.addWidget(self.specHeisOpCobIncInt, 1, 0, 1, 1) | |
|
50 | self.specHeisOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectraHeis) | |
|
51 | self.specHeisOpCebIncoherent.setObjectName(_fromUtf8("specHeisOpCebIncoherent")) | |
|
52 | self.gridLayout_21.addWidget(self.specHeisOpCebIncoherent, 0, 0, 1, 1) | |
|
53 | self.specHeisOpIncoherent = QtGui.QLineEdit(self.tabopSpectraHeis) | |
|
54 | self.specHeisOpIncoherent.setObjectName(_fromUtf8("specHeisOpIncoherent")) | |
|
55 | self.gridLayout_21.addWidget(self.specHeisOpIncoherent, 1, 1, 1, 1) | |
|
56 | spacerItem22 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
57 | self.gridLayout_21.addItem(spacerItem22, 2, 0, 1, 1) | |
|
58 | self.tabWidgetSpectraHeis.addTab(self.tabopSpectraHeis, _fromUtf8("")) | |
|
59 | self.tabgraphSpectraHeis = QtGui.QWidget() | |
|
60 | self.tabgraphSpectraHeis.setObjectName(_fromUtf8("tabgraphSpectraHeis")) | |
|
61 | self.gridLayout_20 = QtGui.QGridLayout(self.tabgraphSpectraHeis) | |
|
62 | self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20")) | |
|
63 | self.label_54 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
64 | self.label_54.setObjectName(_fromUtf8("label_54")) | |
|
65 | self.gridLayout_20.addWidget(self.label_54, 1, 0, 1, 1) | |
|
66 | self.specHeisGraphToolPath = QtGui.QToolButton(self.tabgraphSpectraHeis) | |
|
67 | self.specHeisGraphToolPath.setObjectName(_fromUtf8("specHeisGraphToolPath")) | |
|
68 | self.gridLayout_20.addWidget(self.specHeisGraphToolPath, 0, 6, 1, 1) | |
|
69 | self.specHeisGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
70 | self.specHeisGraphCebRTIplot.setText(_fromUtf8("")) | |
|
71 | self.specHeisGraphCebRTIplot.setObjectName(_fromUtf8("specHeisGraphCebRTIplot")) | |
|
72 | self.gridLayout_20.addWidget(self.specHeisGraphCebRTIplot, 4, 2, 1, 1) | |
|
73 | self.label_62 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
74 | self.label_62.setObjectName(_fromUtf8("label_62")) | |
|
75 | self.gridLayout_20.addWidget(self.label_62, 7, 0, 1, 1) | |
|
76 | self.label_63 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
77 | self.label_63.setObjectName(_fromUtf8("label_63")) | |
|
78 | self.gridLayout_20.addWidget(self.label_63, 8, 0, 1, 1) | |
|
79 | self.label_64 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
80 | self.label_64.setObjectName(_fromUtf8("label_64")) | |
|
81 | self.gridLayout_20.addWidget(self.label_64, 9, 0, 1, 1) | |
|
82 | self.label_65 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
83 | self.label_65.setObjectName(_fromUtf8("label_65")) | |
|
84 | self.gridLayout_20.addWidget(self.label_65, 10, 0, 1, 1) | |
|
85 | spacerItem23 = QtGui.QSpacerItem(134, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
86 | self.gridLayout_20.addItem(spacerItem23, 11, 0, 1, 2) | |
|
87 | self.specHeisGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
88 | self.specHeisGgraphftpratio.setObjectName(_fromUtf8("specHeisGgraphftpratio")) | |
|
89 | self.gridLayout_20.addWidget(self.specHeisGgraphftpratio, 10, 1, 1, 6) | |
|
90 | self.specHeisGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
91 | self.specHeisGraphftpRTIplot.setText(_fromUtf8("")) | |
|
92 | self.specHeisGraphftpRTIplot.setObjectName(_fromUtf8("specHeisGraphftpRTIplot")) | |
|
93 | self.gridLayout_20.addWidget(self.specHeisGraphftpRTIplot, 4, 6, 1, 1) | |
|
94 | self.specHeisGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
95 | self.specHeisGgraphTminTmax.setObjectName(_fromUtf8("specHeisGgraphTminTmax")) | |
|
96 | self.gridLayout_20.addWidget(self.specHeisGgraphTminTmax, 8, 1, 1, 6) | |
|
97 | self.label_60 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
98 | self.label_60.setObjectName(_fromUtf8("label_60")) | |
|
99 | self.gridLayout_20.addWidget(self.label_60, 5, 0, 1, 1) | |
|
100 | self.label_61 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
101 | self.label_61.setObjectName(_fromUtf8("label_61")) | |
|
102 | self.gridLayout_20.addWidget(self.label_61, 6, 0, 1, 1) | |
|
103 | self.specHeisGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
104 | self.specHeisGraphPrefix.setObjectName(_fromUtf8("specHeisGraphPrefix")) | |
|
105 | self.gridLayout_20.addWidget(self.specHeisGraphPrefix, 1, 1, 1, 6) | |
|
106 | self.label_56 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
107 | self.label_56.setObjectName(_fromUtf8("label_56")) | |
|
108 | self.gridLayout_20.addWidget(self.label_56, 2, 4, 1, 1) | |
|
109 | self.label_57 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
110 | self.label_57.setObjectName(_fromUtf8("label_57")) | |
|
111 | self.gridLayout_20.addWidget(self.label_57, 2, 6, 1, 1) | |
|
112 | self.label_58 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
113 | self.label_58.setObjectName(_fromUtf8("label_58")) | |
|
114 | self.gridLayout_20.addWidget(self.label_58, 3, 0, 1, 1) | |
|
115 | self.specHeisGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
116 | self.specHeisGraphCebSpectraplot.setText(_fromUtf8("")) | |
|
117 | self.specHeisGraphCebSpectraplot.setObjectName(_fromUtf8("specHeisGraphCebSpectraplot")) | |
|
118 | self.gridLayout_20.addWidget(self.specHeisGraphCebSpectraplot, 3, 2, 1, 1) | |
|
119 | self.specHeisGgraphYminYmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
120 | self.specHeisGgraphYminYmax.setObjectName(_fromUtf8("specHeisGgraphYminYmax")) | |
|
121 | self.gridLayout_20.addWidget(self.specHeisGgraphYminYmax, 7, 1, 1, 6) | |
|
122 | self.label_53 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
123 | self.label_53.setObjectName(_fromUtf8("label_53")) | |
|
124 | self.gridLayout_20.addWidget(self.label_53, 0, 0, 1, 1) | |
|
125 | self.label_55 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
126 | self.label_55.setObjectName(_fromUtf8("label_55")) | |
|
127 | self.gridLayout_20.addWidget(self.label_55, 2, 2, 1, 1) | |
|
128 | self.specHeisGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
129 | self.specHeisGraphSaveRTIplot.setText(_fromUtf8("")) | |
|
130 | self.specHeisGraphSaveRTIplot.setObjectName(_fromUtf8("specHeisGraphSaveRTIplot")) | |
|
131 | self.gridLayout_20.addWidget(self.specHeisGraphSaveRTIplot, 4, 4, 1, 1) | |
|
132 | spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
133 | self.gridLayout_20.addItem(spacerItem24, 2, 3, 1, 1) | |
|
134 | self.specHeisGgraphXminXmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
135 | self.specHeisGgraphXminXmax.setObjectName(_fromUtf8("specHeisGgraphXminXmax")) | |
|
136 | self.gridLayout_20.addWidget(self.specHeisGgraphXminXmax, 6, 1, 1, 6) | |
|
137 | self.specHeisGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
138 | self.specHeisGgraphChannelList.setObjectName(_fromUtf8("specHeisGgraphChannelList")) | |
|
139 | self.gridLayout_20.addWidget(self.specHeisGgraphChannelList, 5, 1, 1, 6) | |
|
140 | self.specHeisGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
141 | self.specHeisGgraphTimeRange.setObjectName(_fromUtf8("specHeisGgraphTimeRange")) | |
|
142 | self.gridLayout_20.addWidget(self.specHeisGgraphTimeRange, 9, 1, 1, 6) | |
|
143 | spacerItem25 = QtGui.QSpacerItem(106, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
144 | self.gridLayout_20.addItem(spacerItem25, 11, 3, 1, 3) | |
|
145 | self.specHeisGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
146 | self.specHeisGraphSaveSpectra.setText(_fromUtf8("")) | |
|
147 | self.specHeisGraphSaveSpectra.setObjectName(_fromUtf8("specHeisGraphSaveSpectra")) | |
|
148 | self.gridLayout_20.addWidget(self.specHeisGraphSaveSpectra, 3, 4, 1, 1) | |
|
149 | self.specHeisGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
|
150 | self.specHeisGraphftpSpectra.setText(_fromUtf8("")) | |
|
151 | self.specHeisGraphftpSpectra.setObjectName(_fromUtf8("specHeisGraphftpSpectra")) | |
|
152 | self.gridLayout_20.addWidget(self.specHeisGraphftpSpectra, 3, 6, 1, 1) | |
|
153 | self.label_59 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
|
154 | self.label_59.setObjectName(_fromUtf8("label_59")) | |
|
155 | self.gridLayout_20.addWidget(self.label_59, 4, 0, 1, 1) | |
|
156 | spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
157 | self.gridLayout_20.addItem(spacerItem26, 2, 5, 1, 1) | |
|
158 | self.specHeisGraphPath = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
|
159 | self.specHeisGraphPath.setObjectName(_fromUtf8("specHeisGraphPath")) | |
|
160 | self.gridLayout_20.addWidget(self.specHeisGraphPath, 0, 1, 1, 5) | |
|
161 | self.tabWidgetSpectraHeis.addTab(self.tabgraphSpectraHeis, _fromUtf8("")) | |
|
162 | self.taboutputSpectraHeis = QtGui.QWidget() | |
|
163 | self.taboutputSpectraHeis.setObjectName(_fromUtf8("taboutputSpectraHeis")) | |
|
164 | self.gridLayout_19 = QtGui.QGridLayout(self.taboutputSpectraHeis) | |
|
165 | self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19")) | |
|
166 | self.label_67 = QtGui.QLabel(self.taboutputSpectraHeis) | |
|
167 | self.label_67.setObjectName(_fromUtf8("label_67")) | |
|
168 | self.gridLayout_19.addWidget(self.label_67, 1, 0, 1, 1) | |
|
169 | self.label_68 = QtGui.QLabel(self.taboutputSpectraHeis) | |
|
170 | self.label_68.setObjectName(_fromUtf8("label_68")) | |
|
171 | self.gridLayout_19.addWidget(self.label_68, 2, 0, 1, 2) | |
|
172 | self.label_66 = QtGui.QLabel(self.taboutputSpectraHeis) | |
|
173 | self.label_66.setObjectName(_fromUtf8("label_66")) | |
|
174 | self.gridLayout_19.addWidget(self.label_66, 0, 0, 1, 1) | |
|
175 | spacerItem27 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
176 | self.gridLayout_19.addItem(spacerItem27, 4, 0, 1, 1) | |
|
177 | self.specHeisOutputToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) | |
|
178 | self.specHeisOutputToolPath.setObjectName(_fromUtf8("specHeisOutputToolPath")) | |
|
179 | self.gridLayout_19.addWidget(self.specHeisOutputToolPath, 1, 4, 1, 1) | |
|
180 | self.specHeisOutputPath = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
|
181 | self.specHeisOutputPath.setObjectName(_fromUtf8("specHeisOutputPath")) | |
|
182 | self.gridLayout_19.addWidget(self.specHeisOutputPath, 1, 3, 1, 1) | |
|
183 | self.specHeisOutputComdata = QtGui.QComboBox(self.taboutputSpectraHeis) | |
|
184 | self.specHeisOutputComdata.setObjectName(_fromUtf8("specHeisOutputComdata")) | |
|
185 | self.specHeisOutputComdata.addItem(_fromUtf8("")) | |
|
186 | self.gridLayout_19.addWidget(self.specHeisOutputComdata, 0, 3, 1, 2) | |
|
187 | self.label_69 = QtGui.QLabel(self.taboutputSpectraHeis) | |
|
188 | self.label_69.setObjectName(_fromUtf8("label_69")) | |
|
189 | self.gridLayout_19.addWidget(self.label_69, 3, 0, 1, 2) | |
|
190 | self.specHeisOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
|
191 | self.specHeisOutputblocksperfile.setObjectName(_fromUtf8("specHeisOutputblocksperfile")) | |
|
192 | self.gridLayout_19.addWidget(self.specHeisOutputblocksperfile, 2, 3, 1, 1) | |
|
193 | self.specHeisOutputMetada = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
|
194 | self.specHeisOutputMetada.setObjectName(_fromUtf8("specHeisOutputMetada")) | |
|
195 | self.gridLayout_19.addWidget(self.specHeisOutputMetada, 3, 3, 1, 1) | |
|
196 | self.specHeisOutputMetadaToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) | |
|
197 | self.specHeisOutputMetadaToolPath.setObjectName(_fromUtf8("specHeisOutputMetadaToolPath")) | |
|
198 | self.gridLayout_19.addWidget(self.specHeisOutputMetadaToolPath, 3, 4, 1, 1) | |
|
199 | self.tabWidgetSpectraHeis.addTab(self.taboutputSpectraHeis, _fromUtf8("")) | |
|
200 | self.gridLayout_23.addWidget(self.tabWidgetSpectraHeis, 0, 0, 1, 1) | |
|
201 | ||
|
202 | self.tabWidgetProject.addTab(self.tabSpectraHeis, _fromUtf8("")) | |
|
203 | ||
|
204 | self.tabWidgetSpectraHeis.setCurrentIndex(0) | |
|
205 | ||
|
206 | def retranslateUi(self): | |
|
207 | ||
|
208 | self.specHeisGraphClear.setText(_translate("MainWindow", "Clear", None)) | |
|
209 | self.specHeisOpOk.setText(_translate("MainWindow", "Ok", None)) | |
|
210 | self.specHeisOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) | |
|
211 | self.specHeisOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Intergration", None)) | |
|
212 | ||
|
213 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabopSpectraHeis), _translate("MainWindow", "Operation", None)) | |
|
214 | self.label_54.setText(_translate("MainWindow", "Prefix", None)) | |
|
215 | self.specHeisGraphToolPath.setText(_translate("MainWindow", "...", None)) | |
|
216 | self.label_62.setText(_translate("MainWindow", "ymin - ymax", None)) | |
|
217 | self.label_63.setText(_translate("MainWindow", "Tmin - Tmax:", None)) | |
|
218 | self.label_64.setText(_translate("MainWindow", "Time Range:", None)) | |
|
219 | self.label_65.setText(_translate("MainWindow", "Wr Period", None)) | |
|
220 | self.label_60.setText(_translate("MainWindow", "Channel List:", None)) | |
|
221 | self.label_61.setText(_translate("MainWindow", "xmin - xmax", None)) | |
|
222 | self.label_56.setText(_translate("MainWindow", "Save", None)) | |
|
223 | self.label_57.setText(_translate("MainWindow", "ftp", None)) | |
|
224 | self.label_58.setText(_translate("MainWindow", "Spectra Plot", None)) | |
|
225 | self.label_53.setText(_translate("MainWindow", "Path", None)) | |
|
226 | self.label_55.setText(_translate("MainWindow", "Show", None)) | |
|
227 | self.label_59.setText(_translate("MainWindow", "RTI PLot", None)) | |
|
228 | ||
|
229 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabgraphSpectraHeis), _translate("MainWindow", "Graphics", None)) | |
|
230 | self.label_67.setText(_translate("MainWindow", "Path:", None)) | |
|
231 | self.label_68.setText(_translate("MainWindow", "Blocks per File:", None)) | |
|
232 | self.label_66.setText(_translate("MainWindow", "Type:", None)) | |
|
233 | ||
|
234 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.taboutputSpectraHeis), _translate("MainWindow", "Output", None)) | |
|
235 | self.specHeisOutputToolPath.setText(_translate("MainWindow", "...", None)) | |
|
236 | self.specHeisOutputComdata.setItemText(0, _translate("MainWindow", ".fits", None)) | |
|
237 | self.label_69.setText(_translate("MainWindow", "Metada", None)) | |
|
238 | self.specHeisOutputMetadaToolPath.setText(_translate("MainWindow", "...", None)) | |
|
239 | ||
|
240 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectraHeis), _translate("MainWindow", "SpectraHeis", None)) |
@@ -0,0 +1,314 | |||
|
1 | ||
|
2 | from PyQt4 import QtCore, QtGui | |
|
3 | ||
|
4 | try: | |
|
5 | _fromUtf8 = QtCore.QString.fromUtf8 | |
|
6 | except AttributeError: | |
|
7 | def _fromUtf8(s): | |
|
8 | return s | |
|
9 | ||
|
10 | try: | |
|
11 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
|
12 | def _translate(context, text, disambig): | |
|
13 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
|
14 | except AttributeError: | |
|
15 | def _translate(context, text, disambig): | |
|
16 | return QtGui.QApplication.translate(context, text, disambig) | |
|
17 | ||
|
18 | class Ui_VoltageTab(object): | |
|
19 | ||
|
20 | def setupUi(self): | |
|
21 | ||
|
22 | self.tabVoltage = QtGui.QWidget() | |
|
23 | self.tabVoltage.setObjectName(_fromUtf8("tabVoltage")) | |
|
24 | ||
|
25 | self.gridLayout_3 = QtGui.QGridLayout(self.tabVoltage) | |
|
26 | self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) | |
|
27 | ||
|
28 | self.frame_4 = QtGui.QFrame(self.tabVoltage) | |
|
29 | self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel) | |
|
30 | self.frame_4.setFrameShadow(QtGui.QFrame.Raised) | |
|
31 | self.frame_4.setObjectName(_fromUtf8("frame_4")) | |
|
32 | ||
|
33 | self.gridLayout_17 = QtGui.QGridLayout(self.frame_4) | |
|
34 | self.gridLayout_17.setObjectName(_fromUtf8("gridLayout_17")) | |
|
35 | self.volOpOk = QtGui.QPushButton(self.frame_4) | |
|
36 | self.volOpOk.setObjectName(_fromUtf8("volOpOk")) | |
|
37 | self.gridLayout_17.addWidget(self.volOpOk, 0, 0, 1, 1) | |
|
38 | self.volGraphClear = QtGui.QPushButton(self.frame_4) | |
|
39 | self.volGraphClear.setObjectName(_fromUtf8("volGraphClear")) | |
|
40 | self.gridLayout_17.addWidget(self.volGraphClear, 0, 1, 1, 1) | |
|
41 | self.gridLayout_3.addWidget(self.frame_4, 1, 1, 1, 1) | |
|
42 | ||
|
43 | ||
|
44 | self.tabWidgetVoltage = QtGui.QTabWidget(self.tabVoltage) | |
|
45 | self.tabWidgetVoltage.setObjectName(_fromUtf8("tabWidgetVoltage")) | |
|
46 | self.tabopVoltage = QtGui.QWidget() | |
|
47 | self.tabopVoltage.setObjectName(_fromUtf8("tabopVoltage")) | |
|
48 | self.gridLayout = QtGui.QGridLayout(self.tabopVoltage) | |
|
49 | self.gridLayout.setObjectName(_fromUtf8("gridLayout")) | |
|
50 | self.volOpHeights = QtGui.QLineEdit(self.tabopVoltage) | |
|
51 | self.volOpHeights.setObjectName(_fromUtf8("volOpHeights")) | |
|
52 | self.gridLayout.addWidget(self.volOpHeights, 4, 4, 1, 1) | |
|
53 | self.volOpComHeights = QtGui.QComboBox(self.tabopVoltage) | |
|
54 | self.volOpComHeights.setObjectName(_fromUtf8("volOpComHeights")) | |
|
55 | self.volOpComHeights.addItem(_fromUtf8("")) | |
|
56 | self.volOpComHeights.addItem(_fromUtf8("")) | |
|
57 | self.gridLayout.addWidget(self.volOpComHeights, 4, 0, 1, 3) | |
|
58 | self.volOpComChannels = QtGui.QComboBox(self.tabopVoltage) | |
|
59 | self.volOpComChannels.setObjectName(_fromUtf8("volOpComChannels")) | |
|
60 | self.volOpComChannels.addItem(_fromUtf8("")) | |
|
61 | self.volOpComChannels.addItem(_fromUtf8("")) | |
|
62 | self.gridLayout.addWidget(self.volOpComChannels, 2, 0, 1, 3) | |
|
63 | self.volOpCebProfile = QtGui.QCheckBox(self.tabopVoltage) | |
|
64 | self.volOpCebProfile.setObjectName(_fromUtf8("volOpCebProfile")) | |
|
65 | self.gridLayout.addWidget(self.volOpCebProfile, 6, 0, 1, 3) | |
|
66 | self.volOpComProfile = QtGui.QComboBox(self.tabopVoltage) | |
|
67 | self.volOpComProfile.setObjectName(_fromUtf8("volOpComProfile")) | |
|
68 | self.volOpComProfile.addItem(_fromUtf8("")) | |
|
69 | self.volOpComProfile.addItem(_fromUtf8("")) | |
|
70 | self.gridLayout.addWidget(self.volOpComProfile, 7, 0, 1, 3) | |
|
71 | self.volOpCebDecodification = QtGui.QCheckBox(self.tabopVoltage) | |
|
72 | self.volOpCebDecodification.setObjectName(_fromUtf8("volOpCebDecodification")) | |
|
73 | self.gridLayout.addWidget(self.volOpCebDecodification, 8, 0, 1, 3) | |
|
74 | self.volOpProfile = QtGui.QLineEdit(self.tabopVoltage) | |
|
75 | self.volOpProfile.setObjectName(_fromUtf8("volOpProfile")) | |
|
76 | self.gridLayout.addWidget(self.volOpProfile, 7, 4, 1, 1) | |
|
77 | self.volOpFilter = QtGui.QLineEdit(self.tabopVoltage) | |
|
78 | self.volOpFilter.setObjectName(_fromUtf8("volOpFilter")) | |
|
79 | self.gridLayout.addWidget(self.volOpFilter, 5, 4, 1, 1) | |
|
80 | spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
81 | self.gridLayout.addItem(spacerItem, 6, 4, 1, 1) | |
|
82 | spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
83 | self.gridLayout.addItem(spacerItem1, 8, 4, 1, 1) | |
|
84 | spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
85 | self.gridLayout.addItem(spacerItem2, 3, 4, 1, 1) | |
|
86 | self.volOpChannel = QtGui.QLineEdit(self.tabopVoltage) | |
|
87 | self.volOpChannel.setObjectName(_fromUtf8("volOpChannel")) | |
|
88 | self.gridLayout.addWidget(self.volOpChannel, 2, 4, 1, 1) | |
|
89 | self.label_4 = QtGui.QLabel(self.tabopVoltage) | |
|
90 | self.label_4.setObjectName(_fromUtf8("label_4")) | |
|
91 | self.gridLayout.addWidget(self.label_4, 9, 2, 1, 1) | |
|
92 | self.volOpCebChannels = QtGui.QCheckBox(self.tabopVoltage) | |
|
93 | self.volOpCebChannels.setObjectName(_fromUtf8("volOpCebChannels")) | |
|
94 | self.gridLayout.addWidget(self.volOpCebChannels, 1, 0, 1, 3) | |
|
95 | self.volOpCebHeights = QtGui.QCheckBox(self.tabopVoltage) | |
|
96 | self.volOpCebHeights.setObjectName(_fromUtf8("volOpCebHeights")) | |
|
97 | self.gridLayout.addWidget(self.volOpCebHeights, 3, 0, 1, 3) | |
|
98 | self.volOpCebFilter = QtGui.QCheckBox(self.tabopVoltage) | |
|
99 | self.volOpCebFilter.setObjectName(_fromUtf8("volOpCebFilter")) | |
|
100 | self.gridLayout.addWidget(self.volOpCebFilter, 5, 0, 1, 3) | |
|
101 | self.volOpRadarfrequency = QtGui.QLineEdit(self.tabopVoltage) | |
|
102 | self.volOpRadarfrequency.setObjectName(_fromUtf8("volOpRadarfrequency")) | |
|
103 | self.gridLayout.addWidget(self.volOpRadarfrequency, 0, 4, 1, 1) | |
|
104 | self.volOpCebRadarfrequency = QtGui.QCheckBox(self.tabopVoltage) | |
|
105 | self.volOpCebRadarfrequency.setObjectName(_fromUtf8("volOpCebRadarfrequency")) | |
|
106 | self.gridLayout.addWidget(self.volOpCebRadarfrequency, 0, 0, 1, 3) | |
|
107 | self.label_5 = QtGui.QLabel(self.tabopVoltage) | |
|
108 | self.label_5.setObjectName(_fromUtf8("label_5")) | |
|
109 | self.gridLayout.addWidget(self.label_5, 10, 2, 1, 1) | |
|
110 | spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
111 | self.gridLayout.addItem(spacerItem3, 1, 4, 1, 1) | |
|
112 | self.volOpCebFlip = QtGui.QCheckBox(self.tabopVoltage) | |
|
113 | self.volOpCebFlip.setObjectName(_fromUtf8("volOpCebFlip")) | |
|
114 | self.gridLayout.addWidget(self.volOpCebFlip, 11, 0, 1, 3) | |
|
115 | self.volOpFlip = QtGui.QLineEdit(self.tabopVoltage) | |
|
116 | self.volOpFlip.setObjectName(_fromUtf8("volOpFlip")) | |
|
117 | self.gridLayout.addWidget(self.volOpFlip, 11, 4, 1, 1) | |
|
118 | ||
|
119 | self.volOpCebCohInt = QtGui.QCheckBox(self.tabopVoltage) | |
|
120 | self.volOpCebCohInt.setObjectName(_fromUtf8("volOpCebCohInt")) | |
|
121 | self.gridLayout.addWidget(self.volOpCebCohInt, 12, 0, 1, 3) | |
|
122 | self.volOpCohInt = QtGui.QLineEdit(self.tabopVoltage) | |
|
123 | self.volOpCohInt.setObjectName(_fromUtf8("volOpCohInt")) | |
|
124 | self.gridLayout.addWidget(self.volOpCohInt, 12, 4, 1, 1) | |
|
125 | ||
|
126 | self.volOpComCode = QtGui.QComboBox(self.tabopVoltage) | |
|
127 | self.volOpComCode.setObjectName(_fromUtf8("volOpComCode")) | |
|
128 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
129 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
130 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
131 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
132 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
133 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
134 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
135 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
136 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
137 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
138 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
139 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
140 | self.volOpComCode.addItem(_fromUtf8("")) | |
|
141 | self.gridLayout.addWidget(self.volOpComCode, 9, 4, 1, 1) | |
|
142 | self.volOpComMode = QtGui.QComboBox(self.tabopVoltage) | |
|
143 | self.volOpComMode.setObjectName(_fromUtf8("volOpComMode")) | |
|
144 | self.volOpComMode.addItem(_fromUtf8("")) | |
|
145 | self.volOpComMode.addItem(_fromUtf8("")) | |
|
146 | self.gridLayout.addWidget(self.volOpComMode, 10, 4, 1, 1) | |
|
147 | self.tabWidgetVoltage.addTab(self.tabopVoltage, _fromUtf8("")) | |
|
148 | ||
|
149 | ||
|
150 | self.tabgraphVoltage = QtGui.QWidget() | |
|
151 | self.tabgraphVoltage.setObjectName(_fromUtf8("tabgraphVoltage")) | |
|
152 | self.gridLayout_6 = QtGui.QGridLayout(self.tabgraphVoltage) | |
|
153 | self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) | |
|
154 | spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
155 | self.gridLayout_6.addItem(spacerItem4, 12, 3, 1, 1) | |
|
156 | self.volGraphfreqrange = QtGui.QLineEdit(self.tabgraphVoltage) | |
|
157 | self.volGraphfreqrange.setObjectName(_fromUtf8("volGraphfreqrange")) | |
|
158 | self.gridLayout_6.addWidget(self.volGraphfreqrange, 9, 1, 1, 6) | |
|
159 | self.volGraphPrefix = QtGui.QLineEdit(self.tabgraphVoltage) | |
|
160 | self.volGraphPrefix.setObjectName(_fromUtf8("volGraphPrefix")) | |
|
161 | self.gridLayout_6.addWidget(self.volGraphPrefix, 2, 1, 1, 6) | |
|
162 | self.volGraphToolPath = QtGui.QToolButton(self.tabgraphVoltage) | |
|
163 | self.volGraphToolPath.setObjectName(_fromUtf8("volGraphToolPath")) | |
|
164 | self.gridLayout_6.addWidget(self.volGraphToolPath, 1, 5, 1, 2) | |
|
165 | self.volGraphPath = QtGui.QLineEdit(self.tabgraphVoltage) | |
|
166 | self.volGraphPath.setObjectName(_fromUtf8("volGraphPath")) | |
|
167 | self.gridLayout_6.addWidget(self.volGraphPath, 1, 1, 1, 4) | |
|
168 | self.label_14 = QtGui.QLabel(self.tabgraphVoltage) | |
|
169 | self.label_14.setObjectName(_fromUtf8("label_14")) | |
|
170 | self.gridLayout_6.addWidget(self.label_14, 6, 0, 1, 1) | |
|
171 | spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
172 | self.gridLayout_6.addItem(spacerItem5, 3, 3, 1, 1) | |
|
173 | self.label_8 = QtGui.QLabel(self.tabgraphVoltage) | |
|
174 | self.label_8.setObjectName(_fromUtf8("label_8")) | |
|
175 | self.gridLayout_6.addWidget(self.label_8, 8, 0, 1, 1) | |
|
176 | self.label_49 = QtGui.QLabel(self.tabgraphVoltage) | |
|
177 | self.label_49.setObjectName(_fromUtf8("label_49")) | |
|
178 | self.gridLayout_6.addWidget(self.label_49, 4, 3, 1, 1) | |
|
179 | self.label_51 = QtGui.QLabel(self.tabgraphVoltage) | |
|
180 | self.label_51.setObjectName(_fromUtf8("label_51")) | |
|
181 | self.gridLayout_6.addWidget(self.label_51, 9, 0, 1, 1) | |
|
182 | self.volGraphCebshow = QtGui.QCheckBox(self.tabgraphVoltage) | |
|
183 | self.volGraphCebshow.setText(_fromUtf8("")) | |
|
184 | self.volGraphCebshow.setObjectName(_fromUtf8("volGraphCebshow")) | |
|
185 | self.gridLayout_6.addWidget(self.volGraphCebshow, 6, 3, 1, 1) | |
|
186 | self.label_12 = QtGui.QLabel(self.tabgraphVoltage) | |
|
187 | self.label_12.setObjectName(_fromUtf8("label_12")) | |
|
188 | self.gridLayout_6.addWidget(self.label_12, 1, 0, 1, 1) | |
|
189 | self.label_13 = QtGui.QLabel(self.tabgraphVoltage) | |
|
190 | self.label_13.setObjectName(_fromUtf8("label_13")) | |
|
191 | self.gridLayout_6.addWidget(self.label_13, 2, 0, 1, 1) | |
|
192 | self.label_52 = QtGui.QLabel(self.tabgraphVoltage) | |
|
193 | self.label_52.setObjectName(_fromUtf8("label_52")) | |
|
194 | self.gridLayout_6.addWidget(self.label_52, 11, 0, 1, 1) | |
|
195 | spacerItem6 = QtGui.QSpacerItem(40, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
196 | self.gridLayout_6.addItem(spacerItem6, 14, 5, 1, 2) | |
|
197 | spacerItem7 = QtGui.QSpacerItem(18, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
198 | self.gridLayout_6.addItem(spacerItem7, 14, 3, 1, 1) | |
|
199 | self.volGraphChannelList = QtGui.QLineEdit(self.tabgraphVoltage) | |
|
200 | self.volGraphChannelList.setObjectName(_fromUtf8("volGraphChannelList")) | |
|
201 | self.gridLayout_6.addWidget(self.volGraphChannelList, 8, 1, 1, 6) | |
|
202 | self.volGraphHeightrange = QtGui.QLineEdit(self.tabgraphVoltage) | |
|
203 | self.volGraphHeightrange.setObjectName(_fromUtf8("volGraphHeightrange")) | |
|
204 | self.gridLayout_6.addWidget(self.volGraphHeightrange, 11, 1, 1, 6) | |
|
205 | self.label_50 = QtGui.QLabel(self.tabgraphVoltage) | |
|
206 | self.label_50.setObjectName(_fromUtf8("label_50")) | |
|
207 | self.gridLayout_6.addWidget(self.label_50, 4, 4, 1, 1) | |
|
208 | self.volGraphCebSave = QtGui.QCheckBox(self.tabgraphVoltage) | |
|
209 | self.volGraphCebSave.setText(_fromUtf8("")) | |
|
210 | self.volGraphCebSave.setObjectName(_fromUtf8("volGraphCebSave")) | |
|
211 | self.gridLayout_6.addWidget(self.volGraphCebSave, 6, 4, 1, 1) | |
|
212 | self.tabWidgetVoltage.addTab(self.tabgraphVoltage, _fromUtf8("")) | |
|
213 | ||
|
214 | self.taboutputVoltage = QtGui.QWidget() | |
|
215 | self.taboutputVoltage.setObjectName(_fromUtf8("taboutputVoltage")) | |
|
216 | self.gridLayout_12 = QtGui.QGridLayout(self.taboutputVoltage) | |
|
217 | self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12")) | |
|
218 | self.label_36 = QtGui.QLabel(self.taboutputVoltage) | |
|
219 | self.label_36.setObjectName(_fromUtf8("label_36")) | |
|
220 | self.gridLayout_12.addWidget(self.label_36, 0, 0, 1, 1) | |
|
221 | self.label_37 = QtGui.QLabel(self.taboutputVoltage) | |
|
222 | self.label_37.setObjectName(_fromUtf8("label_37")) | |
|
223 | self.gridLayout_12.addWidget(self.label_37, 1, 0, 1, 1) | |
|
224 | self.volOutputPath = QtGui.QLineEdit(self.taboutputVoltage) | |
|
225 | self.volOutputPath.setObjectName(_fromUtf8("volOutputPath")) | |
|
226 | self.gridLayout_12.addWidget(self.volOutputPath, 1, 2, 1, 1) | |
|
227 | self.volOutputToolPath = QtGui.QToolButton(self.taboutputVoltage) | |
|
228 | self.volOutputToolPath.setObjectName(_fromUtf8("volOutputToolPath")) | |
|
229 | self.gridLayout_12.addWidget(self.volOutputToolPath, 1, 3, 1, 1) | |
|
230 | self.volOutputComData = QtGui.QComboBox(self.taboutputVoltage) | |
|
231 | self.volOutputComData.setObjectName(_fromUtf8("volOutputComData")) | |
|
232 | self.volOutputComData.addItem(_fromUtf8("")) | |
|
233 | self.gridLayout_12.addWidget(self.volOutputComData, 0, 2, 1, 2) | |
|
234 | spacerItem8 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
|
235 | self.gridLayout_12.addItem(spacerItem8, 5, 2, 1, 1) | |
|
236 | self.volOutputblocksperfile = QtGui.QLineEdit(self.taboutputVoltage) | |
|
237 | self.volOutputblocksperfile.setObjectName(_fromUtf8("volOutputblocksperfile")) | |
|
238 | self.gridLayout_12.addWidget(self.volOutputblocksperfile, 3, 2, 1, 1) | |
|
239 | self.label_7 = QtGui.QLabel(self.taboutputVoltage) | |
|
240 | self.label_7.setObjectName(_fromUtf8("label_7")) | |
|
241 | self.gridLayout_12.addWidget(self.label_7, 3, 0, 1, 1) | |
|
242 | self.label_35 = QtGui.QLabel(self.taboutputVoltage) | |
|
243 | self.label_35.setObjectName(_fromUtf8("label_35")) | |
|
244 | self.gridLayout_12.addWidget(self.label_35, 4, 0, 1, 1) | |
|
245 | self.volOutputprofilesperblock = QtGui.QLineEdit(self.taboutputVoltage) | |
|
246 | self.volOutputprofilesperblock.setObjectName(_fromUtf8("volOutputprofilesperblock")) | |
|
247 | self.gridLayout_12.addWidget(self.volOutputprofilesperblock, 4, 2, 1, 1) | |
|
248 | self.tabWidgetVoltage.addTab(self.taboutputVoltage, _fromUtf8("")) | |
|
249 | self.gridLayout_3.addWidget(self.tabWidgetVoltage, 0, 1, 1, 1) | |
|
250 | ||
|
251 | self.tabWidgetProject.addTab(self.tabVoltage, _fromUtf8("")) | |
|
252 | ||
|
253 | self.tabWidgetVoltage.setCurrentIndex(0) | |
|
254 | ||
|
255 | def retranslateUi(self): | |
|
256 | ||
|
257 | self.volOpOk.setText(_translate("MainWindow", "Ok", None)) | |
|
258 | self.volGraphClear.setText(_translate("MainWindow", "Clear", None)) | |
|
259 | self.volOpComHeights.setItemText(0, _translate("MainWindow", "Value", None)) | |
|
260 | self.volOpComHeights.setItemText(1, _translate("MainWindow", "Index", None)) | |
|
261 | self.volOpComChannels.setItemText(0, _translate("MainWindow", "Value", None)) | |
|
262 | self.volOpComChannels.setItemText(1, _translate("MainWindow", "Index", None)) | |
|
263 | self.volOpCebProfile.setText(_translate("MainWindow", "Profile Selector", None)) | |
|
264 | self.volOpComProfile.setItemText(0, _translate("MainWindow", "Profile List", None)) | |
|
265 | self.volOpComProfile.setItemText(1, _translate("MainWindow", "Profile Range List", None)) | |
|
266 | self.volOpCebDecodification.setText(_translate("MainWindow", "Decoder", None)) | |
|
267 | self.volOpCebCohInt.setText(_translate("MainWindow", "Coherent Integration", None)) | |
|
268 | self.volOpCebFlip.setText(_translate("MainWindow", "Flip", None)) | |
|
269 | self.label_4.setText(_translate("MainWindow", "Code:", None)) | |
|
270 | self.volOpCebChannels.setText(_translate("MainWindow", "Select Channels", None)) | |
|
271 | self.volOpCebHeights.setText(_translate("MainWindow", "Select Heights", None)) | |
|
272 | self.volOpCebFilter.setText(_translate("MainWindow", "Filter", None)) | |
|
273 | self.volOpCebRadarfrequency.setText(_translate("MainWindow", "Radar Frequency", None)) | |
|
274 | self.label_5.setText(_translate("MainWindow", "Mode:", None)) | |
|
275 | self.volOpComCode.setItemText(0, _translate("MainWindow", "Barker 3", None)) | |
|
276 | self.volOpComCode.setItemText(1, _translate("MainWindow", "Barker 4", None)) | |
|
277 | self.volOpComCode.setItemText(2, _translate("MainWindow", "Barker 5", None)) | |
|
278 | self.volOpComCode.setItemText(3, _translate("MainWindow", "Barker 7", None)) | |
|
279 | self.volOpComCode.setItemText(4, _translate("MainWindow", "Barker 11", None)) | |
|
280 | self.volOpComCode.setItemText(5, _translate("MainWindow", "Barker 13", None)) | |
|
281 | self.volOpComCode.setItemText(6, _translate("MainWindow", "Barker 3 + Comp.", None)) | |
|
282 | self.volOpComCode.setItemText(7, _translate("MainWindow", "Barker 4 + Comp.", None)) | |
|
283 | self.volOpComCode.setItemText(8, _translate("MainWindow", "Barker 5 + Comp.", None)) | |
|
284 | self.volOpComCode.setItemText(9, _translate("MainWindow", "Barker 7 + Comp.", None)) | |
|
285 | self.volOpComCode.setItemText(10, _translate("MainWindow", "Barker 11+ Comp.", None)) | |
|
286 | self.volOpComCode.setItemText(11, _translate("MainWindow", "Barker 13+ Comp.", None)) | |
|
287 | self.volOpComCode.setItemText(12, _translate("MainWindow", "Read from header", None)) | |
|
288 | self.volOpComMode.setItemText(0, _translate("MainWindow", "Time", None)) | |
|
289 | self.volOpComMode.setItemText(1, _translate("MainWindow", "Freq 1", None)) | |
|
290 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabopVoltage), _translate("MainWindow", "Operation", None)) | |
|
291 | ||
|
292 | self.volGraphToolPath.setText(_translate("MainWindow", "...", None)) | |
|
293 | self.label_14.setText(_translate("MainWindow", "Scope", None)) | |
|
294 | self.label_8.setText(_translate("MainWindow", "Channel List", None)) | |
|
295 | self.label_49.setText(_translate("MainWindow", "Show", None)) | |
|
296 | self.label_51.setText(_translate("MainWindow", "Freq/Vel", None)) | |
|
297 | self.label_12.setText(_translate("MainWindow", "Path :", None)) | |
|
298 | self.label_13.setText(_translate("MainWindow", "Prefix:", None)) | |
|
299 | self.label_52.setText(_translate("MainWindow", "Height range", None)) | |
|
300 | self.label_50.setText(_translate("MainWindow", "Save", None)) | |
|
301 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabgraphVoltage), _translate("MainWindow", "Graphics", None)) | |
|
302 | ||
|
303 | self.label_36.setText(_translate("MainWindow", "Type:", None)) | |
|
304 | self.label_37.setText(_translate("MainWindow", "Path:", None)) | |
|
305 | self.volOutputToolPath.setText(_translate("MainWindow", "...", None)) | |
|
306 | self.volOutputComData.setItemText(0, _translate("MainWindow", ".rawdata", None)) | |
|
307 | self.label_7.setText(_translate("MainWindow", "Blocks per File : ", None)) | |
|
308 | self.label_35.setText(_translate("MainWindow", "Profiles per Block: ", None)) | |
|
309 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.taboutputVoltage), _translate("MainWindow", "Output", None)) | |
|
310 | ||
|
311 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabVoltage), _translate("MainWindow", "Voltage", None)) | |
|
312 | ||
|
313 | ||
|
314 | No newline at end of file |
@@ -1,1024 +1,1026 | |||
|
1 | 1 | ''' |
|
2 | 2 | Created on September , 2012 |
|
3 | 3 | @author: |
|
4 | 4 | ''' |
|
5 | 5 | from xml.etree.ElementTree import Element, SubElement |
|
6 | 6 | from xml.etree import ElementTree as ET |
|
7 | 7 | from xml.dom import minidom |
|
8 | 8 | |
|
9 | 9 | #import datetime |
|
10 | 10 | from model import * |
|
11 | 11 | |
|
12 | 12 | import ast |
|
13 | 13 | |
|
14 | 14 | def prettify(elem): |
|
15 | 15 | """Return a pretty-printed XML string for the Element. |
|
16 | 16 | """ |
|
17 | 17 | rough_string = ET.tostring(elem, 'utf-8') |
|
18 | 18 | reparsed = minidom.parseString(rough_string) |
|
19 | 19 | return reparsed.toprettyxml(indent=" ") |
|
20 | 20 | |
|
21 | 21 | class ParameterConf(): |
|
22 | 22 | |
|
23 | 23 | id = None |
|
24 | 24 | name = None |
|
25 | 25 | value = None |
|
26 | 26 | format = None |
|
27 | 27 | |
|
28 | 28 | __formated_value = None |
|
29 | 29 | |
|
30 | 30 | ELEMENTNAME = 'Parameter' |
|
31 | 31 | |
|
32 | 32 | def __init__(self): |
|
33 | 33 | |
|
34 | 34 | self.format = 'str' |
|
35 | 35 | |
|
36 | 36 | def getElementName(self): |
|
37 | 37 | |
|
38 | 38 | return self.ELEMENTNAME |
|
39 | 39 | |
|
40 | 40 | def getValue(self): |
|
41 | 41 | |
|
42 | 42 | if self.__formated_value != None: |
|
43 | 43 | |
|
44 | 44 | return self.__formated_value |
|
45 | 45 | |
|
46 | 46 | value = self.value |
|
47 | 47 | |
|
48 | 48 | if self.format == 'bool': |
|
49 | 49 | value = int(value) |
|
50 | 50 | |
|
51 | 51 | if self.format == 'list': |
|
52 | 52 | strList = value.split(',') |
|
53 | 53 | |
|
54 | 54 | self.__formated_value = strList |
|
55 | 55 | |
|
56 | 56 | return self.__formated_value |
|
57 | 57 | |
|
58 | 58 | if self.format == 'intlist': |
|
59 | 59 | """ |
|
60 | 60 | Example: |
|
61 | 61 | value = (0,1,2) |
|
62 | 62 | """ |
|
63 | 63 | strList = value.split(',') |
|
64 | 64 | intList = [int(x) for x in strList] |
|
65 | 65 | |
|
66 | 66 | self.__formated_value = intList |
|
67 | 67 | |
|
68 | 68 | return self.__formated_value |
|
69 | 69 | |
|
70 | 70 | if self.format == 'floatlist': |
|
71 | 71 | """ |
|
72 | 72 | Example: |
|
73 | 73 | value = (0.5, 1.4, 2.7) |
|
74 | 74 | """ |
|
75 | 75 | strList = value.split(',') |
|
76 | 76 | floatList = [float(x) for x in strList] |
|
77 | 77 | |
|
78 | 78 | self.__formated_value = floatList |
|
79 | 79 | |
|
80 | 80 | return self.__formated_value |
|
81 | 81 | |
|
82 | 82 | if self.format == 'date': |
|
83 | 83 | strList = value.split('/') |
|
84 | 84 | intList = [int(x) for x in strList] |
|
85 | 85 | date = datetime.date(intList[0], intList[1], intList[2]) |
|
86 | 86 | |
|
87 | 87 | self.__formated_value = date |
|
88 | 88 | |
|
89 | 89 | return self.__formated_value |
|
90 | 90 | |
|
91 | 91 | if self.format == 'time': |
|
92 | 92 | strList = value.split(':') |
|
93 | 93 | intList = [int(x) for x in strList] |
|
94 | 94 | time = datetime.time(intList[0], intList[1], intList[2]) |
|
95 | 95 | |
|
96 | 96 | self.__formated_value = time |
|
97 | 97 | |
|
98 | 98 | return self.__formated_value |
|
99 | 99 | |
|
100 | 100 | if self.format == 'pairslist': |
|
101 | 101 | """ |
|
102 | 102 | Example: |
|
103 | 103 | value = (0,1),(1,2) |
|
104 | 104 | """ |
|
105 | 105 | |
|
106 | 106 | value = value.replace('(', '') |
|
107 | 107 | value = value.replace(')', '') |
|
108 | 108 | |
|
109 | 109 | strList = value.split(',') |
|
110 | 110 | intList = [int(item) for item in strList] |
|
111 | 111 | pairList = [] |
|
112 | 112 | for i in range(len(intList)/2): |
|
113 | 113 | pairList.append((intList[i*2], intList[i*2 + 1])) |
|
114 | 114 | |
|
115 | 115 | self.__formated_value = pairList |
|
116 | 116 | |
|
117 | 117 | return self.__formated_value |
|
118 | 118 | |
|
119 | 119 | if self.format == 'multilist': |
|
120 | 120 | """ |
|
121 | 121 | Example: |
|
122 | 122 | value = (0,1,2),(3,4,5) |
|
123 | 123 | """ |
|
124 | 124 | multiList = ast.literal_eval(value) |
|
125 | 125 | |
|
126 | 126 | self.__formated_value = multiList |
|
127 | 127 | |
|
128 | 128 | return self.__formated_value |
|
129 | 129 | |
|
130 | 130 | format_func = eval(self.format) |
|
131 | 131 | |
|
132 | 132 | self.__formated_value = format_func(value) |
|
133 | 133 | |
|
134 | 134 | return self.__formated_value |
|
135 | 135 | |
|
136 | 136 | def setup(self, id, name, value, format='str'): |
|
137 | 137 | |
|
138 | 138 | self.id = id |
|
139 | 139 | self.name = name |
|
140 | 140 | self.value = str(value) |
|
141 | 141 | self.format = str.lower(format) |
|
142 | 142 | |
|
143 | 143 | def update(self, name, value, format='str'): |
|
144 | 144 | |
|
145 | 145 | self.name = name |
|
146 | 146 | self.value = str(value) |
|
147 | 147 | self.format = format |
|
148 | 148 | |
|
149 | 149 | def makeXml(self, opElement): |
|
150 | 150 | |
|
151 | 151 | parmElement = SubElement(opElement, self.ELEMENTNAME) |
|
152 | 152 | parmElement.set('id', str(self.id)) |
|
153 | 153 | parmElement.set('name', self.name) |
|
154 | 154 | parmElement.set('value', self.value) |
|
155 | 155 | parmElement.set('format', self.format) |
|
156 | 156 | |
|
157 | 157 | def readXml(self, parmElement): |
|
158 | 158 | |
|
159 | 159 | self.id = parmElement.get('id') |
|
160 | 160 | self.name = parmElement.get('name') |
|
161 | 161 | self.value = parmElement.get('value') |
|
162 | 162 | self.format = str.lower(parmElement.get('format')) |
|
163 | 163 | |
|
164 | 164 | #Compatible with old signal chain version |
|
165 | 165 | if self.format == 'int' and self.name == 'idfigure': |
|
166 | 166 | self.name = 'id' |
|
167 | 167 | |
|
168 | 168 | def printattr(self): |
|
169 | 169 | |
|
170 | 170 | print "Parameter[%s]: name = %s, value = %s, format = %s" %(self.id, self.name, self.value, self.format) |
|
171 | 171 | |
|
172 | 172 | class OperationConf(): |
|
173 | 173 | |
|
174 | 174 | id = None |
|
175 | 175 | name = None |
|
176 | 176 | priority = None |
|
177 | 177 | type = None |
|
178 | 178 | |
|
179 | 179 | parmConfObjList = [] |
|
180 | 180 | |
|
181 | 181 | ELEMENTNAME = 'Operation' |
|
182 | 182 | |
|
183 | 183 | def __init__(self): |
|
184 | 184 | |
|
185 | 185 | self.id = 0 |
|
186 | 186 | self.name = None |
|
187 | 187 | self.priority = None |
|
188 | 188 | self.type = 'self' |
|
189 | 189 | |
|
190 | 190 | |
|
191 | 191 | def __getNewId(self): |
|
192 | 192 | |
|
193 | 193 | return int(self.id)*10 + len(self.parmConfObjList) + 1 |
|
194 | 194 | |
|
195 | 195 | def getElementName(self): |
|
196 | 196 | |
|
197 | 197 | return self.ELEMENTNAME |
|
198 | 198 | |
|
199 | 199 | def getParameterObjList(self): |
|
200 | 200 | |
|
201 | 201 | return self.parmConfObjList |
|
202 | 202 | |
|
203 | 203 | def getParameterObj(self, parameterName): |
|
204 | 204 | |
|
205 | 205 | for parmConfObj in self.parmConfObjList: |
|
206 | 206 | |
|
207 | 207 | if parmConfObj.name != parameterName: |
|
208 | 208 | continue |
|
209 | 209 | |
|
210 | 210 | return parmConfObj |
|
211 | 211 | |
|
212 | 212 | return None |
|
213 | 213 | |
|
214 | 214 | def getParameterObjfromValue(self,parameterValue): |
|
215 | 215 | for parmConfObj in self.parmConfObjList: |
|
216 | 216 | |
|
217 | 217 | if parmConfObj.getValue() != parameterValue: |
|
218 | 218 | continue |
|
219 | 219 | |
|
220 | 220 | return parmConfObj.getValue() |
|
221 | 221 | |
|
222 | 222 | return None |
|
223 | 223 | |
|
224 | 224 | def getParameterValue(self, parameterName): |
|
225 | 225 | |
|
226 | 226 | parameterObj = self.getParameterObj(parameterName) |
|
227 | 227 | value = parameterObj.getValue() |
|
228 | 228 | |
|
229 | 229 | return value |
|
230 | 230 | |
|
231 | 231 | def setup(self, id, name, priority, type): |
|
232 | 232 | |
|
233 | 233 | self.id = id |
|
234 | 234 | self.name = name |
|
235 | 235 | self.type = type |
|
236 | 236 | self.priority = priority |
|
237 | 237 | |
|
238 | 238 | self.parmConfObjList = [] |
|
239 | 239 | |
|
240 | 240 | def removeParameters(self): |
|
241 | 241 | |
|
242 | 242 | for obj in self.parmConfObjList: |
|
243 | 243 | del obj |
|
244 | 244 | |
|
245 | 245 | self.parmConfObjList = [] |
|
246 | 246 | |
|
247 | 247 | def addParameter(self, name, value, format='str'): |
|
248 | 248 | |
|
249 | 249 | id = self.__getNewId() |
|
250 | 250 | |
|
251 | 251 | parmConfObj = ParameterConf() |
|
252 | 252 | parmConfObj.setup(id, name, value, format) |
|
253 | 253 | |
|
254 | 254 | self.parmConfObjList.append(parmConfObj) |
|
255 | 255 | |
|
256 | 256 | return parmConfObj |
|
257 | 257 | |
|
258 | 258 | def changeParameter(self, name, value, format='str'): |
|
259 | 259 | |
|
260 | 260 | parmConfObj = self.getParameterObj(name) |
|
261 | 261 | parmConfObj.update(name, value, format) |
|
262 | 262 | |
|
263 | 263 | return parmConfObj |
|
264 | 264 | |
|
265 | 265 | def makeXml(self, upElement): |
|
266 | 266 | |
|
267 | 267 | opElement = SubElement(upElement, self.ELEMENTNAME) |
|
268 | 268 | opElement.set('id', str(self.id)) |
|
269 | 269 | opElement.set('name', self.name) |
|
270 | 270 | opElement.set('type', self.type) |
|
271 | 271 | opElement.set('priority', str(self.priority)) |
|
272 | 272 | |
|
273 | 273 | for parmConfObj in self.parmConfObjList: |
|
274 | 274 | parmConfObj.makeXml(opElement) |
|
275 | 275 | |
|
276 | 276 | def readXml(self, opElement): |
|
277 | 277 | |
|
278 | 278 | self.id = opElement.get('id') |
|
279 | 279 | self.name = opElement.get('name') |
|
280 | 280 | self.type = opElement.get('type') |
|
281 | 281 | self.priority = opElement.get('priority') |
|
282 | 282 | |
|
283 | 283 | #Compatible with old signal chain version |
|
284 | 284 | #Use of 'run' method instead 'init' |
|
285 | 285 | if self.type == 'self' and self.name == 'init': |
|
286 | 286 | self.name = 'run' |
|
287 | 287 | |
|
288 | 288 | self.parmConfObjList = [] |
|
289 | 289 | |
|
290 | 290 | parmElementList = opElement.getiterator(ParameterConf().getElementName()) |
|
291 | 291 | |
|
292 | 292 | for parmElement in parmElementList: |
|
293 | 293 | parmConfObj = ParameterConf() |
|
294 | 294 | parmConfObj.readXml(parmElement) |
|
295 | 295 | |
|
296 | 296 | #Compatible with old signal chain version |
|
297 | 297 | #If an 'plot' OPERATION is found, changes name operation by the value of its type PARAMETER |
|
298 | 298 | if self.type != 'self' and self.name == 'Plot': |
|
299 | 299 | if parmConfObj.format == 'str' and parmConfObj.name == 'type': |
|
300 | 300 | self.name = parmConfObj.value |
|
301 | 301 | continue |
|
302 | 302 | |
|
303 | 303 | self.parmConfObjList.append(parmConfObj) |
|
304 | 304 | |
|
305 | 305 | def printattr(self): |
|
306 | 306 | |
|
307 | 307 | print "%s[%s]: name = %s, type = %s, priority = %s" %(self.ELEMENTNAME, |
|
308 | 308 | self.id, |
|
309 | 309 | self.name, |
|
310 | 310 | self.type, |
|
311 | 311 | self.priority) |
|
312 | 312 | |
|
313 | 313 | for parmConfObj in self.parmConfObjList: |
|
314 | 314 | parmConfObj.printattr() |
|
315 | 315 | |
|
316 | 316 | def createObject(self): |
|
317 | 317 | |
|
318 | 318 | if self.type == 'self': |
|
319 | 319 | raise ValueError, "This operation type cannot be created" |
|
320 | 320 | |
|
321 | 321 | if self.type == 'external' or self.type == 'other': |
|
322 | 322 | className = eval(self.name) |
|
323 | 323 | opObj = className() |
|
324 | 324 | |
|
325 | 325 | return opObj |
|
326 | 326 | |
|
327 | 327 | class ProcUnitConf(): |
|
328 | 328 | |
|
329 | 329 | id = None |
|
330 | 330 | name = None |
|
331 | 331 | datatype = None |
|
332 | 332 | inputId = None |
|
333 | 333 | parentId = None |
|
334 | 334 | |
|
335 | 335 | opConfObjList = [] |
|
336 | 336 | |
|
337 | 337 | procUnitObj = None |
|
338 | 338 | opObjList = [] |
|
339 | 339 | |
|
340 | 340 | ELEMENTNAME = 'ProcUnit' |
|
341 | 341 | |
|
342 | 342 | def __init__(self): |
|
343 | 343 | |
|
344 | 344 | self.id = None |
|
345 | 345 | self.datatype = None |
|
346 | 346 | self.name = None |
|
347 | 347 | self.inputId = None |
|
348 | 348 | |
|
349 | 349 | self.opConfObjList = [] |
|
350 | 350 | |
|
351 | 351 | self.procUnitObj = None |
|
352 | 352 | self.opObjDict = {} |
|
353 | 353 | |
|
354 | 354 | def __getPriority(self): |
|
355 | 355 | |
|
356 | 356 | return len(self.opConfObjList)+1 |
|
357 | 357 | |
|
358 | 358 | def __getNewId(self): |
|
359 | 359 | |
|
360 | 360 | return int(self.id)*10 + len(self.opConfObjList) + 1 |
|
361 | 361 | |
|
362 | 362 | def getElementName(self): |
|
363 | 363 | |
|
364 | 364 | return self.ELEMENTNAME |
|
365 | 365 | |
|
366 | 366 | def getId(self): |
|
367 | 367 | |
|
368 | 368 | return str(self.id) |
|
369 | 369 | |
|
370 | 370 | def getInputId(self): |
|
371 | 371 | |
|
372 | 372 | return str(self.inputId) |
|
373 | 373 | |
|
374 | 374 | def getOperationObjList(self): |
|
375 | 375 | |
|
376 | 376 | return self.opConfObjList |
|
377 | 377 | |
|
378 | 378 | def getOperationObj(self, name=None): |
|
379 | 379 | |
|
380 | 380 | for opConfObj in self.opConfObjList: |
|
381 | 381 | |
|
382 | 382 | if opConfObj.name != name: |
|
383 | 383 | continue |
|
384 | 384 | |
|
385 | 385 | return opConfObj |
|
386 | 386 | |
|
387 | 387 | return None |
|
388 | 388 | |
|
389 | 389 | def getOpObjfromParamValue(self,value=None): |
|
390 | 390 | |
|
391 | 391 | for opConfObj in self.opConfObjList: |
|
392 | 392 | if opConfObj.getParameterObjfromValue(parameterValue=value) != value: |
|
393 | 393 | continue |
|
394 | 394 | return opConfObj |
|
395 | 395 | return None |
|
396 | 396 | |
|
397 | 397 | def getProcUnitObj(self): |
|
398 | 398 | |
|
399 | 399 | return self.procUnitObj |
|
400 | 400 | |
|
401 | 401 | def setup(self, id, name, datatype, inputId, parentId=None): |
|
402 | 402 | |
|
403 | 403 | self.id = id |
|
404 | 404 | self.name = name |
|
405 | 405 | self.datatype = datatype |
|
406 | 406 | self.inputId = inputId |
|
407 | 407 | self.parentId = parentId |
|
408 | 408 | |
|
409 | 409 | self.opConfObjList = [] |
|
410 | 410 | |
|
411 | 411 | self.addOperation(name='run', optype='self') |
|
412 | 412 | |
|
413 | 413 | def removeOperations(self): |
|
414 | 414 | |
|
415 | 415 | for obj in self.opConfObjList: |
|
416 | 416 | del obj |
|
417 | 417 | |
|
418 | 418 | self.opConfObjList = [] |
|
419 | 419 | self.addOperation(name='run') |
|
420 | 420 | |
|
421 | 421 | def addParameter(self, **kwargs): |
|
422 | ||
|
422 | ''' | |
|
423 | Add parameters to "run" operation | |
|
424 | ''' | |
|
423 | 425 | opObj = self.opConfObjList[0] |
|
424 | 426 | |
|
425 | 427 | opObj.addParameter(**kwargs) |
|
426 | 428 | |
|
427 | 429 | return opObj |
|
428 | 430 | |
|
429 | 431 | def addOperation(self, name, optype='self'): |
|
430 | 432 | |
|
431 | 433 | id = self.__getNewId() |
|
432 | 434 | priority = self.__getPriority() |
|
433 | 435 | |
|
434 | 436 | opConfObj = OperationConf() |
|
435 | 437 | opConfObj.setup(id, name=name, priority=priority, type=optype) |
|
436 | 438 | |
|
437 | 439 | self.opConfObjList.append(opConfObj) |
|
438 | 440 | |
|
439 | 441 | return opConfObj |
|
440 | 442 | |
|
441 | 443 | def makeXml(self, procUnitElement): |
|
442 | 444 | |
|
443 | 445 | upElement = SubElement(procUnitElement, self.ELEMENTNAME) |
|
444 | 446 | upElement.set('id', str(self.id)) |
|
445 | 447 | upElement.set('name', self.name) |
|
446 | 448 | upElement.set('datatype', self.datatype) |
|
447 | 449 | upElement.set('inputId', str(self.inputId)) |
|
448 | 450 | |
|
449 | 451 | for opConfObj in self.opConfObjList: |
|
450 | 452 | opConfObj.makeXml(upElement) |
|
451 | 453 | |
|
452 | 454 | def readXml(self, upElement): |
|
453 | 455 | |
|
454 | 456 | self.id = upElement.get('id') |
|
455 | 457 | self.name = upElement.get('name') |
|
456 | 458 | self.datatype = upElement.get('datatype') |
|
457 | 459 | self.inputId = upElement.get('inputId') |
|
458 | 460 | |
|
459 | 461 | self.opConfObjList = [] |
|
460 | 462 | |
|
461 | 463 | opElementList = upElement.getiterator(OperationConf().getElementName()) |
|
462 | 464 | |
|
463 | 465 | for opElement in opElementList: |
|
464 | 466 | opConfObj = OperationConf() |
|
465 | 467 | opConfObj.readXml(opElement) |
|
466 | 468 | self.opConfObjList.append(opConfObj) |
|
467 | 469 | |
|
468 | 470 | def printattr(self): |
|
469 | 471 | |
|
470 | 472 | print "%s[%s]: name = %s, datatype = %s, inputId = %s" %(self.ELEMENTNAME, |
|
471 | 473 | self.id, |
|
472 | 474 | self.name, |
|
473 | 475 | self.datatype, |
|
474 | 476 | self.inputId) |
|
475 | 477 | |
|
476 | 478 | for opConfObj in self.opConfObjList: |
|
477 | 479 | opConfObj.printattr() |
|
478 | 480 | |
|
479 | 481 | def createObjects(self): |
|
480 | 482 | |
|
481 | 483 | className = eval(self.name) |
|
482 | 484 | procUnitObj = className() |
|
483 | 485 | |
|
484 | 486 | for opConfObj in self.opConfObjList: |
|
485 | 487 | |
|
486 | 488 | if opConfObj.type == 'self': |
|
487 | 489 | continue |
|
488 | 490 | |
|
489 | 491 | opObj = opConfObj.createObject() |
|
490 | 492 | |
|
491 | 493 | self.opObjDict[opConfObj.id] = opObj |
|
492 | 494 | procUnitObj.addOperation(opObj, opConfObj.id) |
|
493 | 495 | |
|
494 | 496 | self.procUnitObj = procUnitObj |
|
495 | 497 | |
|
496 | 498 | return procUnitObj |
|
497 | 499 | |
|
498 | 500 | def run(self): |
|
499 | 501 | |
|
500 | 502 | finalSts = False |
|
501 | 503 | |
|
502 | 504 | for opConfObj in self.opConfObjList: |
|
503 | 505 | |
|
504 | 506 | kwargs = {} |
|
505 | 507 | for parmConfObj in opConfObj.getParameterObjList(): |
|
506 | 508 | if opConfObj.name == 'run' and parmConfObj.name == 'datatype': |
|
507 | 509 | continue |
|
508 | 510 | |
|
509 | 511 | kwargs[parmConfObj.name] = parmConfObj.getValue() |
|
510 | 512 | |
|
511 | 513 | #print "\tRunning the '%s' operation with %s" %(opConfObj.name, opConfObj.id) |
|
512 | 514 | sts = self.procUnitObj.call(opType = opConfObj.type, |
|
513 | 515 | opName = opConfObj.name, |
|
514 | 516 | opId = opConfObj.id, |
|
515 | 517 | **kwargs) |
|
516 | 518 | finalSts = finalSts or sts |
|
517 | 519 | |
|
518 | 520 | return finalSts |
|
519 | 521 | |
|
520 | 522 | def close(self): |
|
521 | 523 | |
|
522 | 524 | for opConfObj in self.opConfObjList: |
|
523 | 525 | if opConfObj.type == 'self': |
|
524 | 526 | continue |
|
525 | 527 | |
|
526 | 528 | opObj = self.procUnitObj.getOperationObj(opConfObj.id) |
|
527 | 529 | opObj.close() |
|
528 | 530 | |
|
529 | 531 | self.procUnitObj.close() |
|
530 | 532 | |
|
531 | 533 | return |
|
532 | 534 | |
|
533 | 535 | class ReadUnitConf(ProcUnitConf): |
|
534 | 536 | |
|
535 | 537 | path = None |
|
536 | 538 | startDate = None |
|
537 | 539 | endDate = None |
|
538 | 540 | startTime = None |
|
539 | 541 | endTime = None |
|
540 | 542 | |
|
541 | 543 | ELEMENTNAME = 'ReadUnit' |
|
542 | 544 | |
|
543 | 545 | def __init__(self): |
|
544 | 546 | |
|
545 | 547 | self.id = None |
|
546 | 548 | self.datatype = None |
|
547 | 549 | self.name = None |
|
548 | 550 | self.inputId = 0 |
|
549 | 551 | |
|
550 | 552 | self.opConfObjList = [] |
|
551 | 553 | self.opObjList = [] |
|
552 | 554 | |
|
553 | 555 | def getElementName(self): |
|
554 | 556 | |
|
555 | 557 | return self.ELEMENTNAME |
|
556 | 558 | |
|
557 | 559 | def setup(self, id, name, datatype, path, startDate="", endDate="", startTime="", endTime="", parentId=None, **kwargs): |
|
558 | 560 | |
|
559 | 561 | self.id = id |
|
560 | 562 | self.name = name |
|
561 | 563 | self.datatype = datatype |
|
562 | 564 | |
|
563 | 565 | self.path = path |
|
564 | 566 | self.startDate = startDate |
|
565 | 567 | self.endDate = endDate |
|
566 | 568 | self.startTime = startTime |
|
567 | 569 | self.endTime = endTime |
|
568 | 570 | |
|
569 | 571 | self.addRunOperation(**kwargs) |
|
570 | 572 | |
|
571 | 573 | def update(self, datatype, path, startDate, endDate, startTime, endTime, parentId=None, **kwargs): |
|
572 | 574 | |
|
573 | 575 | self.datatype = datatype |
|
574 | 576 | self.path = path |
|
575 | 577 | self.startDate = startDate |
|
576 | 578 | self.endDate = endDate |
|
577 | 579 | self.startTime = startTime |
|
578 | 580 | self.endTime = endTime |
|
579 | 581 | |
|
580 | 582 | self.updateRunOperation(**kwargs) |
|
581 | 583 | |
|
582 | 584 | def addRunOperation(self, **kwargs): |
|
583 | 585 | |
|
584 | 586 | opObj = self.addOperation(name = 'run', optype = 'self') |
|
585 | 587 | |
|
586 | 588 | opObj.addParameter(name='datatype' , value=self.datatype, format='str') |
|
587 | 589 | opObj.addParameter(name='path' , value=self.path, format='str') |
|
588 | 590 | opObj.addParameter(name='startDate' , value=self.startDate, format='date') |
|
589 | 591 | opObj.addParameter(name='endDate' , value=self.endDate, format='date') |
|
590 | 592 | opObj.addParameter(name='startTime' , value=self.startTime, format='time') |
|
591 | 593 | opObj.addParameter(name='endTime' , value=self.endTime, format='time') |
|
592 | 594 | |
|
593 | 595 | for key, value in kwargs.items(): |
|
594 | 596 | opObj.addParameter(name=key, value=value, format=type(value).__name__) |
|
595 | 597 | |
|
596 | 598 | return opObj |
|
597 | 599 | |
|
598 | 600 | def updateRunOperation(self, **kwargs): |
|
599 | 601 | |
|
600 | 602 | opObj = self.getOperationObj(name = 'run') |
|
601 | 603 | opObj.removeParameters() |
|
602 | 604 | |
|
603 | 605 | opObj.addParameter(name='datatype' , value=self.datatype, format='str') |
|
604 | 606 | opObj.addParameter(name='path' , value=self.path, format='str') |
|
605 | 607 | opObj.addParameter(name='startDate' , value=self.startDate, format='date') |
|
606 | 608 | opObj.addParameter(name='endDate' , value=self.endDate, format='date') |
|
607 | 609 | opObj.addParameter(name='startTime' , value=self.startTime, format='time') |
|
608 | 610 | opObj.addParameter(name='endTime' , value=self.endTime, format='time') |
|
609 | 611 | |
|
610 | 612 | for key, value in kwargs.items(): |
|
611 | 613 | opObj.addParameter(name=key, value=value, format=type(value).__name__) |
|
612 | 614 | |
|
613 | 615 | return opObj |
|
614 | 616 | |
|
615 | 617 | class Project(): |
|
616 | 618 | |
|
617 | 619 | id = None |
|
618 | 620 | name = None |
|
619 | 621 | description = None |
|
620 | 622 | # readUnitConfObjList = None |
|
621 | 623 | procUnitConfObjDict = None |
|
622 | 624 | |
|
623 | 625 | ELEMENTNAME = 'Project' |
|
624 | 626 | |
|
625 | 627 | def __init__(self, control=None, dataq=None): |
|
626 | 628 | |
|
627 | 629 | self.id = None |
|
628 | 630 | self.name = None |
|
629 | 631 | self.description = None |
|
630 | 632 | |
|
631 | 633 | self.procUnitConfObjDict = {} |
|
632 | 634 | |
|
633 | 635 | #global data_q |
|
634 | 636 | #data_q = dataq |
|
635 | 637 | |
|
636 | 638 | if control==None: |
|
637 | 639 | control = {} |
|
638 | 640 | control['stop'] = False |
|
639 | 641 | control['pause'] = False |
|
640 | 642 | |
|
641 | 643 | self.control = control |
|
642 | 644 | |
|
643 | 645 | def __getNewId(self): |
|
644 | 646 | |
|
645 | 647 | id = int(self.id)*10 + len(self.procUnitConfObjDict) + 1 |
|
646 | 648 | |
|
647 | 649 | return str(id) |
|
648 | 650 | |
|
649 | 651 | def getElementName(self): |
|
650 | 652 | |
|
651 | 653 | return self.ELEMENTNAME |
|
652 | 654 | |
|
653 | 655 | def getId(self): |
|
654 | 656 | |
|
655 | 657 | return self.id |
|
656 | 658 | |
|
657 | 659 | def setup(self, id, name, description): |
|
658 | 660 | |
|
659 | 661 | self.id = id |
|
660 | 662 | self.name = name |
|
661 | 663 | self.description = description |
|
662 | 664 | |
|
663 | 665 | def update(self, name, description): |
|
664 | 666 | |
|
665 | 667 | self.name = name |
|
666 | 668 | self.description = description |
|
667 | 669 | |
|
668 | 670 | def addReadUnit(self, datatype=None, name=None, **kwargs): |
|
669 | 671 | |
|
670 | 672 | #Compatible with old signal chain version |
|
671 | 673 | if datatype==None and name==None: |
|
672 | 674 | raise ValueError, "datatype or name should be defined" |
|
673 | 675 | |
|
674 | 676 | if name==None: |
|
675 | 677 | if 'Reader' in datatype: |
|
676 | 678 | name = datatype |
|
677 | 679 | else: |
|
678 | 680 | name = '%sReader' %(datatype) |
|
679 | 681 | |
|
680 | 682 | if datatype==None: |
|
681 | 683 | datatype = name.replace('Reader','') |
|
682 | 684 | |
|
683 | 685 | id = self.__getNewId() |
|
684 | 686 | |
|
685 | 687 | readUnitConfObj = ReadUnitConf() |
|
686 | 688 | readUnitConfObj.setup(id, name, datatype, parentId=self.id, **kwargs) |
|
687 | 689 | |
|
688 | 690 | self.procUnitConfObjDict[readUnitConfObj.getId()] = readUnitConfObj |
|
689 | 691 | |
|
690 | 692 | return readUnitConfObj |
|
691 | 693 | |
|
692 | 694 | def addProcUnit(self, inputId=0, datatype=None, name=None): |
|
693 | 695 | |
|
694 | 696 | #Compatible with old signal chain version |
|
695 | 697 | if datatype==None and name==None: |
|
696 | 698 | raise ValueError, "datatype or name should be defined" |
|
697 | 699 | |
|
698 | 700 | if name==None: |
|
699 | 701 | if 'Proc' in datatype: |
|
700 | 702 | name = datatype |
|
701 | 703 | else: |
|
702 | 704 | name = '%sProc' %(datatype) |
|
703 | 705 | |
|
704 | 706 | if datatype==None: |
|
705 | 707 | datatype = name.replace('Proc','') |
|
706 | 708 | |
|
707 | 709 | id = self.__getNewId() |
|
708 | 710 | |
|
709 | 711 | procUnitConfObj = ProcUnitConf() |
|
710 | 712 | procUnitConfObj.setup(id, name, datatype, inputId, parentId=self.id) |
|
711 | 713 | |
|
712 | 714 | self.procUnitConfObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
713 | 715 | |
|
714 | 716 | return procUnitConfObj |
|
715 | 717 | |
|
716 | 718 | def getReadUnitId(self): |
|
717 | 719 | |
|
718 | 720 | readUnitConfObj = self.getReadUnitObj() |
|
719 | 721 | |
|
720 | 722 | return readUnitConfObj.id |
|
721 | 723 | |
|
722 | 724 | def getReadUnitObj(self): |
|
723 | 725 | |
|
724 | 726 | for obj in self.procUnitConfObjDict.values(): |
|
725 | 727 | if obj.getElementName() == "ReadUnit": |
|
726 | 728 | return obj |
|
727 | 729 | |
|
728 | 730 | return None |
|
729 | 731 | |
|
730 | 732 | def getProcUnitObj(self, id): |
|
731 | 733 | |
|
732 | 734 | return self.procUnitConfObjDict[id] |
|
733 | 735 | |
|
734 | 736 | def makeXml(self): |
|
735 | 737 | |
|
736 | 738 | projectElement = Element('Project') |
|
737 | 739 | projectElement.set('id', str(self.id)) |
|
738 | 740 | projectElement.set('name', self.name) |
|
739 | 741 | projectElement.set('description', self.description) |
|
740 | 742 | |
|
741 | 743 | # for readUnitConfObj in self.readUnitConfObjList: |
|
742 | 744 | # readUnitConfObj.makeXml(projectElement) |
|
743 | 745 | |
|
744 | 746 | for procUnitConfObj in self.procUnitConfObjDict.values(): |
|
745 | 747 | procUnitConfObj.makeXml(projectElement) |
|
746 | 748 | |
|
747 | 749 | self.projectElement = projectElement |
|
748 | 750 | |
|
749 | 751 | def writeXml(self, filename): |
|
750 | 752 | |
|
751 | 753 | self.makeXml() |
|
752 | 754 | |
|
753 | 755 | #print prettify(self.projectElement) |
|
754 | 756 | |
|
755 | 757 | ElementTree(self.projectElement).write(filename, method='xml') |
|
756 | 758 | |
|
757 | 759 | def readXml(self, filename): |
|
758 | 760 | |
|
759 | 761 | #tree = ET.parse(filename) |
|
760 | 762 | self.projectElement = None |
|
761 | 763 | # self.readUnitConfObjList = [] |
|
762 | 764 | self.procUnitConfObjDict = {} |
|
763 | 765 | |
|
764 | 766 | self.projectElement = ElementTree().parse(filename) |
|
765 | 767 | |
|
766 | 768 | self.project = self.projectElement.tag |
|
767 | 769 | |
|
768 | 770 | self.id = self.projectElement.get('id') |
|
769 | 771 | self.name = self.projectElement.get('name') |
|
770 | 772 | self.description = self.projectElement.get('description') |
|
771 | 773 | |
|
772 | 774 | readUnitElementList = self.projectElement.getiterator(ReadUnitConf().getElementName()) |
|
773 | 775 | |
|
774 | 776 | for readUnitElement in readUnitElementList: |
|
775 | 777 | readUnitConfObj = ReadUnitConf() |
|
776 | 778 | readUnitConfObj.readXml(readUnitElement) |
|
777 | 779 | |
|
778 | 780 | self.procUnitConfObjDict[readUnitConfObj.getId()] = readUnitConfObj |
|
779 | 781 | |
|
780 | 782 | procUnitElementList = self.projectElement.getiterator(ProcUnitConf().getElementName()) |
|
781 | 783 | |
|
782 | 784 | for procUnitElement in procUnitElementList: |
|
783 | 785 | procUnitConfObj = ProcUnitConf() |
|
784 | 786 | procUnitConfObj.readXml(procUnitElement) |
|
785 | 787 | |
|
786 | 788 | self.procUnitConfObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
787 | 789 | |
|
788 | 790 | def printattr(self): |
|
789 | 791 | |
|
790 | 792 | print "Project[%s]: name = %s, description = %s" %(self.id, |
|
791 | 793 | self.name, |
|
792 | 794 | self.description) |
|
793 | 795 | |
|
794 | 796 | # for readUnitConfObj in self.readUnitConfObjList: |
|
795 | 797 | # readUnitConfObj.printattr() |
|
796 | 798 | |
|
797 | 799 | for procUnitConfObj in self.procUnitConfObjDict.values(): |
|
798 | 800 | procUnitConfObj.printattr() |
|
799 | 801 | |
|
800 | 802 | def createObjects(self): |
|
801 | 803 | |
|
802 | 804 | # for readUnitConfObj in self.readUnitConfObjList: |
|
803 | 805 | # readUnitConfObj.createObjects() |
|
804 | 806 | |
|
805 | 807 | for procUnitConfObj in self.procUnitConfObjDict.values(): |
|
806 | 808 | procUnitConfObj.createObjects() |
|
807 | 809 | |
|
808 | 810 | def __connect(self, objIN, thisObj): |
|
809 | 811 | |
|
810 | 812 | thisObj.setInput(objIN.getOutputObj()) |
|
811 | 813 | |
|
812 | 814 | def connectObjects(self): |
|
813 | 815 | |
|
814 | 816 | for thisPUConfObj in self.procUnitConfObjDict.values(): |
|
815 | 817 | |
|
816 | 818 | inputId = thisPUConfObj.getInputId() |
|
817 | 819 | |
|
818 | 820 | if int(inputId) == 0: |
|
819 | 821 | continue |
|
820 | 822 | |
|
821 | 823 | #Get input object |
|
822 | 824 | puConfINObj = self.procUnitConfObjDict[inputId] |
|
823 | 825 | puObjIN = puConfINObj.getProcUnitObj() |
|
824 | 826 | |
|
825 | 827 | #Get current object |
|
826 | 828 | thisPUObj = thisPUConfObj.getProcUnitObj() |
|
827 | 829 | |
|
828 | 830 | self.__connect(puObjIN, thisPUObj) |
|
829 | 831 | |
|
830 | 832 | def run(self): |
|
831 | 833 | |
|
832 | 834 | # for readUnitConfObj in self.readUnitConfObjList: |
|
833 | 835 | # readUnitConfObj.run() |
|
834 | 836 | |
|
835 | 837 | print "*"*40 |
|
836 | 838 | print " Starting SIGNAL CHAIN PROCESSING " |
|
837 | 839 | print "*"*40 |
|
838 | 840 | |
|
839 | 841 | |
|
840 | 842 | keyList = self.procUnitConfObjDict.keys() |
|
841 | 843 | keyList.sort() |
|
842 | 844 | |
|
843 | 845 | while(True): |
|
844 | 846 | |
|
845 | 847 | finalSts = False |
|
846 | 848 | |
|
847 | 849 | for procKey in keyList: |
|
848 | 850 | # print "Running the '%s' process with %s" %(procUnitConfObj.name, procUnitConfObj.id) |
|
849 | 851 | |
|
850 | 852 | procUnitConfObj = self.procUnitConfObjDict[procKey] |
|
851 | 853 | sts = procUnitConfObj.run() |
|
852 | 854 | finalSts = finalSts or sts |
|
853 | 855 | |
|
854 | 856 | #If every process unit finished so end process |
|
855 | 857 | if not(finalSts): |
|
856 | 858 | print "Every process unit have finished" |
|
857 | 859 | break |
|
858 | 860 | |
|
859 | 861 | if self.control['pause']: |
|
860 | 862 | print "Pause..." |
|
861 | 863 | |
|
862 | 864 | while True: |
|
863 | 865 | time.sleep(0.1) |
|
864 | 866 | |
|
865 | 867 | if not self.control['pause']: |
|
866 | 868 | break |
|
867 | 869 | |
|
868 | 870 | if self.control['stop']: |
|
869 | 871 | break |
|
870 | 872 | |
|
871 | 873 | if self.control['stop']: |
|
872 | 874 | print "Stopping process" |
|
873 | 875 | break |
|
874 | 876 | |
|
875 | 877 | #Closing every process |
|
876 | 878 | for procKey in keyList: |
|
877 | 879 | procUnitConfObj = self.procUnitConfObjDict[procKey] |
|
878 | 880 | procUnitConfObj.close() |
|
879 | 881 | |
|
880 | 882 | print "Process stopped" |
|
881 | 883 | |
|
882 | 884 | def start(self, filename): |
|
883 | 885 | |
|
884 | 886 | self.writeXml(filename) |
|
885 | 887 | self.readXml(filename) |
|
886 | 888 | |
|
887 | 889 | self.createObjects() |
|
888 | 890 | self.connectObjects() |
|
889 | 891 | self.run() |
|
890 | 892 | |
|
891 | 893 | if __name__ == '__main__': |
|
892 | 894 | |
|
893 | 895 | desc = "Segundo Test" |
|
894 | 896 | filename = "schain.xml" |
|
895 | 897 | |
|
896 | 898 | controllerObj = Project() |
|
897 | 899 | |
|
898 | 900 | controllerObj.setup(id = '191', name='test01', description=desc) |
|
899 | 901 | |
|
900 | 902 | readUnitConfObj = controllerObj.addReadUnit(datatype='Voltage', |
|
901 | 903 | path='data/rawdata/', |
|
902 | 904 | startDate='2011/01/01', |
|
903 | 905 | endDate='2012/12/31', |
|
904 | 906 | startTime='00:00:00', |
|
905 | 907 | endTime='23:59:59', |
|
906 | 908 | online=1, |
|
907 | 909 | walk=1) |
|
908 | 910 | |
|
909 | 911 | # opObj00 = readUnitConfObj.addOperation(name='printInfo') |
|
910 | 912 | |
|
911 | 913 | procUnitConfObj0 = controllerObj.addProcUnit(datatype='Voltage', inputId=readUnitConfObj.getId()) |
|
912 | 914 | |
|
913 | 915 | opObj10 = procUnitConfObj0.addOperation(name='selectChannels') |
|
914 | 916 | opObj10.addParameter(name='channelList', value='3,4,5', format='intlist') |
|
915 | 917 | |
|
916 | 918 | opObj10 = procUnitConfObj0.addOperation(name='selectHeights') |
|
917 | 919 | opObj10.addParameter(name='minHei', value='90', format='float') |
|
918 | 920 | opObj10.addParameter(name='maxHei', value='180', format='float') |
|
919 | 921 | |
|
920 | 922 | opObj12 = procUnitConfObj0.addOperation(name='CohInt', optype='external') |
|
921 | 923 | opObj12.addParameter(name='n', value='10', format='int') |
|
922 | 924 | |
|
923 | 925 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObj0.getId()) |
|
924 | 926 | procUnitConfObj1.addParameter(name='nFFTPoints', value='32', format='int') |
|
925 | 927 | # procUnitConfObj1.addParameter(name='pairList', value='(0,1),(0,2),(1,2)', format='') |
|
926 | 928 | |
|
927 | 929 | |
|
928 | 930 | opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
929 | 931 | opObj11.addParameter(name='idfigure', value='1', format='int') |
|
930 | 932 | opObj11.addParameter(name='wintitle', value='SpectraPlot0', format='str') |
|
931 | 933 | opObj11.addParameter(name='zmin', value='40', format='int') |
|
932 | 934 | opObj11.addParameter(name='zmax', value='90', format='int') |
|
933 | 935 | opObj11.addParameter(name='showprofile', value='1', format='int') |
|
934 | 936 | |
|
935 | 937 | # opObj11 = procUnitConfObj1.addOperation(name='CrossSpectraPlot', optype='external') |
|
936 | 938 | # opObj11.addParameter(name='idfigure', value='2', format='int') |
|
937 | 939 | # opObj11.addParameter(name='wintitle', value='CrossSpectraPlot', format='str') |
|
938 | 940 | # opObj11.addParameter(name='zmin', value='40', format='int') |
|
939 | 941 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
940 | 942 | |
|
941 | 943 | |
|
942 | 944 | # procUnitConfObj2 = controllerObj.addProcUnit(datatype='Voltage', inputId=procUnitConfObj0.getId()) |
|
943 | 945 | # |
|
944 | 946 | # opObj12 = procUnitConfObj2.addOperation(name='CohInt', optype='external') |
|
945 | 947 | # opObj12.addParameter(name='n', value='2', format='int') |
|
946 | 948 | # opObj12.addParameter(name='overlapping', value='1', format='int') |
|
947 | 949 | # |
|
948 | 950 | # procUnitConfObj3 = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObj2.getId()) |
|
949 | 951 | # procUnitConfObj3.addParameter(name='nFFTPoints', value='32', format='int') |
|
950 | 952 | # |
|
951 | 953 | # opObj11 = procUnitConfObj3.addOperation(name='SpectraPlot', optype='external') |
|
952 | 954 | # opObj11.addParameter(name='idfigure', value='2', format='int') |
|
953 | 955 | # opObj11.addParameter(name='wintitle', value='SpectraPlot1', format='str') |
|
954 | 956 | # opObj11.addParameter(name='zmin', value='40', format='int') |
|
955 | 957 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
956 | 958 | # opObj11.addParameter(name='showprofile', value='1', format='int') |
|
957 | 959 | |
|
958 | 960 | # opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='external') |
|
959 | 961 | # opObj11.addParameter(name='idfigure', value='10', format='int') |
|
960 | 962 | # opObj11.addParameter(name='wintitle', value='RTI', format='str') |
|
961 | 963 | ## opObj11.addParameter(name='xmin', value='21', format='float') |
|
962 | 964 | ## opObj11.addParameter(name='xmax', value='22', format='float') |
|
963 | 965 | # opObj11.addParameter(name='zmin', value='40', format='int') |
|
964 | 966 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
965 | 967 | # opObj11.addParameter(name='showprofile', value='1', format='int') |
|
966 | 968 | # opObj11.addParameter(name='timerange', value=str(60), format='int') |
|
967 | 969 | |
|
968 | 970 | # opObj10 = procUnitConfObj1.addOperation(name='selectChannels') |
|
969 | 971 | # opObj10.addParameter(name='channelList', value='0,2,4,6', format='intlist') |
|
970 | 972 | # |
|
971 | 973 | # opObj12 = procUnitConfObj1.addOperation(name='IncohInt', optype='external') |
|
972 | 974 | # opObj12.addParameter(name='n', value='2', format='int') |
|
973 | 975 | # |
|
974 | 976 | # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
975 | 977 | # opObj11.addParameter(name='idfigure', value='2', format='int') |
|
976 | 978 | # opObj11.addParameter(name='wintitle', value='SpectraPlot10', format='str') |
|
977 | 979 | # opObj11.addParameter(name='zmin', value='70', format='int') |
|
978 | 980 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
979 | 981 | # |
|
980 | 982 | # opObj10 = procUnitConfObj1.addOperation(name='selectChannels') |
|
981 | 983 | # opObj10.addParameter(name='channelList', value='2,6', format='intlist') |
|
982 | 984 | # |
|
983 | 985 | # opObj12 = procUnitConfObj1.addOperation(name='IncohInt', optype='external') |
|
984 | 986 | # opObj12.addParameter(name='n', value='2', format='int') |
|
985 | 987 | # |
|
986 | 988 | # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
987 | 989 | # opObj11.addParameter(name='idfigure', value='3', format='int') |
|
988 | 990 | # opObj11.addParameter(name='wintitle', value='SpectraPlot10', format='str') |
|
989 | 991 | # opObj11.addParameter(name='zmin', value='70', format='int') |
|
990 | 992 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
991 | 993 | |
|
992 | 994 | |
|
993 | 995 | # opObj12 = procUnitConfObj1.addOperation(name='decoder') |
|
994 | 996 | # opObj12.addParameter(name='ncode', value='2', format='int') |
|
995 | 997 | # opObj12.addParameter(name='nbauds', value='8', format='int') |
|
996 | 998 | # opObj12.addParameter(name='code0', value='001110011', format='int') |
|
997 | 999 | # opObj12.addParameter(name='code1', value='001110011', format='int') |
|
998 | 1000 | |
|
999 | 1001 | |
|
1000 | 1002 | |
|
1001 | 1003 | # procUnitConfObj2 = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObj1.getId()) |
|
1002 | 1004 | # |
|
1003 | 1005 | # opObj21 = procUnitConfObj2.addOperation(name='IncohInt', optype='external') |
|
1004 | 1006 | # opObj21.addParameter(name='n', value='2', format='int') |
|
1005 | 1007 | # |
|
1006 | 1008 | # opObj11 = procUnitConfObj2.addOperation(name='SpectraPlot', optype='external') |
|
1007 | 1009 | # opObj11.addParameter(name='idfigure', value='4', format='int') |
|
1008 | 1010 | # opObj11.addParameter(name='wintitle', value='SpectraPlot OBJ 2', format='str') |
|
1009 | 1011 | # opObj11.addParameter(name='zmin', value='70', format='int') |
|
1010 | 1012 | # opObj11.addParameter(name='zmax', value='90', format='int') |
|
1011 | 1013 | |
|
1012 | 1014 | print "Escribiendo el archivo XML" |
|
1013 | 1015 | |
|
1014 | 1016 | controllerObj.writeXml(filename) |
|
1015 | 1017 | |
|
1016 | 1018 | print "Leyendo el archivo XML" |
|
1017 | 1019 | controllerObj.readXml(filename) |
|
1018 | 1020 | #controllerObj.printattr() |
|
1019 | 1021 | |
|
1020 | 1022 | controllerObj.createObjects() |
|
1021 | 1023 | controllerObj.connectObjects() |
|
1022 | 1024 | controllerObj.run() |
|
1023 | 1025 | |
|
1024 | 1026 | No newline at end of file |
@@ -1,1 +1,1 | |||
|
1 |
|
|
|
1 | from viewcontroller import * No newline at end of file |
This diff has been collapsed as it changes many lines, (829 lines changed) Show them Hide them | |||
@@ -1,6236 +1,6439 | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """ |
|
3 | 3 | Module implementing MainWindow. |
|
4 | 4 | #+++++++++++++GUI V1++++++++++++++# |
|
5 | 5 | @author: AlexanderValdezPortocarrero Γ±_Γ± |
|
6 | 6 | """ |
|
7 | 7 | import os, sys, time |
|
8 | 8 | import datetime |
|
9 | 9 | import Queue |
|
10 | 10 | from PyQt4.QtGui import QMainWindow |
|
11 | 11 | from PyQt4.QtCore import pyqtSignature |
|
12 | 12 | from PyQt4.QtCore import pyqtSignal |
|
13 | 13 | from PyQt4 import QtCore |
|
14 | 14 | from PyQt4 import QtGui |
|
15 | 15 | |
|
16 | 16 | from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess |
|
17 | 17 | from schainpy.gui.viewer.ui_ftp import Ui_Ftp |
|
18 | 18 | from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow |
|
19 | 19 | from schainpy.controller import Project |
|
20 | 20 | |
|
21 | 21 | from modelProperties import treeModel |
|
22 | 22 | from collections import OrderedDict |
|
23 | 23 | from os.path import expanduser |
|
24 | 24 | #from CodeWarrior.Standard_Suite import file |
|
25 | 25 | from comm import * |
|
26 | 26 | |
|
27 | 27 | def isRadarFile(file): |
|
28 | 28 | try: |
|
29 | 29 | year = int(file[1:5]) |
|
30 | 30 | doy = int(file[5:8]) |
|
31 | 31 | set = int(file[8:11]) |
|
32 | 32 | except: |
|
33 | 33 | return 0 |
|
34 | 34 | |
|
35 | 35 | return 1 |
|
36 | 36 | |
|
37 | 37 | def isRadarPath(path): |
|
38 | 38 | try: |
|
39 | 39 | year = int(path[1:5]) |
|
40 | 40 | doy = int(path[5:8]) |
|
41 | 41 | except: |
|
42 | 42 | return 0 |
|
43 | 43 | |
|
44 | 44 | return 1 |
|
45 | 45 | |
|
46 | 46 | class BasicWindow(QMainWindow, Ui_BasicWindow): |
|
47 | 47 | """ |
|
48 | 48 | """ |
|
49 | 49 | def __init__(self, parent=None): |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 | self.create_timers() | |
|
81 | self.create_figure() | |
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
50 | """ | |
|
51 | ||
|
52 | """ | |
|
53 | QMainWindow.__init__(self, parent) | |
|
54 | self.setupUi(self) | |
|
55 | self.__puObjDict = {} | |
|
56 | self.__itemTreeDict = {} | |
|
57 | self.readUnitConfObjList = [] | |
|
58 | self.operObjList = [] | |
|
59 | self.projecObjView = None | |
|
60 | self.idProject = 0 | |
|
61 | # self.idImag = 0 | |
|
62 | ||
|
63 | self.idImagscope = 0 | |
|
64 | self.idImagspectra = 0 | |
|
65 | self.idImagcross = 0 | |
|
66 | self.idImagrti = 0 | |
|
67 | self.idImagcoherence = 0 | |
|
68 | self.idImagpower = 0 | |
|
69 | self.idImagrtinoise = 0 | |
|
70 | self.idImagspectraHeis = 0 | |
|
71 | self.idImagrtiHeis = 0 | |
|
72 | ||
|
73 | self.online = 0 | |
|
74 | self.walk = 0 | |
|
75 | self.create = False | |
|
76 | self.selectedItemTree = None | |
|
77 | self.commCtrlPThread = None | |
|
78 | self.setParameter() | |
|
79 | self.create_comm() | |
|
80 | # self.create_timers() | |
|
81 | # self.create_figure() | |
|
82 | self.temporalFTP = ftpBuffer() | |
|
83 | self.projectProperCaracteristica = [] | |
|
84 | self.projectProperPrincipal = [] | |
|
85 | self.projectProperDescripcion = [] | |
|
86 | self.volProperCaracteristica = [] | |
|
87 | self.volProperPrincipal = [] | |
|
88 | self.volProperDescripcion = [] | |
|
89 | self.specProperCaracteristica = [] | |
|
90 | self.specProperPrincipal = [] | |
|
91 | self.specProperDescripcion = [] | |
|
92 | ||
|
93 | self.specHeisProperCaracteristica = [] | |
|
94 | self.specHeisProperPrincipal = [] | |
|
95 | self.specHeisProperDescripcion = [] | |
|
96 | ||
|
97 | 97 | # self.pathWorkSpace = './' |
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
98 | ||
|
99 | self.__projectObjDict = {} | |
|
100 | self.__operationObjDict = {} | |
|
101 | 101 | |
|
102 | self.__ftpProcUnitAdded = False | |
|
103 | self.__ftpProcUnitId = None | |
|
104 | ||
|
102 | 105 | @pyqtSignature("") |
|
103 | 106 | def on_actionCreate_triggered(self): |
|
104 | 107 | """ |
|
105 | 108 | Slot documentation goes here. |
|
106 | 109 | """ |
|
107 | 110 | self.setInputsProject_View() |
|
108 | 111 | self.create = True |
|
109 | 112 | |
|
110 | 113 | @pyqtSignature("") |
|
111 | 114 | def on_actionSave_triggered(self): |
|
112 | 115 | """ |
|
113 | 116 | Slot documentation goes here. |
|
114 | 117 | """ |
|
115 | 118 | self.saveProject() |
|
116 | 119 | |
|
117 | 120 | @pyqtSignature("") |
|
118 | 121 | def on_actionClose_triggered(self): |
|
119 | 122 | """ |
|
120 | 123 | Slot documentation goes here. |
|
121 | 124 | """ |
|
122 | 125 | self.close() |
|
123 | ||
|
124 | @pyqtSignature("") | |
|
125 | def on_actionPauseToolbar_triggered(self): | |
|
126 | self.actionStarToolbar.setEnabled(False) | |
|
127 | self.actionPauseToolbar.setEnabled(True) | |
|
128 | self.actionStopToolbar.setEnabled(True) | |
|
129 | self.pauseProject() | |
|
130 | 126 | |
|
131 | 127 | @pyqtSignature("") |
|
132 | 128 | def on_actionStart_triggered(self): |
|
133 | 129 | """ |
|
134 | 130 | """ |
|
135 | 131 | self.playProject() |
|
136 | 132 | |
|
137 | ||
|
133 | @pyqtSignature("") | |
|
134 | def on_actionPause_triggered(self): | |
|
135 | """ | |
|
136 | """ | |
|
137 | self.pauseProject() | |
|
138 | ||
|
139 | @pyqtSignature("") | |
|
140 | def on_actionStop_triggered(self): | |
|
141 | """ | |
|
142 | """ | |
|
143 | self.stopProject() | |
|
144 | ||
|
138 | 145 | @pyqtSignature("") |
|
139 | 146 | def on_actionFTP_triggered(self): |
|
140 | 147 | """ |
|
141 | 148 | """ |
|
142 | 149 | self.configFTPWindowObj = Ftp(self) |
|
143 | 150 | # if self.temporalFTP.create: |
|
144 | 151 | if self.temporalFTP.createforView: |
|
145 | 152 | server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() |
|
146 | 153 | self.configFTPWindowObj.setParmsfromTemporal(server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos) |
|
147 | 154 | self.configFTPWindowObj.show() |
|
148 | 155 | self.configFTPWindowObj.closed.connect(self.createFTPConfig) |
|
149 | 156 | |
|
150 | 157 | def createFTPConfig(self): |
|
151 | 158 | self.console.clear() |
|
152 | 159 | if not self.configFTPWindowObj.create: |
|
153 | 160 | self.console.append("There is no FTP configuration") |
|
154 | 161 | return |
|
155 | 162 | self.console.append("Push Ok in Spectra view to Add FTP Configuration") |
|
156 | 163 | server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow() |
|
157 | 164 | self.temporalFTP.save(server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos) |
|
158 | 165 | |
|
159 | 166 | @pyqtSignature("") |
|
160 | 167 | def on_actionOpenToolbar_triggered(self): |
|
161 | 168 | """ |
|
162 | 169 | Slot documentation goes here. |
|
163 | 170 | """ |
|
164 | 171 | self.create = False |
|
165 | 172 | self.frame_2.setEnabled(True) |
|
166 | 173 | home = expanduser("~") |
|
167 | 174 | self.dir = os.path.join(home, 'schain_workspace') |
|
168 | 175 | # print self.dir |
|
169 | 176 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.dir, self.tr("Text Files (*.xml)"))) |
|
170 | 177 | self.console.clear() |
|
171 | 178 | projectObjLoad = Project() |
|
172 | 179 | try: |
|
173 | 180 | projectObjLoad.readXml(filename) |
|
174 | 181 | except: |
|
182 | self.console.clear() | |
|
183 | self.console.append("The selected xml file could not be loaded ...") | |
|
175 | 184 | return 0 |
|
185 | ||
|
176 | 186 | project_name, description = projectObjLoad.name, projectObjLoad.description |
|
177 | 187 | id = projectObjLoad.id |
|
178 | 188 | self.__projectObjDict[id] = projectObjLoad |
|
179 | 189 | # Project Properties |
|
180 | 190 | datatype, data_path, startDate, endDate, startTime, endTime , online , delay, walk, set = self.showProjectProperties(projectObjLoad) |
|
181 | 191 | # show ProjectView |
|
182 | 192 | self.addProject2ProjectExplorer(id=id, name=project_name) |
|
183 | 193 | self.refreshProjectWindow(project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, set) |
|
184 | 194 | |
|
185 | 195 | if datatype == "Voltage": |
|
186 | 196 | ext = '.r' |
|
187 | 197 | self.specOpProfiles.setEnabled(True) |
|
188 | 198 | self.specOpippFactor.setEnabled(True) |
|
189 | 199 | elif datatype == "Spectra": |
|
190 | 200 | ext = '.pdata' |
|
201 | self.specOpProfiles.setEnabled(False) | |
|
202 | self.specOpippFactor.setEnabled(False) | |
|
191 | 203 | elif datatype == "Fits": |
|
192 | 204 | ext = '.fits' |
|
193 | ||
|
194 | 205 | |
|
195 | 206 | if online == 0: |
|
196 | 207 | self.loadDays(data_path, ext, walk) |
|
197 | 208 | else: |
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
209 | self.proComStartDate.setEnabled(False) | |
|
210 | self.proComEndDate.setEnabled(False) | |
|
211 | self.proStartTime.setEnabled(False) | |
|
212 | self.proEndTime.setEnabled(False) | |
|
213 | self.frame_2.setEnabled(True) | |
|
203 | 214 | |
|
204 | 215 | self.tabWidgetProject.setEnabled(True) |
|
205 | 216 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
206 | 217 | # Disable tabProject after finish the creation |
|
207 | 218 | self.tabProject.setEnabled(True) |
|
208 | 219 | puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0])) |
|
209 | 220 | |
|
210 | 221 | for inputId, puObj in puObjorderList.items(): |
|
211 | 222 | # print puObj.datatype, puObj.inputId,puObj.getId(),puObj.parentId |
|
212 | 223 | self.__puObjDict[puObj.getId()] = puObj |
|
213 | 224 | |
|
214 | 225 | if puObj.inputId != "0": |
|
215 | 226 | self.addPU2PELoadXML(id=puObj.getId() , name=puObj.datatype , idParent=puObj.inputId) |
|
216 | 227 | |
|
217 | 228 | if puObj.datatype == "Voltage": |
|
218 | 229 | self.refreshPUWindow(puObj.datatype, puObj) |
|
219 | 230 | self.showPUVoltageProperties(puObj) |
|
220 | 231 | self.showtabPUCreated(datatype=puObj.datatype) |
|
221 | 232 | |
|
222 | 233 | if puObj.datatype == "Spectra": |
|
223 | 234 | self.refreshPUWindow(puObj.datatype, puObj) |
|
224 | 235 | self.showPUSpectraProperties(puObj) |
|
225 | 236 | self.showtabPUCreated(datatype=puObj.datatype) |
|
226 | 237 | |
|
227 | 238 | if puObj.datatype == "SpectraHeis": |
|
228 | 239 | self.refreshPUWindow(puObj.datatype, puObj) |
|
229 | 240 | self.showPUSpectraHeisProperties(puObj) |
|
230 | 241 | self.showtabPUCreated(datatype=puObj.datatype) |
|
231 | ||
|
242 | ||
|
243 | if puObj.name == "SendToServer": | |
|
244 | self.__ftpProcUnitAdded = True | |
|
245 | self.__ftpProcUnitId = puObj.getId() | |
|
246 | ||
|
247 | self.console.clear() | |
|
248 | self.console.append("The selected xml file has been loaded successfully") | |
|
232 | 249 | # self.refreshPUWindow(datatype=datatype,puObj=puObj) |
|
233 | 250 | |
|
234 | 251 | @pyqtSignature("") |
|
235 | 252 | def on_actionCreateToolbar_triggered(self): |
|
236 | 253 | """ |
|
237 | 254 | Slot documentation goes here. |
|
238 | 255 | """ |
|
239 | 256 | self.setInputsProject_View() |
|
240 | 257 | self.create = True |
|
241 | 258 | |
|
242 | 259 | @pyqtSignature("") |
|
243 | 260 | def on_actionAddPU_triggered(self): |
|
244 | 261 | if len(self.__projectObjDict) == 0: |
|
245 | 262 | outputstr = "First Create a Project then add Processing Unit" |
|
246 | 263 | self.console.clear() |
|
247 | 264 | self.console.append(outputstr) |
|
248 | 265 | return 0 |
|
249 | 266 | else: |
|
250 | 267 | self.addPUWindow() |
|
251 | 268 | self.console.clear() |
|
252 | 269 | self.console.append("Please, Choose the type of Processing Unit") |
|
253 | 270 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
254 | 271 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
255 | 272 | self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
256 | 273 | |
|
257 | 274 | |
|
258 | 275 | @pyqtSignature("") |
|
259 | 276 | def on_actionSaveToolbar_triggered(self): |
|
260 | 277 | """ |
|
261 | 278 | Slot documentation goes here. |
|
262 | 279 | """ |
|
263 | 280 | self.saveProject() |
|
264 | 281 | |
|
265 | 282 | @pyqtSignature("") |
|
266 | 283 | def on_actionStarToolbar_triggered(self): |
|
267 | 284 | """ |
|
268 | 285 | Slot documentation goes here. |
|
269 | 286 | """ |
|
270 | 287 | self.playProject() |
|
271 | self.actionStarToolbar.setEnabled(False) | |
|
272 | self.actionPauseToolbar.setEnabled(True) | |
|
273 | self.actionStopToolbar.setEnabled(True) | |
|
274 | ||
|
288 | ||
|
289 | @pyqtSignature("") | |
|
290 | def on_actionPauseToolbar_triggered(self): | |
|
291 | ||
|
292 | self.pauseProject() | |
|
293 | ||
|
275 | 294 | @pyqtSignature("") |
|
276 | 295 | def on_actionStopToolbar_triggered(self): |
|
277 | 296 | """ |
|
278 | 297 | Slot documentation goes here. |
|
279 | 298 | """ |
|
280 | self.actionStarToolbar.setEnabled(True) | |
|
281 | self.actionPauseToolbar.setEnabled(False) | |
|
282 | self.actionStopToolbar.setEnabled(False) | |
|
283 | 299 | self.stopProject() |
|
284 | 300 | |
|
285 | 301 | @pyqtSignature("int") |
|
286 | 302 | def on_proComReadMode_activated(self, index): |
|
287 | 303 | """ |
|
288 | 304 | SELECCION DEL MODO DE LECTURA ON=1, OFF=0 |
|
289 | 305 | """ |
|
290 | 306 | if index == 0: |
|
291 | 307 | self.online = 0 |
|
292 | 308 | self.proDelay.setText("0") |
|
293 | 309 | self.proSet.setText("0") |
|
294 | 310 | self.proSet.setEnabled(False) |
|
295 | 311 | self.proDelay.setEnabled(False) |
|
296 | 312 | elif index == 1: |
|
297 | 313 | self.online = 1 |
|
298 | 314 | self.proSet.setText(" ") |
|
299 | 315 | self.proDelay.setText("5") |
|
300 | 316 | self.proSet.setEnabled(True) |
|
301 | 317 | self.proDelay.setEnabled(True) |
|
302 | 318 | |
|
303 | 319 | @pyqtSignature("int") |
|
304 | 320 | def on_proComDataType_activated(self, index): |
|
305 | 321 | """ |
|
306 | 322 | Voltage or Spectra |
|
307 | 323 | """ |
|
308 | 324 | if index == 0: |
|
309 | 325 | self.datatype = '.r' |
|
310 | 326 | elif index == 1: |
|
311 | 327 | self.datatype = '.pdata' |
|
312 | 328 | elif index == 2: |
|
313 | 329 | self.datatype = '.fits' |
|
314 | 330 | |
|
315 | 331 | self.proDataType.setText(self.datatype) |
|
316 | 332 | self.console.clear() |
|
317 | 333 | |
|
318 | 334 | @pyqtSignature("int") |
|
319 | 335 | def on_proComWalk_activated(self, index): |
|
320 | 336 | """ |
|
321 | 337 | |
|
322 | 338 | """ |
|
323 | 339 | if index == 0: |
|
324 | 340 | self.walk = 0 |
|
325 | 341 | elif index == 1: |
|
326 | 342 | self.walk = 1 |
|
327 | 343 | |
|
328 | 344 | @pyqtSignature("") |
|
329 | 345 | def on_proToolPath_clicked(self): |
|
330 | 346 | """ |
|
331 | 347 | Choose your path |
|
332 | 348 | """ |
|
333 | 349 | self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
334 | 350 | self.proDataPath.setText(self.dataPath) |
|
335 | 351 | |
|
336 | 352 | self.proComStartDate.clear() |
|
337 | 353 | self.proComEndDate.clear() |
|
338 | 354 | |
|
339 | 355 | if not os.path.exists(self.dataPath): |
|
340 | 356 | self.proOk.setEnabled(False) |
|
341 | 357 | self.console.clear() |
|
342 | 358 | self.console.append("Write a correct a path") |
|
343 | 359 | return |
|
344 | 360 | self.console.clear() |
|
345 | 361 | self.console.append("Select the read mode") |
|
346 | 362 | |
|
347 | 363 | |
|
348 | 364 | @pyqtSignature("") |
|
349 | 365 | def on_proLoadButton_clicked(self): |
|
350 | 366 | self.console.clear() |
|
351 | 367 | parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk , set = self.checkInputsProject() |
|
352 | 368 | if read_mode == "Offline": |
|
353 | 369 | if parms_ok: |
|
354 | 370 | self.proComStartDate.clear() |
|
355 | 371 | self.proComEndDate.clear() |
|
356 | 372 | self.loadDays(data_path, ext, walk) |
|
357 | 373 | self.proComStartDate.setEnabled(True) |
|
358 | 374 | self.proComEndDate.setEnabled(True) |
|
359 | 375 | self.proStartTime.setEnabled(True) |
|
360 | 376 | self.proEndTime.setEnabled(True) |
|
361 | 377 | self.frame_2.setEnabled(True) |
|
362 | 378 | return |
|
363 | 379 | if read_mode == "Online": |
|
364 | 380 | if parms_ok: |
|
365 | 381 | self.proComStartDate.addItem("2010/01/30") |
|
366 | 382 | self.proComEndDate.addItem("2013/12/30") |
|
367 | 383 | self.loadDays(data_path, ext, walk) |
|
368 | 384 | self.proComStartDate.setEnabled(False) |
|
369 | 385 | self.proComEndDate.setEnabled(False) |
|
370 | 386 | self.proStartTime.setEnabled(False) |
|
371 | 387 | self.proEndTime.setEnabled(False) |
|
372 | 388 | self.frame_2.setEnabled(True) |
|
373 | 389 | |
|
374 | 390 | @pyqtSignature("int") |
|
375 | 391 | def on_proComStartDate_activated(self, index): |
|
376 | 392 | """ |
|
377 | 393 | SELECCION DEL RANGO DE FECHAS -START DATE |
|
378 | 394 | """ |
|
379 | 395 | stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() |
|
380 | 396 | self.proComEndDate.clear() |
|
381 | 397 | for i in self.dateList[index:]: |
|
382 | 398 | self.proComEndDate.addItem(i) |
|
383 | 399 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex) |
|
384 | 400 | |
|
385 | 401 | @pyqtSignature("int") |
|
386 | 402 | def on_proComEndDate_activated(self, index): |
|
387 | 403 | """ |
|
388 | 404 | SELECCION DEL RANGO DE FECHAS-END DATE |
|
389 | 405 | """ |
|
390 | 406 | startIndex = self.proComStartDate.currentIndex() |
|
391 | 407 | stopIndex = self.proComEndDate.count() - index |
|
392 | 408 | self.proComStartDate.clear() |
|
393 | 409 | for i in self.dateList[:len(self.dateList) - stopIndex + 1]: |
|
394 | 410 | self.proComStartDate.addItem(i) |
|
395 | 411 | self.proComStartDate.setCurrentIndex(startIndex) |
|
396 | 412 | |
|
397 | 413 | @pyqtSignature("") |
|
398 | 414 | def on_proOk_clicked(self): |
|
399 | 415 | """ |
|
400 | 416 | AΓ±ade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml. |
|
401 | 417 | Prepara la configuraciΓ³n del diΓ‘grama del Arbol del treeView numero 2 |
|
402 | 418 | """ |
|
403 | 419 | if self.create: |
|
404 | 420 | self.idProject += 1 |
|
405 | 421 | projectId = self.idProject |
|
406 | 422 | projectObjView = self.createProjectView(projectId) |
|
407 | 423 | readUnitObj = self.createReadUnitView(projectObjView) |
|
408 | 424 | self.addProject2ProjectExplorer(id=projectId, name=projectObjView.name) |
|
409 | 425 | else: |
|
410 | 426 | projectObjView = self.updateProjectView() |
|
411 | 427 | projectId = projectObjView.getId() |
|
412 | 428 | idReadUnit = projectObjView.getReadUnitId() |
|
413 | 429 | readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit) |
|
414 | 430 | |
|
415 | 431 | self.__itemTreeDict[projectId].setText(projectObjView.name) |
|
416 | 432 | # Project Properties |
|
417 | 433 | self.showProjectProperties(projectObjView) |
|
418 | 434 | # Disable tabProject after finish the creation |
|
419 | 435 | self.tabProject.setEnabled(True) |
|
420 | 436 | |
|
421 | 437 | @pyqtSignature("") |
|
422 | 438 | def on_proClear_clicked(self): |
|
423 | 439 | self.setInputsProject_View() |
|
424 | 440 | projectObj = self.getSelectedProjectObj() |
|
425 | 441 | |
|
426 | 442 | @pyqtSignature("int") |
|
427 | 443 | def on_volOpCebChannels_stateChanged(self, p0): |
|
428 | 444 | """ |
|
429 | 445 | Check Box habilita operaciones de SelecciοΏ½n de Canales |
|
430 | 446 | """ |
|
431 | 447 | if p0 == 2: |
|
432 | 448 | self.volOpComChannels.setEnabled(True) |
|
433 | 449 | self.volOpChannel.setEnabled(True) |
|
434 | 450 | |
|
435 | 451 | if p0 == 0: |
|
436 | 452 | self.volOpComChannels.setEnabled(False) |
|
437 | 453 | self.volOpChannel.setEnabled(False) |
|
438 | 454 | self.volOpChannel.clear() |
|
439 | 455 | |
|
440 | 456 | @pyqtSignature("int") |
|
441 | 457 | def on_volOpCebHeights_stateChanged(self, p0): |
|
442 | 458 | """ |
|
443 | 459 | Check Box habilita operaciones de SelecciοΏ½n de Alturas |
|
444 | 460 | """ |
|
445 | 461 | if p0 == 2: |
|
446 | 462 | self.volOpHeights.setEnabled(True) |
|
447 | 463 | self.volOpComHeights.setEnabled(True) |
|
448 | 464 | |
|
449 | 465 | if p0 == 0: |
|
450 | 466 | self.volOpHeights.setEnabled(False) |
|
451 | 467 | self.volOpHeights.clear() |
|
452 | 468 | self.volOpComHeights.setEnabled(False) |
|
453 | 469 | |
|
454 | 470 | @pyqtSignature("int") |
|
455 | 471 | def on_volOpCebFilter_stateChanged(self, p0): |
|
456 | 472 | """ |
|
457 | 473 | Name='Decoder', optype='other' |
|
458 | 474 | """ |
|
459 | 475 | if p0 == 2: |
|
460 | 476 | self.volOpFilter.setEnabled(True) |
|
461 | 477 | |
|
462 | 478 | if p0 == 0: |
|
463 | 479 | self.volOpFilter.setEnabled(False) |
|
464 | 480 | self.volOpFilter.clear() |
|
465 | 481 | |
|
466 | 482 | @pyqtSignature("int") |
|
467 | 483 | def on_volOpCebProfile_stateChanged(self, p0): |
|
468 | 484 | """ |
|
469 | 485 | Check Box habilita ingreso del rango de Perfiles |
|
470 | 486 | """ |
|
471 | 487 | if p0 == 2: |
|
472 | 488 | self.volOpComProfile.setEnabled(True) |
|
473 | 489 | self.volOpProfile.setEnabled(True) |
|
474 | 490 | |
|
475 | 491 | if p0 == 0: |
|
476 | 492 | self.volOpComProfile.setEnabled(False) |
|
477 | 493 | self.volOpProfile.setEnabled(False) |
|
478 | 494 | self.volOpProfile.clear() |
|
479 | 495 | |
|
480 | 496 | @pyqtSignature("int") |
|
481 | 497 | def on_volOpCebDecodification_stateChanged(self, p0): |
|
482 | 498 | """ |
|
483 | 499 | Check Box habilita |
|
484 | 500 | """ |
|
485 | 501 | if p0 == 2: |
|
486 | 502 | self.volOpComCode.setEnabled(True) |
|
487 | 503 | self.volOpComMode.setEnabled(True) |
|
488 | 504 | if p0 == 0: |
|
489 | 505 | self.volOpComCode.setEnabled(False) |
|
490 | 506 | self.volOpComMode.setEnabled(False) |
|
491 | 507 | |
|
492 | 508 | @pyqtSignature("int") |
|
493 | 509 | def on_volOpCebCohInt_stateChanged(self, p0): |
|
494 | 510 | """ |
|
495 | 511 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
496 | 512 | """ |
|
497 | 513 | if p0 == 2: |
|
498 | 514 | self.volOpCohInt.setEnabled(True) |
|
499 | 515 | if p0 == 0: |
|
500 | 516 | self.volOpCohInt.setEnabled(False) |
|
501 | 517 | self.volOpCohInt.clear() |
|
502 | 518 | |
|
503 | 519 | @pyqtSignature("int") |
|
504 | 520 | def on_volOpCebRadarfrequency_stateChanged(self, p0): |
|
505 | 521 | """ |
|
506 | 522 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
507 | 523 | """ |
|
508 | 524 | if p0 == 2: |
|
509 | 525 | self.volOpRadarfrequency.setEnabled(True) |
|
510 | 526 | if p0 == 0: |
|
511 | 527 | self.volOpRadarfrequency.clear() |
|
512 | 528 | self.volOpRadarfrequency.setEnabled(False) |
|
513 | 529 | |
|
514 | 530 | @pyqtSignature("") |
|
515 | 531 | def on_volOutputToolPath_clicked(self): |
|
516 | 532 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
517 | 533 | self.volOutputPath.setText(dirOutPath) |
|
518 | 534 | |
|
519 | 535 | @pyqtSignature("") |
|
520 | 536 | def on_specOutputToolPath_clicked(self): |
|
521 | 537 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
522 | 538 | self.specOutputPath.setText(dirOutPath) |
|
523 | 539 | |
|
524 | 540 | @pyqtSignature("") |
|
525 | 541 | def on_specHeisOutputToolPath_clicked(self): |
|
526 | 542 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
527 | 543 | self.specHeisOutputPath.setText(dirOutPath) |
|
528 | 544 | |
|
529 | 545 | @pyqtSignature("") |
|
530 | 546 | def on_specHeisOutputMetadaToolPath_clicked(self): |
|
531 | 547 | home = expanduser("~") |
|
532 | 548 | self.dir = os.path.join(home, 'schain_workspace') |
|
533 | 549 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.dir, self.tr("Text Files (*.xml)"))) |
|
534 | 550 | self.specHeisOutputMetada.setText(filename) |
|
535 | 551 | |
|
536 | 552 | @pyqtSignature("") |
|
537 | 553 | def on_volOpOk_clicked(self): |
|
538 | 554 | """ |
|
539 | 555 | BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO |
|
540 | 556 | PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML |
|
541 | 557 | """ |
|
558 | ||
|
559 | checkPath = False | |
|
560 | ||
|
561 | self.actionSaveToolbar.setEnabled(False) | |
|
562 | self.actionStarToolbar.setEnabled(False) | |
|
563 | ||
|
542 | 564 | puObj = self.getSelectedPUObj() |
|
543 | 565 | puObj.removeOperations() |
|
544 | 566 | |
|
545 | 567 | if self.volOpCebRadarfrequency.isChecked(): |
|
546 | 568 | value = self.volOpRadarfrequency.text() |
|
547 | 569 | format = 'float' |
|
548 | 570 | name_operation = 'setRadarFrequency' |
|
549 | 571 | name_parameter = 'frequency' |
|
550 | 572 | if not value == "": |
|
551 | 573 | try: |
|
552 | 574 | radarfreq = float(self.volOpRadarfrequency.text()) |
|
553 | 575 | except: |
|
554 | 576 | self.console.clear() |
|
555 | 577 | self.console.append("Write the parameter Radar Frequency type float") |
|
556 | 578 | return 0 |
|
557 | 579 | opObj = puObj.addOperation(name=name_operation) |
|
558 | 580 | opObj.addParameter(name=name_parameter, value=radarfreq, format=format) |
|
559 | 581 | |
|
560 | 582 | |
|
561 | 583 | |
|
562 | 584 | if self.volOpCebChannels.isChecked(): |
|
563 | 585 | value = self.volOpChannel.text() |
|
564 | 586 | format = 'intlist' |
|
565 | 587 | if self.volOpComChannels.currentIndex() == 0: |
|
566 | 588 | name_operation = "selectChannels" |
|
567 | 589 | name_parameter = 'channelList' |
|
568 | 590 | else: |
|
569 | 591 | name_operation = "selectChannelsByIndex" |
|
570 | 592 | name_parameter = 'channelIndexList' |
|
571 | 593 | |
|
572 | 594 | opObj = puObj.addOperation(name=name_operation) |
|
573 | 595 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
574 | 596 | |
|
575 | 597 | if self.volOpCebHeights.isChecked(): |
|
576 | 598 | value = self.volOpHeights.text() |
|
577 | 599 | valueList = value.split(',') |
|
578 | 600 | format = 'float' |
|
579 | 601 | if self.volOpComHeights.currentIndex() == 0: |
|
580 | 602 | name_operation = 'selectHeights' |
|
581 | 603 | name_parameter1 = 'minHei' |
|
582 | 604 | name_parameter2 = 'maxHei' |
|
583 | 605 | else: |
|
584 | 606 | name_operation = 'selectHeightsByIndex' |
|
585 | 607 | name_parameter1 = 'minIndex' |
|
586 | 608 | name_parameter2 = 'maxIndex' |
|
587 | 609 | opObj = puObj.addOperation(name=name_operation) |
|
588 | 610 | opObj.addParameter(name=name_parameter1, value=valueList[0], format=format) |
|
589 | 611 | opObj.addParameter(name=name_parameter2, value=valueList[1], format=format) |
|
590 | 612 | |
|
591 | 613 | if self.volOpCebFilter.isChecked(): |
|
592 | 614 | value = self.volOpFilter.text() |
|
593 | 615 | format = 'int' |
|
594 | 616 | name_operation = 'filterByHeights' |
|
595 | 617 | name_parameter = 'window' |
|
596 | 618 | opObj = puObj.addOperation(name=name_operation) |
|
597 | 619 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
598 | 620 | |
|
599 | 621 | if self.volOpCebProfile.isChecked(): |
|
600 | 622 | value = self.volOpProfile.text() |
|
601 | 623 | format = 'intlist' |
|
602 | 624 | optype = 'other' |
|
603 | 625 | name_operation = 'ProfileSelector' |
|
604 | 626 | if self.volOpComProfile.currentIndex() == 0: |
|
605 | 627 | name_parameter = 'profileList' |
|
606 | 628 | else: |
|
607 | 629 | name_parameter = 'profileRangeList' |
|
608 | 630 | opObj = puObj.addOperation(name='ProfileSelector', optype='other') |
|
609 | 631 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
610 | 632 | |
|
611 | 633 | if self.volOpCebDecodification.isChecked(): |
|
612 | 634 | name_operation = 'Decoder' |
|
613 | 635 | optype = 'other' |
|
614 | 636 | format1 = 'floatlist' |
|
615 | 637 | format2 = 'int' |
|
616 | 638 | format3 = 'int' |
|
617 | 639 | format4 = 'int' |
|
618 | 640 | name_parameter1 = 'code' |
|
619 | 641 | name_parameter2 = 'nCode' |
|
620 | 642 | name_parameter3 = 'nBaud' |
|
621 | 643 | name_parameter4 = 'mode' |
|
622 | 644 | |
|
623 | 645 | if self.volOpComCode.currentIndex() == 0: |
|
624 | 646 | value1 = '1,1,-1' |
|
625 | 647 | value2 = '1' |
|
626 | 648 | value3 = '3' |
|
627 | 649 | if self.volOpComCode.currentIndex() == 1: |
|
628 | 650 | value1 = '1,1,-1,1' |
|
629 | 651 | value2 = '1' |
|
630 | 652 | value3 = '4' |
|
631 | 653 | if self.volOpComCode.currentIndex() == 2: |
|
632 | 654 | value1 = '1,1,1,β1,1' |
|
633 | 655 | value2 = '1' |
|
634 | 656 | value3 = '5' |
|
635 | 657 | if self.volOpComCode.currentIndex() == 3: |
|
636 | 658 | value1 = '1,1,1,-1,-1,1,-1' |
|
637 | 659 | value2 = '1' |
|
638 | 660 | value3 = '7' |
|
639 | 661 | if self.volOpComCode.currentIndex() == 4: |
|
640 | 662 | value1 = '1,1,1,-1,-1,-1,1,-1,-1,1,-1' |
|
641 | 663 | value2 = '1' |
|
642 | 664 | value3 = '11' |
|
643 | 665 | if self.volOpComCode.currentIndex() == 5: |
|
644 | 666 | value1 = '1,1,1,1,1,-1,-1,1,1,-1,1,-1,1' |
|
645 | 667 | value2 = '1' |
|
646 | 668 | value3 = '13' |
|
647 | 669 | if self.volOpComCode.currentIndex() == 6: |
|
648 | 670 | value1 = '1,1,-1,-1,-1,1' |
|
649 | 671 | value2 = '2' |
|
650 | 672 | value3 = '3' |
|
651 | 673 | if self.volOpComCode.currentIndex() == 7: |
|
652 | 674 | value1 = '1,1,-1,1,-1,-1,1,-1' |
|
653 | 675 | value2 = '2' |
|
654 | 676 | value3 = '4' |
|
655 | 677 | if self.volOpComCode.currentIndex() == 8: |
|
656 | 678 | value1 = '1,1,1,-1,1,-1,-1,-1,1,-1' |
|
657 | 679 | value2 = '2' |
|
658 | 680 | value3 = '5' |
|
659 | 681 | if self.volOpComCode.currentIndex() == 9: |
|
660 | 682 | value1 = '1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1' |
|
661 | 683 | value2 = '2' |
|
662 | 684 | value3 = '7' |
|
663 | 685 | if self.volOpComCode.currentIndex() == 10: |
|
664 | 686 | value1 = '1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1 ,-1 ,-1 ,1 ,1,1,-1 ,1 ,1 ,-1 ,1' |
|
665 | 687 | value2 = '2' |
|
666 | 688 | value3 = '11' |
|
667 | 689 | if self.volOpComCode.currentIndex() == 11: |
|
668 | 690 | value1 = '1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1' |
|
669 | 691 | value2 = '2' |
|
670 | 692 | value3 = '13' |
|
671 | 693 | if self.volOpComMode.currentIndex() == 0: |
|
672 | 694 | value4 = '0' |
|
673 | 695 | if self.volOpComMode.currentIndex() == 1: |
|
674 | 696 | value4 = '1' |
|
675 | 697 | if self.volOpComMode.currentIndex() == 2: |
|
676 | 698 | value4 = '2' |
|
677 | 699 | opObj = puObj.addOperation(name=name_operation, optype='other') |
|
678 | 700 | if self.volOpComCode.currentIndex() == 12: |
|
679 | 701 | pass |
|
680 | 702 | else: |
|
681 | 703 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
682 | 704 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
683 | 705 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) |
|
684 | 706 | opObj.addParameter(name=name_parameter4, value=value4, format=format4) |
|
685 | ||
|
707 | ||
|
708 | if self.volOpCebFlip.isChecked(): | |
|
709 | name_operation = 'deFlip' | |
|
710 | optype = 'self' | |
|
711 | value = self.volOpFlip.text() | |
|
712 | name_parameter = 'channelList' | |
|
713 | format = 'intList' | |
|
714 | ||
|
715 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
|
716 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
717 | ||
|
686 | 718 | if self.volOpCebCohInt.isChecked(): |
|
687 | 719 | name_operation = 'CohInt' |
|
688 | 720 | optype = 'other' |
|
689 | 721 | value = self.volOpCohInt.text() |
|
690 | 722 | name_parameter = 'n' |
|
691 | 723 | format = 'float' |
|
692 | 724 | |
|
693 |
opObj = puObj.addOperation(name= |
|
|
725 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
|
694 | 726 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
695 | 727 | |
|
696 | 728 | if self.volGraphCebshow.isChecked(): |
|
697 |
name_operation = ' |
|
|
729 | name_operation = 'Scope' | |
|
698 | 730 | optype = 'other' |
|
699 | 731 | name_parameter = 'type' |
|
700 | 732 | value = 'Scope' |
|
701 | 733 | if self.idImagscope == 0: |
|
702 | 734 | self.idImagscope = 100 |
|
703 | 735 | else: |
|
704 | 736 | self.idImagscope = self.idImagscope + 1 |
|
705 | 737 | |
|
706 | 738 | name_parameter1 = 'id' |
|
707 | 739 | value1 = int(self.idImagscope) |
|
708 | 740 | format1 = 'int' |
|
709 | 741 | format = 'str' |
|
710 | 742 | |
|
711 | 743 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
712 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
744 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
713 | 745 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
714 | 746 | |
|
715 | 747 | channelList = self.volGraphChannelList.text() |
|
716 | 748 | xvalue = self.volGraphfreqrange.text() |
|
717 | 749 | yvalue = self.volGraphHeightrange.text() |
|
718 | 750 | |
|
719 | 751 | if self.volGraphChannelList.isModified(): |
|
720 | 752 | try: |
|
721 | 753 | value = str(channelList) |
|
722 | 754 | except: |
|
723 | 755 | return 0 |
|
724 | 756 | opObj.addParameter(name='channelList', value=value, format='intlist') |
|
725 | 757 | |
|
726 | 758 | if not xvalue == "": |
|
727 | 759 | xvalueList = xvalue.split(',') |
|
728 | 760 | try: |
|
729 | 761 | value0 = int(xvalueList[0]) |
|
730 | 762 | value1 = int(xvalueList[1]) |
|
731 | 763 | except: |
|
732 | 764 | return 0 |
|
733 | 765 | opObj.addParameter(name='xmin', value=value0, format='int') |
|
734 | 766 | opObj.addParameter(name='xmax', value=value1, format='int') |
|
735 | 767 | |
|
736 | 768 | |
|
737 | 769 | if not yvalue == "": |
|
738 | 770 | yvalueList = yvalue.split(",") |
|
739 | 771 | try: |
|
740 | 772 | value = yvalueList[0] |
|
741 | 773 | value = yvalueList[1] |
|
742 | 774 | except: |
|
743 | 775 | return 0 |
|
744 | 776 | opObj.addParameter(name='ymin', value=yvalueList[0], format='int') |
|
745 | 777 | opObj.addParameter(name='ymax', value=yvalueList[1], format='int') |
|
746 | 778 | |
|
747 | 779 | if self.volGraphCebSave.isChecked(): |
|
780 | checkPath = True | |
|
748 | 781 | opObj.addParameter(name='save', value='1', format='int') |
|
749 | 782 | opObj.addParameter(name='figpath', value=self.volGraphPath.text(), format='str') |
|
750 | 783 | value = self.volGraphPrefix.text() |
|
751 | 784 | if not value == "": |
|
752 | 785 | try: |
|
753 | 786 | value = str(self.volGraphPrefix.text()) |
|
754 | 787 | except: |
|
755 | 788 | self.console.clear() |
|
756 | 789 | self.console.append("Please Write prefix") |
|
757 | 790 | return 0 |
|
758 | 791 | opObj.addParameter(name='figfile', value=self.volGraphPrefix.text(), format='str') |
|
759 | ||
|
792 | ||
|
793 | localfolder = None | |
|
794 | if checkPath: | |
|
795 | localfolder = str(self.specGraphPath.text()) | |
|
796 | if localfolder == '': | |
|
797 | self.console.clear() | |
|
798 | self.console.append("Graphic path should be defined") | |
|
799 | return 0 | |
|
800 | ||
|
760 | 801 | # if something happend |
|
761 | 802 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage') |
|
762 | name_operation = 'VoltageWriter' | |
|
763 | optype = 'other' | |
|
764 | name_parameter1 = 'path' | |
|
765 | name_parameter2 = 'blocksPerFile' | |
|
766 | name_parameter3 = 'profilesPerBlock' | |
|
767 | value1 = output_path | |
|
768 | value2 = blocksperfile | |
|
769 | value3 = profilesperblock | |
|
770 | format = "int" | |
|
771 | 803 | if parms_ok: |
|
804 | name_operation = 'VoltageWriter' | |
|
805 | optype = 'other' | |
|
806 | name_parameter1 = 'path' | |
|
807 | name_parameter2 = 'blocksPerFile' | |
|
808 | name_parameter3 = 'profilesPerBlock' | |
|
809 | value1 = output_path | |
|
810 | value2 = blocksperfile | |
|
811 | value3 = profilesperblock | |
|
812 | format = "int" | |
|
772 | 813 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
773 | 814 | opObj.addParameter(name=name_parameter1, value=value1) |
|
774 | 815 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
775 | 816 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
776 | ||
|
777 | ||
|
778 | 817 | |
|
779 | 818 | #---------NEW VOLTAGE PROPERTIES |
|
780 | 819 | self.showPUVoltageProperties(puObj) |
|
781 | ||
|
782 | 820 | |
|
783 | 821 | self.console.clear() |
|
784 | 822 | self.console.append("If you want to save your project") |
|
785 | 823 | self.console.append("click on your project name in the Tree Project Explorer") |
|
786 |
|
|
|
787 | ||
|
824 | ||
|
825 | self.actionSaveToolbar.setEnabled(True) | |
|
826 | self.actionStarToolbar.setEnabled(True) | |
|
827 | ||
|
828 | return 1 | |
|
829 | ||
|
788 | 830 | """ |
|
789 | 831 | Voltage Graph |
|
790 | 832 | """ |
|
791 | 833 | @pyqtSignature("int") |
|
792 | 834 | def on_volGraphCebSave_stateChanged(self, p0): |
|
793 | 835 | """ |
|
794 | 836 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
795 | 837 | """ |
|
796 | 838 | if p0 == 2: |
|
797 | 839 | self.volGraphPath.setEnabled(True) |
|
798 | 840 | self.volGraphPrefix.setEnabled(True) |
|
799 | 841 | self.volGraphToolPath.setEnabled(True) |
|
800 | 842 | |
|
801 | 843 | if p0 == 0: |
|
802 | 844 | self.volGraphPath.setEnabled(False) |
|
803 | 845 | self.volGraphPrefix.setEnabled(False) |
|
804 | 846 | self.volGraphToolPath.setEnabled(False) |
|
805 | 847 | |
|
806 | 848 | @pyqtSignature("") |
|
807 | 849 | def on_volGraphToolPath_clicked(self): |
|
808 | 850 | """ |
|
809 | 851 | Donde se guardan los DATOS |
|
810 | 852 | """ |
|
811 | 853 | self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
812 | 854 | self.volGraphPath.setText(self.dataPath) |
|
813 | 855 | |
|
814 | 856 | # if not os.path.exists(self.dataPath): |
|
815 | 857 | # self.volGraphOk.setEnabled(False) |
|
816 | 858 | # return |
|
817 | 859 | |
|
818 | 860 | @pyqtSignature("int") |
|
819 | 861 | def on_volGraphCebshow_stateChanged(self, p0): |
|
820 | 862 | """ |
|
821 | 863 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
822 | 864 | """ |
|
823 | 865 | if p0 == 0: |
|
824 | 866 | |
|
825 | 867 | self.volGraphChannelList.setEnabled(False) |
|
826 | 868 | self.volGraphfreqrange.setEnabled(False) |
|
827 | 869 | self.volGraphHeightrange.setEnabled(False) |
|
828 | 870 | if p0 == 2: |
|
829 | 871 | |
|
830 | 872 | self.volGraphChannelList.setEnabled(True) |
|
831 | 873 | self.volGraphfreqrange.setEnabled(True) |
|
832 | 874 | self.volGraphHeightrange.setEnabled(True) |
|
833 | 875 | |
|
834 | 876 | """ |
|
835 | 877 | Spectra operation |
|
836 | 878 | """ |
|
837 | 879 | @pyqtSignature("int") |
|
838 | 880 | def on_specOpCebRadarfrequency_stateChanged(self, p0): |
|
839 | 881 | """ |
|
840 | 882 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
841 | 883 | """ |
|
842 | 884 | if p0 == 2: |
|
843 | 885 | self.specOpRadarfrequency.setEnabled(True) |
|
844 | 886 | if p0 == 0: |
|
845 | 887 | self.specOpRadarfrequency.clear() |
|
846 | 888 | self.specOpRadarfrequency.setEnabled(False) |
|
847 | 889 | |
|
848 | 890 | |
|
849 | 891 | @pyqtSignature("int") |
|
850 | 892 | def on_specOpCebCrossSpectra_stateChanged(self, p0): |
|
851 | 893 | """ |
|
852 | 894 | Habilita la opcion de aοΏ½adir el parοΏ½metro CrossSpectra a la Unidad de Procesamiento . |
|
853 | 895 | """ |
|
854 | 896 | if p0 == 2: |
|
855 | 897 | # self.specOpnFFTpoints.setEnabled(True) |
|
856 | 898 | self.specOppairsList.setEnabled(True) |
|
857 | 899 | if p0 == 0: |
|
858 | 900 | # self.specOpnFFTpoints.setEnabled(False) |
|
859 | 901 | self.specOppairsList.setEnabled(False) |
|
860 | 902 | |
|
861 | 903 | @pyqtSignature("int") |
|
862 | 904 | def on_specOpCebChannel_stateChanged(self, p0): |
|
863 | 905 | """ |
|
864 | 906 | Habilita la opcion de aοΏ½adir el parοΏ½metro numero de Canales a la Unidad de Procesamiento . |
|
865 | 907 | """ |
|
866 | 908 | if p0 == 2: |
|
867 | 909 | self.specOpChannel.setEnabled(True) |
|
868 | 910 | self.specOpComChannel.setEnabled(True) |
|
869 | 911 | if p0 == 0: |
|
870 | 912 | self.specOpChannel.setEnabled(False) |
|
871 | 913 | self.specOpComChannel.setEnabled(False) |
|
872 | 914 | |
|
873 | 915 | @pyqtSignature("int") |
|
874 | 916 | def on_specOpCebHeights_stateChanged(self, p0): |
|
875 | 917 | """ |
|
876 | 918 | Habilita la opcion de aοΏ½adir el parοΏ½metro de alturas a la Unidad de Procesamiento . |
|
877 | 919 | """ |
|
878 | 920 | if p0 == 2: |
|
879 | 921 | self.specOpComHeights.setEnabled(True) |
|
880 | 922 | self.specOpHeights.setEnabled(True) |
|
881 | 923 | if p0 == 0: |
|
882 | 924 | self.specOpComHeights.setEnabled(False) |
|
883 | 925 | self.specOpHeights.setEnabled(False) |
|
884 | 926 | |
|
885 | 927 | |
|
886 | 928 | @pyqtSignature("int") |
|
887 | 929 | def on_specOpCebIncoherent_stateChanged(self, p0): |
|
888 | 930 | """ |
|
889 | 931 | Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento . |
|
890 | 932 | """ |
|
891 | 933 | if p0 == 2: |
|
892 | 934 | self.specOpIncoherent.setEnabled(True) |
|
893 | 935 | if p0 == 0: |
|
894 | 936 | self.specOpIncoherent.setEnabled(False) |
|
895 | 937 | |
|
896 | 938 | @pyqtSignature("int") |
|
897 | 939 | def on_specOpCebRemoveDC_stateChanged(self, p0): |
|
898 | 940 | """ |
|
899 | 941 | Habilita la opcion de aοΏ½adir el parοΏ½metro remover DC a la Unidad de Procesamiento . |
|
900 | 942 | """ |
|
901 | 943 | if p0 == 2: |
|
902 | 944 | self.specOpComRemoveDC.setEnabled(True) |
|
903 | 945 | if p0 == 0: |
|
904 | 946 | self.specOpComRemoveDC.setEnabled(False) |
|
905 | 947 | |
|
906 | 948 | @pyqtSignature("int") |
|
907 | 949 | def on_specOpCebgetNoise_stateChanged(self, p0): |
|
908 | 950 | """ |
|
909 | 951 | Habilita la opcion de aοΏ½adir la estimacion de ruido a la Unidad de Procesamiento . |
|
910 | 952 | """ |
|
911 | 953 | if p0 == 2: |
|
912 | 954 | self.specOpgetNoise.setEnabled(True) |
|
913 | 955 | |
|
914 | 956 | if p0 == 0: |
|
915 | 957 | self.specOpgetNoise.setEnabled(False) |
|
916 | 958 | |
|
917 | 959 | def refreshID(self, puObj): |
|
918 |
opObj = puObj.getOpObj |
|
|
960 | opObj = puObj.getOperationObj(name='Scope') | |
|
961 | # opObj = puObj.getOpObjfromParamValue(value="Scope") | |
|
919 | 962 | if opObj == None: |
|
920 | 963 | pass |
|
921 | 964 | else: |
|
922 | 965 | name_parameter1 = 'id' |
|
923 | 966 | format1 = 'int' |
|
924 | 967 | if self.idImagscope == 0: |
|
925 | 968 | self.idImagscope = 100 |
|
926 | 969 | else: |
|
927 | 970 | self.idImagscope = self.idImagscope + 1 |
|
928 | 971 | value1 = int(self.idImagscope) |
|
929 | 972 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
930 | 973 | |
|
931 |
opObj = puObj.getOpObj |
|
|
974 | opObj = puObj.getOperationObj(name='SpectraPlot') | |
|
975 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") | |
|
932 | 976 | if opObj == None: |
|
933 | 977 | pass |
|
934 | 978 | else: |
|
935 | 979 | name_parameter1 = 'id' |
|
936 | 980 | format1 = 'int' |
|
937 | 981 | if self.idImagspectra == 0: |
|
938 | 982 | self.idImagspectra = 200 |
|
939 | 983 | else: |
|
940 | 984 | self.idImagspectra = self.idImagspectra + 1 |
|
941 | 985 | value1 = int(self.idImagspectra) |
|
942 | 986 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
943 | 987 | |
|
944 | ||
|
945 | opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") | |
|
988 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') | |
|
989 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") | |
|
946 | 990 | if opObj == None: |
|
947 | 991 | pass |
|
948 | 992 | else: |
|
949 | 993 | name_parameter1 = 'id' |
|
950 | 994 | format1 = 'int' |
|
951 | 995 | if self.idImagcross == 0: |
|
952 | 996 | self.idImagcross = 300 |
|
953 | 997 | else: |
|
954 | 998 | self.idImagcross = self.idImagcross + 1 |
|
955 | 999 | value1 = int(self.idImagcross) |
|
956 | 1000 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
957 | ||
|
958 |
opObj = puObj.getOpObj |
|
|
1001 | ||
|
1002 | opObj = puObj.getOperationObj(name='RTIPlot') | |
|
1003 | # opObj = puObj.getOpObjfromParamValue(value="RTIPlot") | |
|
959 | 1004 | if opObj == None: |
|
960 | 1005 | pass |
|
961 | 1006 | else: |
|
962 | 1007 | name_parameter1 = 'id' |
|
963 | 1008 | format1 = 'int' |
|
964 | 1009 | if self.idImagrti == 0: |
|
965 | 1010 | self.idImagrti = 400 |
|
966 | 1011 | else: |
|
967 | 1012 | self.idImagrti = self.idImagrti + 1 |
|
968 | 1013 | value1 = int(self.idImagrti) |
|
969 | 1014 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
970 |
|
|
|
971 |
opObj = puObj.getOpObj |
|
|
1015 | ||
|
1016 | opObj = puObj.getOperationObj(name='CoherenceMap') | |
|
1017 | # opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") | |
|
972 | 1018 | if opObj == None: |
|
973 | 1019 | pass |
|
974 | 1020 | else: |
|
975 | 1021 | name_parameter1 = 'id' |
|
976 | 1022 | format1 = 'int' |
|
977 | 1023 | if self.idImagcoherence == 0: |
|
978 | 1024 | self.idImagcoherence = 500 |
|
979 | 1025 | else: |
|
980 | 1026 | self.idImagcoherence = self.idImagcoherence + 1 |
|
981 | 1027 | value1 = int(self.idImagcoherence) |
|
982 | 1028 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
983 | 1029 | |
|
984 |
opObj = puObj.getOpObj |
|
|
1030 | opObj = puObj.getOperationObj(name='PowerProfilePlot') | |
|
1031 | # opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") | |
|
985 | 1032 | if opObj == None: |
|
986 | 1033 | pass |
|
987 | 1034 | else: |
|
988 | 1035 | name_parameter1 = 'id' |
|
989 | 1036 | format1 = 'int' |
|
990 | 1037 | if self.idImagpower == 0: |
|
991 | 1038 | self.idImagpower = 600 |
|
992 | 1039 | else: |
|
993 | 1040 | self.idImagpower = self.idImagpower + 1 |
|
994 | 1041 | value1 = int(self.idImagpower) |
|
995 | 1042 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
996 |
|
|
|
997 |
opObj = puObj.getOpObj |
|
|
1043 | ||
|
1044 | opObj = puObj.getOperationObj(name='Noise') | |
|
1045 | # opObj = puObj.getOpObjfromParamValue(value="Noise") | |
|
998 | 1046 | if opObj == None: |
|
999 | 1047 | pass |
|
1000 | 1048 | else: |
|
1001 | 1049 | name_parameter1 = 'id' |
|
1002 | 1050 | format1 = 'int' |
|
1003 | 1051 | if self.idImagrtinoise == 0: |
|
1004 | 1052 | self.idImagrtinoise = 700 |
|
1005 | 1053 | else: |
|
1006 | 1054 | self.idImagrtinoise = self.idImagrtinoise + 1 |
|
1007 | 1055 | value1 = int(self.idImagrtinoise) |
|
1008 | 1056 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
1009 |
|
|
|
1010 |
opObj = puObj.getOpObj |
|
|
1057 | ||
|
1058 | opObj = puObj.getOperationObj(name='SpectraHeisScope') | |
|
1059 | # opObj = puObj.getOpObjfromParamValue(value="SpectraHeisScope") | |
|
1011 | 1060 | if opObj == None: |
|
1012 | 1061 | pass |
|
1013 | 1062 | else: |
|
1014 | 1063 | name_parameter1 = 'id' |
|
1015 | 1064 | format1 = 'int' |
|
1016 | 1065 | if self.idImagspectraHeis == 0: |
|
1017 | 1066 | self.idImagspectraHeis = 800 |
|
1018 | 1067 | else: |
|
1019 | 1068 | self.idImagspectraHeis = self.idImagspectraHeis + 1 |
|
1020 | 1069 | value1 = int(self.idImagspectraHeis) |
|
1021 | 1070 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
1022 |
|
|
|
1023 |
opObj = puObj.getOpObj |
|
|
1071 | ||
|
1072 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') | |
|
1073 | # opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") | |
|
1024 | 1074 | if opObj == None: |
|
1025 | 1075 | pass |
|
1026 | 1076 | else: |
|
1027 | 1077 | name_parameter1 = 'id' |
|
1028 | 1078 | format1 = 'int' |
|
1029 | 1079 | if self.idImagrtiHeis == 0: |
|
1030 | 1080 | self.idImagrtiHeis = 900 |
|
1031 | 1081 | else: |
|
1032 | 1082 | self.idImagrtiHeis = self.idImagrtiHeis + 1 |
|
1033 | 1083 | value1 = int(self.idImagrtiHeis) |
|
1034 | 1084 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
1035 | 1085 | |
|
1036 | 1086 | @pyqtSignature("") |
|
1037 | 1087 | def on_specOpOk_clicked(self): |
|
1038 | 1088 | """ |
|
1039 | 1089 | AΓADE OPERACION SPECTRA |
|
1040 | 1090 | """ |
|
1091 | ||
|
1092 | addFTP = False | |
|
1093 | checkPath = False | |
|
1094 | ||
|
1095 | self.actionSaveToolbar.setEnabled(False) | |
|
1096 | self.actionStarToolbar.setEnabled(False) | |
|
1097 | ||
|
1041 | 1098 | puObj = self.getSelectedPUObj() |
|
1042 | 1099 | puObj.removeOperations() |
|
1043 | 1100 | |
|
1044 | 1101 | if self.specOpCebRadarfrequency.isChecked(): |
|
1045 | 1102 | value = self.specOpRadarfrequency.text() |
|
1046 | 1103 | format = 'float' |
|
1047 | 1104 | name_operation = 'setRadarFrequency' |
|
1048 | 1105 | name_parameter = 'frequency' |
|
1049 | 1106 | if not value == "": |
|
1050 | 1107 | try: |
|
1051 | 1108 | radarfreq = float(self.specOpRadarfrequency.text()) |
|
1052 | 1109 | except: |
|
1053 | 1110 | self.console.clear() |
|
1054 | 1111 | self.console.append("Write the parameter Radar Frequency type float") |
|
1055 | 1112 | return 0 |
|
1056 | 1113 | opObj = puObj.addOperation(name=name_operation) |
|
1057 | 1114 | opObj.addParameter(name=name_parameter, value=radarfreq, format=format) |
|
1058 | 1115 | |
|
1059 | 1116 | |
|
1060 | 1117 | if self.proComDataType.currentText() == 'Voltage': |
|
1061 | 1118 | name_parameter = 'nFFTPoints' |
|
1062 | 1119 | value = self.specOpnFFTpoints.text() |
|
1063 | 1120 | name_parameter1 = 'nProfiles' |
|
1064 | 1121 | value1 = self.specOpProfiles.text() |
|
1065 | 1122 | name_parameter2 = 'ippFactor' |
|
1066 | 1123 | value2 = self.specOpippFactor.text() |
|
1067 | 1124 | format = 'int' |
|
1068 | 1125 | try: |
|
1069 | 1126 | value = int(self.specOpnFFTpoints.text()) |
|
1070 | 1127 | except: |
|
1071 | 1128 | self.console.clear() |
|
1072 | 1129 | self.console.append("Please Write the number of FFT") |
|
1073 | 1130 | return 0 |
|
1074 | 1131 | puObj.addParameter(name=name_parameter, value=value, format=format) |
|
1075 | 1132 | if not value1 == "": |
|
1076 | 1133 | try: |
|
1077 | 1134 | value1 = int(self.specOpProfiles.text()) |
|
1078 | 1135 | except: |
|
1079 | 1136 | self.console.clear() |
|
1080 | 1137 | self.console.append("Please Write the number of Profiles") |
|
1081 | 1138 | return 0 |
|
1082 | 1139 | puObj.addParameter(name=name_parameter1, value=value1, format=format) |
|
1083 | 1140 | if not value2 == "": |
|
1084 | 1141 | try: |
|
1085 | 1142 | value2 = int(self.specOpippFactor.text()) |
|
1086 | 1143 | except: |
|
1087 | 1144 | self.console.clear() |
|
1088 | 1145 | self.console.append("Please Write the Number of IppFactor") |
|
1089 | 1146 | puObj.addParameter(name=name_parameter2 , value=value2 , format=format) |
|
1090 | 1147 | |
|
1091 | 1148 | if self.specOpCebCrossSpectra.isChecked(): |
|
1092 | 1149 | name_parameter = 'pairsList' |
|
1093 | 1150 | format = 'pairslist' |
|
1094 | 1151 | value2 = self.specOppairsList.text() |
|
1095 | 1152 | puObj.addParameter(name=name_parameter, value=value2, format=format) |
|
1096 | 1153 | |
|
1097 | 1154 | if self.specOpCebHeights.isChecked(): |
|
1098 | 1155 | value = self.specOpHeights.text() |
|
1099 | 1156 | valueList = value.split(',') |
|
1100 | 1157 | format = 'float' |
|
1101 | 1158 | value0 = valueList[0] |
|
1102 | 1159 | value1 = valueList[1] |
|
1103 | 1160 | |
|
1104 | 1161 | if self.specOpComHeights.currentIndex() == 0: |
|
1105 | 1162 | name_operation = 'selectHeights' |
|
1106 | 1163 | name_parameter1 = 'minHei' |
|
1107 | 1164 | name_parameter2 = 'maxHei' |
|
1108 | 1165 | else: |
|
1109 | 1166 | name_operation = 'selectHeightsByIndex' |
|
1110 | 1167 | name_parameter1 = 'minIndex' |
|
1111 | 1168 | name_parameter2 = 'maxIndex' |
|
1112 | 1169 | opObj = puObj.addOperation(name=name_operation) |
|
1113 | 1170 | opObj.addParameter(name=name_parameter1, value=value0, format=format) |
|
1114 | 1171 | opObj.addParameter(name=name_parameter2, value=value1, format=format) |
|
1115 | 1172 | |
|
1116 | 1173 | if self.specOpCebChannel.isChecked(): |
|
1117 | 1174 | value = self.specOpChannel.text() |
|
1118 | 1175 | format = 'intlist' |
|
1119 | 1176 | if self.specOpComChannel.currentIndex() == 0: |
|
1120 | 1177 | name_operation = "selectChannels" |
|
1121 | 1178 | name_parameter = 'channelList' |
|
1122 | 1179 | else: |
|
1123 | 1180 | name_operation = "selectChannelsByIndex" |
|
1124 | 1181 | name_parameter = 'channelIndexList' |
|
1125 | 1182 | opObj = puObj.addOperation(name="selectChannels") |
|
1126 | 1183 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1127 | 1184 | |
|
1128 | 1185 | if self.specOpCebIncoherent.isChecked(): |
|
1129 | 1186 | value = self.specOpIncoherent.text() |
|
1130 | 1187 | name_operation = 'IncohInt' |
|
1131 | 1188 | optype = 'other' |
|
1132 | 1189 | if self.specOpCobIncInt.currentIndex() == 0: |
|
1133 | 1190 | name_parameter = 'timeInterval' |
|
1134 | 1191 | format = 'float' |
|
1135 | 1192 | else: |
|
1136 | 1193 | name_parameter = 'n' |
|
1137 | 1194 | format = 'float' |
|
1138 | 1195 | |
|
1139 | 1196 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1140 | 1197 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1141 | 1198 | |
|
1142 | 1199 | if self.specOpCebRemoveDC.isChecked(): |
|
1143 | 1200 | name_operation = 'removeDC' |
|
1144 | 1201 | name_parameter = 'mode' |
|
1145 | 1202 | format = 'int' |
|
1146 | 1203 | if self.specOpComRemoveDC.currentIndex() == 0: |
|
1147 | 1204 | value = 1 |
|
1148 | 1205 | else: |
|
1149 | 1206 | value = 2 |
|
1150 | 1207 | opObj = puObj.addOperation(name=name_operation) |
|
1151 | 1208 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1152 | 1209 | |
|
1153 | 1210 | if self.specOpCebRemoveInt.isChecked(): |
|
1154 | 1211 | name_operation = 'removeInterference' |
|
1155 | 1212 | opObj = puObj.addOperation(name=name_operation) |
|
1156 | 1213 | |
|
1157 | 1214 | |
|
1158 | 1215 | if self.specOpCebgetNoise.isChecked(): |
|
1159 | 1216 | value = self.specOpgetNoise.text() |
|
1160 | 1217 | valueList = value.split(',') |
|
1161 | 1218 | format = 'float' |
|
1162 | 1219 | name_operation = "getNoise" |
|
1163 | 1220 | opObj = puObj.addOperation(name=name_operation) |
|
1164 | 1221 | |
|
1165 | 1222 | if not value == '': |
|
1166 | 1223 | valueList = value.split(',') |
|
1167 | 1224 | length = len(valueList) |
|
1168 | 1225 | if length == 1: |
|
1169 | 1226 | try: |
|
1170 | 1227 | value1 = float(valueList[0]) |
|
1171 | 1228 | except: |
|
1172 | 1229 | self.console.clear() |
|
1173 | 1230 | self.console.append("Please Write correct parameter Get Noise") |
|
1174 | 1231 | return 0 |
|
1175 | 1232 | name1 = 'minHei' |
|
1176 | 1233 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1177 | 1234 | elif length == 2: |
|
1178 | 1235 | try: |
|
1179 | 1236 | value1 = float(valueList[0]) |
|
1180 | 1237 | value2 = float(valueList[1]) |
|
1181 | 1238 | except: |
|
1182 | 1239 | self.console.clear() |
|
1183 | 1240 | self.console.append("Please Write corrects parameter Get Noise") |
|
1184 | 1241 | return 0 |
|
1185 | 1242 | name1 = 'minHei' |
|
1186 | 1243 | name2 = 'maxHei' |
|
1187 | 1244 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1188 | 1245 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1189 | 1246 | |
|
1190 | 1247 | elif length == 3: |
|
1191 | 1248 | try: |
|
1192 | 1249 | value1 = float(valueList[0]) |
|
1193 | 1250 | value2 = float(valueList[1]) |
|
1194 | 1251 | value3 = float(valueList[2]) |
|
1195 | 1252 | except: |
|
1196 | 1253 | self.console.clear() |
|
1197 | 1254 | self.console.append("Please Write corrects parameter Get Noise") |
|
1198 | 1255 | return 0 |
|
1199 | 1256 | name1 = 'minHei' |
|
1200 | 1257 | name2 = 'maxHei' |
|
1201 | 1258 | name3 = 'minVel' |
|
1202 | 1259 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1203 | 1260 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1204 | 1261 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1205 | 1262 | |
|
1206 | 1263 | elif length == 4: |
|
1207 | 1264 | try: |
|
1208 | 1265 | value1 = float(valueList[0]) |
|
1209 | 1266 | value2 = float(valueList[1]) |
|
1210 | 1267 | value3 = float(valueList[2]) |
|
1211 | 1268 | value4 = float(valueList[3]) |
|
1212 | 1269 | except: |
|
1213 | 1270 | self.console.clear() |
|
1214 | 1271 | self.console.append("Please Write corrects parameter Get Noise") |
|
1215 | 1272 | return 0 |
|
1216 | 1273 | name1 = 'minHei' |
|
1217 | 1274 | name2 = 'maxHei' |
|
1218 | 1275 | name3 = 'minVel' |
|
1219 | 1276 | name4 = 'maxVel' |
|
1220 | 1277 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1221 | 1278 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1222 | 1279 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1223 | 1280 | opObj.addParameter(name=name4, value=value4, format=format) |
|
1224 | 1281 | |
|
1225 | 1282 | elif length > 4: |
|
1226 | 1283 | self.console.clear() |
|
1227 | 1284 | self.console.append("Get Noise Operation only accepts 4 parameters") |
|
1228 | 1285 | return 0 |
|
1229 | 1286 | |
|
1230 | 1287 | #-----Spectra Plot----- |
|
1231 | 1288 | if self.specGraphCebSpectraplot.isChecked(): |
|
1232 | name_operation = 'Plot' | |
|
1289 | name_operation = 'SpectraPlot' | |
|
1233 | 1290 | optype = 'other' |
|
1234 | 1291 | name_parameter = 'type' |
|
1235 | 1292 | value = 'SpectraPlot' |
|
1236 | 1293 | format = 'str' |
|
1237 | 1294 | if self.idImagspectra == 0: |
|
1238 | 1295 | self.idImagspectra = 200 |
|
1239 | 1296 | else: |
|
1240 | 1297 | self.idImagspectra = self.idImagspectra + 1 |
|
1241 | 1298 | name_parameter1 = 'id' |
|
1242 | 1299 | value1 = int(self.idImagspectra) |
|
1243 | 1300 | format1 = 'int' |
|
1244 | 1301 | |
|
1245 | 1302 | format = 'str' |
|
1246 | 1303 | |
|
1247 | 1304 | channelList = self.specGgraphChannelList.text() |
|
1248 | 1305 | xvalue = self.specGgraphFreq.text() |
|
1249 | 1306 | yvalue = self.specGgraphHeight.text() |
|
1250 | 1307 | zvalue = self.specGgraphDbsrange.text() |
|
1251 | 1308 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1252 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1309 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1253 | 1310 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
1254 | 1311 | |
|
1255 | 1312 | if not channelList == '': |
|
1256 | 1313 | name_parameter = 'channelList' |
|
1257 | 1314 | format = 'intlist' |
|
1258 | 1315 | opObj.addParameter(name=name_parameter, value=channelList, format=format) |
|
1259 | 1316 | |
|
1260 | 1317 | if not xvalue == '': |
|
1261 | 1318 | xvalueList = xvalue.split(',') |
|
1262 | 1319 | try: |
|
1263 | 1320 | value1 = float(xvalueList[0]) |
|
1264 | 1321 | value2 = float(xvalueList[1]) |
|
1265 | 1322 | except: |
|
1266 | 1323 | self.console.clear() |
|
1267 | 1324 | self.console.append("Please Write corrects parameter freq") |
|
1268 | 1325 | return 0 |
|
1269 | 1326 | name1 = 'xmin' |
|
1270 | 1327 | name2 = 'xmax' |
|
1271 | 1328 | format = 'float' |
|
1272 | 1329 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1273 | 1330 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1274 | 1331 | #------specGgraphHeight--- |
|
1275 | 1332 | if not yvalue == '': |
|
1276 | 1333 | yvalueList = yvalue.split(",") |
|
1277 | 1334 | try: |
|
1278 | 1335 | value1 = float(yvalueList[0]) |
|
1279 | 1336 | value2 = float(yvalueList[1]) |
|
1280 | 1337 | except: |
|
1281 | 1338 | self.console.clear() |
|
1282 | 1339 | self.console.append("Please Write corrects parameter Height") |
|
1283 | 1340 | return 0 |
|
1284 | 1341 | name1 = 'ymin' |
|
1285 | 1342 | name2 = 'ymax' |
|
1286 | 1343 | format = 'float' |
|
1287 | 1344 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1288 | 1345 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1289 | 1346 | |
|
1290 | 1347 | if not zvalue == '': |
|
1291 | 1348 | zvalueList = zvalue.split(",") |
|
1292 | 1349 | try: |
|
1293 | 1350 | value = float(zvalueList[0]) |
|
1294 | 1351 | value = float(zvalueList[1]) |
|
1295 | 1352 | except: |
|
1296 | 1353 | self.console.clear() |
|
1297 | 1354 | self.console.append("Please Write corrects parameter Dbsrange") |
|
1298 | 1355 | return 0 |
|
1299 | 1356 | format = 'float' |
|
1300 | 1357 | opObj.addParameter(name='zmin', value=zvalueList[0], format=format) |
|
1301 | 1358 | opObj.addParameter(name='zmax', value=zvalueList[1], format=format) |
|
1302 | 1359 | |
|
1303 | 1360 | if self.specGraphSaveSpectra.isChecked(): |
|
1361 | checkPath = True | |
|
1304 | 1362 | name_parameter1 = 'save' |
|
1305 | 1363 | name_parameter2 = 'figpath' |
|
1306 | 1364 | name_parameter3 = 'figfile' |
|
1307 | 1365 | value1 = '1' |
|
1308 | 1366 | value2 = self.specGraphPath.text() |
|
1309 | 1367 | value3 = self.specGraphPrefix.text() |
|
1310 | 1368 | format1 = 'bool' |
|
1311 | 1369 | format2 = 'str' |
|
1312 | 1370 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) |
|
1313 | 1371 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
1314 | if not value3 == "": | |
|
1315 | try: | |
|
1316 | value3 = str(self.specGraphPrefix.text()) | |
|
1317 | except: | |
|
1318 | self.console.clear() | |
|
1319 | self.console.append("Please Write prefix") | |
|
1320 | return 0 | |
|
1321 | opObj.addParameter(name='figfile', value=self.specGraphPrefix.text(), format='str') | |
|
1372 | opObj.addParameter(name=name_parameter3, value=value3, format=format2) | |
|
1322 | 1373 | |
|
1323 | # opObj.addParameter(name=name_parameter3, value=value3, format=format2) | |
|
1324 | 1374 | # opObj.addParameter(name='wr_period', value='5',format='int') |
|
1325 | 1375 | |
|
1326 | 1376 | if self.specGraphftpSpectra.isChecked(): |
|
1327 | 1377 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1328 |
self.addFTPConf |
|
|
1378 | self.addFTPConf2Operation(puObj, opObj) | |
|
1379 | addFTP = True | |
|
1329 | 1380 | |
|
1330 | 1381 | if self.specGraphCebCrossSpectraplot.isChecked(): |
|
1331 | name_operation = 'Plot' | |
|
1382 | name_operation = 'CrossSpectraPlot' | |
|
1332 | 1383 | optype = 'other' |
|
1333 | 1384 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1334 | opObj.addParameter(name='type', value="CrossSpectraPlot", format='str') | |
|
1385 | # opObj.addParameter(name='type', value="CrossSpectraPlot", format='str') | |
|
1335 | 1386 | opObj.addParameter(name='power_cmap', value='jet', format='str') |
|
1336 | 1387 | opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1337 | 1388 | opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1338 | 1389 | |
|
1339 | 1390 | if self.idImagcross == 0: |
|
1340 | 1391 | self.idImagcross = 300 |
|
1341 | 1392 | else: |
|
1342 | 1393 | self.idImagcross = self.idImagcross + 1 |
|
1343 | 1394 | value1 = int(self.idImagcross) |
|
1344 | 1395 | channelList = self.specGgraphChannelList.text() |
|
1345 | 1396 | xvalue = self.specGgraphFreq.text() |
|
1346 | 1397 | yvalue = self.specGgraphHeight.text() |
|
1347 | 1398 | zvalue = self.specGgraphDbsrange.text() |
|
1348 | 1399 | |
|
1349 | 1400 | opObj.addParameter(name='id', value=value1, format='int') |
|
1350 | 1401 | |
|
1351 | 1402 | if self.specGgraphChannelList.isModified(): |
|
1352 | 1403 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1353 | 1404 | |
|
1354 | 1405 | if not xvalue == '': |
|
1355 | 1406 | xvalueList = xvalue.split(',') |
|
1356 | 1407 | try: |
|
1357 | 1408 | value = float(xvalueList[0]) |
|
1358 | 1409 | value = float(xvalueList[1]) |
|
1359 | 1410 | except: |
|
1360 | 1411 | return 0 |
|
1361 | 1412 | format = 'float' |
|
1362 | 1413 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
1363 | 1414 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
1364 | 1415 | |
|
1365 | 1416 | if not yvalue == '': |
|
1366 | 1417 | yvalueList = yvalue.split(",") |
|
1367 | 1418 | try: |
|
1368 | 1419 | value = float(yvalueList[0]) |
|
1369 | 1420 | value = float(yvalueList[1]) |
|
1370 | 1421 | except: |
|
1371 | 1422 | return 0 |
|
1372 | 1423 | format = 'float' |
|
1373 | 1424 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
1374 | 1425 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
1375 | 1426 | |
|
1376 | 1427 | |
|
1377 | 1428 | if not zvalue == '': |
|
1378 | 1429 | zvalueList = zvalue.split(",") |
|
1379 | 1430 | try: |
|
1380 | 1431 | value = float(zvalueList[0]) |
|
1381 | 1432 | value = float(zvalueList[1]) |
|
1382 | 1433 | except: |
|
1383 | 1434 | return 0 |
|
1384 | 1435 | opObj.addParameter(name='zmin', value=zvalueList[0], format='float') |
|
1385 | 1436 | opObj.addParameter(name='zmax', value=zvalueList[1], format='float') |
|
1386 | 1437 | |
|
1387 | 1438 | if self.specGraphSaveCross.isChecked(): |
|
1439 | checkPath = True | |
|
1388 | 1440 | opObj.addParameter(name='save', value='1', format='bool') |
|
1389 | 1441 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') |
|
1390 | 1442 | value = self.specGraphPrefix.text() |
|
1391 | 1443 | if not value == "": |
|
1392 | 1444 | try: |
|
1393 | 1445 | value = str(self.specGraphPrefix.text()) |
|
1394 | 1446 | except: |
|
1395 | 1447 | self.console.clear() |
|
1396 | 1448 | self.console.append("Please Write prefix") |
|
1397 | 1449 | return 0 |
|
1398 | 1450 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1399 | 1451 | # opObj.addParameter(name='figfile', value=self.specGraphPrefix.text(), format='str') |
|
1400 | 1452 | if self.specGraphftpCross.isChecked(): |
|
1401 | 1453 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1402 |
self.addFTPConf |
|
|
1454 | self.addFTPConf2Operation(puObj, opObj) | |
|
1455 | addFTP = True | |
|
1403 | 1456 | |
|
1404 | 1457 | if self.specGraphCebRTIplot.isChecked(): |
|
1405 | name_operation = 'Plot' | |
|
1458 | name_operation = 'RTIPlot' | |
|
1406 | 1459 | optype = 'other' |
|
1407 | 1460 | name_parameter = 'type' |
|
1408 | 1461 | value = 'RTIPlot' |
|
1409 | 1462 | format = 'str' |
|
1410 | 1463 | |
|
1411 | 1464 | if self.idImagrti == 0: |
|
1412 | 1465 | self.idImagrti = 400 |
|
1413 | 1466 | else: |
|
1414 | 1467 | self.idImagrti = self.idImagrti + 1 |
|
1415 | 1468 | |
|
1416 | 1469 | name_parameter1 = 'id' |
|
1417 | 1470 | value1 = int(self.idImagrti) |
|
1418 | 1471 | format1 = 'int' |
|
1419 | 1472 | |
|
1420 | 1473 | format = 'str' |
|
1421 | 1474 | |
|
1422 | 1475 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1423 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1476 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1424 | 1477 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
1425 | 1478 | |
|
1426 | 1479 | channelList = self.specGgraphChannelList.text() |
|
1427 | 1480 | xvalue = self.specGgraphTminTmax.text() |
|
1428 | 1481 | yvalue = self.specGgraphHeight.text() |
|
1429 | 1482 | zvalue = self.specGgraphDbsrange.text() |
|
1430 | 1483 | timerange = self.specGgraphTimeRange.text() |
|
1431 | 1484 | |
|
1432 | 1485 | if not channelList == '': |
|
1433 | 1486 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1434 | 1487 | |
|
1435 | 1488 | if not xvalue == '': |
|
1436 | 1489 | xvalueList = xvalue.split(',') |
|
1437 | 1490 | try: |
|
1438 | 1491 | value = float(xvalueList[0]) |
|
1439 | 1492 | value = float(xvalueList[1]) |
|
1440 | 1493 | except: |
|
1441 | 1494 | return 0 |
|
1442 | 1495 | format = 'float' |
|
1443 | 1496 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
1444 | 1497 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
1445 | 1498 | |
|
1446 | 1499 | if not timerange == '': |
|
1447 | 1500 | format = 'int' |
|
1448 | 1501 | try: |
|
1449 | 1502 | timerange = int(timerange) |
|
1450 | 1503 | except: |
|
1451 | 1504 | return 0 |
|
1452 | 1505 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
1453 | 1506 | |
|
1454 | 1507 | |
|
1455 | 1508 | if not yvalue == '': |
|
1456 | 1509 | yvalueList = yvalue.split(",") |
|
1457 | 1510 | try: |
|
1458 | 1511 | value = float(yvalueList[0]) |
|
1459 | 1512 | value = float(yvalueList[1]) |
|
1460 | 1513 | except: |
|
1461 | 1514 | return 0 |
|
1462 | 1515 | format = 'float' |
|
1463 | 1516 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
1464 | 1517 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
1465 | 1518 | |
|
1466 | 1519 | if not zvalue == '': |
|
1467 | 1520 | zvalueList = zvalue.split(",") |
|
1468 | 1521 | try: |
|
1469 | 1522 | value = float(zvalueList[0]) |
|
1470 | 1523 | value = float(zvalueList[1]) |
|
1471 | 1524 | except: |
|
1472 | 1525 | return 0 |
|
1473 | 1526 | format = 'float' |
|
1474 | 1527 | opObj.addParameter(name='zmin', value=zvalueList[0], format=format) |
|
1475 | 1528 | opObj.addParameter(name='zmax', value=zvalueList[1], format=format) |
|
1476 | 1529 | |
|
1477 | 1530 | if self.specGraphSaveRTIplot.isChecked(): |
|
1478 | opObj.addParameter(name='save', value='1', format='bool') | |
|
1479 |
opObj.addParameter(name=' |
|
|
1480 | value = self.specGraphPrefix.text() | |
|
1481 | if not value == "": | |
|
1482 |
|
|
|
1483 | value = str(self.specGraphPrefix.text()) | |
|
1484 | except: | |
|
1485 |
|
|
|
1486 |
self.console. |
|
|
1487 | return 0 | |
|
1488 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1531 | checkPath = True | |
|
1532 | opObj.addParameter(name='save', value='1', format='bool') | |
|
1533 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') | |
|
1534 | value = self.specGraphPrefix.text() | |
|
1535 | if not value == "": | |
|
1536 | try: | |
|
1537 | value = str(self.specGraphPrefix.text()) | |
|
1538 | except: | |
|
1539 | self.console.clear() | |
|
1540 | self.console.append("Please Write prefix") | |
|
1541 | return 0 | |
|
1542 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1489 | 1543 | |
|
1490 | 1544 | # test_ftp |
|
1491 | 1545 | if self.specGraphftpRTIplot.isChecked(): |
|
1492 | 1546 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1493 |
self.addFTPConf |
|
|
1547 | self.addFTPConf2Operation(puObj, opObj) | |
|
1548 | addFTP = True | |
|
1494 | 1549 | |
|
1495 | 1550 | if self.specGraphCebCoherencmap.isChecked(): |
|
1496 |
name_operation = ' |
|
|
1551 | name_operation = 'CoherenceMap' | |
|
1497 | 1552 | optype = 'other' |
|
1498 | 1553 | name_parameter = 'type' |
|
1499 | 1554 | value = 'CoherenceMap' |
|
1500 | 1555 | format = 'str' |
|
1501 | 1556 | if self.idImagcoherence == 0: |
|
1502 | 1557 | self.idImagcoherence = 500 |
|
1503 | 1558 | else: |
|
1504 | 1559 | self.idImagcoherence = self.idImagcoherence + 1 |
|
1505 | 1560 | |
|
1506 | 1561 | name_parameter1 = 'id' |
|
1507 | 1562 | value1 = int(self.idImagcoherence) |
|
1508 | 1563 | format1 = 'int' |
|
1509 | 1564 | |
|
1510 | 1565 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1511 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1566 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1512 | 1567 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1513 | 1568 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1514 | 1569 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
1515 | 1570 | |
|
1516 | 1571 | channelList = self.specGgraphChannelList.text() |
|
1517 | 1572 | if not channelList == '': |
|
1518 | 1573 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1519 | 1574 | |
|
1520 | 1575 | timerange = self.specGgraphTimeRange.text() |
|
1521 | 1576 | if not timerange == '': |
|
1522 | 1577 | try: |
|
1523 | 1578 | timerange = int(timerange) |
|
1524 | 1579 | except: |
|
1525 | 1580 | return 0 |
|
1526 | 1581 | format = 'int' |
|
1527 | 1582 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
1528 | 1583 | |
|
1529 | 1584 | xvalue = self.specGgraphTminTmax.text() |
|
1530 | 1585 | if not xvalue == '': |
|
1531 | 1586 | xvalueList = xvalue.split(',') |
|
1532 | 1587 | try: |
|
1533 | 1588 | value = float(xvalueList[0]) |
|
1534 | 1589 | value = float(xvalueList[1]) |
|
1535 | 1590 | except: |
|
1536 | 1591 | return 0 |
|
1537 | 1592 | format = 'float' |
|
1538 | 1593 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
1539 | 1594 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
1540 | 1595 | |
|
1541 | 1596 | yvalue = self.specGgraphHeight.text() |
|
1542 | 1597 | if not yvalue == '': |
|
1543 | 1598 | yvalueList = yvalue.split(",") |
|
1544 | 1599 | try: |
|
1545 | 1600 | value = float(yvalueList[0]) |
|
1546 | 1601 | value = float(yvalueList[1]) |
|
1547 | 1602 | except: |
|
1548 | 1603 | return 0 |
|
1549 | 1604 | format = 'float' |
|
1550 | 1605 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
1551 | 1606 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
1552 | 1607 | |
|
1553 | 1608 | zvalue = self.specGgraphmagnitud.text() |
|
1554 | 1609 | if not zvalue == '': |
|
1555 | 1610 | zvalueList = zvalue.split(",") |
|
1556 | 1611 | try: |
|
1557 | 1612 | value = float(zvalueList[0]) |
|
1558 | 1613 | value = float(zvalueList[1]) |
|
1559 | 1614 | except: |
|
1560 | 1615 | return 0 |
|
1561 | 1616 | opObj.addParameter(name='zmin', value=zvalueList[0], format='float') |
|
1562 | 1617 | opObj.addParameter(name='zmax', value=zvalueList[1], format='float') |
|
1563 | 1618 | |
|
1564 | 1619 | if self.specGraphSaveCoherencemap.isChecked(): |
|
1620 | checkPath = True | |
|
1565 | 1621 | opObj.addParameter(name='save', value='1', format='bool') |
|
1566 | 1622 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') |
|
1567 | 1623 | value = self.specGraphPrefix.text() |
|
1568 | 1624 | if not value == "": |
|
1569 | 1625 | try: |
|
1570 | 1626 | value = str(self.specGraphPrefix.text()) |
|
1571 | 1627 | except: |
|
1572 | 1628 | self.console.clear() |
|
1573 | 1629 | self.console.append("Please Write prefix") |
|
1574 | 1630 | return 0 |
|
1575 | 1631 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1576 | 1632 | |
|
1577 | 1633 | # test_ftp |
|
1578 | 1634 | if self.specGraphftpCoherencemap.isChecked(): |
|
1579 | 1635 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1580 |
self.addFTPConf |
|
|
1636 | self.addFTPConf2Operation(puObj, opObj) | |
|
1637 | addFTP = True | |
|
1581 | 1638 | |
|
1582 | 1639 | if self.specGraphPowerprofile.isChecked(): |
|
1583 | name_operation = 'Plot' | |
|
1640 | name_operation = 'PowerProfilePlot' | |
|
1584 | 1641 | optype = 'other' |
|
1585 | 1642 | name_parameter = 'type' |
|
1586 | 1643 | value = 'PowerProfilePlot' |
|
1587 | 1644 | format = 'str' |
|
1588 | 1645 | |
|
1589 | 1646 | if self.idImagpower == 0: |
|
1590 | 1647 | self.idImagpower = 600 |
|
1591 | 1648 | else: |
|
1592 | 1649 | self.idImagpower = self.idImagpower + 1 |
|
1593 | 1650 | value1 = int(self.idImagpower) |
|
1594 | 1651 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1595 | opObj.addParameter(name=name_parameter, value=value, format='str') | |
|
1652 | # opObj.addParameter(name=name_parameter, value=value, format='str') | |
|
1596 | 1653 | opObj.addParameter(name='id', value=value1, format='int') |
|
1597 | 1654 | |
|
1598 | 1655 | channelList = self.specGgraphChannelList.text() |
|
1599 | 1656 | if not channelList == '': |
|
1600 | 1657 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1601 | 1658 | |
|
1602 | 1659 | xvalue = self.specGgraphDbsrange.text() |
|
1603 | 1660 | if not xvalue == '': |
|
1604 | 1661 | xvalueList = xvalue.split(',') |
|
1605 | 1662 | try: |
|
1606 | 1663 | value = float(xvalueList[0]) |
|
1607 | 1664 | value = float(xvalueList[1]) |
|
1608 | 1665 | except: |
|
1609 | 1666 | return 0 |
|
1610 | 1667 | format = 'float' |
|
1611 | 1668 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
1612 | 1669 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
1613 | 1670 | |
|
1614 | 1671 | yvalue = self.specGgraphHeight.text() |
|
1615 | 1672 | if not yvalue == '': |
|
1616 | 1673 | yvalueList = yvalue.split(",") |
|
1617 | 1674 | try: |
|
1618 | 1675 | value = float(yvalueList[0]) |
|
1619 | 1676 | value = float(yvalueList[1]) |
|
1620 | 1677 | except: |
|
1621 | 1678 | return 0 |
|
1622 | 1679 | format = 'float' |
|
1623 | 1680 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
1624 | 1681 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
1625 | 1682 | |
|
1626 | 1683 | |
|
1627 | 1684 | if self.specGraphSavePowerprofile.isChecked(): |
|
1685 | checkPath = True | |
|
1628 | 1686 | opObj.addParameter(name='save', value='1', format='bool') |
|
1629 | 1687 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') |
|
1630 | 1688 | value = self.specGraphPrefix.text() |
|
1631 | 1689 | if not value == "": |
|
1632 | 1690 | try: |
|
1633 | 1691 | value = str(self.specGraphPrefix.text()) |
|
1634 | 1692 | except: |
|
1635 | 1693 | self.console.clear() |
|
1636 | 1694 | self.console.append("Please Write prefix") |
|
1637 | 1695 | return 0 |
|
1638 | 1696 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1639 | 1697 | |
|
1640 | 1698 | |
|
1641 | 1699 | if self.specGraphftpPowerprofile.isChecked(): |
|
1642 | 1700 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1643 |
self.addFTPConf |
|
|
1701 | self.addFTPConf2Operation(puObj, opObj) | |
|
1702 | addFTP = True | |
|
1644 | 1703 | # rti noise |
|
1645 | 1704 | |
|
1646 | 1705 | if self.specGraphCebRTInoise.isChecked(): |
|
1647 |
name_operation = ' |
|
|
1706 | name_operation = 'Noise' | |
|
1648 | 1707 | optype = 'other' |
|
1649 | 1708 | name_parameter = 'type' |
|
1650 | 1709 | value = 'Noise' |
|
1651 | 1710 | format = 'str' |
|
1652 | 1711 | |
|
1653 | 1712 | if self.idImagrtinoise == 0: |
|
1654 | 1713 | self.idImagrtinoise = 700 |
|
1655 | 1714 | else: |
|
1656 | 1715 | self.idImagrtinoise = self.idImagrtinoise + 1 |
|
1657 | 1716 | |
|
1658 | 1717 | name_parameter1 = 'id' |
|
1659 | 1718 | value1 = int(self.idImagrtinoise) |
|
1660 | 1719 | format1 = 'int' |
|
1661 | 1720 | format = 'str' |
|
1662 | 1721 | |
|
1663 | 1722 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1664 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1723 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
1665 | 1724 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
1666 | 1725 | |
|
1667 | 1726 | channelList = self.specGgraphChannelList.text() |
|
1668 | 1727 | xvalue = self.specGgraphTminTmax.text() |
|
1669 | 1728 | yvalue = self.specGgraphDbsrange.text() |
|
1670 | 1729 | timerange = self.specGgraphTimeRange.text() |
|
1671 | 1730 | |
|
1672 | 1731 | |
|
1673 | 1732 | if not channelList == '': |
|
1674 | 1733 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1675 | 1734 | |
|
1676 | 1735 | if not timerange == '': |
|
1677 | 1736 | format = 'int' |
|
1678 | 1737 | try: |
|
1679 | 1738 | timerange = int(timerange) |
|
1680 | 1739 | except: |
|
1681 | 1740 | return 0 |
|
1682 | 1741 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
1683 | 1742 | |
|
1684 | 1743 | if not xvalue == '': |
|
1685 | 1744 | xvalueList = xvalue.split(',') |
|
1686 | 1745 | try: |
|
1687 | 1746 | value = float(xvalueList[0]) |
|
1688 | 1747 | value = float(xvalueList[1]) |
|
1689 | 1748 | except: |
|
1690 | 1749 | return 0 |
|
1691 | 1750 | format = 'float' |
|
1692 | 1751 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
1693 | 1752 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
1694 | 1753 | |
|
1695 | 1754 | if not yvalue == '': |
|
1696 | 1755 | yvalueList = yvalue.split(",") |
|
1697 | 1756 | try: |
|
1698 | 1757 | value = float(yvalueList[0]) |
|
1699 | 1758 | value = float(yvalueList[1]) |
|
1700 | 1759 | except: |
|
1701 | 1760 | return 0 |
|
1702 | 1761 | format = 'float' |
|
1703 | 1762 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
1704 | 1763 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
1705 | 1764 | |
|
1706 | 1765 | if self.specGraphSaveRTInoise.isChecked(): |
|
1707 | opObj.addParameter(name='save', value='1', format='bool') | |
|
1708 |
opObj.addParameter(name=' |
|
|
1709 | value = self.specGraphPrefix.text() | |
|
1710 | if not value == "": | |
|
1711 |
|
|
|
1712 | value = str(self.specGraphPrefix.text()) | |
|
1713 | except: | |
|
1714 |
|
|
|
1715 |
self.console. |
|
|
1716 | return 0 | |
|
1717 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1766 | checkPath = True | |
|
1767 | opObj.addParameter(name='save', value='1', format='bool') | |
|
1768 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') | |
|
1769 | value = self.specGraphPrefix.text() | |
|
1770 | if not value == "": | |
|
1771 | try: | |
|
1772 | value = str(self.specGraphPrefix.text()) | |
|
1773 | except: | |
|
1774 | self.console.clear() | |
|
1775 | self.console.append("Please Write prefix") | |
|
1776 | return 0 | |
|
1777 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1718 | 1778 | |
|
1719 | 1779 | # test_ftp |
|
1720 | 1780 | if self.specGraphftpRTInoise.isChecked(): |
|
1721 | 1781 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1722 |
self.addFTPConf |
|
|
1723 | ||
|
1724 |
|
|
|
1725 | ||
|
1782 | self.addFTPConf2Operation(puObj, opObj) | |
|
1783 | addFTP = True | |
|
1784 | ||
|
1785 | localfolder = None | |
|
1786 | if checkPath: | |
|
1787 | localfolder = str(self.specGraphPath.text()) | |
|
1788 | if localfolder == '': | |
|
1789 | self.console.clear() | |
|
1790 | self.console.append("Graphic path should be defined") | |
|
1791 | return 0 | |
|
1792 | ||
|
1793 | if addFTP: | |
|
1794 | if not localfolder: | |
|
1795 | self.console.clear() | |
|
1796 | self.console.append("You have to save the plots before sending them to FTP Server") | |
|
1797 | return 0 | |
|
1798 | ||
|
1799 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
1800 | self.createFTPProcUnitView(server, username, password, remotefolder, localfolder) | |
|
1801 | else: | |
|
1802 | self.removeFTPProcUnitView() | |
|
1803 | ||
|
1726 | 1804 | # if something happend |
|
1727 | 1805 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') |
|
1728 | name_operation = 'SpectraWriter' | |
|
1729 | optype = 'other' | |
|
1730 | name_parameter1 = 'path' | |
|
1731 | name_parameter2 = 'blocksPerFile' | |
|
1732 | name_parameter3 = 'profilesPerBlock' | |
|
1733 | value1 = output_path | |
|
1734 | value2 = blocksperfile | |
|
1735 | value3 = profilesperblock | |
|
1736 | format = "int" | |
|
1737 | 1806 | if parms_ok: |
|
1807 | name_operation = 'SpectraWriter' | |
|
1808 | optype = 'other' | |
|
1809 | name_parameter1 = 'path' | |
|
1810 | name_parameter2 = 'blocksPerFile' | |
|
1811 | name_parameter3 = 'profilesPerBlock' | |
|
1812 | value1 = output_path | |
|
1813 | value2 = blocksperfile | |
|
1814 | value3 = profilesperblock | |
|
1815 | format = "int" | |
|
1816 | ||
|
1738 | 1817 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1739 | 1818 | opObj.addParameter(name=name_parameter1, value=value1) |
|
1740 | 1819 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
1741 | 1820 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
1742 | 1821 | |
|
1743 | 1822 | self.showPUSpectraProperties(puObj) |
|
1744 | 1823 | |
|
1745 | 1824 | self.console.clear() |
|
1746 | 1825 | self.console.append("If you want to save your project") |
|
1747 | 1826 | self.console.append("click on your project name in the Tree Project Explorer") |
|
1748 | ||
|
1827 | ||
|
1828 | self.actionSaveToolbar.setEnabled(True) | |
|
1829 | self.actionStarToolbar.setEnabled(True) | |
|
1830 | ||
|
1831 | return 1 | |
|
1832 | ||
|
1749 | 1833 | """ |
|
1750 | 1834 | Spectra Graph |
|
1751 | 1835 | """ |
|
1752 | 1836 | @pyqtSignature("int") |
|
1753 | 1837 | def on_specGraphCebSpectraplot_stateChanged(self, p0): |
|
1754 | 1838 | |
|
1755 | 1839 | if p0 == 2: |
|
1756 | 1840 | self.specGgraphChannelList.setEnabled(True) |
|
1757 | 1841 | self.specGgraphFreq.setEnabled(True) |
|
1758 | 1842 | self.specGgraphHeight.setEnabled(True) |
|
1759 | 1843 | self.specGgraphDbsrange.setEnabled(True) |
|
1760 | 1844 | if p0 == 0: |
|
1761 | 1845 | self.specGgraphFreq.setEnabled(False) |
|
1762 | 1846 | self.specGgraphHeight.setEnabled(False) |
|
1763 | 1847 | self.specGgraphDbsrange.setEnabled(False) |
|
1764 | 1848 | |
|
1765 | 1849 | |
|
1766 | 1850 | @pyqtSignature("int") |
|
1767 | 1851 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): |
|
1768 | 1852 | |
|
1769 | 1853 | if p0 == 2: |
|
1770 | 1854 | self.specGgraphFreq.setEnabled(True) |
|
1771 | 1855 | self.specGgraphHeight.setEnabled(True) |
|
1772 | 1856 | self.specGgraphDbsrange.setEnabled(True) |
|
1773 | 1857 | if p0 == 0: |
|
1774 | 1858 | self.specGgraphFreq.setEnabled(False) |
|
1775 | 1859 | self.specGgraphHeight.setEnabled(False) |
|
1776 | 1860 | self.specGgraphDbsrange.setEnabled(False) |
|
1777 | 1861 | |
|
1778 | 1862 | @pyqtSignature("int") |
|
1779 | 1863 | def on_specGraphCebRTIplot_stateChanged(self, p0): |
|
1780 | 1864 | |
|
1781 | 1865 | if p0 == 2: |
|
1782 | 1866 | self.specGgraphChannelList.setEnabled(True) |
|
1783 | 1867 | self.specGgraphTminTmax.setEnabled(True) |
|
1784 | 1868 | self.specGgraphHeight.setEnabled(True) |
|
1785 | 1869 | self.specGgraphDbsrange.setEnabled(True) |
|
1786 | 1870 | self.specGgraphTimeRange.setEnabled(True) |
|
1787 | 1871 | |
|
1788 | 1872 | if p0 == 0: |
|
1789 | 1873 | self.specGgraphTminTmax.setEnabled(False) |
|
1790 | 1874 | self.specGgraphHeight.setEnabled(False) |
|
1791 | 1875 | self.specGgraphDbsrange.setEnabled(False) |
|
1792 | 1876 | self.specGgraphTimeRange.setEnabled(False) |
|
1793 | 1877 | |
|
1794 | 1878 | |
|
1795 | 1879 | @pyqtSignature("int") |
|
1796 | 1880 | def on_specGraphCebRTInoise_stateChanged(self, p0): |
|
1797 | 1881 | if p0 == 2: |
|
1798 | 1882 | self.specGgraphChannelList.setEnabled(True) |
|
1799 | 1883 | self.specGgraphTminTmax.setEnabled(True) |
|
1800 | 1884 | self.specGgraphDbsrange.setEnabled(True) |
|
1801 | 1885 | self.specGgraphTimeRange.setEnabled(True) |
|
1802 | 1886 | |
|
1803 | 1887 | if p0 == 0: |
|
1804 | 1888 | self.specGgraphTminTmax.setEnabled(False) |
|
1805 | 1889 | self.specGgraphDbsrange.setEnabled(False) |
|
1806 | 1890 | self.specGgraphTimeRange.setEnabled(False) |
|
1807 | 1891 | |
|
1808 | 1892 | |
|
1809 | 1893 | |
|
1810 | 1894 | |
|
1811 | 1895 | @pyqtSignature("int") |
|
1812 | 1896 | def on_specGraphCebCoherencmap_stateChanged(self, p0): |
|
1813 | 1897 | |
|
1814 | 1898 | if p0 == 2: |
|
1815 | 1899 | self.specGgraphTminTmax.setEnabled(True) |
|
1816 | 1900 | self.specGgraphHeight.setEnabled(True) |
|
1817 | 1901 | self.specGgraphmagnitud.setEnabled(True) |
|
1818 | 1902 | self.specGgraphTimeRange.setEnabled(True) |
|
1819 | 1903 | |
|
1820 | 1904 | if p0 == 0: |
|
1821 | 1905 | self.specGgraphTminTmax.setEnabled(False) |
|
1822 | 1906 | self.specGgraphHeight.setEnabled(False) |
|
1823 | 1907 | self.specGgraphmagnitud.setEnabled(False) |
|
1824 | 1908 | self.specGgraphTimeRange.setEnabled(False) |
|
1825 | 1909 | |
|
1826 | 1910 | |
|
1827 | 1911 | |
|
1828 | 1912 | |
|
1829 | 1913 | @pyqtSignature("int") |
|
1830 | 1914 | def on_specGraphPowerprofile_stateChanged(self, p0): |
|
1831 | 1915 | |
|
1832 | 1916 | if p0 == 2: |
|
1833 | 1917 | |
|
1834 | 1918 | self.specGgraphHeight.setEnabled(True) |
|
1835 | 1919 | self.specGgraphDbsrange.setEnabled(True) |
|
1836 | 1920 | if p0 == 0: |
|
1837 | 1921 | self.specGgraphHeight.setEnabled(False) |
|
1838 | 1922 | self.specGgraphDbsrange.setEnabled(False) |
|
1839 | 1923 | |
|
1840 | 1924 | @pyqtSignature("int") |
|
1841 | 1925 | def on_specGraphPhase_stateChanged(self, p0): |
|
1842 | 1926 | |
|
1843 | 1927 | if p0 == 2: |
|
1844 | 1928 | self.specGgraphTminTmax.setEnabled(True) |
|
1845 | 1929 | self.specGgraphPhaserange.setEnabled(True) |
|
1846 | 1930 | |
|
1847 | 1931 | if p0 == 0: |
|
1848 | 1932 | self.specGgraphTminTmax.setEnabled(False) |
|
1849 | 1933 | self.specGgraphPhaserange.setEnabled(False) |
|
1850 | 1934 | |
|
1851 | 1935 | @pyqtSignature("int") |
|
1852 | 1936 | def on_specGraphSaveSpectra_stateChanged(self, p0): |
|
1853 | 1937 | """ |
|
1854 | 1938 | """ |
|
1855 | 1939 | if p0 == 2: |
|
1856 | 1940 | self.specGraphPath.setEnabled(True) |
|
1857 | 1941 | self.specGraphPrefix.setEnabled(True) |
|
1858 | 1942 | self.specGraphToolPath.setEnabled(True) |
|
1859 | 1943 | if p0 == 0: |
|
1860 | 1944 | self.specGraphPath.setEnabled(False) |
|
1861 | 1945 | self.specGraphPrefix.setEnabled(False) |
|
1862 | 1946 | self.specGraphToolPath.setEnabled(False) |
|
1863 | 1947 | |
|
1864 | 1948 | |
|
1865 | 1949 | @pyqtSignature("int") |
|
1866 | 1950 | def on_specGraphSaveCross_stateChanged(self, p0): |
|
1867 | 1951 | if p0 == 2: |
|
1868 | 1952 | self.specGraphPath.setEnabled(True) |
|
1869 | 1953 | self.specGraphPrefix.setEnabled(True) |
|
1870 | 1954 | self.specGraphToolPath.setEnabled(True) |
|
1871 | 1955 | |
|
1872 | 1956 | @pyqtSignature("int") |
|
1873 | 1957 | def on_specGraphSaveRTIplot_stateChanged(self, p0): |
|
1874 | 1958 | if p0 == 2: |
|
1875 | 1959 | self.specGraphPath.setEnabled(True) |
|
1876 | 1960 | self.specGraphPrefix.setEnabled(True) |
|
1877 | 1961 | self.specGraphToolPath.setEnabled(True) |
|
1878 | 1962 | |
|
1879 | 1963 | @pyqtSignature("int") |
|
1880 | 1964 | def on_specGraphSaveRTInoise_stateChanged(self, p0): |
|
1881 | 1965 | if p0 == 2: |
|
1882 | 1966 | self.specGraphPath.setEnabled(True) |
|
1883 | 1967 | self.specGraphPrefix.setEnabled(True) |
|
1884 | 1968 | self.specGraphToolPath.setEnabled(True) |
|
1885 | 1969 | |
|
1886 | 1970 | @pyqtSignature("int") |
|
1887 | 1971 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): |
|
1888 | 1972 | if p0 == 2: |
|
1889 | 1973 | self.specGraphPath.setEnabled(True) |
|
1890 | 1974 | self.specGraphPrefix.setEnabled(True) |
|
1891 | 1975 | self.specGraphToolPath.setEnabled(True) |
|
1892 | 1976 | |
|
1893 | 1977 | |
|
1894 | 1978 | @pyqtSignature("int") |
|
1895 | 1979 | def on_specGraphSavePowerprofile_stateChanged(self, p0): |
|
1896 | 1980 | if p0 == 2: |
|
1897 | 1981 | self.specGraphPath.setEnabled(True) |
|
1898 | 1982 | self.specGraphPrefix.setEnabled(True) |
|
1899 | 1983 | self.specGraphToolPath.setEnabled(True) |
|
1900 | 1984 | |
|
1901 | 1985 | |
|
1902 | 1986 | #-------ftp-----# |
|
1903 | 1987 | @pyqtSignature("int") |
|
1904 | 1988 | def on_specGraphftpSpectra_stateChanged(self, p0): |
|
1905 | 1989 | """ |
|
1906 | 1990 | """ |
|
1907 | 1991 | if p0 == 2: |
|
1908 | 1992 | self.specGgraphftpratio.setEnabled(True) |
|
1909 | 1993 | |
|
1910 | 1994 | if p0 == 0: |
|
1911 | 1995 | self.specGgraphftpratio.setEnabled(False) |
|
1912 | 1996 | |
|
1913 | 1997 | |
|
1914 | 1998 | @pyqtSignature("int") |
|
1915 | 1999 | def on_specGraphftpCross_stateChanged(self, p0): |
|
1916 | 2000 | if p0 == 2: |
|
1917 | 2001 | self.specGgraphftpratio.setEnabled(True) |
|
1918 | 2002 | |
|
1919 | 2003 | @pyqtSignature("int") |
|
1920 | 2004 | def on_specGraphftpRTIplot_stateChanged(self, p0): |
|
1921 | 2005 | if p0 == 2: |
|
1922 | 2006 | self.specGgraphftpratio.setEnabled(True) |
|
1923 | 2007 | |
|
1924 | 2008 | @pyqtSignature("int") |
|
1925 | 2009 | def on_specGraphftpRTInoise_stateChanged(self, p0): |
|
1926 | 2010 | if p0 == 2: |
|
1927 | 2011 | self.specGgraphftpratio.setEnabled(True) |
|
1928 | 2012 | |
|
1929 | 2013 | @pyqtSignature("int") |
|
1930 | 2014 | def on_specGraphftpCoherencemap_stateChanged(self, p0): |
|
1931 | 2015 | if p0 == 2: |
|
1932 | 2016 | self.specGgraphftpratio.setEnabled(True) |
|
1933 | 2017 | |
|
1934 | 2018 | @pyqtSignature("int") |
|
1935 | 2019 | def on_specGraphftpPowerprofile_stateChanged(self, p0): |
|
1936 | 2020 | if p0 == 2: |
|
1937 | 2021 | self.specGgraphftpratio.setEnabled(True) |
|
1938 | 2022 | |
|
1939 | 2023 | #-------------------# |
|
1940 | 2024 | |
|
1941 | 2025 | |
|
1942 | 2026 | |
|
1943 | 2027 | @pyqtSignature("") |
|
1944 | 2028 | def on_specGraphToolPath_clicked(self): |
|
1945 | 2029 | """ |
|
1946 | 2030 | """ |
|
1947 | 2031 | self.savePath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1948 | 2032 | self.specGraphPath.setText(self.savePath) |
|
1949 | 2033 | if not os.path.exists(self.savePath): |
|
1950 | 2034 | self.console.clear() |
|
1951 | 2035 | self.console.append("Write a correct a path") |
|
1952 | 2036 | return |
|
1953 | 2037 | |
|
1954 | 2038 | @pyqtSignature("") |
|
1955 | 2039 | def on_specHeisGraphToolPath_clicked(self): |
|
1956 | 2040 | """ |
|
1957 | 2041 | """ |
|
1958 | 2042 | self.savePath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1959 | 2043 | self.specHeisGraphPath.setText(self.savePath) |
|
1960 | 2044 | if not os.path.exists(self.savePath): |
|
1961 | 2045 | self.console.clear() |
|
1962 | 2046 | self.console.append("Write a correct a path") |
|
1963 | 2047 | return |
|
1964 | 2048 | |
|
1965 | 2049 | @pyqtSignature("") |
|
1966 | 2050 | def on_specGraphClear_clicked(self): |
|
1967 | 2051 | self.clearspecGraph() |
|
1968 | 2052 | |
|
1969 | 2053 | @pyqtSignature("int") |
|
1970 | 2054 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): |
|
1971 | 2055 | """ |
|
1972 | 2056 | Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento . |
|
1973 | 2057 | """ |
|
1974 | 2058 | if p0 == 2: |
|
1975 | 2059 | self.specHeisOpIncoherent.setEnabled(True) |
|
1976 | 2060 | self.specHeisOpCobIncInt.setEnabled(True) |
|
1977 | 2061 | if p0 == 0: |
|
1978 | 2062 | self.specHeisOpIncoherent.setEnabled(False) |
|
1979 | 2063 | self.specHeisOpCobIncInt.setEnabled(False) |
|
1980 | 2064 | |
|
1981 | 2065 | @pyqtSignature("") |
|
1982 | 2066 | def on_specHeisOpOk_clicked(self): |
|
1983 | 2067 | """ |
|
1984 | 2068 | AΓADE OPERACION SPECTRAHEIS |
|
1985 | 2069 | """ |
|
2070 | addFTP = False | |
|
2071 | checkPath = False | |
|
2072 | ||
|
2073 | self.actionSaveToolbar.setEnabled(False) | |
|
2074 | self.actionStarToolbar.setEnabled(False) | |
|
2075 | ||
|
1986 | 2076 | puObj = self.getSelectedPUObj() |
|
1987 | 2077 | puObj.removeOperations() |
|
1988 | 2078 | |
|
1989 | 2079 | if self.specHeisOpCebIncoherent.isChecked(): |
|
1990 | 2080 | value = self.specHeisOpIncoherent.text() |
|
1991 | 2081 | name_operation = 'IncohInt4SpectraHeis' |
|
1992 | 2082 | optype = 'other' |
|
1993 | 2083 | if self.specOpCobIncInt.currentIndex() == 0: |
|
1994 | 2084 | name_parameter = 'timeInterval' |
|
1995 | 2085 | format = 'float' |
|
1996 | 2086 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1997 | 2087 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1998 | 2088 | |
|
1999 | 2089 | # ---- Spectra Plot----- |
|
2000 | 2090 | if self.specHeisGraphCebSpectraplot.isChecked(): |
|
2001 |
name_operation = ' |
|
|
2091 | name_operation = 'SpectraHeisScope' | |
|
2002 | 2092 | optype = 'other' |
|
2003 | 2093 | name_parameter = 'type' |
|
2004 | 2094 | value = 'SpectraHeisScope' |
|
2005 | 2095 | format = 'str' |
|
2006 | 2096 | if self.idImagspectraHeis == 0: |
|
2007 | 2097 | self.idImagspectraHeis = 800 |
|
2008 | 2098 | else: |
|
2009 | 2099 | self.idImagspectraHeis = self.idImagspectraHeis + 1 |
|
2010 | 2100 | name_parameter1 = 'id' |
|
2011 | 2101 | value1 = int(self.idImagspectraHeis) |
|
2012 | 2102 | format1 = 'int' |
|
2013 | 2103 | |
|
2014 | 2104 | format = 'str' |
|
2015 | 2105 | |
|
2016 | 2106 | channelList = self.specHeisGgraphChannelList.text() |
|
2017 | 2107 | xvalue = self.specHeisGgraphXminXmax.text() |
|
2018 | 2108 | yvalue = self.specHeisGgraphYminYmax.text() |
|
2019 | 2109 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2020 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
2110 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
2021 | 2111 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
2022 | 2112 | |
|
2023 | 2113 | if not channelList == '': |
|
2024 | 2114 | name_parameter = 'channelList' |
|
2025 | 2115 | format = 'intlist' |
|
2026 | 2116 | opObj.addParameter(name=name_parameter, value=channelList, format=format) |
|
2027 | 2117 | |
|
2028 | 2118 | if not xvalue == '': |
|
2029 | 2119 | xvalueList = xvalue.split(',') |
|
2030 | 2120 | try: |
|
2031 | 2121 | value1 = float(xvalueList[0]) |
|
2032 | 2122 | value2 = float(xvalueList[1]) |
|
2033 | 2123 | except: |
|
2034 | 2124 | self.console.clear() |
|
2035 | 2125 | self.console.append("Please Write corrects parameter xmin-xmax") |
|
2036 | 2126 | return 0 |
|
2037 | 2127 | name1 = 'xmin' |
|
2038 | 2128 | name2 = 'xmax' |
|
2039 | 2129 | format = 'float' |
|
2040 | 2130 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2041 | 2131 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2042 | 2132 | #------specHeisGgraphYmin-Ymax--- |
|
2043 | 2133 | if not yvalue == '': |
|
2044 | 2134 | yvalueList = yvalue.split(",") |
|
2045 | 2135 | try: |
|
2046 | 2136 | value1 = float(yvalueList[0]) |
|
2047 | 2137 | value2 = float(yvalueList[1]) |
|
2048 | 2138 | except: |
|
2049 | 2139 | self.console.clear() |
|
2050 | 2140 | self.console.append("Please Write corrects parameter Ymix-Ymax") |
|
2051 | 2141 | return 0 |
|
2052 | 2142 | name1 = 'ymin' |
|
2053 | 2143 | name2 = 'ymax' |
|
2054 | 2144 | format = 'float' |
|
2055 | 2145 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2056 | 2146 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2057 | 2147 | |
|
2058 | 2148 | if self.specHeisGraphSaveSpectra.isChecked(): |
|
2149 | checkPath = True | |
|
2059 | 2150 | name_parameter1 = 'save' |
|
2060 | 2151 | name_parameter2 = 'figpath' |
|
2061 | 2152 | name_parameter3 = 'figfile' |
|
2062 | 2153 | value1 = '1' |
|
2063 | 2154 | value2 = self.specHeisGraphPath.text() |
|
2064 | 2155 | value3 = self.specHeisGraphPrefix.text() |
|
2065 | 2156 | format1 = 'bool' |
|
2066 | 2157 | format2 = 'str' |
|
2067 | 2158 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) |
|
2068 | 2159 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2069 | 2160 | if not value3 == "": |
|
2070 | 2161 | try: |
|
2071 | 2162 | value3 = str(self.specHeisGraphPrefix.text()) |
|
2072 | 2163 | except: |
|
2073 | 2164 | self.console.clear() |
|
2074 | 2165 | self.console.append("Please Write prefix") |
|
2075 | 2166 | return 0 |
|
2076 | 2167 | opObj.addParameter(name='figfile', value=self.specHeisGraphPrefix.text(), format='str') |
|
2077 | 2168 | |
|
2078 | 2169 | # opObj.addParameter(name=name_parameter3, value=value3, format=format2) |
|
2079 | 2170 | # opObj.addParameter(name='wr_period', value='5',format='int') |
|
2080 | 2171 | |
|
2081 | 2172 | if self.specHeisGraphftpSpectra.isChecked(): |
|
2082 | 2173 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2083 |
self.addFTPConf |
|
|
2174 | self.addFTPConf2Operation(puObj, opObj) | |
|
2175 | addFTP = True | |
|
2084 | 2176 | |
|
2085 | 2177 | if self.specHeisGraphCebRTIplot.isChecked(): |
|
2086 |
name_operation = ' |
|
|
2178 | name_operation = 'RTIfromSpectraHeis' | |
|
2087 | 2179 | optype = 'other' |
|
2088 | 2180 | name_parameter = 'type' |
|
2089 | 2181 | value = 'RTIfromSpectraHeis' |
|
2090 | 2182 | format = 'str' |
|
2091 | 2183 | |
|
2092 | 2184 | if self.idImagrtiHeis == 0: |
|
2093 | 2185 | self.idImagrtiHeis = 900 |
|
2094 | 2186 | else: |
|
2095 | 2187 | self.idImagrtiHeis = self.idImagrtiHeis + 1 |
|
2096 | 2188 | |
|
2097 | 2189 | name_parameter1 = 'id' |
|
2098 | 2190 | value1 = int(self.idImagrtiHeis) |
|
2099 | 2191 | format1 = 'int' |
|
2100 | 2192 | |
|
2101 | 2193 | format = 'str' |
|
2102 | 2194 | |
|
2103 | 2195 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2104 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
2196 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
|
2105 | 2197 | opObj.addParameter(name=name_parameter1, value=value1, format=format1) |
|
2106 | 2198 | |
|
2107 | 2199 | channelList = self.specHeisGgraphChannelList.text() |
|
2108 | 2200 | xvalue = self.specHeisGgraphTminTmax.text() |
|
2109 | 2201 | yvalue = self.specHeisGgraphYminYmax.text() |
|
2110 | 2202 | timerange = self.specHeisGgraphTimeRange.text() |
|
2111 | 2203 | |
|
2112 | 2204 | if not channelList == '': |
|
2113 | 2205 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
2114 | 2206 | |
|
2115 | 2207 | if not xvalue == '': |
|
2116 | 2208 | xvalueList = xvalue.split(',') |
|
2117 | 2209 | try: |
|
2118 | 2210 | value = float(xvalueList[0]) |
|
2119 | 2211 | value = float(xvalueList[1]) |
|
2120 | 2212 | except: |
|
2121 | 2213 | return 0 |
|
2122 | 2214 | format = 'float' |
|
2123 | 2215 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
2124 | 2216 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
2125 | 2217 | |
|
2126 | 2218 | if not timerange == '': |
|
2127 | 2219 | format = 'int' |
|
2128 | 2220 | try: |
|
2129 | 2221 | timerange = int(timerange) |
|
2130 | 2222 | except: |
|
2131 | 2223 | return 0 |
|
2132 | 2224 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
2133 | 2225 | |
|
2134 | 2226 | |
|
2135 | 2227 | if not yvalue == '': |
|
2136 | 2228 | yvalueList = yvalue.split(",") |
|
2137 | 2229 | try: |
|
2138 | 2230 | value = float(yvalueList[0]) |
|
2139 | 2231 | value = float(yvalueList[1]) |
|
2140 | 2232 | except: |
|
2141 | 2233 | return 0 |
|
2142 | 2234 | format = 'float' |
|
2143 | 2235 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
2144 | 2236 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
2145 | 2237 | |
|
2146 | 2238 | if self.specHeisGraphSaveRTIplot.isChecked(): |
|
2147 | opObj.addParameter(name='save', value='1', format='bool') | |
|
2148 |
opObj.addParameter(name=' |
|
|
2149 |
value |
|
|
2150 | if not value == "": | |
|
2151 |
|
|
|
2152 | value = str(self.specHeisGraphPrefix.text()) | |
|
2153 | except: | |
|
2154 |
|
|
|
2155 |
self.console. |
|
|
2156 | return 0 | |
|
2157 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
2239 | checkPath = True | |
|
2240 | opObj.addParameter(name='save', value='1', format='bool') | |
|
2241 | opObj.addParameter(name='figpath', value=self.specHeisGraphPath.text(), format='str') | |
|
2242 | value = self.specHeisGraphPrefix.text() | |
|
2243 | if not value == "": | |
|
2244 | try: | |
|
2245 | value = str(self.specHeisGraphPrefix.text()) | |
|
2246 | except: | |
|
2247 | self.console.clear() | |
|
2248 | self.console.append("Please Write prefix") | |
|
2249 | return 0 | |
|
2250 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
2158 | 2251 | |
|
2159 | 2252 | # test_ftp |
|
2160 | 2253 | if self.specHeisGraphftpRTIplot.isChecked(): |
|
2161 | 2254 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2162 |
self.addFTPConf |
|
|
2163 | ||
|
2255 | self.addFTPConf2Operation(puObj, opObj) | |
|
2256 | addFTP = True | |
|
2257 | ||
|
2258 | localfolder = None | |
|
2259 | if checkPath: | |
|
2260 | localfolder = str(self.specGraphPath.text()) | |
|
2261 | if localfolder == '': | |
|
2262 | self.console.clear() | |
|
2263 | self.console.append("Graphic path should be defined") | |
|
2264 | return 0 | |
|
2265 | ||
|
2266 | if addFTP: | |
|
2267 | if not localfolder: | |
|
2268 | self.console.clear() | |
|
2269 | self.console.append("You have to save the plots before sending them to FTP Server") | |
|
2270 | return 0 | |
|
2271 | ||
|
2272 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
2273 | self.createFTPProcUnitView(server, username, password, remotefolder, localfolder) | |
|
2274 | else: | |
|
2275 | self.removeFTPProcUnitView() | |
|
2276 | ||
|
2164 | 2277 | # if something happened |
|
2165 | 2278 | parms_ok, output_path, blocksperfile, metada = self.checkInputsPUSave(datatype='SpectraHeis') |
|
2166 | name_operation = 'FitsWriter' | |
|
2167 | optype = 'other' | |
|
2168 | name_parameter1 = 'path' | |
|
2169 | name_parameter2 = 'dataBlocksPerFile' | |
|
2170 | name_parameter3 = 'metadatafile' | |
|
2171 | value1 = output_path | |
|
2172 | value2 = blocksperfile | |
|
2173 | value3 = metada | |
|
2174 | format2 = "int" | |
|
2175 | format3 = "str" | |
|
2176 | 2279 | if parms_ok: |
|
2280 | name_operation = 'FitsWriter' | |
|
2281 | optype = 'other' | |
|
2282 | name_parameter1 = 'path' | |
|
2283 | name_parameter2 = 'dataBlocksPerFile' | |
|
2284 | name_parameter3 = 'metadatafile' | |
|
2285 | value1 = output_path | |
|
2286 | value2 = blocksperfile | |
|
2287 | value3 = metada | |
|
2288 | format2 = "int" | |
|
2289 | format3 = "str" | |
|
2177 | 2290 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2178 | 2291 | opObj.addParameter(name=name_parameter1, value=value1) |
|
2179 | 2292 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2180 | 2293 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) |
|
2181 | 2294 | |
|
2182 | 2295 | self.showPUSpectraHeisProperties(puObj) |
|
2183 | 2296 | |
|
2184 | 2297 | self.console.clear() |
|
2185 |
self.console.append(" |
|
|
2186 | self.console.append("click on your project name in the Tree Project Explorer") | |
|
2187 | ||
|
2298 | self.console.append("Click on save icon ff you want to save your project") | |
|
2188 | 2299 | |
|
2189 | ||
|
2300 | self.actionSaveToolbar.setEnabled(True) | |
|
2301 | self.actionStarToolbar.setEnabled(True) | |
|
2302 | ||
|
2303 | return 1 | |
|
2190 | 2304 | @pyqtSignature("int") |
|
2191 | 2305 | def on_specHeisGraphCebSpectraplot_stateChanged(self, p0): |
|
2192 | 2306 | |
|
2193 | 2307 | if p0 == 2: |
|
2194 | 2308 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2195 | 2309 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
2196 | 2310 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2197 | 2311 | if p0 == 0: |
|
2198 | 2312 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
2199 | 2313 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2200 | 2314 | |
|
2201 | 2315 | @pyqtSignature("int") |
|
2202 | 2316 | def on_specHeisGraphCebRTIplot_stateChanged(self, p0): |
|
2203 | 2317 | |
|
2204 | 2318 | if p0 == 2: |
|
2205 | 2319 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2206 | 2320 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
2207 | 2321 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2208 | 2322 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
2209 | 2323 | |
|
2210 | 2324 | if p0 == 0: |
|
2211 | 2325 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
2212 | 2326 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2213 | 2327 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
2214 | 2328 | |
|
2215 | 2329 | @pyqtSignature("int") |
|
2216 | 2330 | def on_specHeisGraphSaveSpectra_stateChanged(self, p0): |
|
2217 | 2331 | """ |
|
2218 | 2332 | """ |
|
2219 | 2333 | if p0 == 2: |
|
2220 | 2334 | self.specHeisGraphPath.setEnabled(True) |
|
2221 | 2335 | self.specHeisGraphPrefix.setEnabled(True) |
|
2222 | 2336 | self.specHeisGraphToolPath.setEnabled(True) |
|
2223 | 2337 | if p0 == 0: |
|
2224 | 2338 | self.specHeisGraphPath.setEnabled(False) |
|
2225 | 2339 | self.specHeisGraphPrefix.setEnabled(False) |
|
2226 | 2340 | self.specHeisGraphToolPath.setEnabled(False) |
|
2227 | 2341 | |
|
2228 | 2342 | @pyqtSignature("int") |
|
2229 | 2343 | def on_specHeisGraphSaveRTIplot_stateChanged(self, p0): |
|
2230 | 2344 | if p0 == 2: |
|
2231 | 2345 | self.specHeisGraphPath.setEnabled(True) |
|
2232 | 2346 | self.specHeisGraphPrefix.setEnabled(True) |
|
2233 | 2347 | self.specHeisGraphToolPath.setEnabled(True) |
|
2234 | 2348 | |
|
2235 | 2349 | #-------ftp-----# |
|
2236 | 2350 | @pyqtSignature("int") |
|
2237 | 2351 | def on_specHeisGraphftpSpectra_stateChanged(self, p0): |
|
2238 | 2352 | """ |
|
2239 | 2353 | """ |
|
2240 | 2354 | if p0 == 2: |
|
2241 | 2355 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2242 | 2356 | |
|
2243 | 2357 | if p0 == 0: |
|
2244 | 2358 | self.specHeisGgraphftpratio.setEnabled(False) |
|
2245 | 2359 | |
|
2246 | 2360 | @pyqtSignature("int") |
|
2247 | 2361 | def on_specHeisGraphftpRTIplot_stateChanged(self, p0): |
|
2248 | 2362 | if p0 == 2: |
|
2249 | 2363 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2250 | 2364 | |
|
2251 | 2365 | @pyqtSignature("") |
|
2252 | 2366 | def on_specHeisGraphClear_clicked(self): |
|
2253 | 2367 | pass |
|
2254 | 2368 | |
|
2255 | 2369 | def on_click(self, index): |
|
2256 | 2370 | |
|
2257 | 2371 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) |
|
2258 | 2372 | if self.getSelectedProjectObj(): |
|
2259 | 2373 | projectObjView = self.getSelectedProjectObj() |
|
2260 | 2374 | project_name, description = projectObjView.name, projectObjView.description |
|
2261 | 2375 | id = int(projectObjView.id) |
|
2262 | 2376 | idReadUnit = projectObjView.getReadUnitId() |
|
2263 | 2377 | readUnitObj = projectObjView.getProcUnitObj(idReadUnit) |
|
2264 | 2378 | datatype, data_path, startDate, endDate, startTime, endTime , online , delay, walk , set = self.showProjectProperties(projectObjView) |
|
2265 | 2379 | # show ProjectView |
|
2266 | 2380 | self.refreshProjectWindow(project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, set) |
|
2267 | 2381 | if datatype == 'Voltage': |
|
2268 | 2382 | ext = '.r' |
|
2269 | 2383 | elif datatype == 'Spectra': |
|
2270 | 2384 | ext = '.pdata' |
|
2271 | 2385 | elif datatype == 'Fits': |
|
2272 | 2386 | ext = '.fits' |
|
2273 | 2387 | if online == 0: |
|
2274 | 2388 | self.proComStartDate.clear() |
|
2275 | 2389 | self.proComEndDate.clear() |
|
2276 | 2390 | self.loadDays(data_path, ext, walk) |
|
2277 | 2391 | self.tabProject.setEnabled(True) |
|
2278 | 2392 | self.tabVoltage.setEnabled(False) |
|
2279 | 2393 | self.tabSpectra.setEnabled(False) |
|
2280 | 2394 | self.tabCorrelation.setEnabled(False) |
|
2281 | 2395 | self.tabSpectraHeis.setEnabled(False) |
|
2282 | 2396 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
2283 | 2397 | |
|
2284 | 2398 | if self.selectedItemTree.text() == 'Voltage': |
|
2285 | 2399 | datatype = 'Voltage' |
|
2286 | 2400 | puObj = self.getSelectedPUObj() |
|
2287 | 2401 | self.showtabPUCreated(datatype=datatype) |
|
2288 | 2402 | if len(puObj.getOperationObjList()) == 1: |
|
2289 | 2403 | self.setInputsPU_View(datatype) |
|
2290 | 2404 | else: |
|
2291 | 2405 | self.refreshPUWindow(datatype=datatype, puObj=puObj) |
|
2292 | 2406 | self.showPUVoltageProperties(puObj) |
|
2293 | 2407 | |
|
2294 | 2408 | if self.selectedItemTree.text() == 'Spectra': |
|
2295 | 2409 | |
|
2296 | 2410 | datatype = 'Spectra' |
|
2297 | 2411 | puObj = self.getSelectedPUObj() |
|
2298 | 2412 | self.showtabPUCreated(datatype=datatype) |
|
2299 | 2413 | if readUnitObj.datatype == 'Spectra': |
|
2300 | 2414 | self.specOpnFFTpoints.setEnabled(False) |
|
2301 | 2415 | self.specOpProfiles.setEnabled(False) |
|
2302 | 2416 | self.specOpippFactor.setEnabled(False) |
|
2303 | 2417 | |
|
2304 | 2418 | else: |
|
2305 | 2419 | self.specOpnFFTpoints.setEnabled(True) |
|
2306 | 2420 | self.specOpProfiles.setEnabled(True) |
|
2307 | 2421 | self.specOpippFactor.setEnabled(True) |
|
2308 | 2422 | |
|
2309 | 2423 | if len(puObj.getOperationObjList()) == 1: |
|
2310 | 2424 | self.setInputsPU_View(datatype) |
|
2311 | 2425 | |
|
2312 |
opObj = puObj.getOperationObj(name=" |
|
|
2426 | opObj = puObj.getOperationObj(name="run") | |
|
2313 | 2427 | if opObj == None: |
|
2314 | 2428 | self.specOpnFFTpoints.clear() |
|
2315 | 2429 | self.specOpProfiles.clear() |
|
2316 | 2430 | self.specOpippFactor.clear() |
|
2317 | 2431 | else: |
|
2318 | 2432 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
2319 | 2433 | if parmObj == None: |
|
2320 | 2434 | self.specOpnFFTpoints.clear() |
|
2321 | 2435 | else: |
|
2322 | 2436 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
2323 | 2437 | self.specOpnFFTpoints.setText(str(value)) |
|
2324 | 2438 | |
|
2325 | 2439 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
2326 | 2440 | if parmObj == None: |
|
2327 | 2441 | self.specOpProfiles.clear() |
|
2328 | 2442 | else: |
|
2329 | 2443 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
2330 | 2444 | self.specOpProfiles.setText(str(value)) |
|
2331 | 2445 | |
|
2332 | 2446 | parmObj = opObj.getParameterObj(parameterName="ippFactor") |
|
2333 | 2447 | if parmObj == None: |
|
2334 | 2448 | self.specOpippFactor.clear() |
|
2335 | 2449 | else: |
|
2336 | 2450 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
2337 | 2451 | self.specOpippFactor.setText(str(value)) |
|
2338 | 2452 | |
|
2339 |
opObj = puObj.getOperationObj(name=" |
|
|
2453 | opObj = puObj.getOperationObj(name="run") | |
|
2340 | 2454 | if opObj == None: |
|
2341 | 2455 | self.specOppairsList.clear() |
|
2342 | 2456 | self.specOpCebCrossSpectra.setCheckState(0) |
|
2343 | 2457 | else: |
|
2344 | 2458 | parmObj = opObj.getParameterObj(parameterName='pairsList') |
|
2345 | 2459 | if parmObj == None: |
|
2346 | 2460 | self.specOppairsList.clear() |
|
2347 | 2461 | self.specOpCebCrossSpectra.setCheckState(0) |
|
2348 | 2462 | else: |
|
2349 | 2463 | value = opObj.getParameterValue(parameterName='pairsList') |
|
2350 | 2464 | value = str(value)[1:-1] |
|
2351 | 2465 | self.specOppairsList.setText(str(value)) |
|
2352 | 2466 | self.specOppairsList.setEnabled(True) |
|
2353 | 2467 | self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked) |
|
2354 | 2468 | |
|
2355 | 2469 | else: |
|
2356 | 2470 | self.refreshPUWindow(datatype=datatype, puObj=puObj) |
|
2357 | 2471 | self.showPUSpectraProperties(puObj) |
|
2358 | 2472 | |
|
2359 | 2473 | if self.selectedItemTree.text() == 'Correlation': |
|
2360 | 2474 | self.tabCorrelation.setEnabled(True) |
|
2361 | 2475 | self.tabVoltage.setEnabled(False) |
|
2362 | 2476 | self.tabSpectra.setEnabled(False) |
|
2363 | 2477 | self.tabWidgetProject.setCurrentWidget(self.tabCorrelation) |
|
2364 | 2478 | |
|
2365 | 2479 | if self.selectedItemTree.text() == 'SpectraHeis': |
|
2366 | 2480 | datatype = 'SpectraHeis' |
|
2367 | 2481 | puObj = self.getSelectedPUObj() |
|
2368 | 2482 | self.showtabPUCreated(datatype=datatype) |
|
2369 | 2483 | if len(puObj.getOperationObjList()) == 1: |
|
2370 | 2484 | self.setInputsPU_View(datatype) |
|
2371 | 2485 | else: |
|
2372 | 2486 | self.refreshPUWindow(datatype=datatype, puObj=puObj) |
|
2373 | 2487 | self.showPUSpectraHeisProperties(puObj) |
|
2374 | 2488 | |
|
2375 | 2489 | |
|
2376 | 2490 | def on_right_click(self, pos): |
|
2377 | 2491 | |
|
2378 | 2492 | self.menu = QtGui.QMenu() |
|
2379 | 2493 | quitAction0 = self.menu.addAction("NewProject") |
|
2380 | 2494 | quitAction1 = self.menu.addAction("NewProcessingUnit") |
|
2381 | 2495 | quitAction2 = self.menu.addAction("Delete") |
|
2382 | 2496 | quitAction3 = self.menu.addAction("Exit") |
|
2383 | 2497 | |
|
2384 | 2498 | if len(self.__itemTreeDict) == 0: |
|
2385 | 2499 | quitAction2.setEnabled(False) |
|
2386 | 2500 | else: |
|
2387 | 2501 | quitAction2.setEnabled(True) |
|
2388 | 2502 | |
|
2389 | 2503 | action = self.menu.exec_(self.mapToGlobal(pos)) |
|
2390 | 2504 | |
|
2391 | 2505 | if action == quitAction0: |
|
2392 | 2506 | self. setInputsProject_View() |
|
2393 | 2507 | self.create = True |
|
2394 | 2508 | |
|
2395 | 2509 | if action == quitAction1: |
|
2396 | 2510 | if len(self.__projectObjDict) == 0: |
|
2397 | 2511 | outputstr = "First Create a Project then add Processing Unit" |
|
2398 | 2512 | self.console.clear() |
|
2399 | 2513 | self.console.append(outputstr) |
|
2400 | 2514 | return 0 |
|
2401 | 2515 | else: |
|
2402 | 2516 | self.addPUWindow() |
|
2403 | 2517 | self.console.clear() |
|
2404 | 2518 | self.console.append("Please, Choose the type of Processing Unit") |
|
2405 | 2519 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
2406 | 2520 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
2407 | 2521 | self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
2408 | 2522 | |
|
2409 | 2523 | if action == quitAction2: |
|
2410 | 2524 | index = self.selectedItemTree |
|
2411 | 2525 | try: |
|
2412 | 2526 | index.parent() |
|
2413 | 2527 | except: |
|
2414 | 2528 | self.console.append('First left click on Project or Processing Unit') |
|
2415 | 2529 | return 0 |
|
2416 | 2530 | # print index.parent(),index |
|
2417 | 2531 | if index.parent() == None: |
|
2418 | 2532 | self.projectExplorerModel.removeRow(index.row()) |
|
2419 | 2533 | else: |
|
2420 | 2534 | index.parent().removeRow(index.row()) |
|
2421 | 2535 | self.deleteProjectorPU() |
|
2422 | 2536 | self.console.clear() |
|
2423 | 2537 | # for i in self.projectExplorerTree.selectionModel().selection().indexes(): |
|
2424 | 2538 | # print i.row() |
|
2425 | 2539 | |
|
2426 | 2540 | if action == quitAction3: |
|
2427 | 2541 | return |
|
2428 | 2542 | |
|
2429 | 2543 | def refreshProjectWindow(self, project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, set): |
|
2430 | 2544 | |
|
2431 | 2545 | self.proName.setText(str(project_name)) |
|
2432 | 2546 | |
|
2433 | 2547 | if datatype == 'Voltage': |
|
2434 | 2548 | ext = '.r' |
|
2435 | 2549 | value = 0 |
|
2436 | 2550 | elif datatype == 'Spectra': |
|
2437 | 2551 | ext = '.pdata' |
|
2438 | 2552 | value = 1 |
|
2439 | 2553 | elif datatype == 'Fits': |
|
2440 | 2554 | ext = 'fits' |
|
2441 | 2555 | value = 2 |
|
2442 | 2556 | self.proDataType.setText(ext) |
|
2443 | 2557 | self.proDataPath.setText(str(data_path)) |
|
2444 | 2558 | self.proComDataType.setCurrentIndex(value) |
|
2445 | 2559 | self.proComReadMode.setCurrentIndex(int(online)) |
|
2446 | 2560 | self.proDelay.setText(str(delay)) |
|
2447 | 2561 | self.proSet.setText(str(set)) |
|
2448 | 2562 | self.proComStartDate.clear() |
|
2449 | 2563 | self.proComEndDate.clear() |
|
2450 | 2564 | self.proComStartDate.addItem(str(startDate)) |
|
2451 | 2565 | self.proComEndDate.addItem(str(endDate)) |
|
2452 | 2566 | starTime = str(startTime) |
|
2453 | 2567 | starlist = starTime.split(":") |
|
2454 | 2568 | endTime = str(endTime) |
|
2455 | 2569 | endlist = endTime.split(":") |
|
2456 | 2570 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
2457 | 2571 | self.proStartTime.setTime(self.time) |
|
2458 | 2572 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
2459 | 2573 | self.proEndTime.setTime(self.time) |
|
2460 | 2574 | self.proDescription.clear() |
|
2461 | 2575 | self.proDescription.append(description) |
|
2462 | 2576 | |
|
2463 | 2577 | def refreshPUWindow(self, datatype, puObj): |
|
2464 | 2578 | |
|
2465 | 2579 | if datatype == 'Voltage': |
|
2466 | 2580 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2467 | 2581 | if opObj == None: |
|
2468 | 2582 | self.volOpRadarfrequency.clear() |
|
2469 | 2583 | self.volOpCebRadarfrequency.setCheckState(0) |
|
2470 | 2584 | else: |
|
2471 | 2585 | value = opObj.getParameterValue(parameterName='frequency') |
|
2472 | 2586 | value = str(value) |
|
2473 | 2587 | self.volOpRadarfrequency.setText(value) |
|
2474 | 2588 | self.volOpRadarfrequency.setEnabled(True) |
|
2475 | 2589 | self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
2476 | 2590 | |
|
2477 | 2591 | |
|
2478 | 2592 | opObj = puObj.getOperationObj(name="selectChannels") |
|
2479 | 2593 | if opObj == None: |
|
2480 | 2594 | self.volOpChannel.clear() |
|
2481 | 2595 | self.volOpCebChannels.setCheckState(0) |
|
2482 | 2596 | |
|
2483 | 2597 | else: |
|
2484 | 2598 | value = opObj.getParameterValue(parameterName='channelList') |
|
2485 | 2599 | value = str(value)[1:-1] |
|
2486 | 2600 | self.volOpChannel.setText(value) |
|
2487 | 2601 | self.volOpChannel.setEnabled(True) |
|
2488 | 2602 | self.volOpCebChannels.setCheckState(QtCore.Qt.Checked) |
|
2489 | 2603 | |
|
2490 | 2604 | |
|
2491 | 2605 | opObj = puObj.getOperationObj(name="selectHeights") |
|
2492 | 2606 | if opObj == None: |
|
2493 | 2607 | self.volOpHeights.clear() |
|
2494 | 2608 | self.volOpCebHeights.setCheckState(0) |
|
2495 | 2609 | else: |
|
2496 | 2610 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
2497 | 2611 | value1 = str(value1) |
|
2498 | 2612 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
2499 | 2613 | value2 = str(value2) |
|
2500 | 2614 | value = value1 + "," + value2 |
|
2501 | 2615 | self.volOpHeights.setText(value) |
|
2502 | 2616 | self.volOpHeights.setEnabled(True) |
|
2503 | 2617 | self.volOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
2504 | 2618 | |
|
2505 | 2619 | opObj = puObj.getOperationObj(name="filterByHeights") |
|
2506 | 2620 | if opObj == None: |
|
2507 | 2621 | self.volOpFilter.clear() |
|
2508 | 2622 | self.volOpCebFilter.setCheckState(0) |
|
2509 | 2623 | else: |
|
2510 | 2624 | value = opObj.getParameterValue(parameterName='window') |
|
2511 | 2625 | value = str(value) |
|
2512 | 2626 | self.volOpFilter.setText(value) |
|
2513 | 2627 | self.volOpFilter.setEnabled(True) |
|
2514 | 2628 | self.volOpCebFilter.setCheckState(QtCore.Qt.Checked) |
|
2515 | 2629 | |
|
2516 | 2630 | opObj = puObj.getOperationObj(name="ProfileSelector") |
|
2517 | 2631 | if opObj == None: |
|
2518 | 2632 | self.volOpProfile.clear() |
|
2519 | 2633 | self.volOpCebProfile.setCheckState(0) |
|
2520 | 2634 | else: |
|
2521 | 2635 | for parmObj in opObj.getParameterObjList(): |
|
2522 | 2636 | if parmObj.name == "profileRangeList": |
|
2523 | 2637 | value = opObj.getParameterValue(parameterName='profileRangeList') |
|
2524 | 2638 | value = str(value)[1:-1] |
|
2525 | 2639 | self.volOpProfile.setText(value) |
|
2526 | 2640 | self.volOpProfile.setEnabled(True) |
|
2527 | 2641 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2528 | 2642 | self.volOpComProfile.setCurrentIndex(1) |
|
2529 | 2643 | if parmObj.name == "profileList": |
|
2530 | 2644 | value = opObj.getParameterValue(parameterName='profileList') |
|
2531 | 2645 | value = str(value)[1:-1] |
|
2532 | 2646 | self.volOpProfile.setText(value) |
|
2533 | 2647 | self.volOpProfile.setEnabled(True) |
|
2534 | 2648 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2535 | 2649 | self.volOpComProfile.setCurrentIndex(0) |
|
2536 | 2650 | |
|
2537 | 2651 | |
|
2538 | 2652 | opObj = puObj.getOperationObj(name="Decoder") |
|
2539 | 2653 | if opObj == None: |
|
2540 | 2654 | self.volOpCebDecodification.setCheckState(0) |
|
2541 | 2655 | else: |
|
2542 | 2656 | try: |
|
2543 | 2657 | valueCode = opObj.getParameterValue(parameterName='nCode') |
|
2544 | 2658 | status = "on" |
|
2545 | 2659 | except: |
|
2546 | 2660 | status = "off" |
|
2547 | 2661 | if not status == "off": |
|
2548 | 2662 | if int(valueCode) == 1: |
|
2549 | 2663 | valueBaud = opObj.getParameterValue(parameterName='nBaud') |
|
2550 | 2664 | if int(valueBaud) == 3: |
|
2551 | 2665 | self.volOpComCode.setCurrentIndex(0) |
|
2552 | 2666 | if int(valueBaud) == 4: |
|
2553 | 2667 | self.volOpComCode.setCurrentIndex(1) |
|
2554 | 2668 | if int(valueBaud) == 5: |
|
2555 | 2669 | self.volOpComCode.setCurrentIndex(2) |
|
2556 | 2670 | if int(valueBaud) == 7: |
|
2557 | 2671 | self.volOpComCode.setCurrentIndex(3) |
|
2558 | 2672 | if int(valueBaud) == 11: |
|
2559 | 2673 | self.volOpComCode.setCurrentIndex(4) |
|
2560 | 2674 | if int(valueBaud) == 13: |
|
2561 | 2675 | self.volOpComCode.setCurrentIndex(5) |
|
2562 | 2676 | else: |
|
2563 | 2677 | valueBaud = opObj.getParameterValue(parameterName='nBaud') |
|
2564 | 2678 | if int(valueBaud) == 3: |
|
2565 | 2679 | self.volOpComCode.setCurrentIndex(6) |
|
2566 | 2680 | if int(valueBaud) == 4: |
|
2567 | 2681 | self.volOpComCode.setCurrentIndex(7) |
|
2568 | 2682 | if int(valueBaud) == 5: |
|
2569 | 2683 | self.volOpComCode.setCurrentIndex(8) |
|
2570 | 2684 | if int(valueBaud) == 7: |
|
2571 | 2685 | self.volOpComCode.setCurrentIndex(9) |
|
2572 | 2686 | if int(valueBaud) == 11: |
|
2573 | 2687 | self.volOpComCode.setCurrentIndex(10) |
|
2574 | 2688 | if int(valueBaud) == 13: |
|
2575 | 2689 | self.volOpComCode.setCurrentIndex(11) |
|
2576 | 2690 | |
|
2577 | 2691 | for parmObj in opObj.getParameterObjList(): |
|
2578 | 2692 | if parmObj.name == "nBaud": |
|
2579 | 2693 | value = opObj.getParameterValue(parameterName='nBaud') |
|
2580 | 2694 | if parmObj.name == "mode": |
|
2581 | 2695 | value = opObj.getParameterValue(parameterName='mode') |
|
2582 | 2696 | self.volOpComMode.setCurrentIndex(value) |
|
2583 | 2697 | else: |
|
2584 | 2698 | self.volOpComCode.setCurrentIndex(12) |
|
2585 | 2699 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) |
|
2586 | 2700 | |
|
2587 | 2701 | opObj = puObj.getOperationObj(name="CohInt") |
|
2588 | 2702 | if opObj == None: |
|
2589 | 2703 | self.volOpCohInt.clear() |
|
2590 | 2704 | self.volOpCebCohInt.setCheckState(0) |
|
2591 | 2705 | else: |
|
2592 | 2706 | value = opObj.getParameterValue(parameterName='n') |
|
2593 | 2707 | self.volOpCohInt.setText(str(value)) |
|
2594 | 2708 | self.volOpCohInt.setEnabled(True) |
|
2595 | 2709 | self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked) |
|
2596 | 2710 | |
|
2597 |
opObj = puObj.getOperationObj(name=' |
|
|
2711 | opObj = puObj.getOperationObj(name='Scope') | |
|
2598 | 2712 | if opObj == None: |
|
2599 | 2713 | self.volGraphCebshow.setCheckState(0) |
|
2600 | 2714 | else: |
|
2601 | 2715 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) |
|
2602 | 2716 | value = opObj.getParameterObj(parameterName='channelList') |
|
2603 | 2717 | if value == None: |
|
2604 | 2718 | self.volGraphChannelList.clear() |
|
2605 | 2719 | else: |
|
2606 | 2720 | value = opObj.getParameterValue(parameterName='channelList') |
|
2607 | 2721 | value = str(value)[1:-1] |
|
2608 | 2722 | self.volGraphChannelList.setText(value) |
|
2609 | 2723 | self.volOpProfile.setEnabled(True) |
|
2610 | 2724 | |
|
2611 | 2725 | for parmObj in opObj.getParameterObjList(): |
|
2612 | 2726 | if parmObj.name == "xmin": |
|
2613 | 2727 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
2614 | 2728 | value1 = str(value1) |
|
2615 | 2729 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
2616 | 2730 | value2 = str(value2) |
|
2617 | 2731 | value = value1 + "," + value2 |
|
2618 | 2732 | self.volGraphfreqrange.setText(value) |
|
2619 | 2733 | else: |
|
2620 | 2734 | self.volGraphfreqrange.clear() |
|
2621 | 2735 | for parmObj in opObj.getParameterObjList(): |
|
2622 | 2736 | if parmObj.name == "ymin": |
|
2623 | 2737 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
2624 | 2738 | value1 = str(value1) |
|
2625 | 2739 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
2626 | 2740 | value2 = str(value2) |
|
2627 | 2741 | value = value1 + "," + value2 |
|
2628 | 2742 | value2 = str(value2) |
|
2629 | 2743 | self.volGraphHeightrange.setText(value) |
|
2630 | 2744 | else: |
|
2631 | 2745 | self.volGraphHeightrange.clear() |
|
2632 | 2746 | |
|
2633 | 2747 | |
|
2634 | 2748 | for parmObj in opObj.getParameterObjList(): |
|
2635 | 2749 | if parmObj.name == "save": |
|
2636 | 2750 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) |
|
2637 | 2751 | else: |
|
2638 | 2752 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
2639 | 2753 | |
|
2640 | 2754 | # outputVoltageWrite |
|
2641 | 2755 | opObj = puObj.getOperationObj(name='VoltageWriter') |
|
2642 | 2756 | if opObj == None: |
|
2643 | 2757 | self.volOutputPath.clear() |
|
2644 | 2758 | self.volOutputblocksperfile.clear() |
|
2645 | 2759 | self.volOutputprofilesperblock.clear() |
|
2646 | 2760 | else: |
|
2647 | 2761 | value = opObj.getParameterObj(parameterName='path') |
|
2648 | 2762 | if value == None: |
|
2649 | 2763 | self.volOutputPath.clear() |
|
2650 | 2764 | else: |
|
2651 | 2765 | value = opObj.getParameterValue(parameterName='path') |
|
2652 | 2766 | path = str(value) |
|
2653 | 2767 | self.volOutputPath.setText(path) |
|
2654 | 2768 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
2655 | 2769 | if value == None: |
|
2656 | 2770 | self.volOutputblocksperfile.clear() |
|
2657 | 2771 | else: |
|
2658 | 2772 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
2659 | 2773 | blocksperfile = str(value) |
|
2660 | 2774 | self.volOutputblocksperfile.setText(blocksperfile) |
|
2661 | 2775 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
2662 | 2776 | if value == None: |
|
2663 | 2777 | self.volOutputprofilesperblock.clear() |
|
2664 | 2778 | else: |
|
2665 | 2779 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
2666 | 2780 | profilesPerBlock = str(value) |
|
2667 | 2781 | self.volOutputprofilesperblock.setText(profilesPerBlock) |
|
2668 | 2782 | |
|
2669 | 2783 | if datatype == 'Spectra': |
|
2670 | 2784 | |
|
2671 | 2785 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2672 | 2786 | if opObj == None: |
|
2673 | 2787 | self.specOpRadarfrequency.clear() |
|
2674 | 2788 | self.specOpCebRadarfrequency.setCheckState(0) |
|
2675 | 2789 | else: |
|
2676 | 2790 | value = opObj.getParameterValue(parameterName='frequency') |
|
2677 | 2791 | value = str(value) |
|
2678 | 2792 | self.specOpRadarfrequency.setText(value) |
|
2679 | 2793 | self.specOpRadarfrequency.setEnabled(True) |
|
2680 | 2794 | self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
2681 | 2795 | |
|
2682 |
opObj = puObj.getOperationObj(name=" |
|
|
2796 | opObj = puObj.getOperationObj(name="run") | |
|
2683 | 2797 | if opObj == None: |
|
2684 | 2798 | self.specOpnFFTpoints.clear() |
|
2685 | 2799 | self.specOpProfiles.clear() |
|
2686 | 2800 | self.specOpippFactor.clear() |
|
2687 | 2801 | else: |
|
2688 | 2802 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
2689 | 2803 | if parmObj == None: |
|
2690 | 2804 | self.specOpnFFTpoints.clear() |
|
2691 | 2805 | else: |
|
2692 | 2806 | self.specOpnFFTpoints.setEnabled(True) |
|
2693 | 2807 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
2694 | 2808 | self.specOpnFFTpoints.setText(str(value)) |
|
2695 | 2809 | |
|
2696 | 2810 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
2697 | 2811 | if parmObj == None: |
|
2698 | 2812 | self.specOpProfiles.clear() |
|
2699 | 2813 | else: |
|
2700 | 2814 | self.specOpProfiles.setEnabled(True) |
|
2701 | 2815 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
2702 | 2816 | self.specOpProfiles.setText(str(value)) |
|
2703 | 2817 | |
|
2704 | 2818 | parmObj = opObj.getParameterObj(parameterName='ippFactor') |
|
2705 | 2819 | if parmObj == None: |
|
2706 | 2820 | self.specOpippFactor.clear() |
|
2707 | 2821 | else: |
|
2708 | 2822 | self.specOpippFactor.setEnabled(True) |
|
2709 | 2823 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
2710 | 2824 | self.specOpippFactor.setText(str(value)) |
|
2711 | 2825 | |
|
2712 |
opObj = puObj.getOperationObj(name=" |
|
|
2826 | opObj = puObj.getOperationObj(name="run") | |
|
2713 | 2827 | if opObj == None: |
|
2714 | 2828 | self.specOppairsList.clear() |
|
2715 | 2829 | self.specOpCebCrossSpectra.setCheckState(0) |
|
2716 | 2830 | else: |
|
2717 | 2831 | parmObj = opObj.getParameterObj(parameterName='pairsList') |
|
2718 | 2832 | if parmObj == None: |
|
2719 | 2833 | self.specOppairsList.clear() |
|
2720 | 2834 | self.specOpCebCrossSpectra.setCheckState(0) |
|
2721 | 2835 | else: |
|
2722 | 2836 | value = opObj.getParameterValue(parameterName='pairsList') |
|
2723 | 2837 | value = str(value)[1:-1] |
|
2724 | 2838 | self.specOppairsList.setText(str(value)) |
|
2725 | 2839 | self.specOppairsList.setEnabled(True) |
|
2726 | 2840 | self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked) |
|
2727 | 2841 | |
|
2728 | 2842 | opObj = puObj.getOperationObj(name="selectChannels") |
|
2729 | 2843 | if opObj == None: |
|
2730 | 2844 | self.specOpChannel.clear() |
|
2731 | 2845 | self.specOpCebChannel.setCheckState(0) |
|
2732 | 2846 | else: |
|
2733 | 2847 | value = opObj.getParameterValue(parameterName='channelList') |
|
2734 | 2848 | value = str(value)[1:-1] |
|
2735 | 2849 | self.specOpChannel.setText(value) |
|
2736 | 2850 | self.specOpChannel.setEnabled(True) |
|
2737 | 2851 | self.specOpCebChannel.setCheckState(QtCore.Qt.Checked) |
|
2738 | 2852 | |
|
2739 | 2853 | opObj = puObj.getOperationObj(name="selectHeights") |
|
2740 | 2854 | if opObj == None: |
|
2741 | 2855 | self.specOpHeights.clear() |
|
2742 | 2856 | self.specOpCebHeights.setCheckState(0) |
|
2743 | 2857 | else: |
|
2744 | 2858 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
2745 | 2859 | value1 = str(value1) |
|
2746 | 2860 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
2747 | 2861 | value2 = str(value2) |
|
2748 | 2862 | value = value1 + "," + value2 |
|
2749 | 2863 | self.specOpHeights.setText(value) |
|
2750 | 2864 | self.specOpHeights.setEnabled(True) |
|
2751 | 2865 | self.specOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
2752 | 2866 | |
|
2753 | 2867 | opObj = puObj.getOperationObj(name="IncohInt") |
|
2754 | 2868 | if opObj == None: |
|
2755 | 2869 | self.specOpIncoherent.clear() |
|
2756 | 2870 | self.specOpCebIncoherent.setCheckState(0) |
|
2757 | 2871 | else: |
|
2758 | 2872 | for parmObj in opObj.getParameterObjList(): |
|
2759 | 2873 | if parmObj.name == 'timeInterval': |
|
2760 | 2874 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
2761 | 2875 | value = float(value) |
|
2762 | 2876 | self.specOpIncoherent.setText(str(value)) |
|
2763 | 2877 | self.specOpIncoherent.setEnabled(True) |
|
2764 | 2878 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
2765 | 2879 | self.specOpCobIncInt.setCurrentIndex(0) |
|
2766 | 2880 | |
|
2767 | 2881 | if parmObj.name == 'n': |
|
2768 | 2882 | value = opObj.getParameterValue(parameterName='n') |
|
2769 | 2883 | value = float(value) |
|
2770 | 2884 | self.specOpIncoherent.setText(str(value)) |
|
2771 | 2885 | self.specOpIncoherent.setEnabled(True) |
|
2772 | 2886 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
2773 | 2887 | self.specOpCobIncInt.setCurrentIndex(1) |
|
2774 | 2888 | |
|
2775 | 2889 | opObj = puObj.getOperationObj(name="removeDC") |
|
2776 | 2890 | if opObj == None: |
|
2777 | 2891 | self.specOpCebRemoveDC.setCheckState(0) |
|
2778 | 2892 | else: |
|
2779 | 2893 | self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked) |
|
2780 | 2894 | value = opObj.getParameterValue(parameterName='mode') |
|
2781 | 2895 | if value == 1: |
|
2782 | 2896 | self.specOpComRemoveDC.setCurrentIndex(0) |
|
2783 | 2897 | elif value == 2: |
|
2784 | 2898 | self.specOpComRemoveDC.setCurrentIndex(1) |
|
2785 | 2899 | |
|
2786 | 2900 | opObj = puObj.getOperationObj(name="removeInterference") |
|
2787 | 2901 | if opObj == None: |
|
2788 | 2902 | self.specOpCebRemoveInt.setCheckState(0) |
|
2789 | 2903 | else: |
|
2790 | 2904 | self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked) |
|
2791 | 2905 | |
|
2792 | 2906 | opObj = puObj.getOperationObj(name='getNoise') |
|
2793 | 2907 | if opObj == None: |
|
2794 | 2908 | self.specOpCebgetNoise.setCheckState(0) |
|
2795 | 2909 | self.specOpgetNoise.clear() |
|
2796 | 2910 | else: |
|
2797 | 2911 | self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked) |
|
2798 | 2912 | parmObj = opObj.getParameterObj(parameterName='minHei') |
|
2799 | 2913 | if parmObj == None: |
|
2800 | 2914 | self.specOpgetNoise.clear() |
|
2801 | 2915 | value1 = None |
|
2802 | 2916 | else: |
|
2803 | 2917 | value1 = opObj.getParameterValue(parameterName='minHei') |
|
2804 | 2918 | value1 = str(value1) |
|
2805 | 2919 | parmObj = opObj.getParameterObj(parameterName='maxHei') |
|
2806 | 2920 | if parmObj == None: |
|
2807 | 2921 | value2 = None |
|
2808 | 2922 | value = value1 |
|
2809 | 2923 | self.specOpgetNoise.setText(value) |
|
2810 | 2924 | self.specOpgetNoise.setEnabled(True) |
|
2811 | 2925 | else: |
|
2812 | 2926 | value2 = opObj.getParameterValue(parameterName='maxHei') |
|
2813 | 2927 | value2 = str(value2) |
|
2814 | 2928 | parmObj = opObj.getParameterObj(parameterName='minVel') |
|
2815 | 2929 | if parmObj == None: |
|
2816 | 2930 | value3 = None |
|
2817 | 2931 | value = value1 + "," + value2 |
|
2818 | 2932 | self.specOpgetNoise.setText(value) |
|
2819 | 2933 | self.specOpgetNoise.setEnabled(True) |
|
2820 | 2934 | else: |
|
2821 | 2935 | value3 = opObj.getParameterValue(parameterName='minVel') |
|
2822 | 2936 | value3 = str(value3) |
|
2823 | 2937 | parmObj = opObj.getParameterObj(parameterName='maxVel') |
|
2824 | 2938 | if parmObj == None: |
|
2825 | 2939 | value4 = None |
|
2826 | 2940 | value = value1 + "," + value2 + "," + value3 |
|
2827 | 2941 | self.specOpgetNoise.setText(value) |
|
2828 | 2942 | self.specOpgetNoise.setEnabled(True) |
|
2829 | 2943 | else: |
|
2830 | 2944 | value4 = opObj.getParameterValue(parameterName='maxVel') |
|
2831 | 2945 | value4 = str(value4) |
|
2832 | 2946 | value = value1 + "," + value2 + "," + value3 + ',' + value4 |
|
2833 | 2947 | self.specOpgetNoise.setText(value) |
|
2834 | 2948 | self.specOpgetNoise.setEnabled(True) |
|
2835 | 2949 | |
|
2836 | opObj = puObj.getOperationObj(name='Plot') | |
|
2837 | opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") | |
|
2950 | opObj = puObj.getOperationObj(name='SpectraPlot') | |
|
2951 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") | |
|
2838 | 2952 | if opObj == None: |
|
2839 | 2953 | self.specGraphCebSpectraplot.setCheckState(0) |
|
2840 | 2954 | self.specGraphSaveSpectra.setCheckState(0) |
|
2841 | 2955 | self.specGraphftpSpectra.setCheckState(0) |
|
2842 | 2956 | |
|
2843 | 2957 | else: |
|
2844 | 2958 | operationSpectraPlot = "Enable" |
|
2845 | 2959 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
2846 | 2960 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
2847 | 2961 | if parmObj == None: |
|
2848 | 2962 | self.specGgraphChannelList.clear() |
|
2849 | 2963 | else: |
|
2850 | 2964 | value = opObj.getParameterValue(parameterName='channelList') |
|
2851 | 2965 | channelListSpectraPlot = str(value)[1:-1] |
|
2852 | 2966 | self.specGgraphChannelList.setText(channelListSpectraPlot) |
|
2853 | 2967 | self.specGgraphChannelList.setEnabled(True) |
|
2854 | 2968 | |
|
2855 | 2969 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
2856 | 2970 | if parmObj == None: |
|
2857 | 2971 | self.specGgraphFreq.clear() |
|
2858 | 2972 | else: |
|
2859 | 2973 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
2860 | 2974 | value1 = str(value1) |
|
2861 | 2975 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
2862 | 2976 | value2 = str(value2) |
|
2863 | 2977 | value = value1 + "," + value2 |
|
2864 | 2978 | self.specGgraphFreq.setText(value) |
|
2865 | 2979 | self.specGgraphFreq.setEnabled(True) |
|
2866 | 2980 | |
|
2867 | 2981 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
2868 | 2982 | if parmObj == None: |
|
2869 | 2983 | self.specGgraphHeight.clear() |
|
2870 | 2984 | else: |
|
2871 | 2985 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
2872 | 2986 | value1 = str(value1) |
|
2873 | 2987 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
2874 | 2988 | value2 = str(value2) |
|
2875 | 2989 | value = value1 + "," + value2 |
|
2876 | 2990 | self.specGgraphHeight.setText(value) |
|
2877 | 2991 | self.specGgraphHeight.setEnabled(True) |
|
2878 | 2992 | |
|
2879 | 2993 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
2880 | 2994 | if parmObj == None: |
|
2881 | 2995 | self.specGgraphDbsrange.clear() |
|
2882 | 2996 | else: |
|
2883 | 2997 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
2884 | 2998 | value1 = str(value1) |
|
2885 | 2999 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
2886 | 3000 | value2 = str(value2) |
|
2887 | 3001 | value = value1 + "," + value2 |
|
2888 | 3002 | self.specGgraphDbsrange.setText(value) |
|
2889 | 3003 | self.specGgraphDbsrange.setEnabled(True) |
|
2890 | 3004 | |
|
2891 | 3005 | |
|
2892 | 3006 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
2893 | 3007 | if parmObj == None: |
|
2894 | 3008 | self.specGraphSaveSpectra.setCheckState(0) |
|
2895 | 3009 | else: |
|
2896 | 3010 | self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
2897 | 3011 | value = opObj.getParameterValue(parameterName='figpath') |
|
2898 | 3012 | self.specGraphPath.setText(value) |
|
2899 | 3013 | |
|
2900 | 3014 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
2901 | 3015 | if parmObj == None: |
|
2902 | 3016 | self.specGraphftpSpectra.setCheckState(0) |
|
2903 | 3017 | else: |
|
2904 | 3018 | self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
2905 | 3019 | try: |
|
2906 | 3020 | value = opObj.getParameterValue(parameterName='wr_period') |
|
2907 | 3021 | except: |
|
2908 | 3022 | value = " " |
|
2909 | 3023 | self.specGgraphftpratio.setText(str(value)) |
|
2910 | 3024 | |
|
2911 |
opObj = puObj.getOpObj |
|
|
3025 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') | |
|
3026 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") | |
|
2912 | 3027 | if opObj == None: |
|
2913 | 3028 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
2914 | 3029 | self.specGraphSaveCross.setCheckState(0) |
|
2915 | 3030 | |
|
2916 | 3031 | else: |
|
2917 | 3032 | operationCrossSpectraPlot = "Enable" |
|
2918 | 3033 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
2919 | 3034 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
2920 | 3035 | if parmObj == None: |
|
2921 | 3036 | self.specGgraphFreq.clear() |
|
2922 | 3037 | else: |
|
2923 | 3038 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
2924 | 3039 | value1 = str(value1) |
|
2925 | 3040 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
2926 | 3041 | value2 = str(value2) |
|
2927 | 3042 | value = value1 + "," + value2 |
|
2928 | 3043 | self.specGgraphFreq.setText(value) |
|
2929 | 3044 | self.specGgraphFreq.setEnabled(True) |
|
2930 | 3045 | |
|
2931 | 3046 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
2932 | 3047 | if parmObj == None: |
|
2933 | 3048 | self.specGgraphHeight.clear() |
|
2934 | 3049 | else: |
|
2935 | 3050 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
2936 | 3051 | value1 = str(value1) |
|
2937 | 3052 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
2938 | 3053 | value2 = str(value2) |
|
2939 | 3054 | value = value1 + "," + value2 |
|
2940 | 3055 | self.specGgraphHeight.setText(value) |
|
2941 | 3056 | self.specGgraphHeight.setEnabled(True) |
|
2942 | 3057 | |
|
2943 | 3058 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
2944 | 3059 | if parmObj == None: |
|
2945 | 3060 | self.specGgraphDbsrange.clear() |
|
2946 | 3061 | else: |
|
2947 | 3062 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
2948 | 3063 | value1 = str(value1) |
|
2949 | 3064 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
2950 | 3065 | value2 = str(value2) |
|
2951 | 3066 | value = value1 + "," + value2 |
|
2952 | 3067 | self.specGgraphDbsrange.setText(value) |
|
2953 | 3068 | self.specGgraphDbsrange.setEnabled(True) |
|
2954 | 3069 | |
|
2955 | 3070 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
2956 | 3071 | if parmObj == None: |
|
2957 | 3072 | self.specGraphSaveCross.setCheckState(0) |
|
2958 | 3073 | |
|
2959 | 3074 | else: |
|
2960 | 3075 | self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked) |
|
2961 | 3076 | value = opObj.getParameterValue(parameterName='figpath') |
|
2962 | 3077 | self.specGraphPath.setText(value) |
|
2963 | 3078 | |
|
2964 | 3079 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
2965 | 3080 | if parmObj == None: |
|
2966 | 3081 | self.specGraphftpCross.setCheckState(0) |
|
2967 | 3082 | else: |
|
2968 | 3083 | self.specGraphftpCross.setCheckState(QtCore.Qt.Checked) |
|
2969 | 3084 | try: |
|
2970 | 3085 | value = opObj.getParameterValue(parameterName='wr_period') |
|
2971 | 3086 | except: |
|
2972 | 3087 | value = " " |
|
2973 | 3088 | self.specGgraphftpratio.setText(str(value)) |
|
2974 |
|
|
|
2975 |
opObj = puObj.getOpObj |
|
|
3089 | ||
|
3090 | opObj = puObj.getOperationObj(name='RTIPlot') | |
|
3091 | # opObj = puObj.getOpObjfromParamValue(value="RTIPlot") | |
|
2976 | 3092 | if opObj == None: |
|
2977 | 3093 | self.specGraphCebRTIplot.setCheckState(0) |
|
2978 | 3094 | self.specGraphSaveRTIplot.setCheckState(0) |
|
2979 | 3095 | self.specGraphftpRTIplot.setCheckState(0) |
|
2980 | 3096 | else: |
|
2981 | 3097 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
2982 | 3098 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
2983 | 3099 | if parmObj == None: |
|
2984 | 3100 | self.specGgraphChannelList.clear() |
|
2985 | 3101 | else: |
|
2986 | 3102 | value = opObj.getParameterValue(parameterName='channelList') |
|
2987 | 3103 | channelListRTIPlot = str(value)[1:-1] |
|
2988 | 3104 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
2989 | 3105 | self.specGgraphChannelList.setEnabled(True) |
|
2990 | 3106 | |
|
2991 | 3107 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
2992 | 3108 | if parmObj == None: |
|
2993 | 3109 | self.specGgraphTminTmax.clear() |
|
2994 | 3110 | else: |
|
2995 | 3111 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
2996 | 3112 | value1 = str(value1) |
|
2997 | 3113 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
2998 | 3114 | value2 = str(value2) |
|
2999 | 3115 | value = value1 + "," + value2 |
|
3000 | 3116 | self.specGgraphTminTmax.setText(value) |
|
3001 | 3117 | self.specGgraphTminTmax.setEnabled(True) |
|
3002 | 3118 | |
|
3003 | 3119 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3004 | 3120 | if parmObj == None: |
|
3005 | 3121 | self.specGgraphTimeRange.clear() |
|
3006 | 3122 | else: |
|
3007 | 3123 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3008 | 3124 | value1 = str(value1) |
|
3009 | 3125 | self.specGgraphTimeRange.setText(value1) |
|
3010 | 3126 | self.specGgraphTimeRange.setEnabled(True) |
|
3011 | 3127 | |
|
3012 | 3128 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3013 | 3129 | if parmObj == None: |
|
3014 | 3130 | self.specGgraphHeight.clear() |
|
3015 | 3131 | else: |
|
3016 | 3132 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3017 | 3133 | value1 = str(value1) |
|
3018 | 3134 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3019 | 3135 | value2 = str(value2) |
|
3020 | 3136 | value = value1 + "," + value2 |
|
3021 | 3137 | self.specGgraphHeight.setText(value) |
|
3022 | 3138 | self.specGgraphHeight.setEnabled(True) |
|
3023 | 3139 | |
|
3024 | 3140 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3025 | 3141 | if parmObj == None: |
|
3026 | 3142 | self.specGgraphDbsrange.clear() |
|
3027 | 3143 | else: |
|
3028 | 3144 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3029 | 3145 | value1 = str(value1) |
|
3030 | 3146 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3031 | 3147 | value2 = str(value2) |
|
3032 | 3148 | value = value1 + "," + value2 |
|
3033 | 3149 | self.specGgraphDbsrange.setText(value) |
|
3034 | 3150 | self.specGgraphDbsrange.setEnabled(True) |
|
3035 | 3151 | |
|
3036 | 3152 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3037 | 3153 | if parmObj == None: |
|
3038 | 3154 | self.specGraphSaveRTIplot.setCheckState(0) |
|
3039 | 3155 | else: |
|
3040 | 3156 | self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3041 | 3157 | value = opObj.getParameterValue(parameterName='figpath') |
|
3042 | 3158 | self.specGraphPath.setText(value) |
|
3043 | 3159 | #---------add----# |
|
3044 | 3160 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3045 | 3161 | if parmObj == None: |
|
3046 | 3162 | self.specGraphftpRTIplot.setCheckState(0) |
|
3047 | 3163 | else: |
|
3048 | 3164 | self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3049 | 3165 | try: |
|
3050 | 3166 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3051 | 3167 | except: |
|
3052 | 3168 | value = " " |
|
3053 | 3169 | self.specGgraphftpratio.setText(str(value)) |
|
3054 | 3170 | |
|
3055 | ||
|
3056 | opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") | |
|
3171 | opObj = puObj.getOperationObj(name='CoherenceMap') | |
|
3172 | # opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") | |
|
3057 | 3173 | if opObj == None: |
|
3058 | 3174 | self.specGraphCebCoherencmap.setCheckState(0) |
|
3059 | 3175 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3060 | 3176 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3061 | 3177 | |
|
3062 | 3178 | else: |
|
3063 | 3179 | operationCoherenceMap = "Enable" |
|
3064 | 3180 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
3065 | 3181 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3066 | 3182 | if parmObj == None: |
|
3067 | 3183 | self.specGgraphTminTmax.clear() |
|
3068 | 3184 | else: |
|
3069 | 3185 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3070 | 3186 | value1 = str(value1) |
|
3071 | 3187 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3072 | 3188 | value2 = str(value2) |
|
3073 | 3189 | value = value1 + "," + value2 |
|
3074 | 3190 | self.specGgraphTminTmax.setText(value) |
|
3075 | 3191 | self.specGgraphTminTmax.setEnabled(True) |
|
3076 | 3192 | |
|
3077 | 3193 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3078 | 3194 | if parmObj == None: |
|
3079 | 3195 | self.specGgraphTimeRange.clear() |
|
3080 | 3196 | else: |
|
3081 | 3197 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3082 | 3198 | value1 = str(value1) |
|
3083 | 3199 | self.specGgraphTimeRange.setText(value1) |
|
3084 | 3200 | self.specGgraphTimeRange.setEnabled(True) |
|
3085 | 3201 | |
|
3086 | 3202 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3087 | 3203 | if parmObj == None: |
|
3088 | 3204 | self.specGgraphHeight.clear() |
|
3089 | 3205 | else: |
|
3090 | 3206 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3091 | 3207 | value1 = str(value1) |
|
3092 | 3208 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3093 | 3209 | value2 = str(value2) |
|
3094 | 3210 | value = value1 + "," + value2 |
|
3095 | 3211 | self.specGgraphHeight.setText(value) |
|
3096 | 3212 | self.specGgraphHeight.setEnabled(True) |
|
3097 | 3213 | |
|
3098 | 3214 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3099 | 3215 | if parmObj == None: |
|
3100 | 3216 | self.specGgraphmagnitud.clear() |
|
3101 | 3217 | else: |
|
3102 | 3218 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3103 | 3219 | value1 = str(value1) |
|
3104 | 3220 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3105 | 3221 | value2 = str(value2) |
|
3106 | 3222 | value = value1 + "," + value2 |
|
3107 | 3223 | self.specGgraphmagnitud.setText(value) |
|
3108 | 3224 | self.specGgraphmagnitud.setEnabled(True) |
|
3109 | 3225 | |
|
3110 | 3226 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3111 | 3227 | if parmObj == None: |
|
3112 | 3228 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3113 | 3229 | else: |
|
3114 | 3230 | self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3115 | 3231 | value = opObj.getParameterValue(parameterName='figpath') |
|
3116 | 3232 | self.specGraphPath.setText(value) |
|
3117 | 3233 | |
|
3118 | 3234 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3119 | 3235 | if parmObj == None: |
|
3120 | 3236 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3121 | 3237 | else: |
|
3122 | 3238 | self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3123 | 3239 | try: |
|
3124 | 3240 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3125 | 3241 | except: |
|
3126 | 3242 | value = " " |
|
3127 | 3243 | self.specGgraphftpratio.setText(str(value)) |
|
3128 | 3244 | |
|
3129 | ||
|
3130 | opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") | |
|
3245 | opObj = puObj.getOperationObj(name='PowerProfilePlot') | |
|
3246 | # opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") | |
|
3131 | 3247 | if opObj == None: |
|
3132 | 3248 | self.specGraphPowerprofile.setCheckState(0) |
|
3133 | 3249 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3134 | 3250 | operationPowerProfilePlot = "Disabled" |
|
3135 | 3251 | channelList = None |
|
3136 | 3252 | freq_vel = None |
|
3137 | 3253 | heightsrange = None |
|
3138 | 3254 | else: |
|
3139 | 3255 | operationPowerProfilePlot = "Enable" |
|
3140 | 3256 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3141 | 3257 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3142 | 3258 | if parmObj == None: |
|
3143 | 3259 | self.specGgraphDbsrange.clear() |
|
3144 | 3260 | else: |
|
3145 | 3261 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3146 | 3262 | value1 = str(value1) |
|
3147 | 3263 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3148 | 3264 | value2 = str(value2) |
|
3149 | 3265 | value = value1 + "," + value2 |
|
3150 | 3266 | self.specGgraphDbsrange.setText(value) |
|
3151 | 3267 | self.specGgraphDbsrange.setEnabled(True) |
|
3152 | 3268 | |
|
3153 | 3269 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3154 | 3270 | if parmObj == None: |
|
3155 | 3271 | self.specGgraphHeight.clear() |
|
3156 | 3272 | else: |
|
3157 | 3273 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3158 | 3274 | value1 = str(value1) |
|
3159 | 3275 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3160 | 3276 | value2 = str(value2) |
|
3161 | 3277 | value = value1 + "," + value2 |
|
3162 | 3278 | self.specGgraphHeight.setText(value) |
|
3163 | 3279 | self.specGgraphHeight.setEnabled(True) |
|
3164 | 3280 | |
|
3165 | 3281 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3166 | 3282 | if parmObj == None: |
|
3167 | 3283 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3168 | 3284 | else: |
|
3169 | 3285 | self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3170 | 3286 | value = opObj.getParameterValue(parameterName='figpath') |
|
3171 | 3287 | self.specGraphPath.setText(value) |
|
3172 | 3288 | |
|
3173 | 3289 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3174 | 3290 | if parmObj == None: |
|
3175 | 3291 | self.specGraphftpPowerprofile.setCheckState(0) |
|
3176 | 3292 | else: |
|
3177 | 3293 | self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3178 | 3294 | try: |
|
3179 | 3295 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3180 | 3296 | except: |
|
3181 | 3297 | value = " " |
|
3182 | 3298 | self.specGgraphftpratio.setText(str(value)) |
|
3183 | 3299 | # -noise |
|
3184 |
opObj = puObj.getOpObj |
|
|
3300 | opObj = puObj.getOperationObj(name='Noise') | |
|
3301 | # opObj = puObj.getOpObjfromParamValue(value="Noise") | |
|
3185 | 3302 | if opObj == None: |
|
3186 | 3303 | self.specGraphCebRTInoise.setCheckState(0) |
|
3187 | 3304 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3188 | 3305 | self.specGraphftpRTInoise.setCheckState(0) |
|
3189 | 3306 | else: |
|
3190 | 3307 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3191 | 3308 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3192 | 3309 | if parmObj == None: |
|
3193 | 3310 | self.specGgraphChannelList.clear() |
|
3194 | 3311 | else: |
|
3195 | 3312 | value = opObj.getParameterValue(parameterName='channelList') |
|
3196 | 3313 | channelListRTINoise = str(value)[1:-1] |
|
3197 | 3314 | self.specGgraphChannelList.setText(channelListRTINoise) |
|
3198 | 3315 | self.specGgraphChannelList.setEnabled(True) |
|
3199 | 3316 | |
|
3200 | 3317 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3201 | 3318 | if parmObj == None: |
|
3202 | 3319 | self.specGgraphTminTmax.clear() |
|
3203 | 3320 | else: |
|
3204 | 3321 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3205 | 3322 | value1 = str(value1) |
|
3206 | 3323 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3207 | 3324 | value2 = str(value2) |
|
3208 | 3325 | value = value1 + "," + value2 |
|
3209 | 3326 | self.specGgraphTminTmax.setText(value) |
|
3210 | 3327 | self.specGgraphTminTmax.setEnabled(True) |
|
3211 | 3328 | |
|
3212 | 3329 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3213 | 3330 | if parmObj == None: |
|
3214 | 3331 | self.specGgraphTimeRange.clear() |
|
3215 | 3332 | else: |
|
3216 | 3333 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3217 | 3334 | value1 = str(value1) |
|
3218 | 3335 | self.specGgraphTimeRange.setText(value1) |
|
3219 | 3336 | self.specGgraphTimeRange.setEnabled(True) |
|
3220 | 3337 | |
|
3221 | 3338 | |
|
3222 | 3339 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3223 | 3340 | if parmObj == None: |
|
3224 | 3341 | self.specGgraphDbsrange.clear() |
|
3225 | 3342 | else: |
|
3226 | 3343 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3227 | 3344 | value1 = str(value1) |
|
3228 | 3345 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3229 | 3346 | value2 = str(value2) |
|
3230 | 3347 | value = value1 + "," + value2 |
|
3231 | 3348 | self.specGgraphDbsrange.setText(value) |
|
3232 | 3349 | self.specGgraphDbsrange.setEnabled(True) |
|
3233 | 3350 | |
|
3234 | 3351 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3235 | 3352 | if parmObj == None: |
|
3236 | 3353 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3237 | 3354 | else: |
|
3238 | 3355 | self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3239 | 3356 | value = opObj.getParameterValue(parameterName='figpath') |
|
3240 | 3357 | self.specGraphPath.setText(value) |
|
3241 | 3358 | #---------add----# |
|
3242 | 3359 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3243 | 3360 | if parmObj == None: |
|
3244 | 3361 | self.specGraphftpRTInoise.setCheckState(0) |
|
3245 | 3362 | else: |
|
3246 | 3363 | self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3247 | 3364 | try: |
|
3248 | 3365 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3249 | 3366 | except: |
|
3250 | 3367 | value = " " |
|
3251 | 3368 | self.specGgraphftpratio.setText(str(value)) |
|
3252 | 3369 | |
|
3253 | 3370 | # outputSpectraWrite |
|
3254 | 3371 | opObj = puObj.getOperationObj(name='SpectraWriter') |
|
3255 | 3372 | if opObj == None: |
|
3256 | 3373 | self.specOutputPath.clear() |
|
3257 | 3374 | self.specOutputblocksperfile.clear() |
|
3258 | 3375 | self.specOutputprofileperblock.clear() |
|
3259 | 3376 | else: |
|
3260 | 3377 | value = opObj.getParameterObj(parameterName='path') |
|
3261 | 3378 | if value == None: |
|
3262 | 3379 | self.specOutputPath.clear() |
|
3263 | 3380 | else: |
|
3264 | 3381 | value = opObj.getParameterValue(parameterName='path') |
|
3265 | 3382 | path = str(value) |
|
3266 | 3383 | self.specOutputPath.setText(path) |
|
3267 | 3384 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
3268 | 3385 | if value == None: |
|
3269 | 3386 | self.specOutputblocksperfile.clear() |
|
3270 | 3387 | else: |
|
3271 | 3388 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
3272 | 3389 | blocksperfile = str(value) |
|
3273 | 3390 | self.specOutputblocksperfile.setText(blocksperfile) |
|
3274 | 3391 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
3275 | 3392 | if value == None: |
|
3276 | 3393 | self.specOutputprofileperblock.clear() |
|
3277 | 3394 | else: |
|
3278 | 3395 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
3279 | 3396 | profilesPerBlock = str(value) |
|
3280 | 3397 | self.specOutputprofileperblock.setText(profilesPerBlock) |
|
3281 | 3398 | |
|
3282 | 3399 | if datatype == 'SpectraHeis': |
|
3283 | 3400 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") |
|
3284 | 3401 | if opObj == None: |
|
3285 | 3402 | self.specHeisOpIncoherent.clear() |
|
3286 | 3403 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
3287 | 3404 | else: |
|
3288 | 3405 | for parmObj in opObj.getParameterObjList(): |
|
3289 | 3406 | if parmObj.name == 'timeInterval': |
|
3290 | 3407 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
3291 | 3408 | value = float(value) |
|
3292 | 3409 | self.specHeisOpIncoherent.setText(str(value)) |
|
3293 | 3410 | self.specHeisOpIncoherent.setEnabled(True) |
|
3294 | 3411 | self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3295 | 3412 | self.specHeisOpCobIncInt.setCurrentIndex(0) |
|
3296 | # SpectraHeis Graph | |
|
3297 | opObj = puObj.getOperationObj(name='Plot') | |
|
3298 |
opObj = puObj.getOpObj |
|
|
3413 | ||
|
3414 | # SpectraHeis Graph | |
|
3415 | opObj = puObj.getOperationObj(name='SpectraHeisScope') | |
|
3416 | # opObj = puObj.getOpObjfromParamValue(value="SpectraHeisScope") | |
|
3299 | 3417 | if opObj == None: |
|
3300 | 3418 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
3301 | 3419 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3302 | 3420 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3303 | 3421 | |
|
3304 | 3422 | else: |
|
3305 | 3423 | operationSpectraHeisScope = "Enable" |
|
3306 | 3424 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3307 | 3425 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3308 | 3426 | if parmObj == None: |
|
3309 | 3427 | self.specHeisGgraphChannelList.clear() |
|
3310 | 3428 | else: |
|
3311 | 3429 | value = opObj.getParameterValue(parameterName='channelList') |
|
3312 | 3430 | channelListSpectraHeisScope = str(value)[1:-1] |
|
3313 | 3431 | self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope) |
|
3314 | 3432 | self.specHeisGgraphChannelList.setEnabled(True) |
|
3315 | 3433 | |
|
3316 | 3434 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3317 | 3435 | if parmObj == None: |
|
3318 | 3436 | self.specHeisGgraphXminXmax.clear() |
|
3319 | 3437 | else: |
|
3320 | 3438 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3321 | 3439 | value1 = str(value1) |
|
3322 | 3440 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3323 | 3441 | value2 = str(value2) |
|
3324 | 3442 | value = value1 + "," + value2 |
|
3325 | 3443 | self.specHeisGgraphXminXmax.setText(value) |
|
3326 | 3444 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
3327 | 3445 | |
|
3328 | 3446 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3329 | 3447 | if parmObj == None: |
|
3330 | 3448 | self.specHeisGgraphYminYmax.clear() |
|
3331 | 3449 | else: |
|
3332 | 3450 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3333 | 3451 | value1 = str(value1) |
|
3334 | 3452 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3335 | 3453 | value2 = str(value2) |
|
3336 | 3454 | value = value1 + "," + value2 |
|
3337 | 3455 | self.specHeisGgraphYminYmax.setText(value) |
|
3338 | 3456 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3339 | 3457 | |
|
3340 | 3458 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3341 | 3459 | if parmObj == None: |
|
3342 | 3460 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3343 | 3461 | else: |
|
3344 | 3462 | self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
3345 | 3463 | value = opObj.getParameterValue(parameterName='figpath') |
|
3346 | 3464 | self.specHeisGraphPath.setText(value) |
|
3347 | 3465 | |
|
3348 | 3466 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3349 | 3467 | if parmObj == None: |
|
3350 | 3468 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3351 | 3469 | else: |
|
3352 | 3470 | self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
3353 | 3471 | try: |
|
3354 | 3472 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3355 | 3473 | except: |
|
3356 | 3474 | value = " " |
|
3357 | 3475 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3358 | 3476 | |
|
3359 | ||
|
3360 | opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") | |
|
3477 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') | |
|
3478 | # opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") | |
|
3361 | 3479 | if opObj == None: |
|
3362 | 3480 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
3363 | 3481 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3364 | 3482 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3365 | 3483 | else: |
|
3366 | 3484 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3367 | 3485 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3368 | 3486 | if parmObj == None: |
|
3369 | 3487 | self.specHeisGgraphChannelList.clear() |
|
3370 | 3488 | else: |
|
3371 | 3489 | value = opObj.getParameterValue(parameterName='channelList') |
|
3372 | 3490 | channelListRTIPlot = str(value)[1:-1] |
|
3373 | 3491 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
3374 | 3492 | self.specGgraphChannelList.setEnabled(True) |
|
3375 | 3493 | |
|
3376 | 3494 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3377 | 3495 | if parmObj == None: |
|
3378 | 3496 | self.specHeisGgraphTminTmax.clear() |
|
3379 | 3497 | else: |
|
3380 | 3498 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3381 | 3499 | value1 = str(value1) |
|
3382 | 3500 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3383 | 3501 | value2 = str(value2) |
|
3384 | 3502 | value = value1 + "," + value2 |
|
3385 | 3503 | self.specHeisGgraphTminTmax.setText(value) |
|
3386 | 3504 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
3387 | 3505 | |
|
3388 | 3506 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3389 | 3507 | if parmObj == None: |
|
3390 | 3508 | self.specGgraphTimeRange.clear() |
|
3391 | 3509 | else: |
|
3392 | 3510 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3393 | 3511 | value1 = str(value1) |
|
3394 | 3512 | self.specHeisGgraphTimeRange.setText(value1) |
|
3395 | 3513 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
3396 | 3514 | |
|
3397 | 3515 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3398 | 3516 | if parmObj == None: |
|
3399 | 3517 | self.specHeisGgraphYminYmax.clear() |
|
3400 | 3518 | else: |
|
3401 | 3519 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3402 | 3520 | value1 = str(value1) |
|
3403 | 3521 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3404 | 3522 | value2 = str(value2) |
|
3405 | 3523 | value = value1 + "," + value2 |
|
3406 | 3524 | self.specHeisGgraphYminYmax.setText(value) |
|
3407 | 3525 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3408 | 3526 | |
|
3409 | 3527 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3410 | 3528 | if parmObj == None: |
|
3411 | 3529 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3412 | 3530 | else: |
|
3413 | 3531 | self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3414 | 3532 | value = opObj.getParameterValue(parameterName='figpath') |
|
3415 | 3533 | self.specHeisGraphPath.setText(value) |
|
3416 | 3534 | #---------add----# |
|
3417 | 3535 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3418 | 3536 | if parmObj == None: |
|
3419 | 3537 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3420 | 3538 | else: |
|
3421 | 3539 | self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3422 | 3540 | try: |
|
3423 | 3541 | value = opObj.getParameterValue(parameterName='wr_period') |
|
3424 | 3542 | except: |
|
3425 | 3543 | value = " " |
|
3426 | 3544 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3427 | 3545 | |
|
3428 | 3546 | |
|
3429 | 3547 | |
|
3430 | 3548 | # outputSpectraHeisWrite |
|
3431 | 3549 | opObj = puObj.getOperationObj(name='FitsWriter') |
|
3432 | 3550 | if opObj == None: |
|
3433 | 3551 | self.specHeisOutputPath.clear() |
|
3434 | 3552 | self.specHeisOutputblocksperfile.clear() |
|
3435 | 3553 | self.specHeisOutputMetada.clear() |
|
3436 | 3554 | else: |
|
3437 | 3555 | value = opObj.getParameterObj(parameterName='path') |
|
3438 | 3556 | if value == None: |
|
3439 | 3557 | self.specHeisOutputPath.clear() |
|
3440 | 3558 | else: |
|
3441 | 3559 | value = opObj.getParameterValue(parameterName='path') |
|
3442 | 3560 | path = str(value) |
|
3443 | 3561 | self.specHeisOutputPath.setText(path) |
|
3444 | 3562 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') |
|
3445 | 3563 | if value == None: |
|
3446 | 3564 | self.specHeisOutputblocksperfile.clear() |
|
3447 | 3565 | else: |
|
3448 | 3566 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') |
|
3449 | 3567 | blocksperfile = str(value) |
|
3450 | 3568 | self.specHeisOutputblocksperfile.setText(blocksperfile) |
|
3451 | 3569 | value = opObj.getParameterObj(parameterName='metadatafile') |
|
3452 | 3570 | if value == None: |
|
3453 | 3571 | self.specHeisOutputMetada.clear() |
|
3454 | 3572 | else: |
|
3455 | 3573 | value = opObj.getParameterValue(parameterName='metadatafile') |
|
3456 | 3574 | metada = str(value) |
|
3457 | 3575 | self.specHeisOutputMetada.setText(metada) |
|
3458 | 3576 | |
|
3459 | 3577 | |
|
3460 | 3578 | |
|
3461 | 3579 | def setspecGraph(self): |
|
3462 | 3580 | |
|
3463 | 3581 | self.specGgraphChannelList.setEnabled(True) |
|
3464 | 3582 | |
|
3465 | 3583 | def clearspecGraph(self): |
|
3466 | 3584 | |
|
3467 | 3585 | self.specGgraphChannelList.clear() |
|
3468 | 3586 | |
|
3469 | 3587 | def create_comm(self): |
|
3470 | 3588 | self.commCtrlPThread = CommCtrlProcessThread() |
|
3471 | 3589 | self.commCtrlPThread.start() |
|
3472 | 3590 | |
|
3473 | 3591 | def create_timers(self): |
|
3474 | 3592 | self.comm_data_timer = QtCore.QTimer(self) |
|
3475 | 3593 | self.comm_data_timer.timeout.connect(self.on_comm_data_timer) |
|
3476 | 3594 | self.comm_data_timer.start(10) |
|
3477 | 3595 | |
|
3478 | 3596 | def create_figure(self): |
|
3479 | 3597 | self.queue_plot = Queue.Queue() |
|
3480 | 3598 | self.plotmanager = PlotManager(self.queue_plot) |
|
3481 | 3599 | self.plot_timer = QtCore.QTimer() |
|
3482 | 3600 | QtCore.QObject.connect(self.plot_timer, QtCore.SIGNAL("timeout()"), self.periodicCall) |
|
3483 | 3601 | self.plot_timer.start(100) |
|
3484 | 3602 | self.running = 1 |
|
3485 | 3603 | |
|
3486 | 3604 | def periodicCall(self): |
|
3487 | 3605 | """ |
|
3488 | 3606 | Check every 100 ms if there is something new in the queue. |
|
3489 | 3607 | """ |
|
3490 | 3608 | self.plotmanager.processIncoming() |
|
3491 | 3609 | if not self.running: |
|
3492 | 3610 | app.quit() |
|
3493 | 3611 | |
|
3494 | 3612 | def on_comm_data_timer(self): |
|
3495 | 3613 | # lee el data_queue y la coloca en el queue de ploteo |
|
3496 | 3614 | try: |
|
3497 | 3615 | reply = self.commCtrlPThread.data_q.get(block=False) |
|
3498 | 3616 | self.queue_plot.put(reply.data) |
|
3499 | 3617 | |
|
3500 | 3618 | except Queue.Empty: |
|
3501 | 3619 | pass |
|
3502 | 3620 | |
|
3503 | 3621 | def createProjectView(self, id): |
|
3504 | 3622 | |
|
3505 | 3623 | self.create = False |
|
3506 | 3624 | project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
3507 | 3625 | |
|
3508 | 3626 | projectObjView = Project() |
|
3509 | 3627 | projectObjView.setup(id=id, name=project_name, description=description) |
|
3510 | 3628 | |
|
3511 | 3629 | self.__projectObjDict[id] = projectObjView |
|
3512 | 3630 | |
|
3513 | 3631 | return projectObjView |
|
3514 | 3632 | |
|
3515 | 3633 | def updateProjectView(self): |
|
3516 | 3634 | |
|
3517 | 3635 | project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
3518 | 3636 | |
|
3519 | 3637 | projectObjView = self.getSelectedProjectObj() |
|
3520 | 3638 | projectObjView.update(name=project_name, description=description) |
|
3521 | 3639 | |
|
3522 | 3640 | return projectObjView |
|
3523 | 3641 | |
|
3524 | 3642 | def createReadUnitView(self, projectObjView): |
|
3525 | 3643 | |
|
3526 | 3644 | project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk , set = self.getParmsFromProjectWindow() |
|
3527 | 3645 | if set == None: |
|
3528 | 3646 | readUnitConfObj = projectObjView.addReadUnit(datatype=datatype, |
|
3529 | 3647 | path=data_path, |
|
3530 | 3648 | startDate=startDate, |
|
3531 | 3649 | endDate=endDate, |
|
3532 | 3650 | startTime=startTime, |
|
3533 | 3651 | endTime=endTime, |
|
3534 | 3652 | online=online, |
|
3535 | 3653 | delay=delay, |
|
3536 | 3654 | walk=walk) |
|
3537 | 3655 | else: |
|
3538 | 3656 | readUnitConfObj = projectObjView.addReadUnit(datatype=datatype, |
|
3539 | 3657 | path=data_path, |
|
3540 | 3658 | startDate=startDate, |
|
3541 | 3659 | endDate=endDate, |
|
3542 | 3660 | startTime=startTime, |
|
3543 | 3661 | endTime=endTime, |
|
3544 | 3662 | online=online, |
|
3545 | 3663 | delay=delay, |
|
3546 | 3664 | walk=walk, |
|
3547 | 3665 | set=set) |
|
3548 | 3666 | |
|
3549 | 3667 | return readUnitConfObj |
|
3550 | 3668 | |
|
3551 | 3669 | def updateReadUnitView(self, projectObjView, idReadUnit): |
|
3552 | 3670 | |
|
3553 | 3671 | project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk , set = self.getParmsFromProjectWindow() |
|
3554 | 3672 | |
|
3555 | 3673 | readUnitConfObj = projectObjView.getProcUnitObj(idReadUnit) |
|
3556 | 3674 | |
|
3557 | 3675 | if set == None: |
|
3558 | 3676 | |
|
3559 | 3677 | readUnitConfObj.update(datatype=datatype, |
|
3560 | 3678 | path=data_path, |
|
3561 | 3679 | startDate=startDate, |
|
3562 | 3680 | endDate=endDate, |
|
3563 | 3681 | startTime=startTime, |
|
3564 | 3682 | endTime=endTime, |
|
3565 | 3683 | online=online, |
|
3566 | 3684 | delay=delay, |
|
3567 | 3685 | walk=walk) |
|
3568 | 3686 | |
|
3569 | 3687 | else: |
|
3570 | 3688 | readUnitConfObj.update(datatype=datatype, |
|
3571 | 3689 | path=data_path, |
|
3572 | 3690 | startDate=startDate, |
|
3573 | 3691 | endDate=endDate, |
|
3574 | 3692 | startTime=startTime, |
|
3575 | 3693 | endTime=endTime, |
|
3576 | 3694 | online=online, |
|
3577 | 3695 | delay=delay, |
|
3578 | 3696 | walk=walk, |
|
3579 | 3697 | set=set) |
|
3580 | 3698 | |
|
3581 | 3699 | |
|
3582 | 3700 | |
|
3583 | 3701 | return readUnitConfObj |
|
3584 | 3702 | |
|
3585 | 3703 | def createProcUnitView(self, projectObjView, datatype, inputId): |
|
3586 | 3704 | |
|
3587 | 3705 | procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId) |
|
3588 | 3706 | |
|
3589 | 3707 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
3590 | 3708 | |
|
3591 | 3709 | return procUnitConfObj |
|
3592 | 3710 | |
|
3593 | 3711 | def updateProcUnitView(self, id): |
|
3594 | 3712 | |
|
3595 | 3713 | procUnitConfObj = projectObjView.getProcUnitObj(id) |
|
3596 | 3714 | procUnitConfObj.removeOperations() |
|
3597 | 3715 | |
|
3598 | 3716 | return procUnitConfObj |
|
3599 | 3717 | |
|
3600 | 3718 | def addPUWindow(self): |
|
3601 | 3719 | |
|
3602 | 3720 | self.configUPWindowObj = UnitProcessWindow(self) |
|
3603 | 3721 | fatherObj = self.getSelectedPUObj() |
|
3604 | 3722 | try: |
|
3605 | 3723 | fatherObj.getElementName() |
|
3606 | 3724 | except: |
|
3607 | 3725 | self.console.append("First left click on Project or Processing Unit") |
|
3608 | 3726 | return 0 |
|
3609 | 3727 | |
|
3610 | 3728 | if fatherObj.getElementName() == 'Project': |
|
3611 | 3729 | readUnitConfObj = fatherObj.getReadUnitObj() |
|
3612 | 3730 | self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype) |
|
3613 | 3731 | |
|
3614 | 3732 | self.configUPWindowObj.getfromWindowList.append(fatherObj) |
|
3615 | 3733 | self.configUPWindowObj.loadTotalList() |
|
3616 | 3734 | self.configUPWindowObj.show() |
|
3617 | 3735 | self.configUPWindowObj.closed.connect(self.createPUWindow) |
|
3618 | 3736 | |
|
3619 | 3737 | def createPUWindow(self): |
|
3620 | 3738 | |
|
3621 | 3739 | self.console.clear() |
|
3622 | 3740 | |
|
3623 | 3741 | if not self.configUPWindowObj.create: |
|
3624 | 3742 | return |
|
3625 | 3743 | |
|
3626 | 3744 | fatherObj = self.configUPWindowObj.getFromWindow |
|
3627 | 3745 | datatype = self.configUPWindowObj.typeofUP |
|
3628 | 3746 | |
|
3629 | 3747 | if fatherObj.getElementName() == 'Project': |
|
3630 | 3748 | inputId = fatherObj.getReadUnitId() |
|
3631 | 3749 | projectObjView = fatherObj |
|
3632 | 3750 | else: |
|
3633 | 3751 | inputId = fatherObj.getId() |
|
3634 | 3752 | projectObjView = self.getSelectedProjectObj() |
|
3635 | 3753 | |
|
3636 | 3754 | #---------------------------- |
|
3637 | 3755 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) |
|
3638 | 3756 | #---------------------------- |
|
3639 | 3757 | self.addPU2ProjectExplorer(id=puObj.getId(), name=datatype) |
|
3640 | 3758 | |
|
3641 | 3759 | self.showtabPUCreated(datatype) |
|
3642 | 3760 | |
|
3643 | 3761 | self.setInputsPU_View(datatype) |
|
3644 | 3762 | |
|
3645 | 3763 | self.showPUinitView() |
|
3646 | 3764 | |
|
3647 | def addFTPparmXML(self, obj, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): | |
|
3648 | obj.addParameter(name='server', value=server, format='str') | |
|
3649 | obj.addParameter(name='folder', value=folder, format='str') | |
|
3650 | obj.addParameter(name='username', value=username, format='str') | |
|
3651 | obj.addParameter(name='password', value=password, format='str') | |
|
3652 | if ftp_wei == None: | |
|
3653 | pass | |
|
3654 | else: | |
|
3655 | obj.addParameter(name='ftp_wei', value=int(ftp_wei), format='int') | |
|
3656 | if exp_code == None: | |
|
3657 | pass | |
|
3658 | else: | |
|
3659 | obj.addParameter(name='exp_code', value=int(exp_code), format='int') | |
|
3660 | if sub_exp_code == None: | |
|
3661 | pass | |
|
3662 | else: | |
|
3663 | obj.addParameter(name='sub_exp_code', value=int(sub_exp_code), format='int') | |
|
3664 | if plot_pos == None: | |
|
3665 | pass | |
|
3666 | else: | |
|
3667 | obj.addParameter(name='plot_pos', value=int(plot_pos), format='int') | |
|
3668 | ||
|
3669 | def addFTPConfiguration(self, puObj, opObj): | |
|
3765 | def addFTPConf2Operation(self, puObj, opObj): | |
|
3766 | ||
|
3670 | 3767 | if self.temporalFTP.create: |
|
3671 | server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
3672 | self.addFTPparmXML(opObj, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos) | |
|
3768 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
3673 | 3769 | else: |
|
3674 | 3770 | self.temporalFTP.setwithoutconfiguration() |
|
3675 | server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
3676 | self.addFTPparmXML(opObj, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos) | |
|
3677 | ||
|
3771 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
|
3772 | ||
|
3773 | opObj.addParameter(name='server', value=server, format='str') | |
|
3774 | opObj.addParameter(name='folder', value=remotefolder, format='str') | |
|
3775 | opObj.addParameter(name='username', value=username, format='str') | |
|
3776 | opObj.addParameter(name='password', value=password, format='str') | |
|
3777 | ||
|
3778 | if ftp_wei: | |
|
3779 | opObj.addParameter(name='ftp_wei', value=int(ftp_wei), format='int') | |
|
3780 | if exp_code: | |
|
3781 | opObj.addParameter(name='exp_code', value=int(exp_code), format='int') | |
|
3782 | if sub_exp_code: | |
|
3783 | opObj.addParameter(name='sub_exp_code', value=int(sub_exp_code), format='int') | |
|
3784 | if plot_pos: | |
|
3785 | opObj.addParameter(name='plot_pos', value=int(plot_pos), format='int') | |
|
3786 | ||
|
3678 | 3787 | if puObj.datatype == "Spectra": |
|
3679 | 3788 | value = self.specGgraphftpratio.text() |
|
3680 | 3789 | if puObj.datatype == "SpectraHeis": |
|
3681 | 3790 | value = self.specHeisGgraphftpratio.text() |
|
3791 | ||
|
3682 | 3792 | if not value == "": |
|
3683 | 3793 | try: |
|
3684 | if puObj.datatype == "Spectra": | |
|
3685 | value = int(self.specGgraphftpratio.text()) | |
|
3686 | if puObj.datatype == "SpectraHeis": | |
|
3687 | value = int(self.specHeisGgraphftpratio.text()) | |
|
3794 | value = int(value) | |
|
3688 | 3795 | except: |
|
3689 |
|
|
|
3690 |
|
|
|
3691 |
|
|
|
3796 | self.console.clear() | |
|
3797 | self.console.append("Please fill Ratio on the textbox") | |
|
3798 | return 0 | |
|
3799 | ||
|
3692 | 3800 | opObj.addParameter(name='wr_period', value=value, format='int') |
|
3693 | ||
|
3801 | ||
|
3802 | def createFTPProcUnitView(self, server, username, password, remotefolder, localfolder='./', extension='.png', period='60', protocol='ftp'): | |
|
3803 | ||
|
3804 | if self.__ftpProcUnitAdded: | |
|
3805 | procUnitConfObj = self.__puObjDict[self.__ftpProcUnitId] | |
|
3806 | procUnitConfObj.removeOperations() | |
|
3807 | else: | |
|
3808 | projectObj = self.getSelectedProjectObj() | |
|
3809 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") | |
|
3810 | ||
|
3811 | procUnitConfObj.addParameter(name='server', value=server, format='str') | |
|
3812 | procUnitConfObj.addParameter(name='username', value=username, format='str') | |
|
3813 | procUnitConfObj.addParameter(name='password', value=password, format='str') | |
|
3814 | procUnitConfObj.addParameter(name='localfolder', value=localfolder, format='str') | |
|
3815 | procUnitConfObj.addParameter(name='remotefolder', value=remotefolder, format='str') | |
|
3816 | procUnitConfObj.addParameter(name='ext', value=extension, format='str') | |
|
3817 | procUnitConfObj.addParameter(name='period', value=period, format='int') | |
|
3818 | procUnitConfObj.addParameter(name='protocol', value=protocol, format='str') | |
|
3819 | ||
|
3820 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj | |
|
3821 | ||
|
3822 | self.__ftpProcUnitAdded = True | |
|
3823 | self.__ftpProcUnitId = procUnitConfObj.getId() | |
|
3824 | ||
|
3825 | def removeFTPProcUnitView(self): | |
|
3826 | ||
|
3827 | if not self.__ftpProcUnitAdded: | |
|
3828 | return | |
|
3829 | ||
|
3830 | procUnitConfObj = self.__puObjDict[self.__ftpProcUnitId] | |
|
3831 | procUnitConfObj.removeOperations() | |
|
3832 | ||
|
3833 | self.__puObjDict.pop(procUnitConfObj.getId()) | |
|
3834 | ||
|
3835 | self.__ftpProcUnitAdded = False | |
|
3836 | self.__ftpProcUnitId = None | |
|
3837 | ||
|
3694 | 3838 | def bufferProject(self, caracteristica, principal, description): |
|
3839 | ||
|
3695 | 3840 | self.projectProperCaracteristica.append(caracteristica) |
|
3696 | 3841 | self.projectProperPrincipal.append(principal) |
|
3697 | 3842 | self.projectProperDescripcion.append(description) |
|
3698 | 3843 | return self.projectProperCaracteristica, self.projectProperPrincipal, self.projectProperDescripcion |
|
3699 | 3844 | |
|
3700 | 3845 | |
|
3701 | 3846 | def showProjectProperties(self, projectObjView): |
|
3702 | 3847 | |
|
3703 | 3848 | project_name, description = projectObjView.name, projectObjView.description |
|
3704 | 3849 | |
|
3705 | 3850 | id = projectObjView.id |
|
3706 | 3851 | readUnitId = projectObjView.getReadUnitId() |
|
3707 | 3852 | readUnitObj = projectObjView.getProcUnitObj(readUnitId) |
|
3708 | 3853 | operationObj = readUnitObj.getOperationObj(name='run') |
|
3709 | 3854 | |
|
3710 | 3855 | |
|
3711 | 3856 | datatype = operationObj.getParameterValue(parameterName='datatype') |
|
3712 | 3857 | dpath = operationObj.getParameterValue(parameterName='path') |
|
3713 | 3858 | startDate = operationObj.getParameterValue(parameterName='startDate') |
|
3714 | 3859 | endDate = operationObj.getParameterValue(parameterName='endDate') |
|
3715 | 3860 | startDate = str(startDate) |
|
3716 | 3861 | endDate = str(endDate) |
|
3717 | 3862 | startDateList = startDate.split('-') |
|
3718 | 3863 | endDateList = endDate.split('-') |
|
3719 | 3864 | startDate = startDateList[0] + "/" + startDateList[1] + "/" + startDateList[2] |
|
3720 | 3865 | endDate = endDateList[0] + "/" + endDateList[1] + "/" + endDateList[2] |
|
3721 | 3866 | |
|
3722 | 3867 | startTime = operationObj.getParameterValue(parameterName='startTime') |
|
3723 | 3868 | endTime = operationObj.getParameterValue(parameterName='endTime') |
|
3724 | 3869 | online = operationObj.getParameterValue(parameterName='online') |
|
3725 | 3870 | walk = operationObj.getParameterValue(parameterName='walk') |
|
3726 | 3871 | delay = operationObj.getParameterValue(parameterName='delay') |
|
3727 | 3872 | try: |
|
3728 | 3873 | set = operationObj.getParameterValue(parameterName='set') |
|
3729 | 3874 | except: |
|
3730 | 3875 | set = " " |
|
3731 | 3876 | |
|
3732 | 3877 | if online == 0: |
|
3733 | 3878 | remode = "offline" |
|
3734 | 3879 | else: |
|
3735 | 3880 | remode = "online" |
|
3736 | 3881 | |
|
3737 | 3882 | if walk == 0: |
|
3738 | 3883 | walk_str = 'On Files' |
|
3739 | 3884 | else: |
|
3740 | 3885 | walk_str = 'On Folder' |
|
3741 | 3886 | |
|
3742 | 3887 | self.bufferProject("Properties", "Name", project_name), |
|
3743 | 3888 | self.bufferProject("Properties", "Data Path", dpath) |
|
3744 | 3889 | self.bufferProject("Properties", "Workspace", self.pathWorkSpace) |
|
3745 | 3890 | self.bufferProject("Parameters", "Read Mode ", remode) |
|
3746 | 3891 | self.bufferProject("Parameters", "DataType ", datatype) |
|
3747 | 3892 | self.bufferProject("Parameters", "Start Date", str(startDate)) |
|
3748 | 3893 | self.bufferProject("Parameters", "End Date ", str(endDate)) |
|
3749 | 3894 | self.bufferProject("Parameters", "Start Time", str(startTime)) |
|
3750 | 3895 | self.bufferProject("Parameters", "End Time ", str(endTime)) |
|
3751 | 3896 | self.bufferProject("Parameters", "Delay ", str(delay)) |
|
3752 | 3897 | try: |
|
3753 | 3898 | set = operationObj.getParameterValue(parameterName='set') |
|
3754 | 3899 | self.bufferProject("Parameters", "Set ", set) |
|
3755 | 3900 | except: |
|
3756 | 3901 | set = " " |
|
3757 | 3902 | self.bufferProject("Parameters", "Walk ", str(walk_str)) |
|
3758 | 3903 | self.bufferProject("Parameters", "Time zone", "Local") |
|
3759 | 3904 | self.bufferProject("Description", "Summary ", description) |
|
3760 | 3905 | |
|
3761 | 3906 | self.propertiesModel = treeModel() |
|
3762 | 3907 | self.propertiesModel.showProjectParms(self.projectProperCaracteristica, self.projectProperPrincipal, self.projectProperDescripcion) |
|
3763 | 3908 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
3764 | 3909 | self.treeProjectProperties.expandAll() |
|
3765 | 3910 | self.treeProjectProperties.resizeColumnToContents(0) |
|
3766 | 3911 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3767 | 3912 | |
|
3768 | 3913 | self.projectProperCaracteristica = [] |
|
3769 | 3914 | self.projectProperPrincipal = [] |
|
3770 | 3915 | self.projectProperDescripcion = [] |
|
3771 | 3916 | |
|
3772 | 3917 | return datatype , dpath , startDate , endDate, startTime, endTime, online, delay, walk, set |
|
3773 | 3918 | |
|
3774 | 3919 | def showPUinitView(self): |
|
3775 | 3920 | self.propertiesModel = treeModel() |
|
3776 | 3921 | self.propertiesModel.initPUVoltageView() |
|
3777 | 3922 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
3778 | 3923 | self.treeProjectProperties.expandAll() |
|
3779 | 3924 | self.treeProjectProperties.allColumnsShowFocus() |
|
3780 | 3925 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3781 | 3926 | |
|
3782 | 3927 | def bufferVoltage(self, caracteristica, principal, description): |
|
3783 | 3928 | self.volProperCaracteristica.append(caracteristica) |
|
3784 | 3929 | self.volProperPrincipal.append(principal) |
|
3785 | 3930 | self.volProperDescripcion.append(description) |
|
3786 | 3931 | return self.volProperCaracteristica, self.volProperPrincipal, self.volProperDescripcion |
|
3787 | 3932 | |
|
3788 | 3933 | def showPUVoltageProperties(self, puObj): |
|
3789 | 3934 | |
|
3790 | 3935 | |
|
3791 | 3936 | type = puObj.name |
|
3792 | 3937 | self.bufferVoltage("Processing Unit", "Type", type) |
|
3793 | 3938 | |
|
3794 | 3939 | opObj = puObj.getOperationObj(name="setRadarFrequency") |
|
3795 | 3940 | if opObj == None: |
|
3796 | 3941 | radarfrequency = None |
|
3797 | 3942 | else: |
|
3798 | 3943 | value = opObj.getParameterValue(parameterName='frequency') |
|
3799 | 3944 | value = str(value) |
|
3800 | 3945 | radarfrequency = value |
|
3801 | 3946 | self.bufferVoltage("Processing Unit", "Radar Frequency", radarfrequency) |
|
3802 | 3947 | |
|
3803 | 3948 | opObj = puObj.getOperationObj(name="selectChannels") |
|
3804 | 3949 | if opObj == None: |
|
3805 | 3950 | channel = None |
|
3806 | 3951 | else: |
|
3807 | 3952 | value = opObj.getParameterValue(parameterName='channelList') |
|
3808 | 3953 | value = str(value)[1:-1] |
|
3809 | 3954 | channel = value |
|
3810 | 3955 | self.bufferVoltage("Processing Unit", "Select Channel", channel) |
|
3811 | 3956 | |
|
3812 | 3957 | |
|
3813 | 3958 | |
|
3814 | 3959 | opObj = puObj.getOperationObj(name="selectHeights") |
|
3815 | 3960 | if opObj == None: |
|
3816 | 3961 | heights = None |
|
3817 | 3962 | else: |
|
3818 | 3963 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
3819 | 3964 | value1 = str(value1) |
|
3820 | 3965 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
3821 | 3966 | value2 = str(value2) |
|
3822 | 3967 | value = value1 + "," + value2 |
|
3823 | 3968 | heights = value |
|
3824 | 3969 | self.bufferVoltage("Processing Unit", "Select Heights", heights) |
|
3825 | 3970 | |
|
3826 | 3971 | |
|
3827 | 3972 | opObj = puObj.getOperationObj(name="filterByHeights") |
|
3828 | 3973 | if opObj == None: |
|
3829 | 3974 | filter = None |
|
3830 | 3975 | else: |
|
3831 | 3976 | value = opObj.getParameterValue(parameterName='window') |
|
3832 | 3977 | value = str(value) |
|
3833 | 3978 | filter = value |
|
3834 | 3979 | self.bufferVoltage("Processing Unit", "Filter", filter) |
|
3835 | 3980 | |
|
3836 | 3981 | |
|
3837 | 3982 | opObj = puObj.getOperationObj(name="ProfileSelector") |
|
3838 | 3983 | if opObj == None: |
|
3839 | 3984 | profile = None |
|
3840 | 3985 | else: |
|
3841 | 3986 | for parmObj in opObj.getParameterObjList(): |
|
3842 | 3987 | if parmObj.name == "profileRangeList": |
|
3843 | 3988 | value = opObj.getParameterValue(parameterName='profileRangeList') |
|
3844 | 3989 | value = str(value)[1:-1] |
|
3845 | 3990 | profile = value |
|
3846 | 3991 | self.bufferVoltage("Processing Unit", "Select Profile", profile) |
|
3847 | 3992 | |
|
3848 | 3993 | if parmObj.name == "profileList": |
|
3849 | 3994 | value = opObj.getParameterValue(parameterName='profileList') |
|
3850 | 3995 | value = str(value)[1:-1] |
|
3851 | 3996 | profile = value |
|
3852 | 3997 | self.bufferVoltage("Processing Unit", "Select Profile", profile) |
|
3853 | 3998 | |
|
3854 | 3999 | opObj = puObj.getOperationObj(name="CohInt") |
|
3855 | 4000 | if opObj == None: |
|
3856 | 4001 | coherentintegration = None |
|
3857 | 4002 | else: |
|
3858 | 4003 | value = opObj.getParameterValue(parameterName='n') |
|
3859 | 4004 | coherentintegration = value |
|
3860 | 4005 | self.bufferVoltage("Processing Unit", "Coherente Integration", coherentintegration) |
|
3861 | 4006 | |
|
3862 | 4007 | |
|
3863 | 4008 | |
|
3864 | 4009 | opObj = puObj.getOperationObj(name="Decoder") |
|
3865 | 4010 | if opObj == None: |
|
3866 | 4011 | self.volOpCebDecodification.setCheckState(0) |
|
3867 | 4012 | code = None |
|
3868 | 4013 | mode = None |
|
3869 | 4014 | else: |
|
3870 | 4015 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) |
|
3871 | 4016 | try: |
|
3872 | 4017 | valueBaud = opObj.getParameterValue(parameterName='nBaud') |
|
3873 | 4018 | except: |
|
3874 | 4019 | status = "off" |
|
3875 | 4020 | try: |
|
3876 | 4021 | valueCode = opObj.getParameterValue(parameterName='nCode') |
|
3877 | 4022 | status = "on" |
|
3878 | 4023 | except: |
|
3879 | 4024 | status = "off" |
|
3880 | 4025 | |
|
3881 | 4026 | if not status == "off": |
|
3882 | 4027 | if int(valueCode) == 1: |
|
3883 | 4028 | Comp = "" |
|
3884 | 4029 | else: |
|
3885 | 4030 | Comp = "+" + "Comp." |
|
3886 | 4031 | code = "Barker" + str(valueBaud) + str(Comp) |
|
3887 | 4032 | else: |
|
3888 | 4033 | code = "Default" |
|
3889 | 4034 | self.bufferVoltage("Decodification", "Code", code) |
|
3890 | 4035 | |
|
3891 | 4036 | try: |
|
3892 | 4037 | value = opObj.getParameterValue(parameterName='mode') |
|
3893 | 4038 | status = "on" |
|
3894 | 4039 | except: |
|
3895 | 4040 | status = "off" |
|
3896 | 4041 | |
|
3897 | 4042 | if not status == "off": |
|
3898 | 4043 | self.volOpComMode.setCurrentIndex(value) |
|
3899 | 4044 | if int(value) == 0: |
|
3900 | 4045 | mode = "Time" |
|
3901 | 4046 | else: |
|
3902 | 4047 | mode = "freq" + str(value) |
|
3903 | 4048 | else: |
|
3904 | 4049 | mode = "Default" |
|
3905 | 4050 | self.bufferVoltage("Decodification", "Mode", mode) |
|
3906 | 4051 | |
|
3907 | 4052 | # graph |
|
3908 | opObj = puObj.getOperationObj(name='Plot') | |
|
4053 | # opObj = puObj.getOperationObj(name='Plot') | |
|
4054 | opObj = puObj.getOperationObj(name='Scope') | |
|
3909 | 4055 | if opObj == None: |
|
3910 | 4056 | self.volGraphCebshow.setCheckState(0) |
|
3911 | 4057 | operation = "Disabled" |
|
3912 | 4058 | channelList = None |
|
3913 | 4059 | freq_vel = None |
|
3914 | 4060 | heightsrange = None |
|
3915 | 4061 | else: |
|
3916 | 4062 | operation = 'Enabled' |
|
3917 | 4063 | self.bufferVoltage("Scope", "Operation", operation), |
|
3918 | 4064 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) |
|
3919 | 4065 | value = opObj.getParameterObj(parameterName='channelList') |
|
3920 | 4066 | if value == None: |
|
3921 | 4067 | channelList = None |
|
3922 | 4068 | else: |
|
3923 | 4069 | value = opObj.getParameterValue(parameterName='channelList') |
|
3924 | 4070 | value = str(value)[1:-1] |
|
3925 | 4071 | channelList = value |
|
3926 | 4072 | self.bufferVoltage("Scope", "Channel List", channelList) |
|
3927 | 4073 | |
|
3928 | 4074 | |
|
3929 | 4075 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
3930 | 4076 | if value1 == None: |
|
3931 | 4077 | freq_vel = None |
|
3932 | 4078 | else: |
|
3933 | 4079 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3934 | 4080 | value1 = str(value1) |
|
3935 | 4081 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
3936 | 4082 | if value2 == None: |
|
3937 | 4083 | freq_vel = None |
|
3938 | 4084 | else: |
|
3939 | 4085 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3940 | 4086 | value2 = str(value2) |
|
3941 | 4087 | value = value1 + "," + value2 |
|
3942 | 4088 | freq_vel = value |
|
3943 | 4089 | self.bufferVoltage("Scope", "Freq/Vel", freq_vel) |
|
3944 | 4090 | |
|
3945 | 4091 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
3946 | 4092 | if value1 == None: |
|
3947 | 4093 | heightsrange = None |
|
3948 | 4094 | else: |
|
3949 | 4095 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3950 | 4096 | value1 = str(value1) |
|
3951 | 4097 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
3952 | 4098 | if value2 == None: |
|
3953 | 4099 | fheightsrange = None |
|
3954 | 4100 | else: |
|
3955 | 4101 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3956 | 4102 | value2 = str(value2) |
|
3957 | 4103 | value = value1 + "," + value2 |
|
3958 | 4104 | heightsrange = value |
|
3959 | 4105 | self.bufferVoltage("Scope", "Height Range", heightsrange) |
|
3960 | 4106 | |
|
3961 | 4107 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3962 | 4108 | if parmObj == None: |
|
3963 | 4109 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
3964 | 4110 | figpath = None |
|
3965 | 4111 | else: |
|
3966 | 4112 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) |
|
3967 | 4113 | value = opObj.getParameterValue(parameterName='figpath') |
|
3968 | 4114 | figpath = value |
|
3969 | 4115 | self.bufferVoltage("Scope", "Path", figpath) |
|
3970 | 4116 | # outputVoltageWrite |
|
3971 | 4117 | opObj = puObj.getOperationObj(name='VoltageWriter') |
|
3972 | 4118 | if opObj == None: |
|
3973 | 4119 | pass |
|
3974 | 4120 | else: |
|
3975 | 4121 | operation = 'Enabled' |
|
3976 | 4122 | self.bufferVoltage("Output", "Operation", operation) |
|
3977 | 4123 | value = opObj.getParameterObj(parameterName='path') |
|
3978 | 4124 | if value == None: |
|
3979 | 4125 | path = None |
|
3980 | 4126 | else: |
|
3981 | 4127 | value = opObj.getParameterValue(parameterName='path') |
|
3982 | 4128 | path = str(value) |
|
3983 | 4129 | self.bufferVoltage("Output", "Path", path) |
|
3984 | 4130 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
3985 | 4131 | if value == None: |
|
3986 | 4132 | blocksperfile = None |
|
3987 | 4133 | else: |
|
3988 | 4134 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
3989 | 4135 | blocksperfile = str(value) |
|
3990 | 4136 | self.bufferVoltage("Output", "BlocksPerFile", blocksperfile) |
|
3991 | 4137 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
3992 | 4138 | if value == None: |
|
3993 | 4139 | profilesPerBlock = None |
|
3994 | 4140 | else: |
|
3995 | 4141 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
3996 | 4142 | profilesPerBlock = str(value) |
|
3997 | 4143 | self.bufferVoltage("Output", "ProfilesPerBlock", profilesPerBlock) |
|
3998 | 4144 | |
|
3999 | 4145 | |
|
4000 | 4146 | # set model PU Properties |
|
4001 | 4147 | |
|
4002 | 4148 | self.propertiesModel = treeModel() |
|
4003 | 4149 | self.propertiesModel.showPUVoltageParms(self.volProperCaracteristica, self.volProperPrincipal, self.volProperDescripcion) |
|
4004 | 4150 | self.volProperCaracteristica = [] |
|
4005 | 4151 | self.volProperPrincipal = [] |
|
4006 | 4152 | self.volProperDescripcion = [] |
|
4007 | 4153 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4008 | 4154 | self.treeProjectProperties.expandAll() |
|
4009 | 4155 | self.treeProjectProperties.allColumnsShowFocus() |
|
4010 | 4156 | self.treeProjectProperties.resizeColumnToContents(0) |
|
4011 | 4157 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4012 | 4158 | |
|
4013 | 4159 | def bufferSpectra(self, caracteristica, principal, description): |
|
4014 | 4160 | self.specProperCaracteristica.append(caracteristica) |
|
4015 | 4161 | self.specProperPrincipal.append(principal) |
|
4016 | 4162 | self.specProperDescripcion.append(description) |
|
4017 | 4163 | return self.specProperCaracteristica, self.specProperPrincipal, self.specProperDescripcion |
|
4018 | 4164 | |
|
4019 | 4165 | def showPUSpectraProperties(self, puObj): |
|
4020 | 4166 | type = puObj.name |
|
4021 | 4167 | self.bufferSpectra("Processing Unit", "Type", type) |
|
4022 | 4168 | |
|
4023 | 4169 | opObj = puObj.getOperationObj(name="setRadarFrequency") |
|
4024 | 4170 | if opObj == None: |
|
4025 | 4171 | radarfrequency = None |
|
4026 | 4172 | else: |
|
4027 | 4173 | value = opObj.getParameterValue(parameterName='frequency') |
|
4028 | 4174 | value = str(value) |
|
4029 | 4175 | radarfrequency = value |
|
4030 | 4176 | self.bufferSpectra("Processing Unit", "Radar Frequency", radarfrequency) |
|
4031 | 4177 | |
|
4032 | 4178 | |
|
4033 |
opObj = puObj.getOperationObj(name=" |
|
|
4179 | opObj = puObj.getOperationObj(name="run") | |
|
4034 | 4180 | if opObj == None: |
|
4035 | 4181 | self.specOpnFFTpoints.clear() |
|
4036 | 4182 | self.specOpProfiles.clear() |
|
4037 | 4183 | self.specOpippFactor.clear() |
|
4038 | 4184 | else: |
|
4039 | 4185 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
4040 | 4186 | if parmObj == None: |
|
4041 | 4187 | nProfiles = None |
|
4042 | 4188 | else: |
|
4043 | 4189 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
4044 | 4190 | nProfiles = value |
|
4045 | 4191 | self.bufferSpectra("Processing Unit", "nProfiles", nProfiles) |
|
4046 | 4192 | |
|
4047 | 4193 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
4048 | 4194 | if parmObj == None: |
|
4049 | 4195 | nFFTPoints = None |
|
4050 | 4196 | else: |
|
4051 | 4197 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
4052 | 4198 | nFFTPoints = value |
|
4053 | 4199 | self.bufferSpectra("Processing Unit", "nFFTpoints", nFFTPoints) |
|
4054 | 4200 | |
|
4055 | 4201 | parmObj = opObj.getParameterObj(parameterName='ippFactor') |
|
4056 | 4202 | if parmObj == None: |
|
4057 | 4203 | ippFactor = None |
|
4058 | 4204 | else: |
|
4059 | 4205 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
4060 | 4206 | ippFactor = value |
|
4061 | 4207 | self.bufferSpectra("Processing Unit", "Ipp Factor", ippFactor) |
|
4062 | 4208 | |
|
4063 | 4209 | |
|
4064 |
opObj = puObj.getOperationObj(name=" |
|
|
4210 | opObj = puObj.getOperationObj(name="run") | |
|
4065 | 4211 | if opObj == None: |
|
4066 | 4212 | pairsList = None |
|
4067 | 4213 | else: |
|
4068 | 4214 | parm = opObj.getParameterObj(parameterName='pairsList') |
|
4069 | 4215 | if parm == None: |
|
4070 | 4216 | pairsList = None |
|
4071 | 4217 | else: |
|
4072 | 4218 | value = opObj.getParameterValue(parameterName='pairsList') |
|
4073 | 4219 | value = str(value)[1:-1] |
|
4074 | 4220 | pairsList = value |
|
4075 | 4221 | self.bufferSpectra("Processing Unit", "PairsList", pairsList) |
|
4076 | 4222 | |
|
4077 | 4223 | |
|
4078 | 4224 | opObj = puObj.getOperationObj(name="selectChannels") |
|
4079 | 4225 | if opObj == None: |
|
4080 | 4226 | channel = None |
|
4081 | 4227 | else: |
|
4082 | 4228 | value = opObj.getParameterValue(parameterName='channelList') |
|
4083 | 4229 | value = str(value)[1:-1] |
|
4084 | 4230 | channel = value |
|
4085 | 4231 | self.bufferSpectra("Processing Unit", "Channel", channel) |
|
4086 | 4232 | |
|
4087 | 4233 | opObj = puObj.getOperationObj(name="selectHeights") |
|
4088 | 4234 | if opObj == None: |
|
4089 | 4235 | heights = None |
|
4090 | 4236 | else: |
|
4091 | 4237 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
4092 | 4238 | value1 = str(value1) |
|
4093 | 4239 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
4094 | 4240 | value2 = str(value2) |
|
4095 | 4241 | value = value1 + "," + value2 |
|
4096 | 4242 | heights = value |
|
4097 | 4243 | self.bufferSpectra("Processing Unit", "Heights", heights) |
|
4098 | 4244 | |
|
4099 | 4245 | opObj = puObj.getOperationObj(name="IncohInt") |
|
4100 | 4246 | if opObj == None: |
|
4101 | 4247 | incoherentintegration = None |
|
4102 | 4248 | else: |
|
4103 | 4249 | try: |
|
4104 | 4250 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
4105 | 4251 | except: |
|
4106 | 4252 | value = opObj.getParameterValue(parameterName='n') |
|
4107 | 4253 | |
|
4108 | 4254 | value = float(value) |
|
4109 | 4255 | incoherentintegration = str(value) |
|
4110 | 4256 | self.bufferSpectra("Processing Unit", "Incoherent Integration", incoherentintegration) |
|
4111 | 4257 | |
|
4112 | 4258 | |
|
4113 | 4259 | opObj = puObj.getOperationObj(name="removeDC") |
|
4114 | 4260 | if opObj == None: |
|
4115 | 4261 | removeDC = None |
|
4116 | 4262 | else: |
|
4117 | 4263 | value = opObj.getParameterValue(parameterName='mode') |
|
4118 | 4264 | self.bufferSpectra("Processing Unit", "Remove DC", value) |
|
4119 | 4265 | |
|
4120 | 4266 | opObj = puObj.getOperationObj(name="removeInterference") |
|
4121 | 4267 | if opObj == None: |
|
4122 | 4268 | removeInterference = None |
|
4123 | 4269 | else: |
|
4124 | 4270 | self.bufferSpectra("Processing Unit", "Remove Interference", "1") |
|
4125 | 4271 | |
|
4126 | 4272 | opObj = puObj.getOperationObj(name="getNoise") |
|
4127 | 4273 | if opObj == None: |
|
4128 | 4274 | getNoise = None |
|
4129 | 4275 | else: |
|
4130 | 4276 | value1 = opObj.getParameterObj(parameterName='minHei') |
|
4131 | 4277 | if value1 == None: |
|
4132 | 4278 | getNoise = None |
|
4133 | 4279 | getNoise = "Default" |
|
4134 | 4280 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
4135 | 4281 | |
|
4136 | 4282 | else: |
|
4137 | 4283 | value1 = opObj.getParameterValue(parameterName='minHei') |
|
4138 | 4284 | value1 = str(value1) |
|
4139 | 4285 | value2 = opObj.getParameterObj(parameterName='maxHei') |
|
4140 | 4286 | if value2 == None: |
|
4141 | 4287 | getNoise = None |
|
4142 | 4288 | value = value1 |
|
4143 | 4289 | getNoise = value |
|
4144 | 4290 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
4145 | 4291 | else: |
|
4146 | 4292 | value2 = opObj.getParameterValue(parameterName='maxHei') |
|
4147 | 4293 | value2 = str(value2) |
|
4148 | 4294 | value3 = opObj.getParameterObj(parameterName='minVel') |
|
4149 | 4295 | if value3 == None: |
|
4150 | 4296 | getNoise = None |
|
4151 | 4297 | value = value1 + "," + value2 |
|
4152 | 4298 | getNoise = value |
|
4153 | 4299 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
4154 | 4300 | else: |
|
4155 | 4301 | value3 = opObj.getParameterValue(parameterName='minVel') |
|
4156 | 4302 | value3 = str(value3) |
|
4157 | 4303 | value4 = opObj.getParameterObj(parameterName='maxVel') |
|
4158 | 4304 | if value4 == None: |
|
4159 | 4305 | getNoise = None |
|
4160 | 4306 | value = value1 + "," + value2 + ',' + value3 |
|
4161 | 4307 | getNoise = value |
|
4162 | 4308 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
4163 | 4309 | else: |
|
4164 | 4310 | value4 = opObj.getParameterValue(parameterName='maxVel') |
|
4165 | 4311 | value4 = str(value4) |
|
4166 | 4312 | value = value1 + "," + value2 + ',' + value3 + ',' + value4 |
|
4167 | 4313 | getNoise = value |
|
4168 | 4314 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
4169 | 4315 | |
|
4170 | ||
|
4171 | opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") | |
|
4316 | opObj = puObj.getOperationObj(name='SpectraPlot') | |
|
4317 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") | |
|
4318 | ||
|
4172 | 4319 | if opObj == None: |
|
4173 | 4320 | operationSpectraPlot = "Disabled" |
|
4174 | 4321 | freq_vel = None |
|
4175 | 4322 | heightsrange = None |
|
4176 | 4323 | channelListSpectraPlot = None |
|
4177 | 4324 | else: |
|
4178 | 4325 | operationSpectraPlot = "Enable" |
|
4179 | 4326 | self.bufferSpectra("Spectra Plot", "Operation", operationSpectraPlot) |
|
4180 | 4327 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4181 | 4328 | if parmObj == None: |
|
4182 | 4329 | channelListSpectraPlot = None |
|
4183 | 4330 | else: |
|
4184 | 4331 | value = opObj.getParameterValue(parameterName='channelList') |
|
4185 | 4332 | channelListSpectraPlot = str(value)[1:-1] |
|
4186 | 4333 | self.bufferSpectra("Spectra Plot", "Channel List", channelListSpectraPlot) |
|
4187 | 4334 | |
|
4188 | 4335 | |
|
4189 | 4336 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4190 | 4337 | if value1 == None: |
|
4191 | 4338 | freq_vel = None |
|
4192 | 4339 | else: |
|
4193 | 4340 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4194 | 4341 | value1 = str(value1) |
|
4195 | 4342 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4196 | 4343 | if value2 == None: |
|
4197 | 4344 | freq_vel = None |
|
4198 | 4345 | else: |
|
4199 | 4346 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4200 | 4347 | value2 = str(value2) |
|
4201 | 4348 | value = value1 + "," + value2 |
|
4202 | 4349 | freq_vel = value |
|
4203 | 4350 | self.bufferSpectra("Spectra Plot", "Freq/Vel", freq_vel) |
|
4204 | 4351 | |
|
4205 | 4352 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4206 | 4353 | if value1 == None: |
|
4207 | 4354 | heightsrange = None |
|
4208 | 4355 | else: |
|
4209 | 4356 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4210 | 4357 | value1 = str(value1) |
|
4211 | 4358 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4212 | 4359 | if value2 == None: |
|
4213 | 4360 | fheightsrange = None |
|
4214 | 4361 | else: |
|
4215 | 4362 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4216 | 4363 | value2 = str(value2) |
|
4217 | 4364 | value = value1 + "," + value2 |
|
4218 | 4365 | heightsrange = value |
|
4219 | 4366 | self.bufferSpectra("Spectra Plot", "Height Range", heightsrange) |
|
4220 | 4367 | |
|
4221 | 4368 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
4222 | 4369 | if value1 == None: |
|
4223 | 4370 | dBrange = None |
|
4224 | 4371 | else: |
|
4225 | 4372 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
4226 | 4373 | value1 = str(value1) |
|
4227 | 4374 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
4228 | 4375 | if value2 == None: |
|
4229 | 4376 | fdBrange = None |
|
4230 | 4377 | else: |
|
4231 | 4378 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
4232 | 4379 | value2 = str(value2) |
|
4233 | 4380 | value = value1 + "," + value2 |
|
4234 | 4381 | dbrange = value |
|
4235 | 4382 | self.bufferSpectra("Spectra Plot", "dB Range", dbrange) |
|
4236 | 4383 | |
|
4237 | 4384 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4238 | 4385 | if parmObj == None: |
|
4239 | 4386 | path = None |
|
4240 | 4387 | else: |
|
4241 | 4388 | path = opObj.getParameterValue(parameterName='figpath') |
|
4242 | 4389 | self.bufferSpectra("Spectra Plot", "Save Path", path) |
|
4243 | 4390 | |
|
4244 | 4391 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4245 | 4392 | if parmObj == None: |
|
4246 | 4393 | status = 'disable' |
|
4247 | 4394 | else: |
|
4248 | 4395 | status = 'enable' |
|
4249 | 4396 | self.bufferSpectra("Spectra Plot", "FTP", status) |
|
4250 | 4397 | self.showWr_Period(puObj, opObj, nameplotop="Spectra Plot") |
|
4251 | 4398 | self.saveFTPvalues(opObj) |
|
4252 |
|
|
|
4253 |
opObj = puObj.getOpObj |
|
|
4399 | ||
|
4400 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') | |
|
4401 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") | |
|
4254 | 4402 | if opObj == None: |
|
4255 | 4403 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
4256 | 4404 | operationCrossSpectraPlot = "Disabled" |
|
4257 | 4405 | channelList = None |
|
4258 | 4406 | freq_vel = None |
|
4259 | 4407 | heightsrange = None |
|
4260 | 4408 | else: |
|
4261 | 4409 | operationCrossSpectraPlot = "Enable" |
|
4262 | 4410 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
4263 | 4411 | self.bufferSpectra("Cross Spectra Plot", "Operation", operationCrossSpectraPlot) |
|
4264 | 4412 | |
|
4265 | 4413 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4266 | 4414 | if value1 == None: |
|
4267 | 4415 | freq_vel = None |
|
4268 | 4416 | else: |
|
4269 | 4417 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4270 | 4418 | value1 = str(value1) |
|
4271 | 4419 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4272 | 4420 | if value2 == None: |
|
4273 | 4421 | freq_vel = None |
|
4274 | 4422 | else: |
|
4275 | 4423 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4276 | 4424 | value2 = str(value2) |
|
4277 | 4425 | value = value1 + "," + value2 |
|
4278 | 4426 | freq_vel = value |
|
4279 | 4427 | self.bufferSpectra("Cross Spectra Plot", "Freq/Vel", freq_vel) |
|
4280 | 4428 | |
|
4281 | 4429 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4282 | 4430 | if value1 == None: |
|
4283 | 4431 | heightsrange = None |
|
4284 | 4432 | else: |
|
4285 | 4433 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4286 | 4434 | value1 = str(value1) |
|
4287 | 4435 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4288 | 4436 | if value2 == None: |
|
4289 | 4437 | fheightsrange = None |
|
4290 | 4438 | else: |
|
4291 | 4439 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4292 | 4440 | value2 = str(value2) |
|
4293 | 4441 | value = value1 + "," + value2 |
|
4294 | 4442 | heightsrange = value |
|
4295 | 4443 | self.bufferSpectra("Cross Spectra Plot", "Height Range", heightsrange) |
|
4296 | 4444 | |
|
4297 | 4445 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
4298 | 4446 | if value1 == None: |
|
4299 | 4447 | dBrange = None |
|
4300 | 4448 | else: |
|
4301 | 4449 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
4302 | 4450 | value1 = str(value1) |
|
4303 | 4451 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
4304 | 4452 | if value2 == None: |
|
4305 | 4453 | fdBrange = None |
|
4306 | 4454 | else: |
|
4307 | 4455 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
4308 | 4456 | value2 = str(value2) |
|
4309 | 4457 | value = value1 + "," + value2 |
|
4310 | 4458 | dbrange = value |
|
4311 | 4459 | self.bufferSpectra("Cross Spectra Plot", "dB Range", dbrange) |
|
4312 | 4460 | |
|
4313 | 4461 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4314 | 4462 | if parmObj == None: |
|
4315 | 4463 | path = None |
|
4316 | 4464 | else: |
|
4317 | 4465 | path = opObj.getParameterValue(parameterName='figpath') |
|
4318 | 4466 | self.bufferSpectra("Cross Spectra Plot", "Save Path", path) |
|
4319 | 4467 | |
|
4320 | 4468 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4321 | 4469 | if parmObj == None: |
|
4322 | 4470 | status = 'disable' |
|
4323 | 4471 | else: |
|
4324 | 4472 | status = 'enable' |
|
4325 | 4473 | self.bufferSpectra("Cross Spectra Plot", "FTP", status) |
|
4326 | 4474 | self.showWr_Period(puObj, opObj, nameplotop="Cross Spectra Plot") |
|
4327 | 4475 | self.saveFTPvalues(opObj) |
|
4328 | 4476 | |
|
4329 | ||
|
4330 | opObj = puObj.getOpObjfromParamValue(value="RTIPlot") | |
|
4477 | opObj = puObj.getOperationObj(name='RTIPlot') | |
|
4478 | # opObj = puObj.getOpObjfromParamValue(value="RTIPlot") | |
|
4331 | 4479 | if opObj == None: |
|
4332 | 4480 | self.specGraphCebRTIplot.setCheckState(0) |
|
4333 | 4481 | operationRTIPlot = "Disabled" |
|
4334 | 4482 | channelList = None |
|
4335 | 4483 | freq_vel = None |
|
4336 | 4484 | heightsrange = None |
|
4337 | 4485 | else: |
|
4338 | 4486 | operationRTIPlot = "Enable" |
|
4339 | 4487 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
4340 | 4488 | self.bufferSpectra("RTI Plot", "Operation", operationRTIPlot) |
|
4341 | 4489 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4342 | 4490 | if parmObj == None: |
|
4343 | 4491 | channelListRTIPlot = None |
|
4344 | 4492 | else: |
|
4345 | 4493 | value = opObj.getParameterValue(parameterName='channelList') |
|
4346 | 4494 | channelListRTIPlot = str(value)[1:-1] |
|
4347 | 4495 | self.bufferSpectra("RTI Plot", "Channel List", channelListRTIPlot) |
|
4348 | 4496 | |
|
4349 | 4497 | |
|
4350 | 4498 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4351 | 4499 | if value1 == None: |
|
4352 | 4500 | freq_vel = None |
|
4353 | 4501 | else: |
|
4354 | 4502 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4355 | 4503 | value1 = str(value1) |
|
4356 | 4504 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4357 | 4505 | if value2 == None: |
|
4358 | 4506 | freq_vel = None |
|
4359 | 4507 | else: |
|
4360 | 4508 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4361 | 4509 | value2 = str(value2) |
|
4362 | 4510 | value = value1 + "," + value2 |
|
4363 | 4511 | tmintmax = value |
|
4364 | 4512 | self.bufferSpectra("RTI Plot", "Tmin,Tmax", tmintmax) |
|
4365 | 4513 | |
|
4366 | 4514 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
4367 | 4515 | if parmObj == None: |
|
4368 | 4516 | timerange = None |
|
4369 | 4517 | else: |
|
4370 | 4518 | value = opObj.getParameterValue(parameterName='timerange') |
|
4371 | 4519 | timerange = str(value) |
|
4372 | 4520 | self.bufferSpectra("RTI Plot", "Time Range", timerange) |
|
4373 | 4521 | |
|
4374 | 4522 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4375 | 4523 | if value1 == None: |
|
4376 | 4524 | heightsrange = None |
|
4377 | 4525 | else: |
|
4378 | 4526 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4379 | 4527 | value1 = str(value1) |
|
4380 | 4528 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4381 | 4529 | if value2 == None: |
|
4382 | 4530 | fheightsrange = None |
|
4383 | 4531 | else: |
|
4384 | 4532 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4385 | 4533 | value2 = str(value2) |
|
4386 | 4534 | value = value1 + "," + value2 |
|
4387 | 4535 | heightsrange = value |
|
4388 | 4536 | self.bufferSpectra("RTI Plot", "Height Range", heightsrange) |
|
4389 | 4537 | |
|
4390 | 4538 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
4391 | 4539 | if value1 == None: |
|
4392 | 4540 | dBrange = None |
|
4393 | 4541 | else: |
|
4394 | 4542 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
4395 | 4543 | value1 = str(value1) |
|
4396 | 4544 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
4397 | 4545 | if value2 == None: |
|
4398 | 4546 | fdBrange = None |
|
4399 | 4547 | else: |
|
4400 | 4548 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
4401 | 4549 | value2 = str(value2) |
|
4402 | 4550 | value = value1 + "," + value2 |
|
4403 | 4551 | dbrange = value |
|
4404 | 4552 | self.bufferSpectra("RTI Plot", "dB Range", dbrange) |
|
4405 | 4553 | |
|
4406 | 4554 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4407 | 4555 | if parmObj == None: |
|
4408 | 4556 | path = None |
|
4409 | 4557 | else: |
|
4410 | 4558 | path = opObj.getParameterValue(parameterName='figpath') |
|
4411 | 4559 | self.bufferSpectra("RTI Plot", "Save Path", path) |
|
4412 | 4560 | |
|
4413 | 4561 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4414 | 4562 | if parmObj == None: |
|
4415 | 4563 | status = 'disable' |
|
4416 | 4564 | else: |
|
4417 | 4565 | status = 'enable' |
|
4418 | 4566 | self.bufferSpectra("RTI Plot", "FTP", status) |
|
4419 | 4567 | self.showWr_Period(puObj, opObj, nameplotop="RTI Plot") |
|
4420 | 4568 | self.saveFTPvalues(opObj) |
|
4421 | 4569 | |
|
4422 | ||
|
4423 | opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") | |
|
4570 | opObj = puObj.getOperationObj(name='CoherenceMap') | |
|
4571 | # opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") | |
|
4424 | 4572 | if opObj == None: |
|
4425 | 4573 | self.specGraphCebCoherencmap.setCheckState(0) |
|
4426 | 4574 | operationCoherenceMap = "Disabled" |
|
4427 | 4575 | channelList = None |
|
4428 | 4576 | freq_vel = None |
|
4429 | 4577 | heightsrange = None |
|
4430 | 4578 | else: |
|
4431 | 4579 | operationCoherenceMap = "Enable" |
|
4432 | 4580 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
4433 | 4581 | self.bufferSpectra("Coherence Map Plot", "Operation", operationCoherenceMap) |
|
4434 | 4582 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4435 | 4583 | if parmObj == None: |
|
4436 | 4584 | channelListRTIPlot = None |
|
4437 | 4585 | else: |
|
4438 | 4586 | value = opObj.getParameterValue(parameterName='channelList') |
|
4439 | 4587 | channelListRTIPlot = str(value)[1:-1] |
|
4440 | 4588 | self.bufferSpectra("Coherence Map Plot", "Channel List", channelListRTIPlot) |
|
4441 | 4589 | |
|
4442 | 4590 | |
|
4443 | 4591 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4444 | 4592 | if value1 == None: |
|
4445 | 4593 | freq_vel = None |
|
4446 | 4594 | else: |
|
4447 | 4595 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4448 | 4596 | value1 = str(value1) |
|
4449 | 4597 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4450 | 4598 | if value2 == None: |
|
4451 | 4599 | freq_vel = None |
|
4452 | 4600 | else: |
|
4453 | 4601 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4454 | 4602 | value2 = str(value2) |
|
4455 | 4603 | value = value1 + "," + value2 |
|
4456 | 4604 | tmintmax = value |
|
4457 | 4605 | self.bufferSpectra("Coherence Map Plot", "Tmin,Tmax", tmintmax) |
|
4458 | 4606 | |
|
4459 | 4607 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
4460 | 4608 | if parmObj == None: |
|
4461 | 4609 | timerange = None |
|
4462 | 4610 | else: |
|
4463 | 4611 | value = opObj.getParameterValue(parameterName='timerange') |
|
4464 | 4612 | timerange = str(value) |
|
4465 | 4613 | self.bufferSpectra("Coherence Map Plot", "Time Range", timerange) |
|
4466 | 4614 | |
|
4467 | 4615 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4468 | 4616 | if value1 == None: |
|
4469 | 4617 | heightsrange = None |
|
4470 | 4618 | else: |
|
4471 | 4619 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4472 | 4620 | value1 = str(value1) |
|
4473 | 4621 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4474 | 4622 | if value2 == None: |
|
4475 | 4623 | fheightsrange = None |
|
4476 | 4624 | else: |
|
4477 | 4625 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4478 | 4626 | value2 = str(value2) |
|
4479 | 4627 | value = value1 + "," + value2 |
|
4480 | 4628 | heightsrange = value |
|
4481 | 4629 | self.bufferSpectra("Coherence Map Plot", "Height Range", heightsrange) |
|
4482 | 4630 | |
|
4483 | 4631 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
4484 | 4632 | if value1 == None: |
|
4485 | 4633 | dBrange = None |
|
4486 | 4634 | else: |
|
4487 | 4635 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
4488 | 4636 | value1 = str(value1) |
|
4489 | 4637 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
4490 | 4638 | if value2 == None: |
|
4491 | 4639 | fdBrange = None |
|
4492 | 4640 | else: |
|
4493 | 4641 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
4494 | 4642 | value2 = str(value2) |
|
4495 | 4643 | value = value1 + "," + value2 |
|
4496 | 4644 | dbrange = value |
|
4497 | 4645 | self.bufferSpectra("Coherence Map Plot", "Magnitud", dbrange) |
|
4498 | 4646 | |
|
4499 | 4647 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4500 | 4648 | if parmObj == None: |
|
4501 | 4649 | path = None |
|
4502 | 4650 | else: |
|
4503 | 4651 | path = opObj.getParameterValue(parameterName='figpath') |
|
4504 | 4652 | self.bufferSpectra("Coherence Map Plot", "Save Path", path) |
|
4505 | 4653 | |
|
4506 | 4654 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4507 | 4655 | if parmObj == None: |
|
4508 | 4656 | status = 'disable' |
|
4509 | 4657 | else: |
|
4510 | 4658 | status = 'enable' |
|
4511 | 4659 | self.bufferSpectra("Coherence Map Plot", "FTP", status) |
|
4512 | 4660 | self.showWr_Period(puObj, opObj, nameplotop="Coherence Map Plot") |
|
4513 | 4661 | self.saveFTPvalues(opObj) |
|
4514 | 4662 | |
|
4515 | 4663 | |
|
4516 | ||
|
4517 | opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") | |
|
4664 | opObj = puObj.getOperationObj(name='PowerProfilePlot') | |
|
4665 | # opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") | |
|
4518 | 4666 | if opObj == None: |
|
4519 | 4667 | self.specGraphPowerprofile.setCheckState(0) |
|
4520 | 4668 | operationPowerProfilePlot = "Disabled" |
|
4521 | 4669 | channelList = None |
|
4522 | 4670 | freq_vel = None |
|
4523 | 4671 | heightsrange = None |
|
4524 | 4672 | else: |
|
4525 | 4673 | operationPowerProfilePlot = "Enable" |
|
4526 | 4674 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
4527 | 4675 | self.bufferSpectra("PowerProfile Plot", "Operation", operationPowerProfilePlot) |
|
4528 | 4676 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4529 | 4677 | if parmObj == None: |
|
4530 | 4678 | channelListSpectraPlot = None |
|
4531 | 4679 | else: |
|
4532 | 4680 | value = opObj.getParameterValue(parameterName='channelList') |
|
4533 | 4681 | channelListSpectraPlot = str(value)[1:-1] |
|
4534 | 4682 | self.bufferSpectra("PowerProfile Plot", "Channel List", channelListSpectraPlot) |
|
4535 | 4683 | |
|
4536 | 4684 | |
|
4537 | 4685 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4538 | 4686 | if value1 == None: |
|
4539 | 4687 | freq_vel = None |
|
4540 | 4688 | else: |
|
4541 | 4689 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4542 | 4690 | value1 = str(value1) |
|
4543 | 4691 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4544 | 4692 | if value2 == None: |
|
4545 | 4693 | freq_vel = None |
|
4546 | 4694 | else: |
|
4547 | 4695 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4548 | 4696 | value2 = str(value2) |
|
4549 | 4697 | value = value1 + "," + value2 |
|
4550 | 4698 | dbrange = value |
|
4551 | 4699 | self.bufferSpectra("PowerProfile Plot", "dbRange", dbrange) |
|
4552 | 4700 | |
|
4553 | 4701 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4554 | 4702 | if value1 == None: |
|
4555 | 4703 | heightsrange = None |
|
4556 | 4704 | else: |
|
4557 | 4705 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4558 | 4706 | value1 = str(value1) |
|
4559 | 4707 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4560 | 4708 | if value2 == None: |
|
4561 | 4709 | fheightsrange = None |
|
4562 | 4710 | else: |
|
4563 | 4711 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4564 | 4712 | value2 = str(value2) |
|
4565 | 4713 | value = value1 + "," + value2 |
|
4566 | 4714 | heightsrange = value |
|
4567 | 4715 | self.bufferSpectra("PowerProfile Plot", "Height Range", heightsrange) |
|
4568 | 4716 | |
|
4569 | 4717 | |
|
4570 | 4718 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4571 | 4719 | if parmObj == None: |
|
4572 | 4720 | path = None |
|
4573 | 4721 | else: |
|
4574 | 4722 | path = opObj.getParameterValue(parameterName='figpath') |
|
4575 | 4723 | self.bufferSpectra("PowerProfile Plot", "Save Path", path) |
|
4576 | 4724 | |
|
4577 | 4725 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4578 | 4726 | if parmObj == None: |
|
4579 | 4727 | status = 'disable' |
|
4580 | 4728 | else: |
|
4581 | 4729 | status = 'enable' |
|
4582 | 4730 | self.bufferSpectra("PowerProfile Plot", "FTP", status) |
|
4583 | 4731 | self.showWr_Period(puObj, opObj, nameplotop="PowerProfile Plot") |
|
4584 | 4732 | self.saveFTPvalues(opObj) |
|
4585 | 4733 | |
|
4586 | 4734 | # noise |
|
4587 |
opObj = puObj.getOpObj |
|
|
4735 | opObj = puObj.getOperationObj(name='Noise') | |
|
4736 | # opObj = puObj.getOpObjfromParamValue(value="Noise") | |
|
4588 | 4737 | if opObj == None: |
|
4589 | 4738 | self.specGraphCebRTInoise.setCheckState(0) |
|
4590 | 4739 | operationRTINoise = "Disabled" |
|
4591 | 4740 | channelList = None |
|
4592 | 4741 | freq_vel = None |
|
4593 | 4742 | dbRange = None |
|
4594 | 4743 | else: |
|
4595 | 4744 | operationRTINoise = "Enable" |
|
4596 | 4745 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) |
|
4597 | 4746 | self.bufferSpectra("Noise Plot", "Operation", operationRTINoise) |
|
4598 | 4747 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4599 | 4748 | if parmObj == None: |
|
4600 | 4749 | channelListRTINoise = None |
|
4601 | 4750 | else: |
|
4602 | 4751 | value = opObj.getParameterValue(parameterName='channelList') |
|
4603 | 4752 | channelListRTINoise = str(value)[1:-1] |
|
4604 | 4753 | self.bufferSpectra("Noise Plot", "Channel List", channelListRTINoise) |
|
4605 | 4754 | |
|
4606 | 4755 | |
|
4607 | 4756 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4608 | 4757 | if value1 == None: |
|
4609 | 4758 | freq_vel = None |
|
4610 | 4759 | else: |
|
4611 | 4760 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4612 | 4761 | value1 = str(value1) |
|
4613 | 4762 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4614 | 4763 | if value2 == None: |
|
4615 | 4764 | freq_vel = None |
|
4616 | 4765 | else: |
|
4617 | 4766 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4618 | 4767 | value2 = str(value2) |
|
4619 | 4768 | value = value1 + "," + value2 |
|
4620 | 4769 | tmintmax = value |
|
4621 | 4770 | self.bufferSpectra("Noise Plot", "Tmin,Tmax", tmintmax) |
|
4622 | 4771 | |
|
4623 | 4772 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
4624 | 4773 | if parmObj == None: |
|
4625 | 4774 | timerange = None |
|
4626 | 4775 | else: |
|
4627 | 4776 | value = opObj.getParameterValue(parameterName='timerange') |
|
4628 | 4777 | timerange = str(value) |
|
4629 | 4778 | self.bufferSpectra("Noise Plot", "Time Range", timerange) |
|
4630 | 4779 | |
|
4631 | 4780 | |
|
4632 | 4781 | |
|
4633 | 4782 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4634 | 4783 | if value1 == None: |
|
4635 | 4784 | DBrange = None |
|
4636 | 4785 | else: |
|
4637 | 4786 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4638 | 4787 | value1 = str(value1) |
|
4639 | 4788 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4640 | 4789 | if value2 == None: |
|
4641 | 4790 | fdBrange = None |
|
4642 | 4791 | else: |
|
4643 | 4792 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4644 | 4793 | value2 = str(value2) |
|
4645 | 4794 | value = value1 + "," + value2 |
|
4646 | 4795 | dBrange = value |
|
4647 | 4796 | self.bufferSpectra("Noise Plot", "dB Range", dBrange) |
|
4648 | 4797 | |
|
4649 | 4798 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4650 | 4799 | if parmObj == None: |
|
4651 | 4800 | path = None |
|
4652 | 4801 | else: |
|
4653 | 4802 | path = opObj.getParameterValue(parameterName='figpath') |
|
4654 | 4803 | self.bufferSpectra("Noise Plot", "Save Path", path) |
|
4655 | 4804 | |
|
4656 | 4805 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4657 | 4806 | if parmObj == None: |
|
4658 | 4807 | status = 'disable' |
|
4659 | 4808 | else: |
|
4660 | 4809 | status = 'enable' |
|
4661 | 4810 | self.bufferSpectra("Noise Plot", "FTP", status) |
|
4662 | 4811 | self.showWr_Period(puObj, opObj, nameplotop="Noise Plot") |
|
4663 | 4812 | self.saveFTPvalues(opObj) |
|
4664 | 4813 | |
|
4665 | 4814 | if self.temporalFTP.create: |
|
4666 | 4815 | self.bufferSpectra("FTP", "Server", self.temporalFTP.server) |
|
4667 | 4816 | self.bufferSpectra("FTP", "Folder", self.temporalFTP.folder) |
|
4668 | 4817 | self.bufferSpectra("FTP", "Username", self.temporalFTP.username) |
|
4669 | self.bufferSpectra("FTP", "Password", self.temporalFTP.password) | |
|
4818 | self.bufferSpectra("FTP", "Password", '*'*len(self.temporalFTP.password)) | |
|
4670 | 4819 | self.bufferSpectra("FTP", "Ftp_wei", self.temporalFTP.ftp_wei) |
|
4671 | 4820 | self.bufferSpectra("FTP", "Exp_code", self.temporalFTP.exp_code) |
|
4672 | 4821 | self.bufferSpectra("FTP", "Sub_exp_code", self.temporalFTP.sub_exp_code) |
|
4673 | 4822 | self.bufferSpectra("FTP", "Plot_pos", self.temporalFTP.plot_pos) |
|
4674 | 4823 | # self.temporalFTP.create=False |
|
4675 | 4824 | self.temporalFTP.withoutconfig = False |
|
4676 | 4825 | |
|
4677 | 4826 | if self.temporalFTP.withoutconfig: |
|
4678 | 4827 | self.bufferSpectra("FTP", "Server", self.temporalFTP.server) |
|
4679 | 4828 | self.bufferSpectra("FTP", "Folder", self.temporalFTP.folder) |
|
4680 | 4829 | self.bufferSpectra("FTP", "Username", self.temporalFTP.username) |
|
4681 | self.bufferSpectra("FTP", "Password", self.temporalFTP.password) | |
|
4830 | self.bufferSpectra("FTP", "Password", '*'*len(self.temporalFTP.password)) | |
|
4682 | 4831 | self.bufferSpectra("FTP", "Ftp_wei", self.temporalFTP.ftp_wei) |
|
4683 | 4832 | self.bufferSpectra("FTP", "Exp_code", self.temporalFTP.exp_code) |
|
4684 | 4833 | self.bufferSpectra("FTP", "Sub_exp_code", self.temporalFTP.sub_exp_code) |
|
4685 | 4834 | self.bufferSpectra("FTP", "Plot_pos", self.temporalFTP.plot_pos) |
|
4686 | 4835 | self.temporalFTP.withoutconfig = False |
|
4687 | 4836 | |
|
4688 | 4837 | #### |
|
4689 | 4838 | self.temporalFTP.create = False |
|
4690 | 4839 | |
|
4691 | 4840 | # outputSpectraWrite |
|
4692 | 4841 | opObj = puObj.getOperationObj(name='SpectraWriter') |
|
4693 | 4842 | if opObj == None: |
|
4694 | 4843 | pass |
|
4695 | 4844 | else: |
|
4696 | 4845 | operation = 'Enabled' |
|
4697 | 4846 | self.bufferSpectra("Output", "Operation", operation) |
|
4698 | 4847 | value = opObj.getParameterObj(parameterName='path') |
|
4699 | 4848 | if value == None: |
|
4700 | 4849 | path = None |
|
4701 | 4850 | else: |
|
4702 | 4851 | value = opObj.getParameterValue(parameterName='path') |
|
4703 | 4852 | path = str(value) |
|
4704 | 4853 | self.bufferSpectra("Output", "Path", path) |
|
4705 | 4854 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
4706 | 4855 | if value == None: |
|
4707 | 4856 | blocksperfile = None |
|
4708 | 4857 | else: |
|
4709 | 4858 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
4710 | 4859 | blocksperfile = str(value) |
|
4711 | 4860 | self.bufferSpectra("Output", "BlocksPerFile", blocksperfile) |
|
4712 | 4861 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
4713 | 4862 | if value == None: |
|
4714 | 4863 | profilesPerBlock = None |
|
4715 | 4864 | else: |
|
4716 | 4865 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
4717 | 4866 | profilesPerBlock = str(value) |
|
4718 | 4867 | self.bufferSpectra("Output", "ProfilesPerBlock", profilesPerBlock) |
|
4719 | 4868 | |
|
4720 | 4869 | # set model PU Properties |
|
4721 | 4870 | |
|
4722 | 4871 | self.propertiesModel = treeModel() |
|
4723 | 4872 | self.propertiesModel.showPUSpectraParms(self.specProperCaracteristica, self.specProperPrincipal, self.specProperDescripcion) |
|
4724 | 4873 | |
|
4725 | 4874 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4726 | 4875 | self.treeProjectProperties.expandAll() |
|
4727 | 4876 | self.treeProjectProperties.allColumnsShowFocus() |
|
4728 | 4877 | self.treeProjectProperties.resizeColumnToContents(0) |
|
4729 | 4878 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4730 | 4879 | |
|
4731 | 4880 | self.specProperCaracteristica = [] |
|
4732 | 4881 | self.specProperDescripcion = [] |
|
4733 | 4882 | self.specProperPrincipal = [] |
|
4734 | 4883 | |
|
4735 | 4884 | |
|
4736 | 4885 | def bufferSpectraHeis(self, caracteristica, principal, description): |
|
4737 | 4886 | self.specHeisProperCaracteristica.append(caracteristica) |
|
4738 | 4887 | self.specHeisProperPrincipal.append(principal) |
|
4739 | 4888 | self.specHeisProperDescripcion.append(description) |
|
4740 | 4889 | return self.specHeisProperCaracteristica, self.specHeisProperPrincipal, self.specHeisProperDescripcion |
|
4741 | 4890 | |
|
4742 | 4891 | |
|
4743 | 4892 | def showPUSpectraHeisProperties(self, puObj): |
|
4744 | 4893 | type = puObj.name |
|
4745 | 4894 | self.bufferSpectraHeis("Processing Unit", "Type", type) |
|
4746 | 4895 | |
|
4747 | 4896 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") |
|
4748 | 4897 | if opObj == None: |
|
4749 | 4898 | incoherentintegration = None |
|
4750 | 4899 | else: |
|
4751 | 4900 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
4752 | 4901 | value = float(value) |
|
4753 | 4902 | incoherentintegration = str(value) |
|
4754 | 4903 | self.bufferSpectraHeis("Processing Unit", "Incoherent Integration", incoherentintegration) |
|
4755 | 4904 | # spectraheis graph |
|
4756 |
opObj = puObj.getOpObj |
|
|
4905 | opObj = puObj.getOperationObj(name='SpectraHeisScope') | |
|
4906 | # opObj = puObj.getOpObjfromParamValue(value="SpectraHeisScope") | |
|
4757 | 4907 | if opObj == None: |
|
4758 | 4908 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
4759 | 4909 | operationSpectraHeisPlot = "Disabled" |
|
4760 | 4910 | xmin_xmax = None |
|
4761 | 4911 | ymin_ymax = None |
|
4762 | 4912 | channelListSpectraPlot = None |
|
4763 | 4913 | else: |
|
4764 | 4914 | operationSpectraHeisPlot = "Enable" |
|
4765 | 4915 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
4766 | 4916 | self.bufferSpectraHeis("SpectraHeis Plot", "Operation", operationSpectraHeisPlot) |
|
4767 | 4917 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4768 | 4918 | if parmObj == None: |
|
4769 | 4919 | channelListSpectraPlot = None |
|
4770 | 4920 | else: |
|
4771 | 4921 | value = opObj.getParameterValue(parameterName='channelList') |
|
4772 | 4922 | channelListSpectraPlot = str(value)[1:-1] |
|
4773 | 4923 | self.bufferSpectraHeis("SpectraHeis Plot", "Channel List", channelListSpectraPlot) |
|
4774 | 4924 | |
|
4775 | 4925 | |
|
4776 | 4926 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4777 | 4927 | if value1 == None: |
|
4778 | 4928 | xmin_xmax = None |
|
4779 | 4929 | else: |
|
4780 | 4930 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4781 | 4931 | value1 = str(value1) |
|
4782 | 4932 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4783 | 4933 | if value2 == None: |
|
4784 | 4934 | xmin_xmax = None |
|
4785 | 4935 | else: |
|
4786 | 4936 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4787 | 4937 | value2 = str(value2) |
|
4788 | 4938 | value = value1 + "," + value2 |
|
4789 | 4939 | xmin_xmax = value |
|
4790 | 4940 | self.bufferSpectraHeis("SpectraHeis Plot", "Xmin-Xmax", xmin_xmax) |
|
4791 | 4941 | |
|
4792 | 4942 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4793 | 4943 | if value1 == None: |
|
4794 | 4944 | ymin_ymax = None |
|
4795 | 4945 | else: |
|
4796 | 4946 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4797 | 4947 | value1 = str(value1) |
|
4798 | 4948 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4799 | 4949 | if value2 == None: |
|
4800 | 4950 | ymin_ymax = None |
|
4801 | 4951 | else: |
|
4802 | 4952 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4803 | 4953 | value2 = str(value2) |
|
4804 | 4954 | value = value1 + "," + value2 |
|
4805 | 4955 | ymin_ymax = value |
|
4806 | 4956 | self.bufferSpectraHeis("SpectraHeis Plot", "Ymin-Ymax", ymin_ymax) |
|
4807 | 4957 | |
|
4808 | 4958 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4809 | 4959 | if parmObj == None: |
|
4810 | 4960 | path = None |
|
4811 | 4961 | else: |
|
4812 | 4962 | path = opObj.getParameterValue(parameterName='figpath') |
|
4813 | 4963 | self.bufferSpectraHeis("SpectraHeis Plot", "Save Path", path) |
|
4814 | 4964 | |
|
4815 | 4965 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4816 | 4966 | if parmObj == None: |
|
4817 | 4967 | status = 'disable' |
|
4818 | 4968 | else: |
|
4819 | 4969 | status = 'enable' |
|
4820 | 4970 | self.bufferSpectraHeis("SpectraHeis Plot", "FTP", status) |
|
4821 | 4971 | self.showWr_Period(puObj, opObj, nameplotop="SpectraHeis Plot") |
|
4822 | 4972 | self.saveFTPvalues(opObj) |
|
4823 | 4973 | |
|
4824 |
opObj = puObj.getOpObj |
|
|
4974 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') | |
|
4975 | # opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") | |
|
4825 | 4976 | if opObj == None: |
|
4826 | 4977 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
4827 | 4978 | operationRTIPlot = "Disabled" |
|
4828 | 4979 | channelList = None |
|
4829 | 4980 | freq_vel = None |
|
4830 | 4981 | heightsrange = None |
|
4831 | 4982 | else: |
|
4832 | 4983 | operationRTIPlot = "Enable" |
|
4833 | 4984 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
4834 | 4985 | self.bufferSpectraHeis("RTIHeis Plot", "Operation", operationRTIPlot) |
|
4835 | 4986 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
4836 | 4987 | if parmObj == None: |
|
4837 | 4988 | channelListRTIPlot = None |
|
4838 | 4989 | else: |
|
4839 | 4990 | value = opObj.getParameterValue(parameterName='channelList') |
|
4840 | 4991 | channelListRTIPlot = str(value)[1:-1] |
|
4841 | 4992 | self.bufferSpectraHeis("RTIHeis Plot", "Channel List", channelListRTIPlot) |
|
4842 | 4993 | |
|
4843 | 4994 | |
|
4844 | 4995 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4845 | 4996 | if value1 == None: |
|
4846 | 4997 | freq_vel = None |
|
4847 | 4998 | else: |
|
4848 | 4999 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
4849 | 5000 | value1 = str(value1) |
|
4850 | 5001 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
4851 | 5002 | if value2 == None: |
|
4852 | 5003 | freq_vel = None |
|
4853 | 5004 | else: |
|
4854 | 5005 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
4855 | 5006 | value2 = str(value2) |
|
4856 | 5007 | value = value1 + "," + value2 |
|
4857 | 5008 | tmintmax = value |
|
4858 | 5009 | self.bufferSpectraHeis("RTIHeis Plot", "Tmin,Tmax", tmintmax) |
|
4859 | 5010 | |
|
4860 | 5011 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
4861 | 5012 | if parmObj == None: |
|
4862 | 5013 | timerange = None |
|
4863 | 5014 | else: |
|
4864 | 5015 | value = opObj.getParameterValue(parameterName='timerange') |
|
4865 | 5016 | timerange = str(value) |
|
4866 | 5017 | self.bufferSpectraHeis("RTIHeis Plot", "Time Range", timerange) |
|
4867 | 5018 | |
|
4868 | 5019 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4869 | 5020 | if value1 == None: |
|
4870 | 5021 | heightsrange = None |
|
4871 | 5022 | else: |
|
4872 | 5023 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
4873 | 5024 | value1 = str(value1) |
|
4874 | 5025 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
4875 | 5026 | if value2 == None: |
|
4876 | 5027 | fheightsrange = None |
|
4877 | 5028 | else: |
|
4878 | 5029 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4879 | 5030 | value2 = str(value2) |
|
4880 | 5031 | value = value1 + "," + value2 |
|
4881 | 5032 | heightsrange = value |
|
4882 | 5033 | self.bufferSpectraHeis("RTIHeis Plot", "Ymin-Ymax", heightsrange) |
|
4883 | 5034 | |
|
4884 | 5035 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4885 | 5036 | if parmObj == None: |
|
4886 | 5037 | path = None |
|
4887 | 5038 | else: |
|
4888 | 5039 | path = opObj.getParameterValue(parameterName='figpath') |
|
4889 | 5040 | self.bufferSpectraHeis("RTIHeis Plot", "Save Path", path) |
|
4890 | 5041 | |
|
4891 | 5042 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4892 | 5043 | if parmObj == None: |
|
4893 | 5044 | status = 'disable' |
|
4894 | 5045 | else: |
|
4895 | 5046 | status = 'enable' |
|
4896 | 5047 | self.bufferSpectraHeis("RTIHeis Plot", "FTP", status) |
|
4897 | 5048 | self.showWr_Period(puObj, opObj, nameplotop="RTIHeis Plot") |
|
4898 | 5049 | self.saveFTPvalues(opObj) |
|
4899 | 5050 | |
|
4900 | 5051 | if self.temporalFTP.create: |
|
4901 | 5052 | self.bufferSpectraHeis("FTP", "Server", self.temporalFTP.server) |
|
4902 | 5053 | self.bufferSpectraHeis("FTP", "Folder", self.temporalFTP.folder) |
|
4903 | 5054 | self.bufferSpectraHeis("FTP", "Username", self.temporalFTP.username) |
|
4904 | 5055 | self.bufferSpectraHeis("FTP", "Password", self.temporalFTP.password) |
|
4905 | 5056 | self.bufferSpectraHeis("FTP", "Ftp_wei", self.temporalFTP.ftp_wei) |
|
4906 | 5057 | self.bufferSpectraHeis("FTP", "Exp_code", self.temporalFTP.exp_code) |
|
4907 | 5058 | self.bufferSpectraHeis("FTP", "Sub_exp_code", self.temporalFTP.sub_exp_code) |
|
4908 | 5059 | self.bufferSpectraHeis("FTP", "Plot_pos", self.temporalFTP.plot_pos) |
|
4909 | 5060 | # self.temporalFTP.create=False |
|
4910 | 5061 | self.temporalFTP.withoutconfig = False |
|
4911 | 5062 | |
|
4912 | 5063 | if self.temporalFTP.withoutconfig: |
|
4913 | 5064 | self.bufferSpectraHeis("FTP", "Server", self.temporalFTP.server) |
|
4914 | 5065 | self.bufferSpectraHeis("FTP", "Folder", self.temporalFTP.folder) |
|
4915 | 5066 | self.bufferSpectraHeis("FTP", "Username", self.temporalFTP.username) |
|
4916 | 5067 | self.bufferSpectraHeis("FTP", "Password", self.temporalFTP.password) |
|
4917 | 5068 | self.bufferSpectraHeis("FTP", "Ftp_wei", self.temporalFTP.ftp_wei) |
|
4918 | 5069 | self.bufferSpectraHeis("FTP", "Exp_code", self.temporalFTP.exp_code) |
|
4919 | 5070 | self.bufferSpectraHeis("FTP", "Sub_exp_code", self.temporalFTP.sub_exp_code) |
|
4920 | 5071 | self.bufferSpectraHeis("FTP", "Plot_pos", self.temporalFTP.plot_pos) |
|
4921 | 5072 | self.temporalFTP.withoutconfig = False |
|
4922 | 5073 | |
|
4923 | 5074 | #### |
|
4924 | 5075 | self.temporalFTP.create = False |
|
4925 | 5076 | |
|
4926 | 5077 | # outputSpectraHeisWrite |
|
4927 | 5078 | opObj = puObj.getOperationObj(name='FitsWriter') |
|
4928 | 5079 | if opObj == None: |
|
4929 | 5080 | pass |
|
4930 | 5081 | else: |
|
4931 | 5082 | operation = 'Enabled' |
|
4932 | 5083 | self.bufferSpectraHeis("Output", "Operation", operation) |
|
4933 | 5084 | value = opObj.getParameterObj(parameterName='path') |
|
4934 | 5085 | if value == None: |
|
4935 | 5086 | path = None |
|
4936 | 5087 | else: |
|
4937 | 5088 | value = opObj.getParameterValue(parameterName='path') |
|
4938 | 5089 | path = str(value) |
|
4939 | 5090 | self.bufferSpectraHeis("Output", "Path", path) |
|
4940 | 5091 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') |
|
4941 | 5092 | if value == None: |
|
4942 | 5093 | blocksperfile = None |
|
4943 | 5094 | else: |
|
4944 | 5095 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') |
|
4945 | 5096 | blocksperfile = str(value) |
|
4946 | 5097 | self.bufferSpectraHeis("Output", "BlocksPerFile", blocksperfile) |
|
4947 | 5098 | value = opObj.getParameterObj(parameterName='metadatafile') |
|
4948 | 5099 | if value == None: |
|
4949 | 5100 | metadata = None |
|
4950 | 5101 | else: |
|
4951 | 5102 | value = opObj.getParameterValue(parameterName='metadatafile') |
|
4952 | 5103 | metadata = str(value) |
|
4953 | 5104 | self.bufferSpectraHeis("Output", "Metadata", metadata) |
|
4954 | 5105 | |
|
4955 | 5106 | # set model PU Properties |
|
4956 | 5107 | |
|
4957 | 5108 | self.propertiesModel = treeModel() |
|
4958 | 5109 | self.propertiesModel.showPUSpectraHeisParms(self.specHeisProperCaracteristica, self.specHeisProperPrincipal, self.specHeisProperDescripcion) |
|
4959 | 5110 | |
|
4960 | 5111 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4961 | 5112 | self.treeProjectProperties.expandAll() |
|
4962 | 5113 | self.treeProjectProperties.allColumnsShowFocus() |
|
4963 | 5114 | self.treeProjectProperties.resizeColumnToContents(0) |
|
4964 | 5115 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4965 | 5116 | |
|
4966 | 5117 | self.specHeisProperCaracteristica = [] |
|
4967 | 5118 | self.specHeisProperDescripcion = [] |
|
4968 | 5119 | self.specHeisProperPrincipal = [] |
|
4969 | 5120 | |
|
4970 | 5121 | |
|
4971 | 5122 | def showWr_Period(self, puObj, opObj, nameplotop): |
|
4972 | 5123 | parmObj = opObj.getParameterObj(parameterName='wr_period') |
|
4973 | 5124 | if parmObj == None: |
|
4974 | 5125 | wr_period = None |
|
4975 | 5126 | else: |
|
4976 | 5127 | value = opObj.getParameterValue(parameterName='wr_period') |
|
4977 | 5128 | wr_period = str(value) |
|
4978 | 5129 | if puObj.datatype == "Spectra": |
|
4979 | 5130 | self.bufferSpectra(nameplotop, "wr_period", wr_period) |
|
4980 | 5131 | if puObj.datatype == "SpectraHeis": |
|
4981 | 5132 | self.bufferSpectraHeis(nameplotop, "wr_period", wr_period) |
|
4982 | 5133 | |
|
4983 | 5134 | def saveFTPvalues(self, opObj): |
|
4984 | 5135 | parmObj = opObj.getParameterObj(parameterName="server") |
|
4985 | 5136 | if parmObj == None: |
|
4986 | 5137 | server = 'jro-app.igp.gob.pe' |
|
4987 | 5138 | else: |
|
4988 | 5139 | server = opObj.getParameterValue(parameterName='server') |
|
4989 | 5140 | |
|
4990 | 5141 | parmObj = opObj.getParameterObj(parameterName="folder") |
|
4991 | 5142 | if parmObj == None: |
|
4992 | 5143 | folder = '/home/wmaster/graficos' |
|
4993 | 5144 | else: |
|
4994 | 5145 | folder = opObj.getParameterValue(parameterName='folder') |
|
4995 | 5146 | |
|
4996 | 5147 | parmObj = opObj.getParameterObj(parameterName="username") |
|
4997 | 5148 | if parmObj == None: |
|
4998 | 5149 | username = 'wmaster' |
|
4999 | 5150 | else: |
|
5000 | 5151 | username = opObj.getParameterValue(parameterName='username') |
|
5001 | 5152 | |
|
5002 | 5153 | parmObj = opObj.getParameterObj(parameterName="password") |
|
5003 | 5154 | if parmObj == None: |
|
5004 | 5155 | password = 'mst2010vhf' |
|
5005 | 5156 | else: |
|
5006 | 5157 | password = opObj.getParameterValue(parameterName='password') |
|
5007 | 5158 | |
|
5008 | 5159 | parmObj = opObj.getParameterObj(parameterName="ftp_wei") |
|
5009 | 5160 | if parmObj == None: |
|
5010 | 5161 | ftp_wei = '0' |
|
5011 | 5162 | else: |
|
5012 | 5163 | ftp_wei = opObj.getParameterValue(parameterName='ftp_wei') |
|
5013 | 5164 | |
|
5014 | 5165 | parmObj = opObj.getParameterObj(parameterName="exp_code") |
|
5015 | 5166 | if parmObj == None: |
|
5016 | 5167 | exp_code = '0' |
|
5017 | 5168 | else: |
|
5018 | 5169 | exp_code = opObj.getParameterValue(parameterName='exp_code') |
|
5019 | 5170 | |
|
5020 | 5171 | parmObj = opObj.getParameterObj(parameterName="sub_exp_code") |
|
5021 | 5172 | if parmObj == None: |
|
5022 | 5173 | sub_exp_code = '0' |
|
5023 | 5174 | else: |
|
5024 | 5175 | sub_exp_code = opObj.getParameterValue(parameterName='sub_exp_code') |
|
5025 | 5176 | |
|
5026 | 5177 | parmObj = opObj.getParameterObj(parameterName="plot_pos") |
|
5027 | 5178 | if parmObj == None: |
|
5028 | 5179 | plot_pos = '0' |
|
5029 | 5180 | self.temporalFTP.setwithoutconfiguration() |
|
5030 | 5181 | else: |
|
5031 | 5182 | plot_pos = opObj.getParameterValue(parameterName='plot_pos') |
|
5032 | 5183 | self.temporalFTP.save(server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos) |
|
5033 | 5184 | |
|
5034 | 5185 | def addProject2ProjectExplorer(self, id, name): |
|
5035 | 5186 | |
|
5036 | 5187 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
5037 | 5188 | self.parentItem = self.projectExplorerModel.invisibleRootItem() |
|
5038 | 5189 | self.parentItem.appendRow(itemTree) |
|
5039 | 5190 | self.parentItem = itemTree |
|
5040 | 5191 | self.projectExplorerTree.setCurrentIndex(self.parentItem.index()) |
|
5041 | 5192 | |
|
5042 | 5193 | self.selectedItemTree = itemTree |
|
5043 | 5194 | |
|
5044 | 5195 | self.__itemTreeDict[id] = itemTree |
|
5045 | 5196 | |
|
5046 | 5197 | def addPU2ProjectExplorer(self, id, name): |
|
5047 | 5198 | # id1= round(int(id)/10.)*10 |
|
5048 | 5199 | # id= int(id) |
|
5049 | 5200 | # id=id-id1 |
|
5050 | 5201 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
5051 | 5202 | |
|
5052 | 5203 | self.parentItem = self.selectedItemTree |
|
5053 | 5204 | self.parentItem.appendRow(itemTree) |
|
5054 | 5205 | self.projectExplorerTree.expandAll() |
|
5055 | 5206 | self.parentItem = itemTree |
|
5056 | 5207 | self.projectExplorerTree.setCurrentIndex(self.parentItem.index()) |
|
5057 | 5208 | |
|
5058 | 5209 | self.selectedItemTree = itemTree |
|
5059 | 5210 | |
|
5060 | 5211 | self.__itemTreeDict[id] = itemTree |
|
5061 | 5212 | |
|
5062 | 5213 | def addPU2PELoadXML(self, id, name, idParent): |
|
5063 | 5214 | |
|
5064 | 5215 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
5065 | 5216 | if self.__itemTreeDict.has_key(idParent): |
|
5066 | 5217 | self.parentItem = self.__itemTreeDict[idParent] |
|
5067 | 5218 | else: |
|
5068 | 5219 | self.parentItem = self.selectedItemTree |
|
5069 | 5220 | self.parentItem.appendRow(itemTree) |
|
5070 | 5221 | self.projectExplorerTree.expandAll() |
|
5071 | 5222 | self.parentItem = itemTree |
|
5072 | 5223 | self.projectExplorerTree.setCurrentIndex(self.parentItem.index()) |
|
5073 | 5224 | |
|
5074 | 5225 | self.selectedItemTree = itemTree |
|
5075 | 5226 | |
|
5076 | 5227 | self.__itemTreeDict[id] = itemTree |
|
5077 | 5228 | # print "stop" |
|
5078 | 5229 | |
|
5079 | 5230 | def getSelectedProjectObj(self): |
|
5080 | 5231 | |
|
5081 | 5232 | for key in self.__itemTreeDict.keys(): |
|
5082 | 5233 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
5083 | 5234 | continue |
|
5084 | 5235 | |
|
5085 | 5236 | if self.__projectObjDict.has_key(key): |
|
5086 | 5237 | projectObj = self.__projectObjDict[key] |
|
5087 | 5238 | else: |
|
5088 | 5239 | puObj = self.__puObjDict[key] |
|
5089 | 5240 | if puObj.parentId == None: |
|
5090 | 5241 | id = puObj.getId()[0] |
|
5091 | 5242 | else: |
|
5092 | 5243 | id = puObj.parentId |
|
5093 | 5244 | projectObj = self.__projectObjDict[id] |
|
5094 | 5245 | |
|
5095 | 5246 | return projectObj |
|
5096 | 5247 | |
|
5097 | 5248 | self.showWarning() |
|
5098 | 5249 | |
|
5099 | 5250 | return None |
|
5100 | 5251 | |
|
5101 | 5252 | def getSelectedPUObj(self): |
|
5102 | 5253 | |
|
5103 | 5254 | for key in self.__itemTreeDict.keys(): |
|
5104 | 5255 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
5105 | 5256 | continue |
|
5106 | 5257 | |
|
5107 | 5258 | if self.__projectObjDict.has_key(key) == True: |
|
5108 | 5259 | fatherObj = self.__projectObjDict[key] |
|
5109 | 5260 | else: |
|
5110 | 5261 | fatherObj = self.__puObjDict[key] |
|
5111 | 5262 | |
|
5112 | 5263 | return fatherObj |
|
5113 | 5264 | |
|
5114 | 5265 | self.showWarning() |
|
5115 | 5266 | |
|
5116 | 5267 | return None |
|
5117 | 5268 | |
|
5118 | 5269 | def playProject(self, ext=".xml"): |
|
5119 | ||
|
5120 | projectObj = self.getSelectedProjectObj() | |
|
5121 | 5270 | |
|
5122 | filename = os.path.join(str(self.pathWorkSpace), | |
|
5123 | "%s_%s%s" %(str(projectObj.name), str(projectObj.id), ext) | |
|
5124 | ) | |
|
5125 | 5271 | |
|
5126 | self.console.clear() | |
|
5127 | projectObj.writeXml(filename) | |
|
5128 | self.console.append("Please Wait...") | |
|
5272 | self.actionStarToolbar.setEnabled(False) | |
|
5273 | self.actionPauseToolbar.setEnabled(True) | |
|
5274 | self.actionStopToolbar.setEnabled(True) | |
|
5275 | ||
|
5276 | projectObj = self.getSelectedProjectObj() | |
|
5277 | ||
|
5278 | filename = os.path.join(str(self.pathWorkSpace), | |
|
5279 | "%s%s%s" %(str(projectObj.name), str(projectObj.id), ext) | |
|
5280 | ) | |
|
5281 | ||
|
5282 | self.console.clear() | |
|
5283 | filename = self.saveProject() | |
|
5284 | # projectObj.writeXml(filename) | |
|
5285 | if filename == None: | |
|
5286 | self.console.append("Process did not initialize.") | |
|
5287 | return | |
|
5288 | ||
|
5289 | self.console.append("Please Wait...") | |
|
5129 | 5290 | # try: |
|
5130 |
|
|
|
5291 | self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PROCESS, filename)) | |
|
5131 | 5292 | # # |
|
5132 | 5293 | # except: |
|
5133 | 5294 | # self.console.append("Error............................................!") |
|
5134 | 5295 | # self.actionStarToolbar.setEnabled(True) |
|
5135 | 5296 | # self.actionPauseToolbar.setEnabled(False) |
|
5136 | 5297 | # self.actionStopToolbar.setEnabled(False) |
|
5137 | 5298 | |
|
5138 | 5299 | # filename = '/home/dsuarez/workspace_signalchain/schain_guiJune04/test/ewdrifts3.xml' |
|
5139 | 5300 | # data = filename |
|
5140 | 5301 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PROCESS, data)) |
|
5141 | 5302 | |
|
5142 | 5303 | def stopProject(self): |
|
5143 | 5304 | stop = True |
|
5305 | self.actionStarToolbar.setEnabled(True) | |
|
5306 | self.actionPauseToolbar.setEnabled(stop) | |
|
5307 | self.actionStopToolbar.setEnabled(stop) | |
|
5308 | ||
|
5144 | 5309 | self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.STOP, stop)) |
|
5145 | 5310 | |
|
5146 | 5311 | def pauseProject(self): |
|
5312 | ||
|
5313 | self.actionStarToolbar.setEnabled(False) | |
|
5314 | self.actionPauseToolbar.setEnabled(True) | |
|
5315 | self.actionStopToolbar.setEnabled(True) | |
|
5316 | ||
|
5147 | 5317 | self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) |
|
5148 | 5318 | |
|
5149 | 5319 | |
|
5150 | 5320 | def saveProject(self): |
|
5151 | 5321 | |
|
5322 | sts = True | |
|
5152 | 5323 | puObj = self.getSelectedPUObj() |
|
5153 | 5324 | if puObj.name == 'VoltageProc': |
|
5154 | self.on_volOpOk_clicked() | |
|
5325 | sts = self.on_volOpOk_clicked() | |
|
5155 | 5326 | if puObj.name == 'SpectraProc': |
|
5156 | self.on_specOpOk_clicked() | |
|
5327 | sts = self.on_specOpOk_clicked() | |
|
5157 | 5328 | if puObj.name == 'SpectraHeisProc': |
|
5158 | self.on_specHeisOpOk_clicked() | |
|
5329 | sts = self.on_specHeisOpOk_clicked() | |
|
5330 | ||
|
5331 | if not sts: | |
|
5332 | return None | |
|
5333 | ||
|
5159 | 5334 | projectObj = self.getSelectedProjectObj() |
|
5160 | 5335 | puObjorderList = OrderedDict(sorted(projectObj.procUnitConfObjDict.items(), key=lambda x: x[0])) |
|
5161 | 5336 | |
|
5162 | 5337 | for inputId, puObj in puObjorderList.items(): |
|
5163 | 5338 | # print puObj.datatype, puObj.inputId,puObj.getId(),puObj.parentId |
|
5164 | 5339 | |
|
5165 | 5340 | if puObj.name == "VoltageProc": |
|
5166 |
self.refreshID(puObj) |
|
|
5167 | ||
|
5341 | self.refreshID(puObj) | |
|
5168 | 5342 | if puObj.name == "SpectraProc": |
|
5169 | 5343 | self.refreshID(puObj) |
|
5170 | 5344 | if puObj.name == "SpectraHeisProc": |
|
5171 | 5345 | self.refreshID(puObj) |
|
5172 | 5346 | |
|
5173 | filename = self.pathWorkSpace + "/" + str(projectObj.name) + str(projectObj.id) + ".xml" | |
|
5347 | filename = os.path.join(str(self.pathWorkSpace), | |
|
5348 | "%s%s%s" %(str(projectObj.name), str(projectObj.id), '.xml') | |
|
5349 | ) | |
|
5174 | 5350 | projectObj.writeXml(filename) |
|
5175 |
self.console.append("Now, you can p |
|
|
5176 | ||
|
5351 | self.console.append("Now, you can press the Start Icon on the toolbar") | |
|
5352 | ||
|
5353 | return filename | |
|
5177 | 5354 | |
|
5178 | 5355 | def deleteProjectorPU(self): |
|
5179 | 5356 | """ |
|
5180 | 5357 | Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol |
|
5181 | 5358 | """ |
|
5182 | 5359 | for key in self.__itemTreeDict.keys(): |
|
5183 | 5360 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
5184 | 5361 | continue |
|
5185 | 5362 | |
|
5186 | 5363 | if self.__projectObjDict.has_key(key) == True: |
|
5187 | 5364 | |
|
5188 | 5365 | del self.__projectObjDict[key] |
|
5189 | 5366 | del self.__itemTreeDict[key] |
|
5190 | 5367 | |
|
5191 | 5368 | else: |
|
5192 | 5369 | puObj = self.__puObjDict[key] |
|
5193 | 5370 | if puObj.parentId == None: |
|
5194 | 5371 | id = puObj.getId()[0] |
|
5195 | 5372 | else: |
|
5196 | 5373 | id = puObj.parentId |
|
5197 | 5374 | projectObj = self.__projectObjDict[id] |
|
5198 | 5375 | del self.__puObjDict[key] |
|
5199 | 5376 | del self.__itemTreeDict[key] |
|
5200 | 5377 | del projectObj.procUnitConfObjDict[key] |
|
5201 | 5378 | for key in projectObj.procUnitConfObjDict.keys(): |
|
5202 | 5379 | if projectObj.procUnitConfObjDict[key].inputId != puObj.getId(): |
|
5203 | 5380 | continue |
|
5204 | 5381 | del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()] |
|
5205 | 5382 | del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()] |
|
5206 | 5383 | del projectObj.procUnitConfObjDict[key] |
|
5207 | 5384 | # print projectObj.procUnitConfObjDict |
|
5208 | 5385 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict |
|
5209 | 5386 | self.showWarning() |
|
5210 | 5387 | |
|
5211 | 5388 | def showWarning(self): |
|
5212 | 5389 | pass |
|
5213 | 5390 | |
|
5214 | 5391 | def getParmsFromProjectWindow(self): |
|
5215 | 5392 | """ |
|
5216 | 5393 | Return Inputs Project: |
|
5217 | 5394 | - id |
|
5218 | 5395 | - project_name |
|
5219 | 5396 | - datatype |
|
5220 | 5397 | - ext |
|
5221 | 5398 | - data_path |
|
5222 | 5399 | - readmode |
|
5223 | 5400 | - delay |
|
5224 | 5401 | - set |
|
5225 | 5402 | - walk |
|
5226 | 5403 | """ |
|
5227 | 5404 | project_name = str(self.proName.text()) |
|
5228 | 5405 | try: |
|
5229 | 5406 | name = str(self.proName.text()) |
|
5230 | 5407 | except: |
|
5231 | 5408 | self.console.clear() |
|
5232 | 5409 | self.console.append("Please Write a name") |
|
5233 | 5410 | return 0 |
|
5234 | 5411 | |
|
5235 | 5412 | desc = str(self.proDescription.toPlainText()) |
|
5236 | 5413 | datatype = str(self.proComDataType.currentText()) |
|
5237 | 5414 | data_path = str(self.proDataPath.text()) |
|
5238 | 5415 | if not os.path.exists(data_path): |
|
5239 | 5416 | self.proOk.setEnabled(False) |
|
5240 | 5417 | self.console.clear() |
|
5241 | 5418 | self.console.append("Write a correct a path") |
|
5242 | 5419 | return |
|
5243 | 5420 | |
|
5244 | 5421 | online = int(self.online) |
|
5245 | 5422 | if online == 0: |
|
5246 | 5423 | delay = 0 |
|
5247 | 5424 | set = 0 |
|
5248 | 5425 | else: |
|
5249 | 5426 | delay = self.proDelay.text() |
|
5250 | 5427 | try: |
|
5251 | 5428 | delay = int(self.proDelay.text()) |
|
5252 | 5429 | except: |
|
5253 | 5430 | self.console.clear() |
|
5254 | 5431 | self.console.append("Please Write a number for delay") |
|
5255 | 5432 | return 0 |
|
5256 | 5433 | |
|
5257 | 5434 | set = self.proSet.text() |
|
5258 | 5435 | try: |
|
5259 | 5436 | set = int(self.proSet.text()) |
|
5260 | 5437 | except: |
|
5261 | 5438 | self.console.clear() |
|
5262 | 5439 | set = None |
|
5263 | 5440 | |
|
5264 | 5441 | |
|
5265 | 5442 | walk = int(self.walk) |
|
5266 | 5443 | starDate = str(self.proComStartDate.currentText()) |
|
5267 | 5444 | endDate = str(self.proComEndDate.currentText()) |
|
5268 | 5445 | reloj1 = self.proStartTime.time() |
|
5269 | 5446 | reloj2 = self.proEndTime.time() |
|
5270 | 5447 | startTime = str(reloj1.hour()) + ":" + str(reloj1.minute()) + ":" + str(reloj1.second()) |
|
5271 | 5448 | endTime = str(reloj2.hour()) + ":" + str(reloj2.minute()) + ":" + str(reloj2.second()) |
|
5272 | 5449 | |
|
5273 | 5450 | return project_name, desc, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk , set |
|
5274 | 5451 | |
|
5275 | 5452 | def removefromtree(self, row): |
|
5276 | 5453 | self.parentItem.removeRow(row) |
|
5277 | 5454 | |
|
5278 | 5455 | |
|
5279 | 5456 | def setInputsProject_View(self): |
|
5280 | 5457 | self.tabWidgetProject.setEnabled(True) |
|
5281 | 5458 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
5282 | 5459 | self.tabProject.setEnabled(True) |
|
5283 | 5460 | self.frame_2.setEnabled(False) |
|
5284 | 5461 | self.proName.clear() |
|
5285 | 5462 | self.proName.setFocus() |
|
5286 | 5463 | self.proName.setSelection(0, 0) |
|
5287 | 5464 | self.proName.setCursorPosition(0) |
|
5288 | 5465 | self.proDataType.setText('.r') |
|
5289 | 5466 | self.proDataPath.clear() |
|
5290 | 5467 | self.proComDataType.clear() |
|
5291 | 5468 | self.proComDataType.addItem("Voltage") |
|
5292 | 5469 | self.proComDataType.addItem("Spectra") |
|
5293 | 5470 | self.proComDataType.addItem("Fits") |
|
5294 | 5471 | |
|
5295 | 5472 | self.proComStartDate.clear() |
|
5296 | 5473 | self.proComEndDate.clear() |
|
5297 | 5474 | |
|
5298 | 5475 | startTime = "00:00:00" |
|
5299 | 5476 | endTime = "23:59:59" |
|
5300 | 5477 | starlist = startTime.split(":") |
|
5301 | 5478 | endlist = endTime.split(":") |
|
5302 | 5479 | self.proDelay.setText("0") |
|
5303 | 5480 | self.proSet.setText("0") |
|
5304 | 5481 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
5305 | 5482 | self.proStartTime.setTime(self.time) |
|
5306 | 5483 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
5307 | 5484 | self.proEndTime.setTime(self.time) |
|
5308 | 5485 | self.proDescription.clear() |
|
5309 | 5486 | self.proOk.setEnabled(False) |
|
5310 | 5487 | self.console.clear() |
|
5311 | 5488 | # self.console.append("Please, Write a name Project") |
|
5312 | 5489 | # self.console.append("Introduce Project Parameters")DC |
|
5313 | 5490 | # self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)") |
|
5314 | 5491 | |
|
5315 | 5492 | def setInputsPU_View(self, datatype): |
|
5316 | 5493 | projectObjView = self.getSelectedProjectObj() |
|
5317 | 5494 | idReadUnit = projectObjView.getReadUnitId() |
|
5318 | 5495 | readUnitObj = projectObjView.getProcUnitObj(idReadUnit) |
|
5319 | 5496 | |
|
5320 | 5497 | if datatype == 'Voltage': |
|
5321 | 5498 | self.volOpComChannels.setEnabled(False) |
|
5322 | 5499 | self.volOpComHeights.setEnabled(False) |
|
5323 | 5500 | self.volOpFilter.setEnabled(False) |
|
5324 | 5501 | self.volOpComProfile.setEnabled(False) |
|
5325 | 5502 | self.volOpComCode.setEnabled(False) |
|
5326 | 5503 | self.volOpCohInt.setEnabled(False) |
|
5327 | 5504 | self.volOpChannel.setEnabled(False) |
|
5328 | 5505 | self.volOpHeights.setEnabled(False) |
|
5329 | 5506 | self.volOpProfile.setEnabled(False) |
|
5330 | 5507 | self.volOpRadarfrequency.setEnabled(False) |
|
5331 | 5508 | self.volOpCebChannels.setCheckState(0) |
|
5332 | 5509 | self.volOpCebRadarfrequency.setCheckState(0) |
|
5333 | 5510 | self.volOpCebHeights.setCheckState(0) |
|
5334 | 5511 | self.volOpCebFilter.setCheckState(0) |
|
5335 | 5512 | self.volOpCebProfile.setCheckState(0) |
|
5336 | 5513 | self.volOpCebDecodification.setCheckState(0) |
|
5337 | 5514 | self.volOpCebCohInt.setCheckState(0) |
|
5338 | 5515 | |
|
5339 | 5516 | self.volOpChannel.clear() |
|
5340 | 5517 | self.volOpHeights.clear() |
|
5341 | 5518 | self.volOpProfile.clear() |
|
5342 | 5519 | self.volOpFilter.clear() |
|
5343 | 5520 | self.volOpCohInt.clear() |
|
5344 | 5521 | self.volOpRadarfrequency.clear() |
|
5345 | 5522 | |
|
5346 | 5523 | if datatype == 'Spectra': |
|
5347 | 5524 | |
|
5348 | 5525 | if readUnitObj.datatype == 'Spectra': |
|
5349 | 5526 | self.specOpnFFTpoints.setEnabled(False) |
|
5350 | 5527 | self.specOpProfiles.setEnabled(False) |
|
5351 | 5528 | self.specOpippFactor.setEnabled(False) |
|
5352 | 5529 | else: |
|
5353 | 5530 | self.specOpnFFTpoints.setEnabled(True) |
|
5354 | 5531 | self.specOpProfiles.setEnabled(True) |
|
5355 | 5532 | self.specOpippFactor.setEnabled(True) |
|
5356 | 5533 | |
|
5357 | 5534 | self.specOpCebCrossSpectra.setCheckState(0) |
|
5358 | 5535 | self.specOpCebChannel.setCheckState(0) |
|
5359 | 5536 | self.specOpCebHeights.setCheckState(0) |
|
5360 | 5537 | self.specOpCebIncoherent.setCheckState(0) |
|
5361 | 5538 | self.specOpCebRemoveDC.setCheckState(0) |
|
5362 | 5539 | self.specOpCebRemoveInt.setCheckState(0) |
|
5363 | 5540 | self.specOpCebgetNoise.setCheckState(0) |
|
5364 | 5541 | self.specOpCebRadarfrequency.setCheckState(0) |
|
5365 | 5542 | |
|
5366 | 5543 | self.specOpRadarfrequency.setEnabled(False) |
|
5367 | 5544 | self.specOppairsList.setEnabled(False) |
|
5368 | 5545 | self.specOpChannel.setEnabled(False) |
|
5369 | 5546 | self.specOpHeights.setEnabled(False) |
|
5370 | 5547 | self.specOpIncoherent.setEnabled(False) |
|
5371 | 5548 | self.specOpgetNoise.setEnabled(False) |
|
5372 | 5549 | |
|
5373 | 5550 | self.specOpRadarfrequency.clear() |
|
5374 | 5551 | self.specOpnFFTpoints.clear() |
|
5375 | 5552 | self.specOpProfiles.clear() |
|
5376 | 5553 | self.specOpippFactor.clear |
|
5377 | 5554 | self.specOppairsList.clear() |
|
5378 | 5555 | self.specOpChannel.clear() |
|
5379 | 5556 | self.specOpHeights.clear() |
|
5380 | 5557 | self.specOpIncoherent.clear() |
|
5381 | 5558 | self.specOpgetNoise.clear() |
|
5382 | 5559 | |
|
5383 | 5560 | self.specGraphCebSpectraplot.setCheckState(0) |
|
5384 | 5561 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
5385 | 5562 | self.specGraphCebRTIplot.setCheckState(0) |
|
5386 | 5563 | self.specGraphCebRTInoise.setCheckState(0) |
|
5387 | 5564 | self.specGraphCebCoherencmap.setCheckState(0) |
|
5388 | 5565 | self.specGraphPowerprofile.setCheckState(0) |
|
5389 | 5566 | |
|
5390 | 5567 | self.specGraphSaveSpectra.setCheckState(0) |
|
5391 | 5568 | self.specGraphSaveCross.setCheckState(0) |
|
5392 | 5569 | self.specGraphSaveRTIplot.setCheckState(0) |
|
5393 | 5570 | self.specGraphSaveRTInoise.setCheckState(0) |
|
5394 | 5571 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
5395 | 5572 | self.specGraphSavePowerprofile.setCheckState(0) |
|
5396 | 5573 | |
|
5397 | 5574 | self.specGraphftpRTIplot.setCheckState(0) |
|
5398 | 5575 | self.specGraphftpRTInoise.setCheckState(0) |
|
5399 | 5576 | self.specGraphftpCoherencemap.setCheckState(0) |
|
5400 | 5577 | |
|
5401 | 5578 | self.specGraphPath.clear() |
|
5402 | 5579 | self.specGraphPrefix.clear() |
|
5403 | 5580 | |
|
5404 | 5581 | self.specGgraphftpratio.clear() |
|
5405 | 5582 | |
|
5406 | 5583 | self.specGgraphChannelList.clear() |
|
5407 | 5584 | self.specGgraphFreq.clear() |
|
5408 | 5585 | self.specGgraphHeight.clear() |
|
5409 | 5586 | self.specGgraphDbsrange.clear() |
|
5410 | 5587 | self.specGgraphmagnitud.clear() |
|
5411 | 5588 | self.specGgraphTminTmax.clear() |
|
5412 | 5589 | self.specGgraphTimeRange.clear() |
|
5413 | 5590 | |
|
5414 | 5591 | if datatype == 'SpectraHeis': |
|
5415 | 5592 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
5416 | 5593 | self.specHeisOpIncoherent.setEnabled(False) |
|
5417 | 5594 | self.specHeisOpIncoherent.clear() |
|
5418 | 5595 | |
|
5419 | 5596 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
5420 | 5597 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
5421 | 5598 | |
|
5422 | 5599 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
5423 | 5600 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
5424 | 5601 | |
|
5425 | 5602 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
5426 | 5603 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
5427 | 5604 | |
|
5428 | 5605 | self.specHeisGraphPath.clear() |
|
5429 | 5606 | self.specHeisGraphPrefix.clear() |
|
5430 | 5607 | self.specHeisGgraphChannelList.clear() |
|
5431 | 5608 | self.specHeisGgraphXminXmax.clear() |
|
5432 | 5609 | self.specHeisGgraphYminYmax.clear() |
|
5433 | 5610 | self.specHeisGgraphTminTmax.clear() |
|
5434 | 5611 | self.specHeisGgraphTimeRange.clear() |
|
5435 | 5612 | self.specHeisGgraphftpratio.clear() |
|
5436 | 5613 | |
|
5437 | 5614 | |
|
5438 | 5615 | |
|
5439 | 5616 | |
|
5440 | 5617 | |
|
5441 | 5618 | def showtabPUCreated(self, datatype): |
|
5442 | 5619 | if datatype == "Voltage": |
|
5443 | 5620 | self.tabVoltage.setEnabled(True) |
|
5444 | 5621 | self.tabProject.setEnabled(False) |
|
5445 | 5622 | self.tabSpectra.setEnabled(False) |
|
5446 | 5623 | self.tabCorrelation.setEnabled(False) |
|
5447 | 5624 | self.tabSpectraHeis.setEnabled(False) |
|
5448 | 5625 | self.tabWidgetProject.setCurrentWidget(self.tabVoltage) |
|
5449 | 5626 | |
|
5450 | 5627 | if datatype == "Spectra": |
|
5451 | 5628 | self.tabVoltage.setEnabled(False) |
|
5452 | 5629 | self.tabProject.setEnabled(False) |
|
5453 | 5630 | self.tabSpectra.setEnabled(True) |
|
5454 | 5631 | self.tabCorrelation.setEnabled(False) |
|
5455 | 5632 | self.tabSpectraHeis.setEnabled(False) |
|
5456 | 5633 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) |
|
5457 | 5634 | if datatype == "SpectraHeis": |
|
5458 | 5635 | self.tabVoltage.setEnabled(False) |
|
5459 | 5636 | self.tabProject.setEnabled(False) |
|
5460 | 5637 | self.tabSpectra.setEnabled(False) |
|
5461 | 5638 | self.tabCorrelation.setEnabled(False) |
|
5462 | 5639 | self.tabSpectraHeis.setEnabled(True) |
|
5463 | 5640 | self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis) |
|
5464 | 5641 | |
|
5465 | 5642 | |
|
5466 | 5643 | def searchData(self, data_path, ext, walk, expLabel=''): |
|
5467 | 5644 | dateList = [] |
|
5468 | 5645 | fileList = [] |
|
5469 | 5646 | |
|
5647 | if not os.path.exists(data_path): | |
|
5648 | return None | |
|
5649 | ||
|
5470 | 5650 | if walk == 0: |
|
5471 | 5651 | files = os.listdir(data_path) |
|
5472 | 5652 | for thisFile in files: |
|
5473 | 5653 | thisExt = os.path.splitext(thisFile)[-1] |
|
5474 | 5654 | if thisExt == ext: |
|
5475 | 5655 | fileList.append(thisFile) |
|
5476 | 5656 | |
|
5477 | 5657 | for thisFile in fileList: |
|
5478 | 5658 | try: |
|
5479 | 5659 | year = int(thisFile[1:5]) |
|
5480 | 5660 | doy = int(thisFile[5:8]) |
|
5481 | 5661 | |
|
5482 | 5662 | date = datetime.date(year, 1, 1) + datetime.timedelta(doy - 1) |
|
5483 | 5663 | dateformat = date.strftime("%Y/%m/%d") |
|
5484 | 5664 | |
|
5485 | 5665 | if dateformat not in dateList: |
|
5486 | 5666 | dateList.append(dateformat) |
|
5487 | 5667 | except: |
|
5488 | 5668 | continue |
|
5489 | 5669 | # REVISION---------------------------------1 |
|
5490 | 5670 | if walk == 1: |
|
5491 | 5671 | |
|
5492 | 5672 | dirList = os.listdir(data_path) |
|
5493 | 5673 | |
|
5494 | 5674 | dirList.sort() |
|
5495 | 5675 | |
|
5496 | 5676 | dateList = [] |
|
5497 | 5677 | |
|
5498 | 5678 | for thisDir in dirList: |
|
5499 | 5679 | |
|
5500 | 5680 | if not isRadarPath(thisDir): |
|
5501 | 5681 | self.console.clear() |
|
5502 | 5682 | self.console.append("Please, Choose the Correct Path") |
|
5503 | 5683 | self.proOk.setEnabled(False) |
|
5504 | 5684 | continue |
|
5505 | 5685 | |
|
5506 | 5686 | doypath = os.path.join(data_path, thisDir, expLabel) |
|
5507 | 5687 | if not os.path.exists(doypath): |
|
5508 | 5688 | self.console.clear() |
|
5509 | 5689 | self.console.append("Please, Choose the Correct Path") |
|
5510 | 5690 | return |
|
5511 | 5691 | files = os.listdir(doypath) |
|
5512 | 5692 | fileList = [] |
|
5513 | 5693 | |
|
5514 | 5694 | for thisFile in files: |
|
5515 | 5695 | thisExt = os.path.splitext(thisFile)[-1] |
|
5516 | 5696 | if thisExt != ext: |
|
5517 | 5697 | self.console.clear() |
|
5518 | 5698 | self.console.append("There is no datatype selected in the Path Directory") |
|
5519 | 5699 | self.proOk.setEnabled(False) |
|
5520 | 5700 | continue |
|
5521 | 5701 | |
|
5522 | 5702 | if not isRadarFile(thisFile): |
|
5523 | 5703 | self.proOk.setEnabled(False) |
|
5524 | 5704 | self.console.clear() |
|
5525 | 5705 | self.console.append("Please, Choose the Correct Path") |
|
5526 | 5706 | continue |
|
5527 | 5707 | |
|
5528 | 5708 | fileList.append(thisFile) |
|
5529 | 5709 | break |
|
5530 | 5710 | |
|
5531 | 5711 | if fileList == []: |
|
5532 | 5712 | continue |
|
5533 | 5713 | |
|
5534 | 5714 | year = int(thisDir[1:5]) |
|
5535 | 5715 | doy = int(thisDir[5:8]) |
|
5536 | 5716 | |
|
5537 | 5717 | date = datetime.date(year, 1, 1) + datetime.timedelta(doy - 1) |
|
5538 | 5718 | dateformat = date.strftime("%Y/%m/%d") |
|
5539 | 5719 | dateList.append(dateformat) |
|
5540 | 5720 | |
|
5541 | 5721 | if len(dateList) > 0: |
|
5542 | 5722 | self.proOk.setEnabled(True) |
|
5543 | 5723 | return dateList |
|
5544 | 5724 | |
|
5545 | 5725 | |
|
5546 | 5726 | # self.proOk.setEnabled(False) |
|
5547 | 5727 | return None |
|
5548 | 5728 | |
|
5549 | 5729 | def checkInputsProject(self): |
|
5550 | 5730 | """ |
|
5551 | 5731 | Check Inputs Project: |
|
5552 | 5732 | - project_name |
|
5553 | 5733 | - datatype |
|
5554 | 5734 | - ext |
|
5555 | 5735 | - data_path |
|
5556 | 5736 | - readmode |
|
5557 | 5737 | - delay |
|
5558 | 5738 | - set |
|
5559 | 5739 | - walk |
|
5560 | 5740 | """ |
|
5561 | 5741 | parms_ok = True |
|
5562 | 5742 | project_name = str(self.proName.text()) |
|
5563 | 5743 | if project_name == '' or project_name == None: |
|
5564 | 5744 | outputstr = "Enter the Project Name" |
|
5565 | 5745 | self.console.append(outputstr) |
|
5566 | 5746 | parms_ok = False |
|
5567 | 5747 | project_name = None |
|
5568 | 5748 | |
|
5569 | 5749 | datatype = str(self.proComDataType.currentText()) |
|
5570 | 5750 | if not(datatype in ['Voltage', 'Spectra', 'Fits']): |
|
5571 | 5751 | outputstr = 'datatype = %s, this must be either Voltage, Spectra or SpectraHeis' % datatype |
|
5572 | 5752 | self.console.append(outputstr) |
|
5573 | 5753 | parms_ok = False |
|
5574 | 5754 | datatype = None |
|
5575 | 5755 | |
|
5576 | 5756 | ext = str(self.proDataType.text()) |
|
5577 | 5757 | if not(ext in ['.r', '.pdata', '.fits']): |
|
5578 | 5758 | outputstr = "extension files must be .r , .pdata or .fits" |
|
5579 | 5759 | self.console.append(outputstr) |
|
5580 | 5760 | parms_ok = False |
|
5581 | 5761 | ext = None |
|
5582 | 5762 | |
|
5583 | 5763 | data_path = str(self.proDataPath.text()) |
|
5584 | 5764 | |
|
5585 | 5765 | if data_path == '': |
|
5586 | 5766 | outputstr = 'Datapath is empty' |
|
5587 | 5767 | self.console.append(outputstr) |
|
5588 | 5768 | parms_ok = False |
|
5589 | 5769 | data_path = None |
|
5590 | 5770 | |
|
5591 | 5771 | if data_path != None: |
|
5592 | 5772 | if not os.path.exists(data_path): |
|
5593 | 5773 | outputstr = 'Datapath:%s does not exists' % data_path |
|
5594 | 5774 | self.console.append(outputstr) |
|
5595 | 5775 | parms_ok = False |
|
5596 | 5776 | data_path = None |
|
5597 | 5777 | |
|
5598 | 5778 | read_mode = str(self.proComReadMode.currentText()) |
|
5599 | 5779 | if not(read_mode in ['Online', 'Offline']): |
|
5600 | 5780 | outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode |
|
5601 | 5781 | self.console.append(outputstr) |
|
5602 | 5782 | parms_ok = False |
|
5603 | 5783 | read_mode = None |
|
5604 | 5784 | |
|
5605 | 5785 | try: |
|
5606 | 5786 | delay = int(str(self.proDelay.text())) |
|
5607 | 5787 | except: |
|
5608 | 5788 | outputstr = 'Delay: %s, this must be a integer number' % str(self.proName.text()) |
|
5609 | 5789 | self.console.append(outputstr) |
|
5610 | 5790 | parms_ok = False |
|
5611 | 5791 | delay = None |
|
5612 | 5792 | |
|
5613 | 5793 | try: |
|
5614 | 5794 | set = int(str(self.proSet.text())) |
|
5615 | 5795 | except: |
|
5616 | 5796 | # outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text()) |
|
5617 | 5797 | # self.console.append(outputstr) |
|
5618 | 5798 | # parms_ok = False |
|
5619 | 5799 | set = None |
|
5620 | 5800 | |
|
5621 | 5801 | walk_str = str(self.proComWalk.currentText()) |
|
5622 | 5802 | if walk_str == 'On Files': |
|
5623 | 5803 | walk = 0 |
|
5624 | 5804 | elif walk_str == 'On Folder': |
|
5625 | 5805 | walk = 1 |
|
5626 | 5806 | else: |
|
5627 | 5807 | outputstr = 'Walk: %s, this must be either On Files or On Folders' % walk_str |
|
5628 | 5808 | self.console.append(outputstr) |
|
5629 | 5809 | parms_ok = False |
|
5630 | 5810 | walk = None |
|
5631 | 5811 | |
|
5632 | 5812 | return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set |
|
5633 | 5813 | |
|
5634 | 5814 | def checkInputsPUSave(self, datatype): |
|
5635 | 5815 | """ |
|
5636 | 5816 | Check Inputs Spectra Save: |
|
5637 | 5817 | - path |
|
5638 | 5818 | - blocks Per File |
|
5639 | 5819 | - sufix |
|
5640 | 5820 | - dataformat |
|
5641 | 5821 | """ |
|
5642 | 5822 | parms_ok = True |
|
5643 | 5823 | |
|
5644 | 5824 | if datatype == "Voltage": |
|
5645 | 5825 | output_path = str(self.volOutputPath.text()) |
|
5646 | 5826 | blocksperfile = str(self.volOutputblocksperfile.text()) |
|
5647 | 5827 | profilesperblock = str(self.volOutputprofilesperblock.text()) |
|
5648 | 5828 | |
|
5649 | 5829 | if datatype == "Spectra": |
|
5650 | 5830 | output_path = str(self.specOutputPath.text()) |
|
5651 | 5831 | blocksperfile = str(self.specOutputblocksperfile.text()) |
|
5652 | 5832 | profilesperblock = str(self.specOutputprofileperblock.text()) |
|
5653 | 5833 | |
|
5654 | 5834 | if datatype == "SpectraHeis": |
|
5655 | 5835 | output_path = str(self.specHeisOutputPath.text()) |
|
5656 | 5836 | blocksperfile = str(self.specHeisOutputblocksperfile.text()) |
|
5657 | 5837 | metada = str(self.specHeisOutputMetada.text()) |
|
5658 | 5838 | |
|
5659 | 5839 | if output_path == '': |
|
5660 | 5840 | outputstr = 'Outputpath is empty' |
|
5661 | 5841 | self.console.append(outputstr) |
|
5662 | 5842 | parms_ok = False |
|
5663 | 5843 | data_path = None |
|
5664 | 5844 | |
|
5665 | 5845 | if output_path != None: |
|
5666 | 5846 | if not os.path.exists(output_path): |
|
5667 | 5847 | outputstr = 'OutputPath:%s does not exists' % output_path |
|
5668 | 5848 | self.console.append(outputstr) |
|
5669 | 5849 | parms_ok = False |
|
5670 | 5850 | output_path = None |
|
5671 | 5851 | |
|
5672 | 5852 | |
|
5673 | 5853 | try: |
|
5674 | 5854 | profilesperblock = int(profilesperblock) |
|
5675 | 5855 | except: |
|
5676 | 5856 | if datatype == "Voltage": |
|
5677 | 5857 | outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.volOutputprofilesperblock.text()) |
|
5678 | 5858 | self.console.append(outputstr) |
|
5679 | 5859 | parms_ok = False |
|
5680 | 5860 | profilesperblock = None |
|
5681 | 5861 | |
|
5682 | 5862 | elif datatype == "Spectra": |
|
5683 | 5863 | outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.specOutputprofileperblock.text()) |
|
5684 | 5864 | self.console.append(outputstr) |
|
5685 | 5865 | parms_ok = False |
|
5686 | 5866 | profilesperblock = None |
|
5687 | 5867 | |
|
5688 | 5868 | try: |
|
5689 | 5869 | blocksperfile = int(blocksperfile) |
|
5690 | 5870 | except: |
|
5691 | 5871 | if datatype == "Voltage": |
|
5692 | 5872 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.volOutputblocksperfile.text()) |
|
5693 | 5873 | elif datatype == "Spectra": |
|
5694 | 5874 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specOutputblocksperfile.text()) |
|
5695 | 5875 | elif datatype == "SpectraHeis": |
|
5696 | 5876 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specHeisOutputblocksperfile.text()) |
|
5697 | 5877 | |
|
5698 | 5878 | self.console.append(outputstr) |
|
5699 | 5879 | parms_ok = False |
|
5700 | 5880 | blocksperfile = None |
|
5701 | 5881 | |
|
5702 | 5882 | if datatype == "SpectraHeis": |
|
5703 | 5883 | if metada == '': |
|
5704 | 5884 | outputstr = 'Choose metada file' |
|
5705 | 5885 | self.console.append(outputstr) |
|
5706 | 5886 | parms_ok = False |
|
5707 | 5887 | if metada != None: |
|
5708 | 5888 | if not os.path.isfile(metada): |
|
5709 | 5889 | outputstr = 'Metadata:%s does not exists' % metada |
|
5710 | 5890 | self.console.append(outputstr) |
|
5711 | 5891 | parms_ok = False |
|
5712 | 5892 | output_path = None |
|
5713 | 5893 | |
|
5714 | 5894 | if datatype == "Voltage": |
|
5715 | 5895 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5716 | 5896 | |
|
5717 | 5897 | |
|
5718 | 5898 | if datatype == "Spectra": |
|
5719 | 5899 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5720 | 5900 | |
|
5721 | 5901 | |
|
5722 | 5902 | if datatype == "SpectraHeis": |
|
5723 | 5903 | return parms_ok, output_path, blocksperfile, metada |
|
5724 | 5904 | |
|
5725 | 5905 | def loadDays(self, data_path, ext, walk): |
|
5726 | 5906 | """ |
|
5727 | 5907 | Method to loads day |
|
5728 | 5908 | """ |
|
5729 | 5909 | dateList = self.searchData(data_path, ext, walk) |
|
5730 | 5910 | if dateList == None: |
|
5731 | 5911 | self.console.clear() |
|
5732 | 5912 | outputstr = "The path: %s is empty with file extension *%s" % (data_path, ext) |
|
5733 | 5913 | self.console.append(outputstr) |
|
5734 | 5914 | return |
|
5735 | 5915 | |
|
5736 | 5916 | self.dateList = dateList |
|
5737 | 5917 | for thisDate in dateList: |
|
5738 | 5918 | self.proComStartDate.addItem(thisDate) |
|
5739 | 5919 | self.proComEndDate.addItem(thisDate) |
|
5740 | 5920 | self.proComEndDate.setCurrentIndex(self.proComStartDate.count() - 1) |
|
5741 | 5921 | |
|
5742 | 5922 | def setWorkSpaceGUI(self, pathWorkSpace): |
|
5743 | 5923 | self.pathWorkSpace = pathWorkSpace |
|
5744 | 5924 | |
|
5745 | 5925 | """ |
|
5746 | 5926 | Comandos Usados en Console |
|
5747 | 5927 | """ |
|
5748 | 5928 | def __del__(self): |
|
5749 | 5929 | sys.stdout = sys.__stdout__ |
|
5750 | 5930 | sys.stderr = sys.__stderr__ |
|
5751 | 5931 | |
|
5752 | 5932 | def normalOutputWritten(self, text): |
|
5753 | 5933 | self.console.append(text) |
|
5754 | 5934 | |
|
5755 | 5935 | |
|
5756 | 5936 | def setParameter(self): |
|
5757 | 5937 | |
|
5758 | 5938 | self.setWindowTitle("ROJ-Signal Chain") |
|
5759 | 5939 | self.setWindowIcon(QtGui.QIcon("schainpy/gui/figure/adn.jpg")) |
|
5760 | 5940 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) |
|
5761 | 5941 | # sys.stderr = ShowMeConsole(textWritten=self.normalOutputWritten) |
|
5762 | 5942 | self.tabWidgetProject.setEnabled(False) |
|
5763 | 5943 | self.tabVoltage.setEnabled(False) |
|
5764 | 5944 | self.tabSpectra.setEnabled(False) |
|
5765 | 5945 | self.tabCorrelation.setEnabled(False) |
|
5766 | 5946 | self.frame_2.setEnabled(False) |
|
5767 | 5947 | |
|
5768 |
self.actionCreate.setShortcut('Ctrl+ |
|
|
5769 |
self.actionStart.setShortcut('Ctrl+ |
|
|
5948 | self.actionCreate.setShortcut('Ctrl+N') | |
|
5949 | self.actionStart.setShortcut('Ctrl+P') | |
|
5770 | 5950 | self.actionSave.setShortcut('Ctrl+S') |
|
5771 | 5951 | self.actionClose.setShortcut('Ctrl+Q') |
|
5772 | 5952 | |
|
5773 | 5953 | self.actionStarToolbar.setEnabled(True) |
|
5774 | 5954 | self.actionPauseToolbar.setEnabled(False) |
|
5775 | 5955 | self.actionStopToolbar.setEnabled(False) |
|
5776 | 5956 | |
|
5777 | 5957 | self.proName.clear() |
|
5778 | 5958 | self.proDataPath.setText('') |
|
5779 | 5959 | self.console.setReadOnly(True) |
|
5780 |
self.console.append("Welcome to Signal Chain |
|
|
5960 | self.console.append("Welcome to Signal Chain\nOpen a project or Create a new one") | |
|
5781 | 5961 | self.proStartTime.setDisplayFormat("hh:mm:ss") |
|
5782 | 5962 | self.proDataType.setEnabled(False) |
|
5783 | 5963 | self.time = QtCore.QTime() |
|
5784 | 5964 | self.hour = 0 |
|
5785 | 5965 | self.min = 0 |
|
5786 | 5966 | self.sec = 0 |
|
5787 | 5967 | self.proEndTime.setDisplayFormat("hh:mm:ss") |
|
5788 | 5968 | startTime = "00:00:00" |
|
5789 | 5969 | endTime = "23:59:59" |
|
5790 | 5970 | starlist = startTime.split(":") |
|
5791 | 5971 | endlist = endTime.split(":") |
|
5792 | 5972 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
5793 | 5973 | self.proStartTime.setTime(self.time) |
|
5794 | 5974 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
5795 | 5975 | self.proEndTime.setTime(self.time) |
|
5796 | 5976 | self.proOk.setEnabled(False) |
|
5797 | 5977 | # set model Project Explorer |
|
5798 | 5978 | self.projectExplorerModel = QtGui.QStandardItemModel() |
|
5799 | 5979 | self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",)) |
|
5800 | 5980 | layout = QtGui.QVBoxLayout() |
|
5801 | 5981 | layout.addWidget(self.projectExplorerTree) |
|
5802 | 5982 | self.projectExplorerTree.setModel(self.projectExplorerModel) |
|
5803 | 5983 | self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
|
5804 | 5984 | self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click) |
|
5805 | 5985 | self.projectExplorerTree.clicked.connect(self.on_click) |
|
5806 | 5986 | self.projectExplorerTree.expandAll() |
|
5807 | 5987 | # set model Project Properties |
|
5808 | 5988 | |
|
5809 | 5989 | self.propertiesModel = treeModel() |
|
5810 | 5990 | self.propertiesModel.initProjectView() |
|
5811 | 5991 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
5812 | 5992 | self.treeProjectProperties.expandAll() |
|
5813 | 5993 | self.treeProjectProperties.allColumnsShowFocus() |
|
5814 | 5994 | self.treeProjectProperties.resizeColumnToContents(1) |
|
5815 | 5995 | |
|
5816 | 5996 | # set Project |
|
5817 | 5997 | self.proDelay.setEnabled(False) |
|
5818 | 5998 | self.proSet.setEnabled(False) |
|
5819 | 5999 | self.proDataType.setReadOnly(True) |
|
5820 | 6000 | |
|
5821 | 6001 | # set Operation Voltage |
|
5822 | 6002 | self.volOpComChannels.setEnabled(False) |
|
5823 | 6003 | self.volOpComHeights.setEnabled(False) |
|
5824 | 6004 | self.volOpFilter.setEnabled(False) |
|
5825 | 6005 | self.volOpComProfile.setEnabled(False) |
|
5826 | 6006 | self.volOpComCode.setEnabled(False) |
|
5827 | 6007 | self.volOpCohInt.setEnabled(False) |
|
5828 | 6008 | self.volOpRadarfrequency.setEnabled(False) |
|
5829 | 6009 | |
|
5830 | 6010 | self.volOpChannel.setEnabled(False) |
|
5831 | 6011 | self.volOpHeights.setEnabled(False) |
|
5832 | 6012 | self.volOpProfile.setEnabled(False) |
|
5833 | 6013 | self.volOpComMode.setEnabled(False) |
|
5834 | 6014 | |
|
5835 | 6015 | self.volGraphPath.setEnabled(False) |
|
5836 | 6016 | self.volGraphPrefix.setEnabled(False) |
|
5837 | 6017 | self.volGraphToolPath.setEnabled(False) |
|
5838 | 6018 | |
|
5839 | 6019 | # set Graph Voltage |
|
5840 | 6020 | self.volGraphChannelList.setEnabled(False) |
|
5841 | 6021 | self.volGraphfreqrange.setEnabled(False) |
|
5842 | 6022 | self.volGraphHeightrange.setEnabled(False) |
|
5843 | 6023 | |
|
5844 | 6024 | # set Operation Spectra |
|
5845 | 6025 | self.specOpnFFTpoints.setEnabled(False) |
|
5846 | 6026 | self.specOpProfiles.setEnabled(False) |
|
5847 | 6027 | self.specOpippFactor.setEnabled(False) |
|
5848 | 6028 | self.specOppairsList.setEnabled(False) |
|
5849 | 6029 | self.specOpComChannel.setEnabled(False) |
|
5850 | 6030 | self.specOpComHeights.setEnabled(False) |
|
5851 | 6031 | self.specOpIncoherent.setEnabled(False) |
|
5852 | 6032 | self.specOpgetNoise.setEnabled(False) |
|
5853 | 6033 | self.specOpRadarfrequency.setEnabled(False) |
|
5854 | 6034 | |
|
5855 | 6035 | |
|
5856 | 6036 | self.specOpChannel.setEnabled(False) |
|
5857 | 6037 | self.specOpHeights.setEnabled(False) |
|
5858 | 6038 | # set Graph Spectra |
|
5859 | 6039 | self.specGgraphChannelList.setEnabled(False) |
|
5860 | 6040 | self.specGgraphFreq.setEnabled(False) |
|
5861 | 6041 | self.specGgraphHeight.setEnabled(False) |
|
5862 | 6042 | self.specGgraphDbsrange.setEnabled(False) |
|
5863 | 6043 | self.specGgraphmagnitud.setEnabled(False) |
|
5864 | 6044 | self.specGgraphTminTmax.setEnabled(False) |
|
5865 | 6045 | self.specGgraphTimeRange.setEnabled(False) |
|
5866 | 6046 | self.specGraphPath.setEnabled(False) |
|
5867 | 6047 | self.specGraphToolPath.setEnabled(False) |
|
5868 | 6048 | self.specGraphPrefix.setEnabled(False) |
|
5869 | 6049 | |
|
5870 | 6050 | self.specGgraphftpratio.setEnabled(False) |
|
5871 | 6051 | # set Operation SpectraHeis |
|
5872 | 6052 | self.specHeisOpIncoherent.setEnabled(False) |
|
5873 | 6053 | self.specHeisOpCobIncInt.setEnabled(False) |
|
5874 | 6054 | # set Graph SpectraHeis |
|
5875 | 6055 | self.specHeisGgraphChannelList.setEnabled(False) |
|
5876 | 6056 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
5877 | 6057 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
5878 | 6058 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
5879 | 6059 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
5880 | 6060 | self.specHeisGgraphftpratio.setEnabled(False) |
|
5881 | 6061 | self.specHeisGraphPath.setEnabled(False) |
|
5882 | 6062 | self.specHeisGraphPrefix.setEnabled(False) |
|
5883 | 6063 | self.specHeisGraphToolPath.setEnabled(False) |
|
5884 | 6064 | |
|
5885 | 6065 | |
|
5886 | 6066 | # tool tip gui |
|
5887 | 6067 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
5888 | 6068 | self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process') |
|
5889 | 6069 | # tool tip gui project |
|
5890 | 6070 | self.proComWalk.setToolTip('<b>On Files</b>:<i>Search file in format .r or pdata</i> <b>On Folders</b>:<i>Search file in a directory DYYYYDOY</i>') |
|
5891 | 6071 | self.proComWalk.setCurrentIndex(0) |
|
5892 | 6072 | # tool tip gui volOp |
|
5893 | 6073 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
|
5894 | 6074 | self.volOpHeights.setToolTip('Example: 90,180') |
|
5895 |
self.volOpFilter.setToolTip('Example: |
|
|
5896 |
self.volOpProfile.setToolTip('Example:0,12 |
|
|
5897 |
self.volOpCohInt.setToolTip('Example: 1 |
|
|
5898 | self.volOpOk.setToolTip('If you have finish, please Ok ') | |
|
6075 | self.volOpFilter.setToolTip('Example: 2') | |
|
6076 | self.volOpProfile.setToolTip('Example:0,127') | |
|
6077 | self.volOpCohInt.setToolTip('Example: 128') | |
|
6078 | self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3') | |
|
6079 | self.volOpOk.setToolTip('If you have finished, please Ok ') | |
|
5899 | 6080 | # tool tip gui volGraph |
|
5900 |
self.volGraphfreqrange.setToolTip('Example: |
|
|
6081 | self.volGraphfreqrange.setToolTip('Example: -30,30') | |
|
5901 | 6082 | self.volGraphHeightrange.setToolTip('Example: 20,180') |
|
5902 | 6083 | # tool tip gui specOp |
|
5903 |
self.specOpnFFTpoints.setToolTip('Example: 1 |
|
|
5904 |
self.specOpProfiles.setToolTip('Example: 1 |
|
|
5905 | self.specOpippFactor.setToolTip('Example:1') | |
|
5906 |
self.specOpIncoherent.setToolTip('Example: 1 |
|
|
6084 | self.specOpnFFTpoints.setToolTip('Example: 128') | |
|
6085 | self.specOpProfiles.setToolTip('Example: 128') | |
|
6086 | self.specOpippFactor.setToolTip('Example:1.0') | |
|
6087 | self.specOpIncoherent.setToolTip('Example: 10') | |
|
5907 | 6088 | self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)') |
|
5908 | 6089 | |
|
5909 |
self.specOpChannel.setToolTip('Example: 1,2,3 |
|
|
6090 | self.specOpChannel.setToolTip('Example: 0,1,2,3') | |
|
5910 | 6091 | self.specOpHeights.setToolTip('Example: 90,180') |
|
5911 | 6092 | self.specOppairsList.setToolTip('Example: (0,1),(2,3)') |
|
5912 | 6093 | # tool tip gui specGraph |
|
5913 | 6094 | |
|
5914 |
self.specGgraphChannelList.setToolTip('Example: |
|
|
5915 |
self.specGgraphFreq.setToolTip('Example: |
|
|
5916 |
self.specGgraphHeight.setToolTip('Example: |
|
|
6095 | self.specGgraphChannelList.setToolTip('Example: 0,3,4') | |
|
6096 | self.specGgraphFreq.setToolTip('Example: -20,20') | |
|
6097 | self.specGgraphHeight.setToolTip('Example: 100,400') | |
|
5917 | 6098 | self.specGgraphDbsrange.setToolTip('Example: 30,170') |
|
5918 | 6099 | |
|
5919 |
self.specGraphPrefix.setToolTip('Example: |
|
|
6100 | self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME') | |
|
6101 | ||
|
6102 | def closeEvent(self, event): | |
|
6103 | self.closed.emit() | |
|
6104 | event.accept() | |
|
5920 | 6105 | |
|
5921 | 6106 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): |
|
5922 | 6107 | """ |
|
5923 | 6108 | Class documentation goes here. |
|
5924 | 6109 | """ |
|
5925 | 6110 | closed = pyqtSignal() |
|
5926 | 6111 | create = False |
|
5927 | 6112 | |
|
5928 | 6113 | def __init__(self, parent=None): |
|
5929 | 6114 | """ |
|
5930 | 6115 | Constructor |
|
5931 | 6116 | """ |
|
5932 | 6117 | QMainWindow.__init__(self, parent) |
|
5933 | 6118 | self.setupUi(self) |
|
5934 | 6119 | self.getFromWindow = None |
|
5935 | 6120 | self.getfromWindowList = [] |
|
5936 | 6121 | self.dataTypeProject = None |
|
5937 | 6122 | |
|
5938 | 6123 | self.listUP = None |
|
5939 | 6124 | |
|
5940 | 6125 | @pyqtSignature("") |
|
5941 | 6126 | def on_unitPokbut_clicked(self): |
|
5942 | 6127 | """ |
|
5943 | 6128 | Slot documentation goes here. |
|
5944 | 6129 | """ |
|
5945 | 6130 | self.create = True |
|
5946 | 6131 | self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())] |
|
5947 | 6132 | # self.nameofUP= str(self.nameUptxt.text()) |
|
5948 | 6133 | self.typeofUP = str(self.comboTypeBox.currentText()) |
|
5949 | 6134 | self.close() |
|
5950 | 6135 | |
|
5951 | 6136 | |
|
5952 | 6137 | @pyqtSignature("") |
|
5953 | 6138 | def on_unitPcancelbut_clicked(self): |
|
5954 | 6139 | """ |
|
5955 | 6140 | Slot documentation goes here. |
|
5956 | 6141 | """ |
|
5957 | 6142 | self.create = False |
|
5958 | 6143 | self.close() |
|
5959 | 6144 | |
|
5960 | 6145 | def loadTotalList(self): |
|
5961 | 6146 | self.comboInputBox.clear() |
|
5962 | 6147 | for i in self.getfromWindowList: |
|
5963 | 6148 | |
|
5964 | 6149 | name = i.getElementName() |
|
5965 | 6150 | if name == 'Project': |
|
5966 | 6151 | id = i.id |
|
5967 | 6152 | name = i.name |
|
5968 | 6153 | if self.dataTypeProject == 'Voltage': |
|
5969 | 6154 | self.comboTypeBox.clear() |
|
5970 | 6155 | self.comboTypeBox.addItem("Voltage") |
|
5971 | 6156 | |
|
5972 | 6157 | if self.dataTypeProject == 'Spectra': |
|
5973 | 6158 | self.comboTypeBox.clear() |
|
5974 | 6159 | self.comboTypeBox.addItem("Spectra") |
|
5975 | 6160 | self.comboTypeBox.addItem("Correlation") |
|
5976 | 6161 | if self.dataTypeProject == 'Fits': |
|
5977 | 6162 | self.comboTypeBox.clear() |
|
5978 | 6163 | self.comboTypeBox.addItem("SpectraHeis") |
|
5979 | 6164 | |
|
5980 | 6165 | |
|
5981 | 6166 | if name == 'ProcUnit': |
|
5982 | 6167 | id = int(i.id) - 1 |
|
5983 | 6168 | name = i.datatype |
|
5984 | 6169 | if name == 'Voltage': |
|
5985 | 6170 | self.comboTypeBox.clear() |
|
5986 | 6171 | self.comboTypeBox.addItem("Spectra") |
|
5987 | 6172 | self.comboTypeBox.addItem("SpectraHeis") |
|
5988 | 6173 | self.comboTypeBox.addItem("Correlation") |
|
5989 | 6174 | if name == 'Spectra': |
|
5990 | 6175 | self.comboTypeBox.clear() |
|
5991 | 6176 | self.comboTypeBox.addItem("Spectra") |
|
5992 | 6177 | self.comboTypeBox.addItem("SpectraHeis") |
|
5993 | 6178 | self.comboTypeBox.addItem("Correlation") |
|
5994 | 6179 | if name == 'SpectraHeis': |
|
5995 | 6180 | self.comboTypeBox.clear() |
|
5996 | 6181 | self.comboTypeBox.addItem("SpectraHeis") |
|
5997 | 6182 | |
|
5998 | 6183 | self.comboInputBox.addItem(str(name)) |
|
5999 | 6184 | # self.comboInputBox.addItem(str(name)+str(id)) |
|
6000 | 6185 | |
|
6001 | 6186 | def closeEvent(self, event): |
|
6002 | 6187 | self.closed.emit() |
|
6003 | 6188 | event.accept() |
|
6004 | 6189 | |
|
6005 | 6190 | class Ftp(QMainWindow, Ui_Ftp): |
|
6006 | 6191 | """ |
|
6007 | 6192 | Class documentation goes here. |
|
6008 | 6193 | """ |
|
6009 | 6194 | create = False |
|
6010 | 6195 | closed = pyqtSignal() |
|
6011 | 6196 | server = None |
|
6012 | 6197 | folder = None |
|
6013 | 6198 | username = None |
|
6014 | 6199 | password = None |
|
6015 | 6200 | ftp_wei = None |
|
6016 | 6201 | exp_code = None |
|
6017 | 6202 | sub_exp_code = None |
|
6018 | 6203 | plot_pos = None |
|
6019 | 6204 | |
|
6020 | 6205 | def __init__(self, parent=None): |
|
6021 | 6206 | """ |
|
6022 | 6207 | Constructor |
|
6023 | 6208 | """ |
|
6024 | 6209 | QMainWindow.__init__(self, parent) |
|
6025 | 6210 | self.setupUi(self) |
|
6026 | 6211 | self.setParameter() |
|
6027 | 6212 | |
|
6028 | 6213 | def setParameter(self): |
|
6029 | 6214 | self.setWindowTitle("ROJ-Signal Chain") |
|
6030 | 6215 | self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe') |
|
6031 | 6216 | self.folderFTP.setToolTip('Example: /home/wmaster/graficos') |
|
6032 |
self.usernameFTP.setToolTip('Example: |
|
|
6033 |
self.passwordFTP.setToolTip('Example: m |
|
|
6217 | self.usernameFTP.setToolTip('Example: myusername') | |
|
6218 | self.passwordFTP.setToolTip('Example: mypass ') | |
|
6034 | 6219 | self.weightFTP.setToolTip('Example: 0') |
|
6035 | 6220 | self.expcodeFTP.setToolTip('Example: 0') |
|
6036 | 6221 | self.subexpFTP.setToolTip('Example: 0') |
|
6037 | 6222 | self.plotposFTP.setToolTip('Example: 0') |
|
6038 | 6223 | |
|
6039 | 6224 | def setParmsfromTemporal(self, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): |
|
6040 | 6225 | self.serverFTP.setText(str(server)) |
|
6041 | 6226 | self.folderFTP.setText(str(folder)) |
|
6042 | 6227 | self.usernameFTP.setText(str(username)) |
|
6043 | 6228 | self.passwordFTP.setText(str(password)) |
|
6044 | 6229 | self.weightFTP.setText(str(ftp_wei)) |
|
6045 | 6230 | self.expcodeFTP.setText(str(exp_code)) |
|
6046 | 6231 | self.subexpFTP.setText(str(sub_exp_code)) |
|
6047 | 6232 | self.plotposFTP.setText(str(plot_pos)) |
|
6048 | 6233 | |
|
6049 | 6234 | def getParmsFromFtpWindow(self): |
|
6050 | 6235 | """ |
|
6051 | 6236 | Return Inputs Project: |
|
6052 | 6237 | - server |
|
6053 | 6238 | - folder |
|
6054 | 6239 | - username |
|
6055 | 6240 | - password |
|
6056 | 6241 | - ftp_wei |
|
6057 | 6242 | - exp_code |
|
6058 | 6243 | - sub_exp_code |
|
6059 | 6244 | - plot_pos |
|
6060 | 6245 | """ |
|
6061 | 6246 | name_server_ftp = str(self.serverFTP.text()) |
|
6062 | 6247 | try: |
|
6063 | 6248 | name = str(self.serverFTP.text()) |
|
6064 | 6249 | except: |
|
6065 | 6250 | self.console.clear() |
|
6066 | 6251 | self.console.append("Please Write a FTP Server") |
|
6067 | 6252 | return 0 |
|
6068 | 6253 | |
|
6069 | 6254 | folder_server_ftp = str(self.folderFTP.text()) |
|
6070 | 6255 | try: |
|
6071 | 6256 | folder = str(self.folderFTP.text()) |
|
6072 | 6257 | except: |
|
6073 | 6258 | self.console.clear() |
|
6074 | 6259 | self.console.append("Please Write a Folder") |
|
6075 | 6260 | return 0 |
|
6076 | 6261 | |
|
6077 | 6262 | username_ftp = str(self.usernameFTP.text()) |
|
6078 | 6263 | try: |
|
6079 | 6264 | username = str(self.usernameFTP.text()) |
|
6080 | 6265 | except: |
|
6081 | 6266 | self.console.clear() |
|
6082 | 6267 | self.console.append("Please Write a User Name") |
|
6083 | 6268 | return 0 |
|
6084 | 6269 | |
|
6085 | 6270 | password_ftp = str(self.passwordFTP.text()) |
|
6086 | 6271 | try: |
|
6087 | 6272 | password = str(self.passwordFTP.text()) |
|
6088 | 6273 | except: |
|
6089 | 6274 | self.console.clear() |
|
6090 | 6275 | self.console.append("Please Write a passwordFTP") |
|
6091 | 6276 | return 0 |
|
6092 | 6277 | |
|
6093 | 6278 | ftp_wei = self.weightFTP.text() |
|
6094 | 6279 | if not ftp_wei == "": |
|
6095 | 6280 | try: |
|
6096 | 6281 | ftp_wei = int(self.weightFTP.text()) |
|
6097 | 6282 | except: |
|
6098 | 6283 | self.console.clear() |
|
6099 | 6284 | self.console.append("Please Write a ftp_wei number") |
|
6100 | 6285 | return 0 |
|
6101 | 6286 | |
|
6102 | 6287 | exp_code = self.expcodeFTP.text() |
|
6103 | 6288 | if not exp_code == "": |
|
6104 | 6289 | try: |
|
6105 | 6290 | exp_code = int(self.expcodeFTP.text()) |
|
6106 | 6291 | except: |
|
6107 | 6292 | self.console.clear() |
|
6108 | 6293 | self.console.append("Please Write a exp_code number") |
|
6109 | 6294 | return 0 |
|
6110 | 6295 | |
|
6111 | 6296 | |
|
6112 | 6297 | sub_exp_code = self.subexpFTP.text() |
|
6113 | 6298 | if not sub_exp_code == "": |
|
6114 | 6299 | try: |
|
6115 | 6300 | sub_exp_code = int(self.subexpFTP.text()) |
|
6116 | 6301 | except: |
|
6117 | 6302 | self.console.clear() |
|
6118 | 6303 | self.console.append("Please Write a sub_exp_code number") |
|
6119 | 6304 | return 0 |
|
6120 | 6305 | |
|
6121 | 6306 | plot_pos = self.plotposFTP.text() |
|
6122 | 6307 | if not plot_pos == "": |
|
6123 | 6308 | try: |
|
6124 | 6309 | plot_pos = int(self.plotposFTP.text()) |
|
6125 | 6310 | except: |
|
6126 | 6311 | self.console.clear() |
|
6127 | 6312 | self.console.append("Please Write a plot_pos number") |
|
6128 | 6313 | return 0 |
|
6129 | 6314 | |
|
6130 | 6315 | return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos |
|
6131 | 6316 | |
|
6132 | 6317 | @pyqtSignature("") |
|
6133 | 6318 | def on_ftpOkButton_clicked(self): |
|
6134 | 6319 | server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow() |
|
6135 | 6320 | self.create = True |
|
6136 | 6321 | self.close() |
|
6137 | 6322 | |
|
6138 | 6323 | @pyqtSignature("") |
|
6139 | 6324 | def on_ftpCancelButton_clicked(self): |
|
6140 | 6325 | self.create = False |
|
6141 | 6326 | self.close() |
|
6142 | 6327 | |
|
6143 | 6328 | def closeEvent(self, event): |
|
6144 | 6329 | self.closed.emit() |
|
6145 | 6330 | event.accept() |
|
6146 | 6331 | |
|
6147 | 6332 | class ftpBuffer(): |
|
6148 | 6333 | server = None |
|
6149 | 6334 | folder = None |
|
6150 | 6335 | username = None |
|
6151 | 6336 | password = None |
|
6152 | 6337 | ftp_wei = None |
|
6153 | 6338 | exp_code = None |
|
6154 | 6339 | sub_exp_code = None |
|
6155 | 6340 | plot_pos = None |
|
6156 | 6341 | create = False |
|
6157 | 6342 | withoutconfig = False |
|
6158 | 6343 | createforView = False |
|
6159 | ||
|
6344 | localfolder = None | |
|
6345 | extension = None | |
|
6346 | period = None | |
|
6347 | protocol = None | |
|
6160 | 6348 | |
|
6161 | 6349 | def __init__(self): |
|
6350 | ||
|
6351 | self.create = False | |
|
6162 | 6352 | self.server = None |
|
6163 | 6353 | self.folder = None |
|
6164 | 6354 | self.username = None |
|
6165 | 6355 | self.password = None |
|
6166 | 6356 | self.ftp_wei = None |
|
6167 | 6357 | self.exp_code = None |
|
6168 | 6358 | self.sub_exp_code = None |
|
6169 | 6359 | self.plot_pos = None |
|
6170 | 6360 | # self.create = False |
|
6361 | self.localfolder = None | |
|
6362 | self.extension = None | |
|
6363 | self.period = None | |
|
6364 | self.protocol = None | |
|
6171 | 6365 | |
|
6172 | 6366 | def setwithoutconfiguration(self): |
|
6367 | ||
|
6368 | self.create = False | |
|
6173 | 6369 | self.server = "jro-app.igp.gob.pe" |
|
6174 | 6370 | self.folder = "/home/wmaster/graficos" |
|
6175 |
self.username = " |
|
|
6371 | self.username = "wmaster" | |
|
6176 | 6372 | self.password = "mst2010vhf" |
|
6177 | 6373 | self.ftp_wei = "0" |
|
6178 | 6374 | self.exp_code = "0" |
|
6179 | 6375 | self.sub_exp_code = "0" |
|
6180 | 6376 | self.plot_pos = "0" |
|
6181 | 6377 | self.withoutconfig = True |
|
6378 | self.localfolder = './' | |
|
6379 | self.extension = '.png' | |
|
6380 | self.period = '60' | |
|
6381 | self.protocol = 'ftp' | |
|
6382 | ||
|
6383 | def save(self, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos, localfolder='./', extension='.png', period='60', protocol='ftp'): | |
|
6182 | 6384 | |
|
6183 | def save(self, server, folder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): | |
|
6184 | 6385 | self.server = server |
|
6185 | 6386 | self.folder = folder |
|
6186 | 6387 | self.username = username |
|
6187 | 6388 | self.password = password |
|
6188 | 6389 | self.ftp_wei = ftp_wei |
|
6189 | 6390 | self.exp_code = exp_code |
|
6190 | 6391 | self.sub_exp_code = sub_exp_code |
|
6191 | 6392 | self.plot_pos = plot_pos |
|
6192 | 6393 | self.create = True |
|
6193 | 6394 | self.withoutconfig = False |
|
6194 | 6395 | self.createforView = True |
|
6396 | self.localfolder = localfolder | |
|
6195 | 6397 | |
|
6196 | 6398 | |
|
6197 | 6399 | def recover(self): |
|
6400 | ||
|
6198 | 6401 | return self.server, self.folder, self.username, self.password, self.ftp_wei, self.exp_code, self.sub_exp_code, self.plot_pos |
|
6199 | 6402 | |
|
6200 | 6403 | class ShowMeConsole(QtCore.QObject): |
|
6201 | 6404 | textWritten = QtCore.pyqtSignal(str) |
|
6202 | 6405 | def write (self, text): |
|
6203 | 6406 | self.textWritten.emit(str(text)) |
|
6204 | 6407 | |
|
6205 | 6408 | class PlotManager(): |
|
6206 | 6409 | def __init__(self, queue): |
|
6207 | 6410 | self.queue = queue |
|
6208 | 6411 | self.objPlotDict = {} |
|
6209 | 6412 | |
|
6210 | 6413 | def processIncoming(self): |
|
6211 | 6414 | while self.queue.qsize(): |
|
6212 | 6415 | try: |
|
6213 | 6416 | dataFromQueue = self.queue.get(True) |
|
6214 | 6417 | if dataFromQueue == None: |
|
6215 | 6418 | continue |
|
6216 | 6419 | |
|
6217 | 6420 | dataPlot = dataFromQueue['data'] |
|
6218 | 6421 | kwargs = dataFromQueue['kwargs'] |
|
6219 | 6422 | id = kwargs['id'] |
|
6220 | 6423 | if 'channelList' in kwargs.keys(): |
|
6221 | 6424 | channelList = kwargs['channelList'] |
|
6222 | 6425 | else: |
|
6223 | 6426 | channelList = None |
|
6224 | 6427 | plotname = kwargs.pop('type') |
|
6225 | 6428 | |
|
6226 | 6429 | if not(id in self.objPlotDict.keys()): |
|
6227 | 6430 | className = eval(plotname) |
|
6228 | 6431 | self.objPlotDict[id] = className(id, channelList, dataPlot) |
|
6229 | 6432 | self.objPlotDict[id].show() |
|
6230 | 6433 | |
|
6231 | 6434 | self.objPlotDict[id].run(dataPlot , **kwargs) |
|
6232 | 6435 | |
|
6233 | 6436 | except Queue.Empty: |
|
6234 | 6437 | pass |
|
6235 | 6438 | |
|
6236 | 6439 |
@@ -1,97 +1,100 | |||
|
1 | 1 | import threading |
|
2 | 2 | import Queue |
|
3 | 3 | import pickle |
|
4 | 4 | import numpy, os, sys |
|
5 | 5 | |
|
6 | 6 | from schainpy.controller import Project |
|
7 | 7 | from command import * |
|
8 | 8 | |
|
9 | 9 | class ControllerThread(threading.Thread): |
|
10 | def __init__(self, filename, data_q): | |
|
10 | def __init__(self, filename, data_q=None): | |
|
11 | 11 | super(ControllerThread, self).__init__() |
|
12 | 12 | self.filename = filename |
|
13 | 13 | self.data_q = data_q |
|
14 | 14 | self.control = {'stop':False,'pause':False} |
|
15 | 15 | |
|
16 | 16 | def stop(self): |
|
17 | 17 | self.control['stop'] = True |
|
18 | 18 | |
|
19 | 19 | def pause(self): |
|
20 | 20 | self.control['pause'] = not(self.control['pause']) |
|
21 | 21 | |
|
22 | 22 | def run(self): |
|
23 | 23 | self.control['stop'] = False |
|
24 | 24 | self.control['pause'] = False |
|
25 | 25 | self.controllerObj = Project(self.control, self.data_q) |
|
26 | 26 | self.controllerObj.readXml(self.filename) |
|
27 | 27 | self.controllerObj.createObjects() |
|
28 | 28 | self.controllerObj.connectObjects() |
|
29 | 29 | self.controllerObj.run() |
|
30 | 30 | |
|
31 | 31 | class CommCtrlProcessThread(threading.Thread): |
|
32 | 32 | """ Implements the threading.Thread interface (start, join, etc.) and |
|
33 | 33 | can be controlled via the cmd_q Queue attribute. Replies are placed in |
|
34 | 34 | the reply_q Queue attribute. |
|
35 | 35 | """ |
|
36 | 36 | def __init__(self, cmd_q=Queue.Queue(), reply_q=Queue.Queue()): |
|
37 | 37 | super(CommCtrlProcessThread, self).__init__() |
|
38 | 38 | self.cmd_q = cmd_q |
|
39 | self.reply_q = reply_q | |
|
39 | # self.reply_q = reply_q | |
|
40 | 40 | |
|
41 | 41 | # self.print_q = Queue.Queue() |
|
42 | self.data_q = Queue.Queue() | |
|
42 | # self.data_q = Queue.Queue() | |
|
43 | ||
|
43 | 44 | |
|
44 | 45 | self.alive = threading.Event() |
|
46 | self.setDaemon(True) | |
|
45 | 47 | self.alive.set() |
|
46 | 48 | self.socket = None |
|
47 | 49 | |
|
48 | 50 | self.socketIO = None |
|
49 | 51 | self.mySocket = None |
|
50 | 52 | |
|
51 | 53 | |
|
52 | 54 | self.handlers = { |
|
53 | 55 | ProcessCommand.PROCESS: self._handle_ioPROCESSTHREAD, |
|
54 | 56 | ProcessCommand.MESSAGE: self._handle_ioMESSAGE, |
|
55 | 57 | ProcessCommand.DATA: self._handle_ioDATA, |
|
56 | 58 | ProcessCommand.STOP: self._handle_ioSTOP, |
|
57 | 59 | ProcessCommand.PAUSE: self._handle_ioPAUSE |
|
58 | 60 | } |
|
59 | 61 | |
|
60 | 62 | def run(self): |
|
63 | ||
|
61 | 64 | while self.alive.isSet(): |
|
62 | 65 | try: |
|
63 | 66 | cmd = self.cmd_q.get(True, 0.1) |
|
64 | 67 | self.handlers[cmd.type](cmd) |
|
65 | 68 | except Queue.Empty as e: |
|
66 | 69 | continue |
|
67 | 70 | |
|
68 | 71 | |
|
69 | 72 | def _handle_ioPROCESSTHREAD(self, cmd): |
|
70 | 73 | filename = cmd.data |
|
71 |
self.controllerObj = ControllerThread(filename=filename |
|
|
74 | self.controllerObj = ControllerThread(filename=filename) | |
|
72 | 75 | self.controllerObj.start() |
|
73 | 76 | |
|
74 | 77 | def _handle_ioPAUSE(self, cmd): |
|
75 | 78 | self.controllerObj.pause() |
|
76 | 79 | |
|
77 | 80 | def _handle_ioSTOP(self, cmd): |
|
78 | 81 | self.controllerObj.stop() |
|
79 | 82 | |
|
80 | 83 | def _handle_ioDATA(self, cmd): |
|
81 | 84 | self.reply_q.put(self._success_reply_data(data=cmd.data)) |
|
82 | 85 | |
|
83 | 86 | def _handle_ioMESSAGE(self, cmd): |
|
84 | 87 | self.reply_q.put(self._success_reply_message(data=cmd.data)) |
|
85 | 88 | |
|
86 | 89 | def _success_reply_data(self, data=None): |
|
87 | 90 | return ClientReply(ClientReply.DATA, data) |
|
88 | 91 | |
|
89 | 92 | def _success_reply_message(self, data=None): |
|
90 | 93 | return ClientReply(ClientReply.MESSAGE, data) |
|
91 | 94 | |
|
92 | 95 | def join(self, timeout=None): |
|
93 | 96 | self.alive.clear() |
|
94 | 97 | threading.Thread.join(self, timeout) |
|
95 | 98 | |
|
96 | 99 | |
|
97 | 100 | No newline at end of file |
@@ -1,139 +1,140 | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Form implementation generated from reading ui file '/home/alex/ui/ftpConfig4.ui' |
|
4 | 4 | # |
|
5 | 5 | # Created: Tue Aug 20 08:24:35 2013 |
|
6 | 6 | # by: PyQt4 UI code generator 4.10 |
|
7 | 7 | # |
|
8 | 8 | # WARNING! All changes made in this file will be lost! |
|
9 | 9 | |
|
10 | 10 | from PyQt4 import QtCore, QtGui |
|
11 | 11 | |
|
12 | 12 | try: |
|
13 | 13 | _fromUtf8 = QtCore.QString.fromUtf8 |
|
14 | 14 | except AttributeError: |
|
15 | 15 | def _fromUtf8(s): |
|
16 | 16 | return s |
|
17 | 17 | |
|
18 | 18 | try: |
|
19 | 19 | _encoding = QtGui.QApplication.UnicodeUTF8 |
|
20 | 20 | def _translate(context, text, disambig): |
|
21 | 21 | return QtGui.QApplication.translate(context, text, disambig, _encoding) |
|
22 | 22 | except AttributeError: |
|
23 | 23 | def _translate(context, text, disambig): |
|
24 | 24 | return QtGui.QApplication.translate(context, text, disambig) |
|
25 | 25 | |
|
26 | 26 | class Ui_Ftp(object): |
|
27 | 27 | def setupUi(self, MainWindow): |
|
28 | 28 | MainWindow.setObjectName(_fromUtf8("MainWindow")) |
|
29 | 29 | MainWindow.resize(374, 399) |
|
30 | 30 | MainWindow.setMinimumSize(QtCore.QSize(374, 399)) |
|
31 | 31 | MainWindow.setMaximumSize(QtCore.QSize(374, 399)) |
|
32 | 32 | self.centralWidget = QtGui.QWidget(MainWindow) |
|
33 | 33 | self.centralWidget.setObjectName(_fromUtf8("centralWidget")) |
|
34 | 34 | self.label = QtGui.QLabel(self.centralWidget) |
|
35 | 35 | self.label.setGeometry(QtCore.QRect(9, 38, 47, 17)) |
|
36 | 36 | self.label.setObjectName(_fromUtf8("label")) |
|
37 | 37 | self.label_2 = QtGui.QLabel(self.centralWidget) |
|
38 | 38 | self.label_2.setGeometry(QtCore.QRect(9, 133, 77, 17)) |
|
39 | 39 | self.label_2.setObjectName(_fromUtf8("label_2")) |
|
40 | 40 | self.label_3 = QtGui.QLabel(self.centralWidget) |
|
41 | 41 | self.label_3.setGeometry(QtCore.QRect(9, 166, 68, 17)) |
|
42 | 42 | self.label_3.setObjectName(_fromUtf8("label_3")) |
|
43 | 43 | self.label_4 = QtGui.QLabel(self.centralWidget) |
|
44 | 44 | self.label_4.setGeometry(QtCore.QRect(9, 9, 101, 17)) |
|
45 | 45 | font = QtGui.QFont() |
|
46 | 46 | font.setBold(True) |
|
47 | 47 | font.setWeight(75) |
|
48 | 48 | self.label_4.setFont(font) |
|
49 | 49 | self.label_4.setObjectName(_fromUtf8("label_4")) |
|
50 | 50 | self.label_5 = QtGui.QLabel(self.centralWidget) |
|
51 | 51 | self.label_5.setGeometry(QtCore.QRect(9, 104, 87, 17)) |
|
52 | 52 | font = QtGui.QFont() |
|
53 | 53 | font.setBold(True) |
|
54 | 54 | font.setWeight(75) |
|
55 | 55 | self.label_5.setFont(font) |
|
56 | 56 | self.label_5.setObjectName(_fromUtf8("label_5")) |
|
57 | 57 | self.label_6 = QtGui.QLabel(self.centralWidget) |
|
58 | 58 | self.label_6.setGeometry(QtCore.QRect(9, 71, 47, 17)) |
|
59 | 59 | self.label_6.setObjectName(_fromUtf8("label_6")) |
|
60 | 60 | self.serverFTP = QtGui.QLineEdit(self.centralWidget) |
|
61 | 61 | self.serverFTP.setGeometry(QtCore.QRect(130, 40, 231, 27)) |
|
62 | 62 | self.serverFTP.setObjectName(_fromUtf8("serverFTP")) |
|
63 | 63 | self.folderFTP = QtGui.QLineEdit(self.centralWidget) |
|
64 | 64 | self.folderFTP.setGeometry(QtCore.QRect(130, 70, 231, 27)) |
|
65 | 65 | self.folderFTP.setObjectName(_fromUtf8("folderFTP")) |
|
66 | 66 | self.usernameFTP = QtGui.QLineEdit(self.centralWidget) |
|
67 | 67 | self.usernameFTP.setGeometry(QtCore.QRect(130, 130, 231, 27)) |
|
68 | 68 | self.usernameFTP.setObjectName(_fromUtf8("usernameFTP")) |
|
69 | 69 | self.passwordFTP = QtGui.QLineEdit(self.centralWidget) |
|
70 | self.passwordFTP.setEchoMode(QtGui.QLineEdit.Password) | |
|
70 | 71 | self.passwordFTP.setGeometry(QtCore.QRect(130, 160, 231, 27)) |
|
71 | 72 | self.passwordFTP.setObjectName(_fromUtf8("passwordFTP")) |
|
72 | 73 | self.ftpCancelButton = QtGui.QPushButton(self.centralWidget) |
|
73 | 74 | self.ftpCancelButton.setGeometry(QtCore.QRect(130, 360, 111, 27)) |
|
74 | 75 | self.ftpCancelButton.setObjectName(_fromUtf8("ftpCancelButton")) |
|
75 | 76 | self.ftpOkButton = QtGui.QPushButton(self.centralWidget) |
|
76 | 77 | self.ftpOkButton.setGeometry(QtCore.QRect(250, 360, 111, 27)) |
|
77 | 78 | self.ftpOkButton.setObjectName(_fromUtf8("ftpOkButton")) |
|
78 | 79 | self.label_7 = QtGui.QLabel(self.centralWidget) |
|
79 | 80 | self.label_7.setGeometry(QtCore.QRect(10, 200, 66, 17)) |
|
80 | 81 | font = QtGui.QFont() |
|
81 | 82 | font.setBold(True) |
|
82 | 83 | font.setWeight(75) |
|
83 | 84 | self.label_7.setFont(font) |
|
84 | 85 | self.label_7.setObjectName(_fromUtf8("label_7")) |
|
85 | 86 | self.label_8 = QtGui.QLabel(self.centralWidget) |
|
86 | 87 | self.label_8.setGeometry(QtCore.QRect(10, 230, 81, 17)) |
|
87 | 88 | self.label_8.setObjectName(_fromUtf8("label_8")) |
|
88 | 89 | self.label_9 = QtGui.QLabel(self.centralWidget) |
|
89 | 90 | self.label_9.setGeometry(QtCore.QRect(10, 260, 81, 17)) |
|
90 | 91 | self.label_9.setObjectName(_fromUtf8("label_9")) |
|
91 | 92 | self.label_10 = QtGui.QLabel(self.centralWidget) |
|
92 | 93 | self.label_10.setGeometry(QtCore.QRect(10, 290, 81, 17)) |
|
93 | 94 | self.label_10.setObjectName(_fromUtf8("label_10")) |
|
94 | 95 | self.label_11 = QtGui.QLabel(self.centralWidget) |
|
95 | 96 | self.label_11.setGeometry(QtCore.QRect(10, 320, 81, 17)) |
|
96 | 97 | self.label_11.setObjectName(_fromUtf8("label_11")) |
|
97 | 98 | self.weightFTP = QtGui.QLineEdit(self.centralWidget) |
|
98 | 99 | self.weightFTP.setGeometry(QtCore.QRect(130, 230, 231, 27)) |
|
99 | 100 | self.weightFTP.setObjectName(_fromUtf8("weightFTP")) |
|
100 | 101 | self.expcodeFTP = QtGui.QLineEdit(self.centralWidget) |
|
101 | 102 | self.expcodeFTP.setGeometry(QtCore.QRect(130, 260, 231, 27)) |
|
102 | 103 | self.expcodeFTP.setObjectName(_fromUtf8("expcodeFTP")) |
|
103 | 104 | self.subexpFTP = QtGui.QLineEdit(self.centralWidget) |
|
104 | 105 | self.subexpFTP.setGeometry(QtCore.QRect(130, 290, 231, 27)) |
|
105 | 106 | self.subexpFTP.setObjectName(_fromUtf8("subexpFTP")) |
|
106 | 107 | self.plotposFTP = QtGui.QLineEdit(self.centralWidget) |
|
107 | 108 | self.plotposFTP.setGeometry(QtCore.QRect(130, 320, 231, 27)) |
|
108 | 109 | self.plotposFTP.setObjectName(_fromUtf8("plotposFTP")) |
|
109 | 110 | MainWindow.setCentralWidget(self.centralWidget) |
|
110 | 111 | |
|
111 | 112 | self.retranslateUi(MainWindow) |
|
112 | 113 | QtCore.QMetaObject.connectSlotsByName(MainWindow) |
|
113 | 114 | |
|
114 | 115 | def retranslateUi(self, MainWindow): |
|
115 | 116 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) |
|
116 | 117 | self.label.setText(_translate("MainWindow", "Server:", None)) |
|
117 | 118 | self.label_2.setText(_translate("MainWindow", "User Name:", None)) |
|
118 | 119 | self.label_3.setText(_translate("MainWindow", "Password:", None)) |
|
119 | 120 | self.label_4.setText(_translate("MainWindow", "Server Details", None)) |
|
120 | 121 | self.label_5.setText(_translate("MainWindow", "User Details", None)) |
|
121 | self.label_6.setText(_translate("MainWindow", "Folder:", None)) | |
|
122 | self.label_6.setText(_translate("MainWindow", "Remote Folder:", None)) | |
|
122 | 123 | self.ftpCancelButton.setText(_translate("MainWindow", "Cancel", None)) |
|
123 | 124 | self.ftpOkButton.setText(_translate("MainWindow", "Ok", None)) |
|
124 |
self.label_7.setText(_translate("MainWindow", " |
|
|
125 | self.label_7.setText(_translate("MainWindow", "Project Details", None)) | |
|
125 | 126 | self.label_8.setText(_translate("MainWindow", "Ftp_wei:", None)) |
|
126 | 127 | self.label_9.setText(_translate("MainWindow", "Exp_code:", None)) |
|
127 | 128 | self.label_10.setText(_translate("MainWindow", "Sub_exp:", None)) |
|
128 | 129 | self.label_11.setText(_translate("MainWindow", "Plot_pos:", None)) |
|
129 | 130 | |
|
130 | 131 | |
|
131 | 132 | if __name__ == "__main__": |
|
132 | 133 | import sys |
|
133 | 134 | app = QtGui.QApplication(sys.argv) |
|
134 | 135 | MainWindow = QtGui.QMainWindow() |
|
135 | 136 | ui = Ui_Ftp() |
|
136 | 137 | ui.setupUi(MainWindow) |
|
137 | 138 | MainWindow.show() |
|
138 | 139 | sys.exit(app.exec_()) |
|
139 | 140 |
@@ -1,1279 +1,1532 | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Form implementation generated from reading ui file '/home/alex/ui/MainWindow_21_02_13_v49.ui' |
|
4 | 4 | # |
|
5 | 5 | # Created: Mon Mar 24 13:28:36 2014 |
|
6 | 6 | # by: PyQt4 UI code generator 4.10 |
|
7 | 7 | # |
|
8 | 8 | # WARNING! All changes made in this file will be lost! |
|
9 | 9 | |
|
10 | 10 | from PyQt4 import QtCore, QtGui |
|
11 | from windows import * | |
|
11 | 12 | |
|
12 | 13 | try: |
|
13 | 14 | _fromUtf8 = QtCore.QString.fromUtf8 |
|
14 | 15 | except AttributeError: |
|
15 | 16 | def _fromUtf8(s): |
|
16 | 17 | return s |
|
17 | 18 | |
|
18 | 19 | try: |
|
19 | 20 | _encoding = QtGui.QApplication.UnicodeUTF8 |
|
20 | 21 | def _translate(context, text, disambig): |
|
21 | 22 | return QtGui.QApplication.translate(context, text, disambig, _encoding) |
|
22 | 23 | except AttributeError: |
|
23 | 24 | def _translate(context, text, disambig): |
|
24 | 25 | return QtGui.QApplication.translate(context, text, disambig) |
|
25 | 26 | |
|
26 | 27 | class Ui_MainWindow(object): |
|
28 | ||
|
27 | 29 | def setupUi(self, MainWindow): |
|
30 | ||
|
28 | 31 | MainWindow.setObjectName(_fromUtf8("MainWindow")) |
|
29 | 32 | MainWindow.resize(1203, 711) |
|
33 | ||
|
30 | 34 | self.centralWidget = QtGui.QWidget(MainWindow) |
|
31 | 35 | self.centralWidget.setObjectName(_fromUtf8("centralWidget")) |
|
32 | 36 | self.gridLayout_16 = QtGui.QGridLayout(self.centralWidget) |
|
33 | 37 | self.gridLayout_16.setObjectName(_fromUtf8("gridLayout_16")) |
|
34 | 38 | self.splitter_2 = QtGui.QSplitter(self.centralWidget) |
|
35 | 39 | self.splitter_2.setOrientation(QtCore.Qt.Horizontal) |
|
36 | 40 | self.splitter_2.setObjectName(_fromUtf8("splitter_2")) |
|
37 | 41 | self.projectExplorerTree = QtGui.QTreeView(self.splitter_2) |
|
38 | 42 | self.projectExplorerTree.setObjectName(_fromUtf8("projectExplorerTree")) |
|
39 | 43 | self.splitter = QtGui.QSplitter(self.splitter_2) |
|
40 | 44 | self.splitter.setOrientation(QtCore.Qt.Vertical) |
|
41 | 45 | self.splitter.setObjectName(_fromUtf8("splitter")) |
|
42 | 46 | self.tabWidgetProject = QtGui.QTabWidget(self.splitter) |
|
43 | 47 | self.tabWidgetProject.setMinimumSize(QtCore.QSize(0, 278)) |
|
44 | 48 | self.tabWidgetProject.setMaximumSize(QtCore.QSize(16777215, 16777215)) |
|
45 | 49 | self.tabWidgetProject.setObjectName(_fromUtf8("tabWidgetProject")) |
|
50 | ||
|
51 | ||
|
46 | 52 | self.tabProject = QtGui.QWidget() |
|
47 | 53 | self.tabProject.setObjectName(_fromUtf8("tabProject")) |
|
48 | 54 | self.gridLayout_15 = QtGui.QGridLayout(self.tabProject) |
|
49 | 55 | self.gridLayout_15.setObjectName(_fromUtf8("gridLayout_15")) |
|
50 | 56 | self.frame = QtGui.QFrame(self.tabProject) |
|
51 | 57 | self.frame.setFrameShape(QtGui.QFrame.StyledPanel) |
|
52 | 58 | self.frame.setFrameShadow(QtGui.QFrame.Raised) |
|
53 | 59 | self.frame.setObjectName(_fromUtf8("frame")) |
|
54 | 60 | self.gridLayout_2 = QtGui.QGridLayout(self.frame) |
|
55 | 61 | self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) |
|
62 | ||
|
56 | 63 | self.label = QtGui.QLabel(self.frame) |
|
57 | 64 | self.label.setObjectName(_fromUtf8("label")) |
|
58 | 65 | self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) |
|
59 | 66 | self.proName = QtGui.QLineEdit(self.frame) |
|
60 | 67 | self.proName.setObjectName(_fromUtf8("proName")) |
|
61 | 68 | self.gridLayout_2.addWidget(self.proName, 0, 1, 1, 8) |
|
62 | 69 | self.label_11 = QtGui.QLabel(self.frame) |
|
63 | 70 | self.label_11.setObjectName(_fromUtf8("label_11")) |
|
64 | 71 | self.gridLayout_2.addWidget(self.label_11, 1, 0, 1, 1) |
|
65 | 72 | self.proComDataType = QtGui.QComboBox(self.frame) |
|
66 | 73 | self.proComDataType.setObjectName(_fromUtf8("proComDataType")) |
|
67 | 74 | self.proComDataType.addItem(_fromUtf8("")) |
|
68 | 75 | self.proComDataType.addItem(_fromUtf8("")) |
|
69 | 76 | self.proComDataType.addItem(_fromUtf8("")) |
|
70 | 77 | self.gridLayout_2.addWidget(self.proComDataType, 1, 1, 1, 5) |
|
71 | 78 | self.proDataType = QtGui.QLineEdit(self.frame) |
|
72 | 79 | self.proDataType.setObjectName(_fromUtf8("proDataType")) |
|
73 | 80 | self.gridLayout_2.addWidget(self.proDataType, 1, 6, 1, 3) |
|
74 | 81 | self.label_15 = QtGui.QLabel(self.frame) |
|
75 | 82 | self.label_15.setObjectName(_fromUtf8("label_15")) |
|
76 | 83 | self.gridLayout_2.addWidget(self.label_15, 2, 0, 1, 1) |
|
77 | 84 | self.proToolPath = QtGui.QToolButton(self.frame) |
|
78 | 85 | self.proToolPath.setObjectName(_fromUtf8("proToolPath")) |
|
79 | 86 | self.gridLayout_2.addWidget(self.proToolPath, 2, 1, 1, 1) |
|
80 | 87 | self.proDataPath = QtGui.QLineEdit(self.frame) |
|
81 | 88 | self.proDataPath.setObjectName(_fromUtf8("proDataPath")) |
|
82 | 89 | self.gridLayout_2.addWidget(self.proDataPath, 2, 2, 1, 7) |
|
83 | 90 | self.label_23 = QtGui.QLabel(self.frame) |
|
84 | 91 | self.label_23.setObjectName(_fromUtf8("label_23")) |
|
85 | 92 | self.gridLayout_2.addWidget(self.label_23, 3, 0, 1, 1) |
|
86 | 93 | self.proComReadMode = QtGui.QComboBox(self.frame) |
|
87 | 94 | self.proComReadMode.setObjectName(_fromUtf8("proComReadMode")) |
|
88 | 95 | self.proComReadMode.addItem(_fromUtf8("")) |
|
89 | 96 | self.proComReadMode.addItem(_fromUtf8("")) |
|
90 | 97 | self.gridLayout_2.addWidget(self.proComReadMode, 3, 1, 1, 2) |
|
91 | 98 | self.label_33 = QtGui.QLabel(self.frame) |
|
92 | 99 | self.label_33.setObjectName(_fromUtf8("label_33")) |
|
93 | 100 | self.gridLayout_2.addWidget(self.label_33, 3, 5, 1, 2) |
|
94 | 101 | self.proDelay = QtGui.QLineEdit(self.frame) |
|
95 | 102 | self.proDelay.setObjectName(_fromUtf8("proDelay")) |
|
96 | 103 | self.gridLayout_2.addWidget(self.proDelay, 3, 8, 1, 1) |
|
97 | 104 | self.label_32 = QtGui.QLabel(self.frame) |
|
98 | 105 | self.label_32.setObjectName(_fromUtf8("label_32")) |
|
99 | 106 | self.gridLayout_2.addWidget(self.label_32, 4, 0, 1, 1) |
|
100 | 107 | self.proComWalk = QtGui.QComboBox(self.frame) |
|
101 | 108 | self.proComWalk.setObjectName(_fromUtf8("proComWalk")) |
|
102 | 109 | self.proComWalk.addItem(_fromUtf8("")) |
|
103 | 110 | self.proComWalk.addItem(_fromUtf8("")) |
|
104 | 111 | self.gridLayout_2.addWidget(self.proComWalk, 4, 1, 1, 8) |
|
105 | 112 | self.proLoadButton = QtGui.QPushButton(self.frame) |
|
106 | 113 | self.proLoadButton.setObjectName(_fromUtf8("proLoadButton")) |
|
107 | 114 | self.gridLayout_2.addWidget(self.proLoadButton, 5, 0, 1, 9) |
|
108 | 115 | self.label_10 = QtGui.QLabel(self.frame) |
|
109 | 116 | self.label_10.setObjectName(_fromUtf8("label_10")) |
|
110 | 117 | self.gridLayout_2.addWidget(self.label_10, 3, 3, 1, 1) |
|
111 | 118 | self.proSet = QtGui.QLineEdit(self.frame) |
|
112 | 119 | self.proSet.setObjectName(_fromUtf8("proSet")) |
|
113 | 120 | self.gridLayout_2.addWidget(self.proSet, 3, 4, 1, 1) |
|
114 | 121 | self.gridLayout_15.addWidget(self.frame, 0, 0, 1, 1) |
|
115 | 122 | self.frame_2 = QtGui.QFrame(self.tabProject) |
|
116 | 123 | self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) |
|
117 | 124 | self.frame_2.setFrameShadow(QtGui.QFrame.Raised) |
|
118 | 125 | self.frame_2.setObjectName(_fromUtf8("frame_2")) |
|
119 | 126 | self.gridLayout_10 = QtGui.QGridLayout(self.frame_2) |
|
120 | 127 | self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) |
|
121 | 128 | self.label_27 = QtGui.QLabel(self.frame_2) |
|
122 | 129 | self.label_27.setObjectName(_fromUtf8("label_27")) |
|
123 | 130 | self.gridLayout_10.addWidget(self.label_27, 0, 0, 1, 1) |
|
124 | 131 | self.proComStartDate = QtGui.QComboBox(self.frame_2) |
|
125 | 132 | self.proComStartDate.setObjectName(_fromUtf8("proComStartDate")) |
|
126 | 133 | self.gridLayout_10.addWidget(self.proComStartDate, 0, 1, 1, 1) |
|
127 | 134 | self.label_28 = QtGui.QLabel(self.frame_2) |
|
128 | 135 | self.label_28.setObjectName(_fromUtf8("label_28")) |
|
129 | 136 | self.gridLayout_10.addWidget(self.label_28, 1, 0, 1, 1) |
|
130 | 137 | self.proComEndDate = QtGui.QComboBox(self.frame_2) |
|
131 | 138 | self.proComEndDate.setObjectName(_fromUtf8("proComEndDate")) |
|
132 | 139 | self.gridLayout_10.addWidget(self.proComEndDate, 1, 1, 1, 1) |
|
133 | 140 | self.label_2 = QtGui.QLabel(self.frame_2) |
|
134 | 141 | self.label_2.setObjectName(_fromUtf8("label_2")) |
|
135 | 142 | self.gridLayout_10.addWidget(self.label_2, 2, 0, 1, 1) |
|
136 | 143 | self.proStartTime = QtGui.QTimeEdit(self.frame_2) |
|
137 | 144 | self.proStartTime.setObjectName(_fromUtf8("proStartTime")) |
|
138 | 145 | self.gridLayout_10.addWidget(self.proStartTime, 2, 1, 1, 1) |
|
139 | 146 | self.label_3 = QtGui.QLabel(self.frame_2) |
|
140 | 147 | self.label_3.setObjectName(_fromUtf8("label_3")) |
|
141 | 148 | self.gridLayout_10.addWidget(self.label_3, 3, 0, 1, 1) |
|
142 | 149 | self.proEndTime = QtGui.QTimeEdit(self.frame_2) |
|
143 | 150 | self.proEndTime.setObjectName(_fromUtf8("proEndTime")) |
|
144 | 151 | self.gridLayout_10.addWidget(self.proEndTime, 3, 1, 1, 1) |
|
145 | 152 | self.label_30 = QtGui.QLabel(self.frame_2) |
|
146 | 153 | self.label_30.setObjectName(_fromUtf8("label_30")) |
|
147 | 154 | self.gridLayout_10.addWidget(self.label_30, 4, 0, 1, 1) |
|
148 | 155 | self.proDescription = QtGui.QTextEdit(self.frame_2) |
|
149 | 156 | self.proDescription.setObjectName(_fromUtf8("proDescription")) |
|
150 | 157 | self.gridLayout_10.addWidget(self.proDescription, 4, 1, 1, 1) |
|
151 | 158 | self.gridLayout_15.addWidget(self.frame_2, 1, 0, 1, 1) |
|
152 | 159 | self.frame_3 = QtGui.QFrame(self.tabProject) |
|
153 | 160 | self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) |
|
154 | 161 | self.frame_3.setFrameShadow(QtGui.QFrame.Raised) |
|
155 | 162 | self.frame_3.setObjectName(_fromUtf8("frame_3")) |
|
156 | 163 | self.gridLayout_14 = QtGui.QGridLayout(self.frame_3) |
|
157 | 164 | self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14")) |
|
158 | 165 | self.proOk = QtGui.QPushButton(self.frame_3) |
|
159 | 166 | self.proOk.setObjectName(_fromUtf8("proOk")) |
|
160 | 167 | self.gridLayout_14.addWidget(self.proOk, 0, 0, 1, 1) |
|
161 | 168 | self.proClear = QtGui.QPushButton(self.frame_3) |
|
162 | 169 | self.proClear.setObjectName(_fromUtf8("proClear")) |
|
163 | 170 | self.gridLayout_14.addWidget(self.proClear, 0, 1, 1, 1) |
|
164 | 171 | self.gridLayout_15.addWidget(self.frame_3, 2, 0, 1, 1) |
|
165 | 172 | self.tabWidgetProject.addTab(self.tabProject, _fromUtf8("")) |
|
166 | 173 | self.tabVoltage = QtGui.QWidget() |
|
167 | 174 | self.tabVoltage.setObjectName(_fromUtf8("tabVoltage")) |
|
168 | 175 | self.gridLayout_3 = QtGui.QGridLayout(self.tabVoltage) |
|
169 | 176 | self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) |
|
170 | 177 | self.frame_4 = QtGui.QFrame(self.tabVoltage) |
|
171 | 178 | self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel) |
|
172 | 179 | self.frame_4.setFrameShadow(QtGui.QFrame.Raised) |
|
173 | 180 | self.frame_4.setObjectName(_fromUtf8("frame_4")) |
|
174 | 181 | self.gridLayout_17 = QtGui.QGridLayout(self.frame_4) |
|
175 | 182 | self.gridLayout_17.setObjectName(_fromUtf8("gridLayout_17")) |
|
176 | 183 | self.volOpOk = QtGui.QPushButton(self.frame_4) |
|
177 | 184 | self.volOpOk.setObjectName(_fromUtf8("volOpOk")) |
|
178 | 185 | self.gridLayout_17.addWidget(self.volOpOk, 0, 0, 1, 1) |
|
179 | 186 | self.volGraphClear = QtGui.QPushButton(self.frame_4) |
|
180 | 187 | self.volGraphClear.setObjectName(_fromUtf8("volGraphClear")) |
|
181 | 188 | self.gridLayout_17.addWidget(self.volGraphClear, 0, 1, 1, 1) |
|
182 | 189 | self.gridLayout_3.addWidget(self.frame_4, 1, 1, 1, 1) |
|
183 | 190 | self.tabWidgetVoltage = QtGui.QTabWidget(self.tabVoltage) |
|
184 | 191 | self.tabWidgetVoltage.setObjectName(_fromUtf8("tabWidgetVoltage")) |
|
185 | 192 | self.tabopVoltage = QtGui.QWidget() |
|
186 | 193 | self.tabopVoltage.setObjectName(_fromUtf8("tabopVoltage")) |
|
187 | 194 | self.gridLayout = QtGui.QGridLayout(self.tabopVoltage) |
|
188 | 195 | self.gridLayout.setObjectName(_fromUtf8("gridLayout")) |
|
189 | 196 | self.volOpHeights = QtGui.QLineEdit(self.tabopVoltage) |
|
190 | 197 | self.volOpHeights.setObjectName(_fromUtf8("volOpHeights")) |
|
191 | 198 | self.gridLayout.addWidget(self.volOpHeights, 4, 4, 1, 1) |
|
192 | 199 | self.volOpComHeights = QtGui.QComboBox(self.tabopVoltage) |
|
193 | 200 | self.volOpComHeights.setObjectName(_fromUtf8("volOpComHeights")) |
|
194 | 201 | self.volOpComHeights.addItem(_fromUtf8("")) |
|
195 | 202 | self.volOpComHeights.addItem(_fromUtf8("")) |
|
196 | 203 | self.gridLayout.addWidget(self.volOpComHeights, 4, 0, 1, 3) |
|
197 | 204 | self.volOpComChannels = QtGui.QComboBox(self.tabopVoltage) |
|
198 | 205 | self.volOpComChannels.setObjectName(_fromUtf8("volOpComChannels")) |
|
199 | 206 | self.volOpComChannels.addItem(_fromUtf8("")) |
|
200 | 207 | self.volOpComChannels.addItem(_fromUtf8("")) |
|
201 | 208 | self.gridLayout.addWidget(self.volOpComChannels, 2, 0, 1, 3) |
|
202 | 209 | self.volOpCebProfile = QtGui.QCheckBox(self.tabopVoltage) |
|
203 | 210 | self.volOpCebProfile.setObjectName(_fromUtf8("volOpCebProfile")) |
|
204 | 211 | self.gridLayout.addWidget(self.volOpCebProfile, 6, 0, 1, 3) |
|
205 | 212 | self.volOpComProfile = QtGui.QComboBox(self.tabopVoltage) |
|
206 | 213 | self.volOpComProfile.setObjectName(_fromUtf8("volOpComProfile")) |
|
207 | 214 | self.volOpComProfile.addItem(_fromUtf8("")) |
|
208 | 215 | self.volOpComProfile.addItem(_fromUtf8("")) |
|
209 | 216 | self.gridLayout.addWidget(self.volOpComProfile, 7, 0, 1, 3) |
|
210 | 217 | self.volOpCebDecodification = QtGui.QCheckBox(self.tabopVoltage) |
|
211 | 218 | self.volOpCebDecodification.setObjectName(_fromUtf8("volOpCebDecodification")) |
|
212 | 219 | self.gridLayout.addWidget(self.volOpCebDecodification, 8, 0, 1, 3) |
|
213 | 220 | self.volOpCebCohInt = QtGui.QCheckBox(self.tabopVoltage) |
|
214 | 221 | self.volOpCebCohInt.setObjectName(_fromUtf8("volOpCebCohInt")) |
|
215 | 222 | self.gridLayout.addWidget(self.volOpCebCohInt, 11, 0, 1, 3) |
|
216 | 223 | self.volOpProfile = QtGui.QLineEdit(self.tabopVoltage) |
|
217 | 224 | self.volOpProfile.setObjectName(_fromUtf8("volOpProfile")) |
|
218 | 225 | self.gridLayout.addWidget(self.volOpProfile, 7, 4, 1, 1) |
|
219 | 226 | self.volOpFilter = QtGui.QLineEdit(self.tabopVoltage) |
|
220 | 227 | self.volOpFilter.setObjectName(_fromUtf8("volOpFilter")) |
|
221 | 228 | self.gridLayout.addWidget(self.volOpFilter, 5, 4, 1, 1) |
|
222 | 229 | spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
223 | 230 | self.gridLayout.addItem(spacerItem, 6, 4, 1, 1) |
|
224 | 231 | spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
225 | 232 | self.gridLayout.addItem(spacerItem1, 8, 4, 1, 1) |
|
226 | 233 | spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
227 | 234 | self.gridLayout.addItem(spacerItem2, 3, 4, 1, 1) |
|
228 | 235 | self.volOpChannel = QtGui.QLineEdit(self.tabopVoltage) |
|
229 | 236 | self.volOpChannel.setObjectName(_fromUtf8("volOpChannel")) |
|
230 | 237 | self.gridLayout.addWidget(self.volOpChannel, 2, 4, 1, 1) |
|
231 | 238 | self.label_4 = QtGui.QLabel(self.tabopVoltage) |
|
232 | 239 | self.label_4.setObjectName(_fromUtf8("label_4")) |
|
233 | 240 | self.gridLayout.addWidget(self.label_4, 9, 2, 1, 1) |
|
234 | 241 | self.volOpCebChannels = QtGui.QCheckBox(self.tabopVoltage) |
|
235 | 242 | self.volOpCebChannels.setObjectName(_fromUtf8("volOpCebChannels")) |
|
236 | 243 | self.gridLayout.addWidget(self.volOpCebChannels, 1, 0, 1, 3) |
|
237 | 244 | self.volOpCebHeights = QtGui.QCheckBox(self.tabopVoltage) |
|
238 | 245 | self.volOpCebHeights.setObjectName(_fromUtf8("volOpCebHeights")) |
|
239 | 246 | self.gridLayout.addWidget(self.volOpCebHeights, 3, 0, 1, 3) |
|
240 | 247 | self.volOpCebFilter = QtGui.QCheckBox(self.tabopVoltage) |
|
241 | 248 | self.volOpCebFilter.setObjectName(_fromUtf8("volOpCebFilter")) |
|
242 | 249 | self.gridLayout.addWidget(self.volOpCebFilter, 5, 0, 1, 3) |
|
243 | 250 | self.volOpRadarfrequency = QtGui.QLineEdit(self.tabopVoltage) |
|
244 | 251 | self.volOpRadarfrequency.setObjectName(_fromUtf8("volOpRadarfrequency")) |
|
245 | 252 | self.gridLayout.addWidget(self.volOpRadarfrequency, 0, 4, 1, 1) |
|
246 | 253 | self.volOpCebRadarfrequency = QtGui.QCheckBox(self.tabopVoltage) |
|
247 | 254 | self.volOpCebRadarfrequency.setObjectName(_fromUtf8("volOpCebRadarfrequency")) |
|
248 | 255 | self.gridLayout.addWidget(self.volOpCebRadarfrequency, 0, 0, 1, 3) |
|
249 | 256 | self.label_5 = QtGui.QLabel(self.tabopVoltage) |
|
250 | 257 | self.label_5.setObjectName(_fromUtf8("label_5")) |
|
251 | 258 | self.gridLayout.addWidget(self.label_5, 10, 2, 1, 1) |
|
252 | 259 | spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
253 | 260 | self.gridLayout.addItem(spacerItem3, 1, 4, 1, 1) |
|
254 | 261 | self.volOpCohInt = QtGui.QLineEdit(self.tabopVoltage) |
|
255 | 262 | self.volOpCohInt.setObjectName(_fromUtf8("volOpCohInt")) |
|
256 | 263 | self.gridLayout.addWidget(self.volOpCohInt, 11, 4, 1, 1) |
|
257 | 264 | self.volOpComCode = QtGui.QComboBox(self.tabopVoltage) |
|
258 | 265 | self.volOpComCode.setObjectName(_fromUtf8("volOpComCode")) |
|
259 | 266 | self.volOpComCode.addItem(_fromUtf8("")) |
|
260 | 267 | self.volOpComCode.addItem(_fromUtf8("")) |
|
261 | 268 | self.volOpComCode.addItem(_fromUtf8("")) |
|
262 | 269 | self.volOpComCode.addItem(_fromUtf8("")) |
|
263 | 270 | self.volOpComCode.addItem(_fromUtf8("")) |
|
264 | 271 | self.volOpComCode.addItem(_fromUtf8("")) |
|
265 | 272 | self.volOpComCode.addItem(_fromUtf8("")) |
|
266 | 273 | self.volOpComCode.addItem(_fromUtf8("")) |
|
267 | 274 | self.volOpComCode.addItem(_fromUtf8("")) |
|
268 | 275 | self.volOpComCode.addItem(_fromUtf8("")) |
|
269 | 276 | self.volOpComCode.addItem(_fromUtf8("")) |
|
270 | 277 | self.volOpComCode.addItem(_fromUtf8("")) |
|
271 | 278 | self.volOpComCode.addItem(_fromUtf8("")) |
|
272 | 279 | self.gridLayout.addWidget(self.volOpComCode, 9, 4, 1, 1) |
|
273 | 280 | self.volOpComMode = QtGui.QComboBox(self.tabopVoltage) |
|
274 | 281 | self.volOpComMode.setObjectName(_fromUtf8("volOpComMode")) |
|
275 | 282 | self.volOpComMode.addItem(_fromUtf8("")) |
|
276 | 283 | self.volOpComMode.addItem(_fromUtf8("")) |
|
277 | 284 | self.gridLayout.addWidget(self.volOpComMode, 10, 4, 1, 1) |
|
278 | 285 | self.tabWidgetVoltage.addTab(self.tabopVoltage, _fromUtf8("")) |
|
279 | 286 | self.tabgraphVoltage = QtGui.QWidget() |
|
280 | 287 | self.tabgraphVoltage.setObjectName(_fromUtf8("tabgraphVoltage")) |
|
281 | 288 | self.gridLayout_6 = QtGui.QGridLayout(self.tabgraphVoltage) |
|
282 | 289 | self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) |
|
283 | 290 | spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
284 | 291 | self.gridLayout_6.addItem(spacerItem4, 12, 3, 1, 1) |
|
285 | 292 | self.volGraphfreqrange = QtGui.QLineEdit(self.tabgraphVoltage) |
|
286 | 293 | self.volGraphfreqrange.setObjectName(_fromUtf8("volGraphfreqrange")) |
|
287 | 294 | self.gridLayout_6.addWidget(self.volGraphfreqrange, 9, 1, 1, 6) |
|
288 | 295 | self.volGraphPrefix = QtGui.QLineEdit(self.tabgraphVoltage) |
|
289 | 296 | self.volGraphPrefix.setObjectName(_fromUtf8("volGraphPrefix")) |
|
290 | 297 | self.gridLayout_6.addWidget(self.volGraphPrefix, 2, 1, 1, 6) |
|
291 | 298 | self.volGraphToolPath = QtGui.QToolButton(self.tabgraphVoltage) |
|
292 | 299 | self.volGraphToolPath.setObjectName(_fromUtf8("volGraphToolPath")) |
|
293 | 300 | self.gridLayout_6.addWidget(self.volGraphToolPath, 1, 5, 1, 2) |
|
294 | 301 | self.volGraphPath = QtGui.QLineEdit(self.tabgraphVoltage) |
|
295 | 302 | self.volGraphPath.setObjectName(_fromUtf8("volGraphPath")) |
|
296 | 303 | self.gridLayout_6.addWidget(self.volGraphPath, 1, 1, 1, 4) |
|
297 | 304 | self.label_14 = QtGui.QLabel(self.tabgraphVoltage) |
|
298 | 305 | self.label_14.setObjectName(_fromUtf8("label_14")) |
|
299 | 306 | self.gridLayout_6.addWidget(self.label_14, 6, 0, 1, 1) |
|
300 | 307 | spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
301 | 308 | self.gridLayout_6.addItem(spacerItem5, 3, 3, 1, 1) |
|
302 | 309 | self.label_8 = QtGui.QLabel(self.tabgraphVoltage) |
|
303 | 310 | self.label_8.setObjectName(_fromUtf8("label_8")) |
|
304 | 311 | self.gridLayout_6.addWidget(self.label_8, 8, 0, 1, 1) |
|
305 | 312 | self.label_49 = QtGui.QLabel(self.tabgraphVoltage) |
|
306 | 313 | self.label_49.setObjectName(_fromUtf8("label_49")) |
|
307 | 314 | self.gridLayout_6.addWidget(self.label_49, 4, 3, 1, 1) |
|
308 | 315 | self.label_51 = QtGui.QLabel(self.tabgraphVoltage) |
|
309 | 316 | self.label_51.setObjectName(_fromUtf8("label_51")) |
|
310 | 317 | self.gridLayout_6.addWidget(self.label_51, 9, 0, 1, 1) |
|
311 | 318 | self.volGraphCebshow = QtGui.QCheckBox(self.tabgraphVoltage) |
|
312 | 319 | self.volGraphCebshow.setText(_fromUtf8("")) |
|
313 | 320 | self.volGraphCebshow.setObjectName(_fromUtf8("volGraphCebshow")) |
|
314 | 321 | self.gridLayout_6.addWidget(self.volGraphCebshow, 6, 3, 1, 1) |
|
315 | 322 | self.label_12 = QtGui.QLabel(self.tabgraphVoltage) |
|
316 | 323 | self.label_12.setObjectName(_fromUtf8("label_12")) |
|
317 | 324 | self.gridLayout_6.addWidget(self.label_12, 1, 0, 1, 1) |
|
318 | 325 | self.label_13 = QtGui.QLabel(self.tabgraphVoltage) |
|
319 | 326 | self.label_13.setObjectName(_fromUtf8("label_13")) |
|
320 | 327 | self.gridLayout_6.addWidget(self.label_13, 2, 0, 1, 1) |
|
321 | 328 | self.label_52 = QtGui.QLabel(self.tabgraphVoltage) |
|
322 | 329 | self.label_52.setObjectName(_fromUtf8("label_52")) |
|
323 | 330 | self.gridLayout_6.addWidget(self.label_52, 11, 0, 1, 1) |
|
324 | 331 | spacerItem6 = QtGui.QSpacerItem(40, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
325 | 332 | self.gridLayout_6.addItem(spacerItem6, 14, 5, 1, 2) |
|
326 | 333 | spacerItem7 = QtGui.QSpacerItem(18, 12, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
327 | 334 | self.gridLayout_6.addItem(spacerItem7, 14, 3, 1, 1) |
|
328 | 335 | self.volGraphChannelList = QtGui.QLineEdit(self.tabgraphVoltage) |
|
329 | 336 | self.volGraphChannelList.setObjectName(_fromUtf8("volGraphChannelList")) |
|
330 | 337 | self.gridLayout_6.addWidget(self.volGraphChannelList, 8, 1, 1, 6) |
|
331 | 338 | self.volGraphHeightrange = QtGui.QLineEdit(self.tabgraphVoltage) |
|
332 | 339 | self.volGraphHeightrange.setObjectName(_fromUtf8("volGraphHeightrange")) |
|
333 | 340 | self.gridLayout_6.addWidget(self.volGraphHeightrange, 11, 1, 1, 6) |
|
334 | 341 | self.label_50 = QtGui.QLabel(self.tabgraphVoltage) |
|
335 | 342 | self.label_50.setObjectName(_fromUtf8("label_50")) |
|
336 | 343 | self.gridLayout_6.addWidget(self.label_50, 4, 4, 1, 1) |
|
337 | 344 | self.volGraphCebSave = QtGui.QCheckBox(self.tabgraphVoltage) |
|
338 | 345 | self.volGraphCebSave.setText(_fromUtf8("")) |
|
339 | 346 | self.volGraphCebSave.setObjectName(_fromUtf8("volGraphCebSave")) |
|
340 | 347 | self.gridLayout_6.addWidget(self.volGraphCebSave, 6, 4, 1, 1) |
|
341 | 348 | self.tabWidgetVoltage.addTab(self.tabgraphVoltage, _fromUtf8("")) |
|
342 | 349 | self.taboutputVoltage = QtGui.QWidget() |
|
343 | 350 | self.taboutputVoltage.setObjectName(_fromUtf8("taboutputVoltage")) |
|
344 | 351 | self.gridLayout_12 = QtGui.QGridLayout(self.taboutputVoltage) |
|
345 | 352 | self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12")) |
|
346 | 353 | self.label_36 = QtGui.QLabel(self.taboutputVoltage) |
|
347 | 354 | self.label_36.setObjectName(_fromUtf8("label_36")) |
|
348 | 355 | self.gridLayout_12.addWidget(self.label_36, 0, 0, 1, 1) |
|
349 | 356 | self.label_37 = QtGui.QLabel(self.taboutputVoltage) |
|
350 | 357 | self.label_37.setObjectName(_fromUtf8("label_37")) |
|
351 | 358 | self.gridLayout_12.addWidget(self.label_37, 1, 0, 1, 1) |
|
352 | 359 | self.volOutputPath = QtGui.QLineEdit(self.taboutputVoltage) |
|
353 | 360 | self.volOutputPath.setObjectName(_fromUtf8("volOutputPath")) |
|
354 | 361 | self.gridLayout_12.addWidget(self.volOutputPath, 1, 2, 1, 1) |
|
355 | 362 | self.volOutputToolPath = QtGui.QToolButton(self.taboutputVoltage) |
|
356 | 363 | self.volOutputToolPath.setObjectName(_fromUtf8("volOutputToolPath")) |
|
357 | 364 | self.gridLayout_12.addWidget(self.volOutputToolPath, 1, 3, 1, 1) |
|
358 | 365 | self.volOutputComData = QtGui.QComboBox(self.taboutputVoltage) |
|
359 | 366 | self.volOutputComData.setObjectName(_fromUtf8("volOutputComData")) |
|
360 | 367 | self.volOutputComData.addItem(_fromUtf8("")) |
|
361 | 368 | self.gridLayout_12.addWidget(self.volOutputComData, 0, 2, 1, 2) |
|
362 | 369 | spacerItem8 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
363 | 370 | self.gridLayout_12.addItem(spacerItem8, 5, 2, 1, 1) |
|
364 | 371 | self.volOutputblocksperfile = QtGui.QLineEdit(self.taboutputVoltage) |
|
365 | 372 | self.volOutputblocksperfile.setObjectName(_fromUtf8("volOutputblocksperfile")) |
|
366 | 373 | self.gridLayout_12.addWidget(self.volOutputblocksperfile, 3, 2, 1, 1) |
|
367 | 374 | self.label_7 = QtGui.QLabel(self.taboutputVoltage) |
|
368 | 375 | self.label_7.setObjectName(_fromUtf8("label_7")) |
|
369 | 376 | self.gridLayout_12.addWidget(self.label_7, 3, 0, 1, 1) |
|
370 | 377 | self.label_35 = QtGui.QLabel(self.taboutputVoltage) |
|
371 | 378 | self.label_35.setObjectName(_fromUtf8("label_35")) |
|
372 | 379 | self.gridLayout_12.addWidget(self.label_35, 4, 0, 1, 1) |
|
373 | 380 | self.volOutputprofilesperblock = QtGui.QLineEdit(self.taboutputVoltage) |
|
374 | 381 | self.volOutputprofilesperblock.setObjectName(_fromUtf8("volOutputprofilesperblock")) |
|
375 | 382 | self.gridLayout_12.addWidget(self.volOutputprofilesperblock, 4, 2, 1, 1) |
|
376 | 383 | self.tabWidgetVoltage.addTab(self.taboutputVoltage, _fromUtf8("")) |
|
377 | 384 | self.gridLayout_3.addWidget(self.tabWidgetVoltage, 0, 1, 1, 1) |
|
378 | 385 | self.tabWidgetProject.addTab(self.tabVoltage, _fromUtf8("")) |
|
379 | 386 | self.tabSpectra = QtGui.QWidget() |
|
380 | 387 | self.tabSpectra.setObjectName(_fromUtf8("tabSpectra")) |
|
381 | 388 | self.gridLayout_7 = QtGui.QGridLayout(self.tabSpectra) |
|
382 | 389 | self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) |
|
383 | 390 | self.frame_5 = QtGui.QFrame(self.tabSpectra) |
|
384 | 391 | self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel) |
|
385 | 392 | self.frame_5.setFrameShadow(QtGui.QFrame.Raised) |
|
386 | 393 | self.frame_5.setObjectName(_fromUtf8("frame_5")) |
|
387 | 394 | self.gridLayout_18 = QtGui.QGridLayout(self.frame_5) |
|
388 | 395 | self.gridLayout_18.setObjectName(_fromUtf8("gridLayout_18")) |
|
389 | 396 | self.specOpOk = QtGui.QPushButton(self.frame_5) |
|
390 | 397 | self.specOpOk.setObjectName(_fromUtf8("specOpOk")) |
|
391 | 398 | self.gridLayout_18.addWidget(self.specOpOk, 0, 0, 1, 1) |
|
392 | 399 | self.specGraphClear = QtGui.QPushButton(self.frame_5) |
|
393 | 400 | self.specGraphClear.setObjectName(_fromUtf8("specGraphClear")) |
|
394 | 401 | self.gridLayout_18.addWidget(self.specGraphClear, 0, 1, 1, 1) |
|
395 | 402 | self.gridLayout_7.addWidget(self.frame_5, 1, 1, 1, 1) |
|
396 | 403 | self.tabWidgetSpectra = QtGui.QTabWidget(self.tabSpectra) |
|
397 | 404 | self.tabWidgetSpectra.setObjectName(_fromUtf8("tabWidgetSpectra")) |
|
398 | 405 | self.tabopSpectra = QtGui.QWidget() |
|
399 | 406 | self.tabopSpectra.setObjectName(_fromUtf8("tabopSpectra")) |
|
400 | 407 | self.gridLayout_5 = QtGui.QGridLayout(self.tabopSpectra) |
|
401 | 408 | self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) |
|
402 | 409 | self.specOpCebCrossSpectra = QtGui.QCheckBox(self.tabopSpectra) |
|
403 | 410 | self.specOpCebCrossSpectra.setObjectName(_fromUtf8("specOpCebCrossSpectra")) |
|
404 | 411 | self.gridLayout_5.addWidget(self.specOpCebCrossSpectra, 4, 0, 1, 2) |
|
405 | 412 | self.specOpComChannel = QtGui.QComboBox(self.tabopSpectra) |
|
406 | 413 | self.specOpComChannel.setObjectName(_fromUtf8("specOpComChannel")) |
|
407 | 414 | self.specOpComChannel.addItem(_fromUtf8("")) |
|
408 | 415 | self.specOpComChannel.addItem(_fromUtf8("")) |
|
409 | 416 | self.gridLayout_5.addWidget(self.specOpComChannel, 8, 0, 1, 2) |
|
410 | 417 | self.specOpChannel = QtGui.QLineEdit(self.tabopSpectra) |
|
411 | 418 | self.specOpChannel.setObjectName(_fromUtf8("specOpChannel")) |
|
412 | 419 | self.gridLayout_5.addWidget(self.specOpChannel, 8, 3, 1, 2) |
|
413 | 420 | self.specOpComHeights = QtGui.QComboBox(self.tabopSpectra) |
|
414 | 421 | self.specOpComHeights.setObjectName(_fromUtf8("specOpComHeights")) |
|
415 | 422 | self.specOpComHeights.addItem(_fromUtf8("")) |
|
416 | 423 | self.specOpComHeights.addItem(_fromUtf8("")) |
|
417 | 424 | self.gridLayout_5.addWidget(self.specOpComHeights, 11, 0, 1, 2) |
|
418 | 425 | self.specOpHeights = QtGui.QLineEdit(self.tabopSpectra) |
|
419 | 426 | self.specOpHeights.setObjectName(_fromUtf8("specOpHeights")) |
|
420 | 427 | self.gridLayout_5.addWidget(self.specOpHeights, 11, 3, 1, 2) |
|
421 | 428 | self.specOpIncoherent = QtGui.QLineEdit(self.tabopSpectra) |
|
422 | 429 | self.specOpIncoherent.setObjectName(_fromUtf8("specOpIncoherent")) |
|
423 | 430 | self.gridLayout_5.addWidget(self.specOpIncoherent, 13, 3, 1, 2) |
|
424 | 431 | self.specOpCebRemoveDC = QtGui.QCheckBox(self.tabopSpectra) |
|
425 | 432 | self.specOpCebRemoveDC.setObjectName(_fromUtf8("specOpCebRemoveDC")) |
|
426 | 433 | self.gridLayout_5.addWidget(self.specOpCebRemoveDC, 14, 0, 1, 2) |
|
427 | 434 | self.specOpCebHeights = QtGui.QCheckBox(self.tabopSpectra) |
|
428 | 435 | self.specOpCebHeights.setObjectName(_fromUtf8("specOpCebHeights")) |
|
429 | 436 | self.gridLayout_5.addWidget(self.specOpCebHeights, 9, 0, 1, 1) |
|
430 | 437 | self.specOpCebChannel = QtGui.QCheckBox(self.tabopSpectra) |
|
431 | 438 | self.specOpCebChannel.setObjectName(_fromUtf8("specOpCebChannel")) |
|
432 | 439 | self.gridLayout_5.addWidget(self.specOpCebChannel, 7, 0, 1, 1) |
|
433 | 440 | self.specOppairsList = QtGui.QLineEdit(self.tabopSpectra) |
|
434 | 441 | self.specOppairsList.setObjectName(_fromUtf8("specOppairsList")) |
|
435 | 442 | self.gridLayout_5.addWidget(self.specOppairsList, 6, 3, 1, 2) |
|
436 | 443 | self.specOpnFFTpoints = QtGui.QLineEdit(self.tabopSpectra) |
|
437 | 444 | self.specOpnFFTpoints.setObjectName(_fromUtf8("specOpnFFTpoints")) |
|
438 | 445 | self.gridLayout_5.addWidget(self.specOpnFFTpoints, 2, 3, 1, 2) |
|
439 | 446 | self.label_31 = QtGui.QLabel(self.tabopSpectra) |
|
440 | 447 | self.label_31.setObjectName(_fromUtf8("label_31")) |
|
441 | 448 | self.gridLayout_5.addWidget(self.label_31, 6, 0, 1, 2) |
|
442 | 449 | self.label_26 = QtGui.QLabel(self.tabopSpectra) |
|
443 | 450 | self.label_26.setObjectName(_fromUtf8("label_26")) |
|
444 | 451 | self.gridLayout_5.addWidget(self.label_26, 2, 0, 1, 2) |
|
445 | 452 | self.specOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectra) |
|
446 | 453 | self.specOpCebIncoherent.setObjectName(_fromUtf8("specOpCebIncoherent")) |
|
447 | 454 | self.gridLayout_5.addWidget(self.specOpCebIncoherent, 12, 0, 1, 1) |
|
448 | 455 | self.specOpCobIncInt = QtGui.QComboBox(self.tabopSpectra) |
|
449 | 456 | self.specOpCobIncInt.setObjectName(_fromUtf8("specOpCobIncInt")) |
|
450 | 457 | self.specOpCobIncInt.addItem(_fromUtf8("")) |
|
451 | 458 | self.specOpCobIncInt.addItem(_fromUtf8("")) |
|
452 | 459 | self.gridLayout_5.addWidget(self.specOpCobIncInt, 13, 0, 1, 2) |
|
453 | 460 | spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
454 | 461 | self.gridLayout_5.addItem(spacerItem9, 12, 3, 1, 1) |
|
455 | 462 | self.specOpCebRadarfrequency = QtGui.QCheckBox(self.tabopSpectra) |
|
456 | 463 | self.specOpCebRadarfrequency.setObjectName(_fromUtf8("specOpCebRadarfrequency")) |
|
457 | 464 | self.gridLayout_5.addWidget(self.specOpCebRadarfrequency, 0, 0, 1, 2) |
|
458 | 465 | spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
459 | 466 | self.gridLayout_5.addItem(spacerItem10, 9, 3, 1, 1) |
|
460 | 467 | spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
461 | 468 | self.gridLayout_5.addItem(spacerItem11, 7, 3, 1, 1) |
|
462 | 469 | self.specOpRadarfrequency = QtGui.QLineEdit(self.tabopSpectra) |
|
463 | 470 | self.specOpRadarfrequency.setObjectName(_fromUtf8("specOpRadarfrequency")) |
|
464 | 471 | self.gridLayout_5.addWidget(self.specOpRadarfrequency, 0, 3, 1, 2) |
|
465 | 472 | spacerItem12 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
466 | 473 | self.gridLayout_5.addItem(spacerItem12, 4, 3, 1, 1) |
|
467 | 474 | self.label_21 = QtGui.QLabel(self.tabopSpectra) |
|
468 | 475 | self.label_21.setObjectName(_fromUtf8("label_21")) |
|
469 | 476 | self.gridLayout_5.addWidget(self.label_21, 1, 0, 1, 1) |
|
470 | 477 | self.specOpProfiles = QtGui.QLineEdit(self.tabopSpectra) |
|
471 | 478 | self.specOpProfiles.setObjectName(_fromUtf8("specOpProfiles")) |
|
472 | 479 | self.gridLayout_5.addWidget(self.specOpProfiles, 1, 3, 1, 2) |
|
473 | 480 | self.specOpCebRemoveInt = QtGui.QCheckBox(self.tabopSpectra) |
|
474 | 481 | self.specOpCebRemoveInt.setObjectName(_fromUtf8("specOpCebRemoveInt")) |
|
475 | 482 | self.gridLayout_5.addWidget(self.specOpCebRemoveInt, 15, 0, 1, 1) |
|
476 | 483 | spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
477 | 484 | self.gridLayout_5.addItem(spacerItem13, 15, 3, 1, 1) |
|
478 | 485 | self.label_70 = QtGui.QLabel(self.tabopSpectra) |
|
479 | 486 | self.label_70.setObjectName(_fromUtf8("label_70")) |
|
480 | 487 | self.gridLayout_5.addWidget(self.label_70, 3, 0, 1, 1) |
|
481 | 488 | self.specOpCebgetNoise = QtGui.QCheckBox(self.tabopSpectra) |
|
482 | 489 | self.specOpCebgetNoise.setObjectName(_fromUtf8("specOpCebgetNoise")) |
|
483 | 490 | self.gridLayout_5.addWidget(self.specOpCebgetNoise, 16, 0, 1, 1) |
|
484 | 491 | self.specOpippFactor = QtGui.QLineEdit(self.tabopSpectra) |
|
485 | 492 | self.specOpippFactor.setObjectName(_fromUtf8("specOpippFactor")) |
|
486 | 493 | self.gridLayout_5.addWidget(self.specOpippFactor, 3, 3, 1, 2) |
|
487 | 494 | self.specOpComRemoveDC = QtGui.QComboBox(self.tabopSpectra) |
|
488 | 495 | self.specOpComRemoveDC.setObjectName(_fromUtf8("specOpComRemoveDC")) |
|
489 | 496 | self.specOpComRemoveDC.addItem(_fromUtf8("")) |
|
490 | 497 | self.specOpComRemoveDC.addItem(_fromUtf8("")) |
|
491 | 498 | self.gridLayout_5.addWidget(self.specOpComRemoveDC, 14, 3, 1, 2) |
|
492 | 499 | self.specOpgetNoise = QtGui.QLineEdit(self.tabopSpectra) |
|
493 | 500 | self.specOpgetNoise.setObjectName(_fromUtf8("specOpgetNoise")) |
|
494 | 501 | self.gridLayout_5.addWidget(self.specOpgetNoise, 16, 3, 1, 2) |
|
495 | 502 | self.tabWidgetSpectra.addTab(self.tabopSpectra, _fromUtf8("")) |
|
496 | 503 | self.tabgraphSpectra = QtGui.QWidget() |
|
497 | 504 | self.tabgraphSpectra.setObjectName(_fromUtf8("tabgraphSpectra")) |
|
498 | 505 | self.gridLayout_9 = QtGui.QGridLayout(self.tabgraphSpectra) |
|
499 | 506 | self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) |
|
500 | 507 | self.label_44 = QtGui.QLabel(self.tabgraphSpectra) |
|
501 | 508 | self.label_44.setObjectName(_fromUtf8("label_44")) |
|
502 | 509 | self.gridLayout_9.addWidget(self.label_44, 10, 0, 1, 1) |
|
503 | 510 | spacerItem14 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
504 | 511 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) |
|
505 | 512 | self.label_20 = QtGui.QLabel(self.tabgraphSpectra) |
|
506 | 513 | self.label_20.setObjectName(_fromUtf8("label_20")) |
|
507 | 514 | self.gridLayout_9.addWidget(self.label_20, 21, 0, 1, 1) |
|
508 | 515 | self.specGraphSaveRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
509 | 516 | self.specGraphSaveRTInoise.setText(_fromUtf8("")) |
|
510 | 517 | self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise")) |
|
511 | 518 | self.gridLayout_9.addWidget(self.specGraphSaveRTInoise, 13, 4, 1, 1) |
|
512 | 519 | self.specGgraphmagnitud = QtGui.QLineEdit(self.tabgraphSpectra) |
|
513 | 520 | self.specGgraphmagnitud.setObjectName(_fromUtf8("specGgraphmagnitud")) |
|
514 | 521 | self.gridLayout_9.addWidget(self.specGgraphmagnitud, 20, 1, 1, 7) |
|
515 | 522 | self.specGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectra) |
|
516 | 523 | self.specGraphSaveSpectra.setText(_fromUtf8("")) |
|
517 | 524 | self.specGraphSaveSpectra.setObjectName(_fromUtf8("specGraphSaveSpectra")) |
|
518 | 525 | self.gridLayout_9.addWidget(self.specGraphSaveSpectra, 6, 4, 1, 1) |
|
519 | 526 | self.specGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectra) |
|
520 | 527 | self.specGgraphChannelList.setObjectName(_fromUtf8("specGgraphChannelList")) |
|
521 | 528 | self.gridLayout_9.addWidget(self.specGgraphChannelList, 15, 1, 1, 7) |
|
522 | 529 | self.label_25 = QtGui.QLabel(self.tabgraphSpectra) |
|
523 | 530 | self.label_25.setObjectName(_fromUtf8("label_25")) |
|
524 | 531 | self.gridLayout_9.addWidget(self.label_25, 2, 0, 1, 1) |
|
525 | 532 | self.specGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectra) |
|
526 | 533 | self.specGgraphTminTmax.setObjectName(_fromUtf8("specGgraphTminTmax")) |
|
527 | 534 | self.gridLayout_9.addWidget(self.specGgraphTminTmax, 21, 1, 1, 7) |
|
528 | 535 | spacerItem15 = QtGui.QSpacerItem(28, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
529 | 536 | self.gridLayout_9.addItem(spacerItem15, 27, 6, 1, 2) |
|
530 | 537 | spacerItem16 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
531 | 538 | self.gridLayout_9.addItem(spacerItem16, 3, 5, 1, 1) |
|
532 | 539 | self.label_42 = QtGui.QLabel(self.tabgraphSpectra) |
|
533 | 540 | self.label_42.setObjectName(_fromUtf8("label_42")) |
|
534 | 541 | self.gridLayout_9.addWidget(self.label_42, 9, 0, 1, 1) |
|
535 | 542 | self.label_16 = QtGui.QLabel(self.tabgraphSpectra) |
|
536 | 543 | self.label_16.setObjectName(_fromUtf8("label_16")) |
|
537 | 544 | self.gridLayout_9.addWidget(self.label_16, 18, 0, 1, 1) |
|
538 | 545 | self.label_17 = QtGui.QLabel(self.tabgraphSpectra) |
|
539 | 546 | self.label_17.setObjectName(_fromUtf8("label_17")) |
|
540 | 547 | self.gridLayout_9.addWidget(self.label_17, 19, 0, 1, 1) |
|
541 | 548 | self.label_18 = QtGui.QLabel(self.tabgraphSpectra) |
|
542 | 549 | self.label_18.setObjectName(_fromUtf8("label_18")) |
|
543 | 550 | self.gridLayout_9.addWidget(self.label_18, 20, 0, 1, 1) |
|
544 | 551 | self.specGgraphFreq = QtGui.QLineEdit(self.tabgraphSpectra) |
|
545 | 552 | self.specGgraphFreq.setObjectName(_fromUtf8("specGgraphFreq")) |
|
546 | 553 | self.gridLayout_9.addWidget(self.specGgraphFreq, 16, 1, 1, 7) |
|
547 | 554 | self.specGgraphHeight = QtGui.QLineEdit(self.tabgraphSpectra) |
|
548 | 555 | self.specGgraphHeight.setObjectName(_fromUtf8("specGgraphHeight")) |
|
549 | 556 | self.gridLayout_9.addWidget(self.specGgraphHeight, 18, 1, 1, 7) |
|
550 | 557 | spacerItem17 = QtGui.QSpacerItem(49, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
551 | 558 | self.gridLayout_9.addItem(spacerItem17, 27, 0, 1, 1) |
|
552 | 559 | self.label_24 = QtGui.QLabel(self.tabgraphSpectra) |
|
553 | 560 | self.label_24.setObjectName(_fromUtf8("label_24")) |
|
554 | 561 | self.gridLayout_9.addWidget(self.label_24, 0, 0, 1, 1) |
|
555 | 562 | self.specGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectra) |
|
556 | 563 | self.specGraphPrefix.setObjectName(_fromUtf8("specGraphPrefix")) |
|
557 | 564 | self.gridLayout_9.addWidget(self.specGraphPrefix, 2, 1, 1, 7) |
|
558 | 565 | self.specGgraphDbsrange = QtGui.QLineEdit(self.tabgraphSpectra) |
|
559 | 566 | self.specGgraphDbsrange.setObjectName(_fromUtf8("specGgraphDbsrange")) |
|
560 | 567 | self.gridLayout_9.addWidget(self.specGgraphDbsrange, 19, 1, 1, 7) |
|
561 | 568 | self.label_46 = QtGui.QLabel(self.tabgraphSpectra) |
|
562 | 569 | self.label_46.setObjectName(_fromUtf8("label_46")) |
|
563 | 570 | self.gridLayout_9.addWidget(self.label_46, 11, 0, 1, 1) |
|
564 | 571 | self.label_22 = QtGui.QLabel(self.tabgraphSpectra) |
|
565 | 572 | self.label_22.setObjectName(_fromUtf8("label_22")) |
|
566 | 573 | self.gridLayout_9.addWidget(self.label_22, 16, 0, 1, 1) |
|
567 | 574 | self.specGraphPath = QtGui.QLineEdit(self.tabgraphSpectra) |
|
568 | 575 | self.specGraphPath.setObjectName(_fromUtf8("specGraphPath")) |
|
569 | 576 | self.gridLayout_9.addWidget(self.specGraphPath, 0, 1, 1, 6) |
|
570 | 577 | self.label_41 = QtGui.QLabel(self.tabgraphSpectra) |
|
571 | 578 | self.label_41.setObjectName(_fromUtf8("label_41")) |
|
572 | 579 | self.gridLayout_9.addWidget(self.label_41, 8, 0, 1, 1) |
|
573 | 580 | self.specGraphToolPath = QtGui.QToolButton(self.tabgraphSpectra) |
|
574 | 581 | self.specGraphToolPath.setObjectName(_fromUtf8("specGraphToolPath")) |
|
575 | 582 | self.gridLayout_9.addWidget(self.specGraphToolPath, 0, 7, 1, 1) |
|
576 | 583 | self.label_6 = QtGui.QLabel(self.tabgraphSpectra) |
|
577 | 584 | self.label_6.setObjectName(_fromUtf8("label_6")) |
|
578 | 585 | self.gridLayout_9.addWidget(self.label_6, 15, 0, 1, 1) |
|
579 | 586 | self.label_40 = QtGui.QLabel(self.tabgraphSpectra) |
|
580 | 587 | self.label_40.setObjectName(_fromUtf8("label_40")) |
|
581 | 588 | self.gridLayout_9.addWidget(self.label_40, 6, 0, 1, 1) |
|
582 | 589 | self.specGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
583 | 590 | self.specGraphCebSpectraplot.setText(_fromUtf8("")) |
|
584 | 591 | self.specGraphCebSpectraplot.setObjectName(_fromUtf8("specGraphCebSpectraplot")) |
|
585 | 592 | self.gridLayout_9.addWidget(self.specGraphCebSpectraplot, 6, 2, 1, 1) |
|
586 | 593 | self.specGraphCebCrossSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
587 | 594 | self.specGraphCebCrossSpectraplot.setText(_fromUtf8("")) |
|
588 | 595 | self.specGraphCebCrossSpectraplot.setObjectName(_fromUtf8("specGraphCebCrossSpectraplot")) |
|
589 | 596 | self.gridLayout_9.addWidget(self.specGraphCebCrossSpectraplot, 8, 2, 1, 1) |
|
590 | 597 | self.specGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
591 | 598 | self.specGraphCebRTIplot.setText(_fromUtf8("")) |
|
592 | 599 | self.specGraphCebRTIplot.setObjectName(_fromUtf8("specGraphCebRTIplot")) |
|
593 | 600 | self.gridLayout_9.addWidget(self.specGraphCebRTIplot, 9, 2, 1, 1) |
|
594 | 601 | self.specGraphCebCoherencmap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
595 | 602 | self.specGraphCebCoherencmap.setText(_fromUtf8("")) |
|
596 | 603 | self.specGraphCebCoherencmap.setObjectName(_fromUtf8("specGraphCebCoherencmap")) |
|
597 | 604 | self.gridLayout_9.addWidget(self.specGraphCebCoherencmap, 10, 2, 1, 1) |
|
598 | 605 | self.specGraphPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
599 | 606 | self.specGraphPowerprofile.setText(_fromUtf8("")) |
|
600 | 607 | self.specGraphPowerprofile.setObjectName(_fromUtf8("specGraphPowerprofile")) |
|
601 | 608 | self.gridLayout_9.addWidget(self.specGraphPowerprofile, 11, 2, 1, 1) |
|
602 | 609 | self.specGraphSaveCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
603 | 610 | self.specGraphSaveCross.setText(_fromUtf8("")) |
|
604 | 611 | self.specGraphSaveCross.setObjectName(_fromUtf8("specGraphSaveCross")) |
|
605 | 612 | self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, 4, 1, 1) |
|
606 | 613 | self.specGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectra) |
|
607 | 614 | self.specGraphftpSpectra.setText(_fromUtf8("")) |
|
608 | 615 | self.specGraphftpSpectra.setObjectName(_fromUtf8("specGraphftpSpectra")) |
|
609 | 616 | self.gridLayout_9.addWidget(self.specGraphftpSpectra, 6, 6, 1, 1) |
|
610 | 617 | spacerItem18 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
611 | 618 | self.gridLayout_9.addItem(spacerItem18, 4, 3, 1, 1) |
|
612 | 619 | self.specGraphSavePowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
613 | 620 | self.specGraphSavePowerprofile.setText(_fromUtf8("")) |
|
614 | 621 | self.specGraphSavePowerprofile.setObjectName(_fromUtf8("specGraphSavePowerprofile")) |
|
615 | 622 | self.gridLayout_9.addWidget(self.specGraphSavePowerprofile, 11, 4, 1, 1) |
|
616 | 623 | self.specGraphSaveCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
617 | 624 | self.specGraphSaveCoherencemap.setText(_fromUtf8("")) |
|
618 | 625 | self.specGraphSaveCoherencemap.setObjectName(_fromUtf8("specGraphSaveCoherencemap")) |
|
619 | 626 | self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, 4, 1, 1) |
|
620 | 627 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
621 | 628 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 1, 1) |
|
622 | 629 | self.specGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectra) |
|
623 | 630 | self.specGgraphftpratio.setObjectName(_fromUtf8("specGgraphftpratio")) |
|
624 | 631 | self.gridLayout_9.addWidget(self.specGgraphftpratio, 23, 1, 1, 7) |
|
625 | 632 | self.label_43 = QtGui.QLabel(self.tabgraphSpectra) |
|
626 | 633 | self.label_43.setObjectName(_fromUtf8("label_43")) |
|
627 | 634 | self.gridLayout_9.addWidget(self.label_43, 3, 2, 2, 1) |
|
628 | 635 | self.specGraphftpCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
629 | 636 | self.specGraphftpCross.setText(_fromUtf8("")) |
|
630 | 637 | self.specGraphftpCross.setObjectName(_fromUtf8("specGraphftpCross")) |
|
631 | 638 | self.gridLayout_9.addWidget(self.specGraphftpCross, 8, 6, 1, 1) |
|
632 | 639 | self.label_29 = QtGui.QLabel(self.tabgraphSpectra) |
|
633 | 640 | self.label_29.setObjectName(_fromUtf8("label_29")) |
|
634 | 641 | self.gridLayout_9.addWidget(self.label_29, 23, 0, 1, 1) |
|
635 | 642 | self.label_47 = QtGui.QLabel(self.tabgraphSpectra) |
|
636 | 643 | self.label_47.setObjectName(_fromUtf8("label_47")) |
|
637 | 644 | self.gridLayout_9.addWidget(self.label_47, 3, 4, 2, 1) |
|
638 | 645 | self.specGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
639 | 646 | self.specGraphftpRTIplot.setText(_fromUtf8("")) |
|
640 | 647 | self.specGraphftpRTIplot.setObjectName(_fromUtf8("specGraphftpRTIplot")) |
|
641 | 648 | self.gridLayout_9.addWidget(self.specGraphftpRTIplot, 9, 6, 1, 1) |
|
642 | 649 | self.specGraphftpCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
643 | 650 | self.specGraphftpCoherencemap.setText(_fromUtf8("")) |
|
644 | 651 | self.specGraphftpCoherencemap.setObjectName(_fromUtf8("specGraphftpCoherencemap")) |
|
645 | 652 | self.gridLayout_9.addWidget(self.specGraphftpCoherencemap, 10, 6, 1, 1) |
|
646 | 653 | self.specGraphftpPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
647 | 654 | self.specGraphftpPowerprofile.setText(_fromUtf8("")) |
|
648 | 655 | self.specGraphftpPowerprofile.setObjectName(_fromUtf8("specGraphftpPowerprofile")) |
|
649 | 656 | self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, 6, 1, 1) |
|
650 | 657 | self.label_19 = QtGui.QLabel(self.tabgraphSpectra) |
|
651 | 658 | self.label_19.setObjectName(_fromUtf8("label_19")) |
|
652 | 659 | self.gridLayout_9.addWidget(self.label_19, 3, 6, 2, 2) |
|
653 | 660 | self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
654 | 661 | self.specGraphSaveRTIplot.setText(_fromUtf8("")) |
|
655 | 662 | self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot")) |
|
656 | 663 | self.gridLayout_9.addWidget(self.specGraphSaveRTIplot, 9, 4, 1, 1) |
|
657 | 664 | self.label_45 = QtGui.QLabel(self.tabgraphSpectra) |
|
658 | 665 | self.label_45.setObjectName(_fromUtf8("label_45")) |
|
659 | 666 | self.gridLayout_9.addWidget(self.label_45, 13, 0, 1, 1) |
|
660 | 667 | self.specGraphftpRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
661 | 668 | self.specGraphftpRTInoise.setText(_fromUtf8("")) |
|
662 | 669 | self.specGraphftpRTInoise.setObjectName(_fromUtf8("specGraphftpRTInoise")) |
|
663 | 670 | self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, 6, 1, 1) |
|
664 | 671 | self.specGraphCebRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
665 | 672 | self.specGraphCebRTInoise.setText(_fromUtf8("")) |
|
666 | 673 | self.specGraphCebRTInoise.setObjectName(_fromUtf8("specGraphCebRTInoise")) |
|
667 | 674 | self.gridLayout_9.addWidget(self.specGraphCebRTInoise, 13, 2, 1, 1) |
|
668 | 675 | self.label_48 = QtGui.QLabel(self.tabgraphSpectra) |
|
669 | 676 | self.label_48.setObjectName(_fromUtf8("label_48")) |
|
670 | 677 | self.gridLayout_9.addWidget(self.label_48, 22, 0, 1, 1) |
|
671 | 678 | self.specGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectra) |
|
672 | 679 | self.specGgraphTimeRange.setObjectName(_fromUtf8("specGgraphTimeRange")) |
|
673 | 680 | self.gridLayout_9.addWidget(self.specGgraphTimeRange, 22, 1, 1, 7) |
|
674 | 681 | self.tabWidgetSpectra.addTab(self.tabgraphSpectra, _fromUtf8("")) |
|
675 | 682 | self.taboutputSpectra = QtGui.QWidget() |
|
676 | 683 | self.taboutputSpectra.setObjectName(_fromUtf8("taboutputSpectra")) |
|
677 | 684 | self.gridLayout_11 = QtGui.QGridLayout(self.taboutputSpectra) |
|
678 | 685 | self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11")) |
|
679 | 686 | self.label_39 = QtGui.QLabel(self.taboutputSpectra) |
|
680 | 687 | self.label_39.setObjectName(_fromUtf8("label_39")) |
|
681 | 688 | self.gridLayout_11.addWidget(self.label_39, 0, 0, 1, 1) |
|
682 | 689 | self.specOutputComData = QtGui.QComboBox(self.taboutputSpectra) |
|
683 | 690 | self.specOutputComData.setObjectName(_fromUtf8("specOutputComData")) |
|
684 | 691 | self.specOutputComData.addItem(_fromUtf8("")) |
|
685 | 692 | self.gridLayout_11.addWidget(self.specOutputComData, 0, 2, 1, 2) |
|
686 | 693 | self.label_34 = QtGui.QLabel(self.taboutputSpectra) |
|
687 | 694 | self.label_34.setObjectName(_fromUtf8("label_34")) |
|
688 | 695 | self.gridLayout_11.addWidget(self.label_34, 1, 0, 1, 1) |
|
689 | 696 | self.specOutputPath = QtGui.QLineEdit(self.taboutputSpectra) |
|
690 | 697 | self.specOutputPath.setObjectName(_fromUtf8("specOutputPath")) |
|
691 | 698 | self.gridLayout_11.addWidget(self.specOutputPath, 1, 2, 1, 1) |
|
692 | 699 | spacerItem20 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
693 | 700 | self.gridLayout_11.addItem(spacerItem20, 4, 2, 1, 1) |
|
694 | 701 | self.specOutputToolPath = QtGui.QToolButton(self.taboutputSpectra) |
|
695 | 702 | self.specOutputToolPath.setObjectName(_fromUtf8("specOutputToolPath")) |
|
696 | 703 | self.gridLayout_11.addWidget(self.specOutputToolPath, 1, 3, 1, 1) |
|
697 | 704 | self.specOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectra) |
|
698 | 705 | self.specOutputblocksperfile.setObjectName(_fromUtf8("specOutputblocksperfile")) |
|
699 | 706 | self.gridLayout_11.addWidget(self.specOutputblocksperfile, 2, 2, 1, 1) |
|
700 | 707 | self.label_9 = QtGui.QLabel(self.taboutputSpectra) |
|
701 | 708 | self.label_9.setObjectName(_fromUtf8("label_9")) |
|
702 | 709 | self.gridLayout_11.addWidget(self.label_9, 2, 0, 1, 2) |
|
703 | 710 | self.label_38 = QtGui.QLabel(self.taboutputSpectra) |
|
704 | 711 | self.label_38.setObjectName(_fromUtf8("label_38")) |
|
705 | 712 | self.gridLayout_11.addWidget(self.label_38, 3, 0, 1, 1) |
|
706 | 713 | self.specOutputprofileperblock = QtGui.QLineEdit(self.taboutputSpectra) |
|
707 | 714 | self.specOutputprofileperblock.setObjectName(_fromUtf8("specOutputprofileperblock")) |
|
708 | 715 | self.gridLayout_11.addWidget(self.specOutputprofileperblock, 3, 2, 1, 1) |
|
709 | 716 | self.tabWidgetSpectra.addTab(self.taboutputSpectra, _fromUtf8("")) |
|
710 | 717 | self.gridLayout_7.addWidget(self.tabWidgetSpectra, 0, 1, 1, 1) |
|
711 | 718 | self.tabWidgetProject.addTab(self.tabSpectra, _fromUtf8("")) |
|
712 | 719 | self.tabSpectraHeis = QtGui.QWidget() |
|
713 | 720 | self.tabSpectraHeis.setObjectName(_fromUtf8("tabSpectraHeis")) |
|
714 | 721 | self.gridLayout_23 = QtGui.QGridLayout(self.tabSpectraHeis) |
|
715 | 722 | self.gridLayout_23.setObjectName(_fromUtf8("gridLayout_23")) |
|
716 | 723 | self.frame_6 = QtGui.QFrame(self.tabSpectraHeis) |
|
717 | 724 | self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) |
|
718 | 725 | self.frame_6.setFrameShadow(QtGui.QFrame.Raised) |
|
719 | 726 | self.frame_6.setObjectName(_fromUtf8("frame_6")) |
|
720 | 727 | self.gridLayout_22 = QtGui.QGridLayout(self.frame_6) |
|
721 | 728 | self.gridLayout_22.setObjectName(_fromUtf8("gridLayout_22")) |
|
722 | 729 | self.specHeisGraphClear = QtGui.QPushButton(self.frame_6) |
|
723 | 730 | self.specHeisGraphClear.setObjectName(_fromUtf8("specHeisGraphClear")) |
|
724 | 731 | self.gridLayout_22.addWidget(self.specHeisGraphClear, 0, 1, 1, 1) |
|
725 | 732 | self.specHeisOpOk = QtGui.QPushButton(self.frame_6) |
|
726 | 733 | self.specHeisOpOk.setObjectName(_fromUtf8("specHeisOpOk")) |
|
727 | 734 | self.gridLayout_22.addWidget(self.specHeisOpOk, 0, 0, 1, 1) |
|
728 | 735 | self.gridLayout_23.addWidget(self.frame_6, 1, 0, 1, 1) |
|
729 | 736 | self.tabWidgetSpectraHeis = QtGui.QTabWidget(self.tabSpectraHeis) |
|
730 | 737 | self.tabWidgetSpectraHeis.setObjectName(_fromUtf8("tabWidgetSpectraHeis")) |
|
731 | 738 | self.tabopSpectraHeis = QtGui.QWidget() |
|
732 | 739 | self.tabopSpectraHeis.setObjectName(_fromUtf8("tabopSpectraHeis")) |
|
733 | 740 | self.gridLayout_21 = QtGui.QGridLayout(self.tabopSpectraHeis) |
|
734 | 741 | self.gridLayout_21.setObjectName(_fromUtf8("gridLayout_21")) |
|
735 | 742 | spacerItem21 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
736 | 743 | self.gridLayout_21.addItem(spacerItem21, 0, 1, 1, 1) |
|
737 | 744 | self.specHeisOpCobIncInt = QtGui.QComboBox(self.tabopSpectraHeis) |
|
738 | 745 | self.specHeisOpCobIncInt.setObjectName(_fromUtf8("specHeisOpCobIncInt")) |
|
739 | 746 | self.specHeisOpCobIncInt.addItem(_fromUtf8("")) |
|
740 | 747 | self.gridLayout_21.addWidget(self.specHeisOpCobIncInt, 1, 0, 1, 1) |
|
741 | 748 | self.specHeisOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectraHeis) |
|
742 | 749 | self.specHeisOpCebIncoherent.setObjectName(_fromUtf8("specHeisOpCebIncoherent")) |
|
743 | 750 | self.gridLayout_21.addWidget(self.specHeisOpCebIncoherent, 0, 0, 1, 1) |
|
744 | 751 | self.specHeisOpIncoherent = QtGui.QLineEdit(self.tabopSpectraHeis) |
|
745 | 752 | self.specHeisOpIncoherent.setObjectName(_fromUtf8("specHeisOpIncoherent")) |
|
746 | 753 | self.gridLayout_21.addWidget(self.specHeisOpIncoherent, 1, 1, 1, 1) |
|
747 | 754 | spacerItem22 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
748 | 755 | self.gridLayout_21.addItem(spacerItem22, 2, 0, 1, 1) |
|
749 | 756 | self.tabWidgetSpectraHeis.addTab(self.tabopSpectraHeis, _fromUtf8("")) |
|
750 | 757 | self.tabgraphSpectraHeis = QtGui.QWidget() |
|
751 | 758 | self.tabgraphSpectraHeis.setObjectName(_fromUtf8("tabgraphSpectraHeis")) |
|
752 | 759 | self.gridLayout_20 = QtGui.QGridLayout(self.tabgraphSpectraHeis) |
|
753 | 760 | self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20")) |
|
754 | 761 | self.label_54 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
755 | 762 | self.label_54.setObjectName(_fromUtf8("label_54")) |
|
756 | 763 | self.gridLayout_20.addWidget(self.label_54, 1, 0, 1, 1) |
|
757 | 764 | self.specHeisGraphToolPath = QtGui.QToolButton(self.tabgraphSpectraHeis) |
|
758 | 765 | self.specHeisGraphToolPath.setObjectName(_fromUtf8("specHeisGraphToolPath")) |
|
759 | 766 | self.gridLayout_20.addWidget(self.specHeisGraphToolPath, 0, 6, 1, 1) |
|
760 | 767 | self.specHeisGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
761 | 768 | self.specHeisGraphCebRTIplot.setText(_fromUtf8("")) |
|
762 | 769 | self.specHeisGraphCebRTIplot.setObjectName(_fromUtf8("specHeisGraphCebRTIplot")) |
|
763 | 770 | self.gridLayout_20.addWidget(self.specHeisGraphCebRTIplot, 4, 2, 1, 1) |
|
764 | 771 | self.label_62 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
765 | 772 | self.label_62.setObjectName(_fromUtf8("label_62")) |
|
766 | 773 | self.gridLayout_20.addWidget(self.label_62, 7, 0, 1, 1) |
|
767 | 774 | self.label_63 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
768 | 775 | self.label_63.setObjectName(_fromUtf8("label_63")) |
|
769 | 776 | self.gridLayout_20.addWidget(self.label_63, 8, 0, 1, 1) |
|
770 | 777 | self.label_64 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
771 | 778 | self.label_64.setObjectName(_fromUtf8("label_64")) |
|
772 | 779 | self.gridLayout_20.addWidget(self.label_64, 9, 0, 1, 1) |
|
773 | 780 | self.label_65 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
774 | 781 | self.label_65.setObjectName(_fromUtf8("label_65")) |
|
775 | 782 | self.gridLayout_20.addWidget(self.label_65, 10, 0, 1, 1) |
|
776 | 783 | spacerItem23 = QtGui.QSpacerItem(134, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
777 | 784 | self.gridLayout_20.addItem(spacerItem23, 11, 0, 1, 2) |
|
778 | 785 | self.specHeisGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
779 | 786 | self.specHeisGgraphftpratio.setObjectName(_fromUtf8("specHeisGgraphftpratio")) |
|
780 | 787 | self.gridLayout_20.addWidget(self.specHeisGgraphftpratio, 10, 1, 1, 6) |
|
781 | 788 | self.specHeisGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
782 | 789 | self.specHeisGraphftpRTIplot.setText(_fromUtf8("")) |
|
783 | 790 | self.specHeisGraphftpRTIplot.setObjectName(_fromUtf8("specHeisGraphftpRTIplot")) |
|
784 | 791 | self.gridLayout_20.addWidget(self.specHeisGraphftpRTIplot, 4, 6, 1, 1) |
|
785 | 792 | self.specHeisGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
786 | 793 | self.specHeisGgraphTminTmax.setObjectName(_fromUtf8("specHeisGgraphTminTmax")) |
|
787 | 794 | self.gridLayout_20.addWidget(self.specHeisGgraphTminTmax, 8, 1, 1, 6) |
|
788 | 795 | self.label_60 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
789 | 796 | self.label_60.setObjectName(_fromUtf8("label_60")) |
|
790 | 797 | self.gridLayout_20.addWidget(self.label_60, 5, 0, 1, 1) |
|
791 | 798 | self.label_61 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
792 | 799 | self.label_61.setObjectName(_fromUtf8("label_61")) |
|
793 | 800 | self.gridLayout_20.addWidget(self.label_61, 6, 0, 1, 1) |
|
794 | 801 | self.specHeisGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
795 | 802 | self.specHeisGraphPrefix.setObjectName(_fromUtf8("specHeisGraphPrefix")) |
|
796 | 803 | self.gridLayout_20.addWidget(self.specHeisGraphPrefix, 1, 1, 1, 6) |
|
797 | 804 | self.label_56 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
798 | 805 | self.label_56.setObjectName(_fromUtf8("label_56")) |
|
799 | 806 | self.gridLayout_20.addWidget(self.label_56, 2, 4, 1, 1) |
|
800 | 807 | self.label_57 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
801 | 808 | self.label_57.setObjectName(_fromUtf8("label_57")) |
|
802 | 809 | self.gridLayout_20.addWidget(self.label_57, 2, 6, 1, 1) |
|
803 | 810 | self.label_58 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
804 | 811 | self.label_58.setObjectName(_fromUtf8("label_58")) |
|
805 | 812 | self.gridLayout_20.addWidget(self.label_58, 3, 0, 1, 1) |
|
806 | 813 | self.specHeisGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
807 | 814 | self.specHeisGraphCebSpectraplot.setText(_fromUtf8("")) |
|
808 | 815 | self.specHeisGraphCebSpectraplot.setObjectName(_fromUtf8("specHeisGraphCebSpectraplot")) |
|
809 | 816 | self.gridLayout_20.addWidget(self.specHeisGraphCebSpectraplot, 3, 2, 1, 1) |
|
810 | 817 | self.specHeisGgraphYminYmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
811 | 818 | self.specHeisGgraphYminYmax.setObjectName(_fromUtf8("specHeisGgraphYminYmax")) |
|
812 | 819 | self.gridLayout_20.addWidget(self.specHeisGgraphYminYmax, 7, 1, 1, 6) |
|
813 | 820 | self.label_53 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
814 | 821 | self.label_53.setObjectName(_fromUtf8("label_53")) |
|
815 | 822 | self.gridLayout_20.addWidget(self.label_53, 0, 0, 1, 1) |
|
816 | 823 | self.label_55 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
817 | 824 | self.label_55.setObjectName(_fromUtf8("label_55")) |
|
818 | 825 | self.gridLayout_20.addWidget(self.label_55, 2, 2, 1, 1) |
|
819 | 826 | self.specHeisGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
820 | 827 | self.specHeisGraphSaveRTIplot.setText(_fromUtf8("")) |
|
821 | 828 | self.specHeisGraphSaveRTIplot.setObjectName(_fromUtf8("specHeisGraphSaveRTIplot")) |
|
822 | 829 | self.gridLayout_20.addWidget(self.specHeisGraphSaveRTIplot, 4, 4, 1, 1) |
|
823 | 830 | spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
824 | 831 | self.gridLayout_20.addItem(spacerItem24, 2, 3, 1, 1) |
|
825 | 832 | self.specHeisGgraphXminXmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
826 | 833 | self.specHeisGgraphXminXmax.setObjectName(_fromUtf8("specHeisGgraphXminXmax")) |
|
827 | 834 | self.gridLayout_20.addWidget(self.specHeisGgraphXminXmax, 6, 1, 1, 6) |
|
828 | 835 | self.specHeisGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
829 | 836 | self.specHeisGgraphChannelList.setObjectName(_fromUtf8("specHeisGgraphChannelList")) |
|
830 | 837 | self.gridLayout_20.addWidget(self.specHeisGgraphChannelList, 5, 1, 1, 6) |
|
831 | 838 | self.specHeisGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
832 | 839 | self.specHeisGgraphTimeRange.setObjectName(_fromUtf8("specHeisGgraphTimeRange")) |
|
833 | 840 | self.gridLayout_20.addWidget(self.specHeisGgraphTimeRange, 9, 1, 1, 6) |
|
834 | 841 | spacerItem25 = QtGui.QSpacerItem(106, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
835 | 842 | self.gridLayout_20.addItem(spacerItem25, 11, 3, 1, 3) |
|
836 | 843 | self.specHeisGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
837 | 844 | self.specHeisGraphSaveSpectra.setText(_fromUtf8("")) |
|
838 | 845 | self.specHeisGraphSaveSpectra.setObjectName(_fromUtf8("specHeisGraphSaveSpectra")) |
|
839 | 846 | self.gridLayout_20.addWidget(self.specHeisGraphSaveSpectra, 3, 4, 1, 1) |
|
840 | 847 | self.specHeisGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
841 | 848 | self.specHeisGraphftpSpectra.setText(_fromUtf8("")) |
|
842 | 849 | self.specHeisGraphftpSpectra.setObjectName(_fromUtf8("specHeisGraphftpSpectra")) |
|
843 | 850 | self.gridLayout_20.addWidget(self.specHeisGraphftpSpectra, 3, 6, 1, 1) |
|
844 | 851 | self.label_59 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
845 | 852 | self.label_59.setObjectName(_fromUtf8("label_59")) |
|
846 | 853 | self.gridLayout_20.addWidget(self.label_59, 4, 0, 1, 1) |
|
847 | 854 | spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
848 | 855 | self.gridLayout_20.addItem(spacerItem26, 2, 5, 1, 1) |
|
849 | 856 | self.specHeisGraphPath = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
850 | 857 | self.specHeisGraphPath.setObjectName(_fromUtf8("specHeisGraphPath")) |
|
851 | 858 | self.gridLayout_20.addWidget(self.specHeisGraphPath, 0, 1, 1, 5) |
|
852 | 859 | self.tabWidgetSpectraHeis.addTab(self.tabgraphSpectraHeis, _fromUtf8("")) |
|
853 | 860 | self.taboutputSpectraHeis = QtGui.QWidget() |
|
854 | 861 | self.taboutputSpectraHeis.setObjectName(_fromUtf8("taboutputSpectraHeis")) |
|
855 | 862 | self.gridLayout_19 = QtGui.QGridLayout(self.taboutputSpectraHeis) |
|
856 | 863 | self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19")) |
|
857 | 864 | self.label_67 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
858 | 865 | self.label_67.setObjectName(_fromUtf8("label_67")) |
|
859 | 866 | self.gridLayout_19.addWidget(self.label_67, 1, 0, 1, 1) |
|
860 | 867 | self.label_68 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
861 | 868 | self.label_68.setObjectName(_fromUtf8("label_68")) |
|
862 | 869 | self.gridLayout_19.addWidget(self.label_68, 2, 0, 1, 2) |
|
863 | 870 | self.label_66 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
864 | 871 | self.label_66.setObjectName(_fromUtf8("label_66")) |
|
865 | 872 | self.gridLayout_19.addWidget(self.label_66, 0, 0, 1, 1) |
|
866 | 873 | spacerItem27 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
867 | 874 | self.gridLayout_19.addItem(spacerItem27, 4, 0, 1, 1) |
|
868 | 875 | self.specHeisOutputToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
869 | 876 | self.specHeisOutputToolPath.setObjectName(_fromUtf8("specHeisOutputToolPath")) |
|
870 | 877 | self.gridLayout_19.addWidget(self.specHeisOutputToolPath, 1, 4, 1, 1) |
|
871 | 878 | self.specHeisOutputPath = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
872 | 879 | self.specHeisOutputPath.setObjectName(_fromUtf8("specHeisOutputPath")) |
|
873 | 880 | self.gridLayout_19.addWidget(self.specHeisOutputPath, 1, 3, 1, 1) |
|
874 | 881 | self.specHeisOutputComdata = QtGui.QComboBox(self.taboutputSpectraHeis) |
|
875 | 882 | self.specHeisOutputComdata.setObjectName(_fromUtf8("specHeisOutputComdata")) |
|
876 | 883 | self.specHeisOutputComdata.addItem(_fromUtf8("")) |
|
877 | 884 | self.gridLayout_19.addWidget(self.specHeisOutputComdata, 0, 3, 1, 2) |
|
878 | 885 | self.label_69 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
879 | 886 | self.label_69.setObjectName(_fromUtf8("label_69")) |
|
880 | 887 | self.gridLayout_19.addWidget(self.label_69, 3, 0, 1, 2) |
|
881 | 888 | self.specHeisOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
882 | 889 | self.specHeisOutputblocksperfile.setObjectName(_fromUtf8("specHeisOutputblocksperfile")) |
|
883 | 890 | self.gridLayout_19.addWidget(self.specHeisOutputblocksperfile, 2, 3, 1, 1) |
|
884 | 891 | self.specHeisOutputMetada = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
885 | 892 | self.specHeisOutputMetada.setObjectName(_fromUtf8("specHeisOutputMetada")) |
|
886 | 893 | self.gridLayout_19.addWidget(self.specHeisOutputMetada, 3, 3, 1, 1) |
|
887 | 894 | self.specHeisOutputMetadaToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
888 | 895 | self.specHeisOutputMetadaToolPath.setObjectName(_fromUtf8("specHeisOutputMetadaToolPath")) |
|
889 | 896 | self.gridLayout_19.addWidget(self.specHeisOutputMetadaToolPath, 3, 4, 1, 1) |
|
890 | 897 | self.tabWidgetSpectraHeis.addTab(self.taboutputSpectraHeis, _fromUtf8("")) |
|
891 | 898 | self.gridLayout_23.addWidget(self.tabWidgetSpectraHeis, 0, 0, 1, 1) |
|
892 | 899 | self.tabWidgetProject.addTab(self.tabSpectraHeis, _fromUtf8("")) |
|
893 | 900 | self.tabCorrelation = QtGui.QWidget() |
|
894 | 901 | self.tabCorrelation.setObjectName(_fromUtf8("tabCorrelation")) |
|
895 | 902 | self.gridLayout_13 = QtGui.QGridLayout(self.tabCorrelation) |
|
896 | 903 | self.gridLayout_13.setObjectName(_fromUtf8("gridLayout_13")) |
|
897 | 904 | self.tabWidget_2 = QtGui.QTabWidget(self.tabCorrelation) |
|
898 | 905 | self.tabWidget_2.setObjectName(_fromUtf8("tabWidget_2")) |
|
899 | 906 | self.tabopCorrelation = QtGui.QWidget() |
|
900 | 907 | self.tabopCorrelation.setObjectName(_fromUtf8("tabopCorrelation")) |
|
901 | 908 | self.tabWidget_2.addTab(self.tabopCorrelation, _fromUtf8("")) |
|
902 | 909 | self.tabopCorrelation1 = QtGui.QWidget() |
|
903 | 910 | self.tabopCorrelation1.setObjectName(_fromUtf8("tabopCorrelation1")) |
|
904 | 911 | self.tabWidget_2.addTab(self.tabopCorrelation1, _fromUtf8("")) |
|
905 | 912 | self.gridLayout_13.addWidget(self.tabWidget_2, 0, 0, 1, 1) |
|
906 | 913 | self.tabWidgetProject.addTab(self.tabCorrelation, _fromUtf8("")) |
|
914 | ||
|
915 | ||
|
907 | 916 | self.tabConsole = QtGui.QTabWidget(self.splitter) |
|
908 | 917 | self.tabConsole.setMinimumSize(QtCore.QSize(0, 0)) |
|
909 | 918 | self.tabConsole.setObjectName(_fromUtf8("tabConsole")) |
|
910 | 919 | self.tab_5 = QtGui.QWidget() |
|
911 | 920 | self.tab_5.setObjectName(_fromUtf8("tab_5")) |
|
912 | 921 | self.gridLayout_4 = QtGui.QGridLayout(self.tab_5) |
|
913 | 922 | self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) |
|
914 | 923 | self.console = QtGui.QTextEdit(self.tab_5) |
|
915 | 924 | self.console.setObjectName(_fromUtf8("console")) |
|
916 | 925 | self.gridLayout_4.addWidget(self.console, 0, 0, 1, 1) |
|
917 | 926 | self.tabConsole.addTab(self.tab_5, _fromUtf8("")) |
|
918 | 927 | self.tabWidget = QtGui.QTabWidget(self.splitter_2) |
|
919 | 928 | self.tabWidget.setObjectName(_fromUtf8("tabWidget")) |
|
920 | 929 | self.tabProjectProperty = QtGui.QWidget() |
|
921 | 930 | self.tabProjectProperty.setObjectName(_fromUtf8("tabProjectProperty")) |
|
922 | 931 | self.gridLayout_8 = QtGui.QGridLayout(self.tabProjectProperty) |
|
923 | 932 | self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) |
|
924 | 933 | self.treeProjectProperties = QtGui.QTreeView(self.tabProjectProperty) |
|
925 | 934 | self.treeProjectProperties.setObjectName(_fromUtf8("treeProjectProperties")) |
|
926 | 935 | self.gridLayout_8.addWidget(self.treeProjectProperties, 0, 0, 1, 1) |
|
927 | 936 | self.tabWidget.addTab(self.tabProjectProperty, _fromUtf8("")) |
|
928 | 937 | self.gridLayout_16.addWidget(self.splitter_2, 1, 0, 1, 1) |
|
929 | 938 | MainWindow.setCentralWidget(self.centralWidget) |
|
930 | 939 | self.toolBar = QtGui.QToolBar(MainWindow) |
|
931 | 940 | self.toolBar.setObjectName(_fromUtf8("toolBar")) |
|
932 | 941 | MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) |
|
933 | 942 | self.menuBar = QtGui.QMenuBar(MainWindow) |
|
934 | 943 | self.menuBar.setGeometry(QtCore.QRect(0, 0, 1065, 25)) |
|
935 | 944 | self.menuBar.setObjectName(_fromUtf8("menuBar")) |
|
936 | 945 | self.menuProject = QtGui.QMenu(self.menuBar) |
|
937 | 946 | self.menuProject.setObjectName(_fromUtf8("menuProject")) |
|
938 | 947 | self.menuRun = QtGui.QMenu(self.menuBar) |
|
939 | 948 | self.menuRun.setObjectName(_fromUtf8("menuRun")) |
|
940 | 949 | self.menuOptions = QtGui.QMenu(self.menuBar) |
|
941 | 950 | self.menuOptions.setObjectName(_fromUtf8("menuOptions")) |
|
942 | 951 | self.menuHelp = QtGui.QMenu(self.menuBar) |
|
943 | 952 | self.menuHelp.setObjectName(_fromUtf8("menuHelp")) |
|
944 | 953 | MainWindow.setMenuBar(self.menuBar) |
|
945 | 954 | self.actionOpen = QtGui.QAction(MainWindow) |
|
946 | icon = QtGui.QIcon() | |
|
947 | icon.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/open.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
948 | self.actionOpen.setIcon(icon) | |
|
955 | ||
|
956 | iconOpen = QtGui.QIcon() | |
|
957 | iconOpen.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/open.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
958 | ||
|
959 | iconCreate = QtGui.QIcon() | |
|
960 | iconCreate.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/project.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
961 | ||
|
962 | iconSave = QtGui.QIcon() | |
|
963 | iconSave.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/saveicon.jpeg")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
964 | ||
|
965 | iconStart = QtGui.QIcon() | |
|
966 | iconStart.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/startServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
967 | ||
|
968 | iconStop = QtGui.QIcon() | |
|
969 | iconStop.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/stopServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
970 | ||
|
971 | iconPause = QtGui.QIcon() | |
|
972 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pause.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
973 | ||
|
974 | iconAddPU = QtGui.QIcon() | |
|
975 | iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/add_PU.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
976 | ||
|
977 | self.actionOpen.setIcon(iconOpen) | |
|
949 | 978 | self.actionOpen.setObjectName(_fromUtf8("actionOpen")) |
|
950 | 979 | self.actionCreate = QtGui.QAction(MainWindow) |
|
951 | icon1 = QtGui.QIcon() | |
|
952 | icon1.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/project.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
953 | self.actionCreate.setIcon(icon1) | |
|
980 | self.actionCreate.setIcon(iconCreate) | |
|
954 | 981 | self.actionCreate.setObjectName(_fromUtf8("actionCreate")) |
|
955 | 982 | self.actionSave = QtGui.QAction(MainWindow) |
|
956 | icon2 = QtGui.QIcon() | |
|
957 | icon2.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/saveicon.jpeg")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
958 | self.actionSave.setIcon(icon2) | |
|
983 | self.actionSave.setIcon(iconSave) | |
|
959 | 984 | self.actionSave.setObjectName(_fromUtf8("actionSave")) |
|
960 | 985 | self.actionClose = QtGui.QAction(MainWindow) |
|
961 | 986 | self.actionClose.setObjectName(_fromUtf8("actionClose")) |
|
962 | 987 | self.actionStart = QtGui.QAction(MainWindow) |
|
963 | icon3 = QtGui.QIcon() | |
|
964 | icon3.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/startServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
965 | self.actionStart.setIcon(icon3) | |
|
988 | self.actionStart.setIcon(iconStart) | |
|
966 | 989 | self.actionStart.setObjectName(_fromUtf8("actionStart")) |
|
967 | 990 | self.actionPause = QtGui.QAction(MainWindow) |
|
991 | self.actionPause.setIcon(iconPause) | |
|
968 | 992 | self.actionPause.setObjectName(_fromUtf8("actionPause")) |
|
993 | self.actionStop = QtGui.QAction(MainWindow) | |
|
994 | self.actionStop.setIcon(iconStop) | |
|
995 | self.actionStop.setObjectName(_fromUtf8("actionStop")) | |
|
969 | 996 | self.actionAbout = QtGui.QAction(MainWindow) |
|
970 | 997 | self.actionAbout.setObjectName(_fromUtf8("actionAbout")) |
|
971 | 998 | self.actionOpenToolbar = QtGui.QAction(MainWindow) |
|
972 | self.actionOpenToolbar.setIcon(icon) | |
|
999 | self.actionOpenToolbar.setIcon(iconOpen) | |
|
973 | 1000 | self.actionOpenToolbar.setObjectName(_fromUtf8("actionOpenToolbar")) |
|
974 | 1001 | self.actionCreateToolbar = QtGui.QAction(MainWindow) |
|
975 |
self.actionCreateToolbar.setIcon(icon |
|
|
1002 | self.actionCreateToolbar.setIcon(iconCreate) | |
|
976 | 1003 | self.actionCreateToolbar.setObjectName(_fromUtf8("actionCreateToolbar")) |
|
977 | 1004 | self.actionSaveToolbar = QtGui.QAction(MainWindow) |
|
978 |
self.actionSaveToolbar.setIcon(icon |
|
|
1005 | self.actionSaveToolbar.setIcon(iconSave) | |
|
979 | 1006 | self.actionSaveToolbar.setObjectName(_fromUtf8("actionSaveToolbar")) |
|
980 | 1007 | self.actionStarToolbar = QtGui.QAction(MainWindow) |
|
981 |
self.actionStarToolbar.setIcon(icon |
|
|
1008 | self.actionStarToolbar.setIcon(iconStart) | |
|
982 | 1009 | self.actionStarToolbar.setObjectName(_fromUtf8("actionStarToolbar")) |
|
983 | 1010 | self.actionStopToolbar = QtGui.QAction(MainWindow) |
|
984 | icon4 = QtGui.QIcon() | |
|
985 | icon4.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/stopServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
986 | self.actionStopToolbar.setIcon(icon4) | |
|
1011 | self.actionStopToolbar.setIcon(iconStop) | |
|
987 | 1012 | self.actionStopToolbar.setObjectName(_fromUtf8("actionStopToolbar")) |
|
988 | 1013 | self.actionPauseToolbar = QtGui.QAction(MainWindow) |
|
989 | icon5 = QtGui.QIcon() | |
|
990 | icon5.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pause.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
991 | self.actionPause.setIcon(icon5) | |
|
992 | self.actionPauseToolbar.setIcon(icon5) | |
|
1014 | self.actionPause.setIcon(iconPause) | |
|
1015 | self.actionPauseToolbar.setIcon(iconPause) | |
|
993 | 1016 | self.actionPauseToolbar.setObjectName(_fromUtf8("actionPauseToolbar")) |
|
994 | 1017 | self.actionAddPU = QtGui.QAction(MainWindow) |
|
995 | icon6 = QtGui.QIcon() | |
|
996 | icon6.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/add_PU.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
997 | self.actionAddPU.setIcon(icon6) | |
|
1018 | self.actionAddPU.setIcon(iconAddPU) | |
|
998 | 1019 | self.actionAddPU.setObjectName(_fromUtf8("actionAddPU")) |
|
999 | 1020 | self.actionFTP = QtGui.QAction(MainWindow) |
|
1000 | 1021 | self.actionFTP.setObjectName(_fromUtf8("actionFTP")) |
|
1001 | 1022 | self.toolBar.addAction(self.actionOpenToolbar) |
|
1002 | 1023 | self.toolBar.addSeparator() |
|
1003 | 1024 | self.toolBar.addAction(self.actionCreateToolbar) |
|
1004 | 1025 | self.toolBar.addSeparator() |
|
1005 | 1026 | self.toolBar.addAction(self.actionAddPU) |
|
1006 | 1027 | self.toolBar.addSeparator() |
|
1007 | 1028 | self.toolBar.addAction(self.actionSaveToolbar) |
|
1008 | 1029 | self.toolBar.addSeparator() |
|
1009 | 1030 | self.toolBar.addAction(self.actionStarToolbar) |
|
1010 | 1031 | self.toolBar.addSeparator() |
|
1011 | 1032 | self.toolBar.addAction(self.actionPauseToolbar) |
|
1012 | 1033 | self.toolBar.addSeparator() |
|
1013 | 1034 | self.toolBar.addAction(self.actionStopToolbar) |
|
1014 | 1035 | self.toolBar.addSeparator() |
|
1015 | 1036 | self.a=1 |
|
1016 | 1037 | self.actionPauseToolbar.triggered.connect(self.changeIcon) |
|
1017 | 1038 | |
|
1018 | 1039 | |
|
1019 | 1040 | self.menuProject.addAction(self.actionOpen) |
|
1020 | 1041 | self.menuProject.addAction(self.actionCreate) |
|
1021 | 1042 | self.menuProject.addAction(self.actionSave) |
|
1022 | 1043 | self.menuProject.addAction(self.actionClose) |
|
1023 | 1044 | self.menuRun.addAction(self.actionStart) |
|
1024 | 1045 | self.menuRun.addAction(self.actionPause) |
|
1046 | self.menuRun.addAction(self.actionStop) | |
|
1025 | 1047 | self.menuOptions.addAction(self.actionFTP) |
|
1026 | 1048 | self.menuHelp.addAction(self.actionAbout) |
|
1027 | 1049 | self.menuBar.addAction(self.menuProject.menuAction()) |
|
1028 | 1050 | self.menuBar.addAction(self.menuRun.menuAction()) |
|
1029 | 1051 | self.menuBar.addAction(self.menuOptions.menuAction()) |
|
1030 | 1052 | self.menuBar.addAction(self.menuHelp.menuAction()) |
|
1031 | 1053 | |
|
1032 | 1054 | self.retranslateUi(MainWindow) |
|
1033 | 1055 | self.tabWidgetProject.setCurrentIndex(0) |
|
1034 | 1056 | self.tabWidgetVoltage.setCurrentIndex(0) |
|
1035 | 1057 | self.tabWidgetSpectra.setCurrentIndex(0) |
|
1036 | 1058 | self.tabWidgetSpectraHeis.setCurrentIndex(0) |
|
1037 | 1059 | self.tabWidget_2.setCurrentIndex(0) |
|
1038 | 1060 | self.tabConsole.setCurrentIndex(0) |
|
1039 | 1061 | self.tabWidget.setCurrentIndex(0) |
|
1040 | 1062 | QtCore.QMetaObject.connectSlotsByName(MainWindow) |
|
1041 | 1063 | |
|
1042 | 1064 | def changeIcon(self): |
|
1065 | ||
|
1043 | 1066 | if self.a==1: |
|
1044 |
icon |
|
|
1045 |
icon |
|
|
1046 |
self.actionPauseToolbar.setIcon(icon |
|
|
1067 | iconPauseRed = QtGui.QIcon() | |
|
1068 | iconPauseRed.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pausered.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1069 | self.actionPauseToolbar.setIcon(iconPauseRed) | |
|
1047 | 1070 | self.a+=1 |
|
1048 | 1071 | return 0 |
|
1049 | 1072 | if self.a==2: |
|
1050 |
icon |
|
|
1051 |
icon |
|
|
1052 |
self.actionPauseToolbar.setIcon(icon |
|
|
1073 | iconPause = QtGui.QIcon() | |
|
1074 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pause.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1075 | self.actionPauseToolbar.setIcon(iconPause) | |
|
1053 | 1076 | self.a-=1 |
|
1054 | 1077 | return 0 |
|
1055 | 1078 | |
|
1056 | 1079 | def retranslateUi(self, MainWindow): |
|
1080 | ||
|
1057 | 1081 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) |
|
1058 | 1082 | self.label.setText(_translate("MainWindow", "Project Name :", None)) |
|
1059 | 1083 | self.label_11.setText(_translate("MainWindow", "DataType :", None)) |
|
1060 | 1084 | self.proComDataType.setItemText(0, _translate("MainWindow", "Voltage", None)) |
|
1061 | 1085 | self.proComDataType.setItemText(1, _translate("MainWindow", "Spectra", None)) |
|
1062 | 1086 | self.proComDataType.setItemText(2, _translate("MainWindow", "Fits", None)) |
|
1063 | 1087 | self.label_15.setText(_translate("MainWindow", "DataPath :", None)) |
|
1064 | 1088 | self.proToolPath.setText(_translate("MainWindow", "...", None)) |
|
1065 | 1089 | self.label_23.setText(_translate("MainWindow", "Read Mode:", None)) |
|
1066 | 1090 | self.proComReadMode.setItemText(0, _translate("MainWindow", "Offline", None)) |
|
1067 | 1091 | self.proComReadMode.setItemText(1, _translate("MainWindow", "Online", None)) |
|
1068 | 1092 | self.label_33.setText(_translate("MainWindow", "Delay:", None)) |
|
1069 | 1093 | self.label_32.setText(_translate("MainWindow", "Walk :", None)) |
|
1070 | 1094 | self.proComWalk.setItemText(0, _translate("MainWindow", "On Files", None)) |
|
1071 | 1095 | self.proComWalk.setItemText(1, _translate("MainWindow", "On Folder", None)) |
|
1072 | 1096 | self.proLoadButton.setText(_translate("MainWindow", "Load", None)) |
|
1073 | 1097 | self.label_10.setText(_translate("MainWindow", "Set:", None)) |
|
1074 | 1098 | self.label_27.setText(_translate("MainWindow", "Star Date:", None)) |
|
1075 | 1099 | self.label_28.setText(_translate("MainWindow", "End Date:", None)) |
|
1076 | 1100 | self.label_2.setText(_translate("MainWindow", "Start Time:", None)) |
|
1077 | 1101 | self.label_3.setText(_translate("MainWindow", "End Time:", None)) |
|
1078 | 1102 | self.label_30.setText(_translate("MainWindow", "Description:", None)) |
|
1079 | 1103 | self.proOk.setText(_translate("MainWindow", "Ok", None)) |
|
1080 | 1104 | self.proClear.setText(_translate("MainWindow", "Clear", None)) |
|
1081 | 1105 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabProject), _translate("MainWindow", "Project", None)) |
|
1082 | 1106 | self.volOpOk.setText(_translate("MainWindow", "Ok", None)) |
|
1083 | 1107 | self.volGraphClear.setText(_translate("MainWindow", "Clear", None)) |
|
1084 | 1108 | self.volOpComHeights.setItemText(0, _translate("MainWindow", "Value", None)) |
|
1085 | 1109 | self.volOpComHeights.setItemText(1, _translate("MainWindow", "Index", None)) |
|
1086 | 1110 | self.volOpComChannels.setItemText(0, _translate("MainWindow", "Value", None)) |
|
1087 | 1111 | self.volOpComChannels.setItemText(1, _translate("MainWindow", "Index", None)) |
|
1088 | 1112 | self.volOpCebProfile.setText(_translate("MainWindow", "Profile Selector", None)) |
|
1089 | 1113 | self.volOpComProfile.setItemText(0, _translate("MainWindow", "Profile List", None)) |
|
1090 | 1114 | self.volOpComProfile.setItemText(1, _translate("MainWindow", "Profile Range List", None)) |
|
1091 | 1115 | self.volOpCebDecodification.setText(_translate("MainWindow", "Decoder", None)) |
|
1092 | 1116 | self.volOpCebCohInt.setText(_translate("MainWindow", "Coherent Integration", None)) |
|
1093 | 1117 | self.label_4.setText(_translate("MainWindow", "Code:", None)) |
|
1094 | 1118 | self.volOpCebChannels.setText(_translate("MainWindow", "Select Channels", None)) |
|
1095 | 1119 | self.volOpCebHeights.setText(_translate("MainWindow", "Select Heights", None)) |
|
1096 | 1120 | self.volOpCebFilter.setText(_translate("MainWindow", "Filter", None)) |
|
1097 | 1121 | self.volOpCebRadarfrequency.setText(_translate("MainWindow", "Radar Frequency", None)) |
|
1098 | 1122 | self.label_5.setText(_translate("MainWindow", "Mode:", None)) |
|
1099 | 1123 | self.volOpComCode.setItemText(0, _translate("MainWindow", "Barker 3", None)) |
|
1100 | 1124 | self.volOpComCode.setItemText(1, _translate("MainWindow", "Barker 4", None)) |
|
1101 | 1125 | self.volOpComCode.setItemText(2, _translate("MainWindow", "Barker 5", None)) |
|
1102 | 1126 | self.volOpComCode.setItemText(3, _translate("MainWindow", "Barker 7", None)) |
|
1103 | 1127 | self.volOpComCode.setItemText(4, _translate("MainWindow", "Barker 11", None)) |
|
1104 | 1128 | self.volOpComCode.setItemText(5, _translate("MainWindow", "Barker 13", None)) |
|
1105 | 1129 | self.volOpComCode.setItemText(6, _translate("MainWindow", "Barker 3 + Comp.", None)) |
|
1106 | 1130 | self.volOpComCode.setItemText(7, _translate("MainWindow", "Barker 4 + Comp.", None)) |
|
1107 | 1131 | self.volOpComCode.setItemText(8, _translate("MainWindow", "Barker 5 + Comp.", None)) |
|
1108 | 1132 | self.volOpComCode.setItemText(9, _translate("MainWindow", "Barker 7 + Comp.", None)) |
|
1109 | 1133 | self.volOpComCode.setItemText(10, _translate("MainWindow", "Barker 11+ Comp.", None)) |
|
1110 | 1134 | self.volOpComCode.setItemText(11, _translate("MainWindow", "Barker 13+ Comp.", None)) |
|
1111 | 1135 | self.volOpComCode.setItemText(12, _translate("MainWindow", "Default", None)) |
|
1112 | 1136 | self.volOpComMode.setItemText(0, _translate("MainWindow", "Time", None)) |
|
1113 | 1137 | self.volOpComMode.setItemText(1, _translate("MainWindow", "Freq 1", None)) |
|
1114 | 1138 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabopVoltage), _translate("MainWindow", "Operation", None)) |
|
1115 | 1139 | self.volGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
1116 | 1140 | self.label_14.setText(_translate("MainWindow", "Scope", None)) |
|
1117 | 1141 | self.label_8.setText(_translate("MainWindow", "Channel List", None)) |
|
1118 | 1142 | self.label_49.setText(_translate("MainWindow", "Show", None)) |
|
1119 | 1143 | self.label_51.setText(_translate("MainWindow", "Freq/Vel", None)) |
|
1120 | 1144 | self.label_12.setText(_translate("MainWindow", "Path :", None)) |
|
1121 | 1145 | self.label_13.setText(_translate("MainWindow", "Prefix:", None)) |
|
1122 | 1146 | self.label_52.setText(_translate("MainWindow", "Height range", None)) |
|
1123 | 1147 | self.label_50.setText(_translate("MainWindow", "Save", None)) |
|
1124 | 1148 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.tabgraphVoltage), _translate("MainWindow", "Graphics", None)) |
|
1125 | 1149 | self.label_36.setText(_translate("MainWindow", "Type:", None)) |
|
1126 | 1150 | self.label_37.setText(_translate("MainWindow", "Path:", None)) |
|
1127 | 1151 | self.volOutputToolPath.setText(_translate("MainWindow", "...", None)) |
|
1128 | 1152 | self.volOutputComData.setItemText(0, _translate("MainWindow", ".rawdata", None)) |
|
1129 | 1153 | self.label_7.setText(_translate("MainWindow", "Blocks per File : ", None)) |
|
1130 | 1154 | self.label_35.setText(_translate("MainWindow", "Profiles per Block: ", None)) |
|
1131 | 1155 | self.tabWidgetVoltage.setTabText(self.tabWidgetVoltage.indexOf(self.taboutputVoltage), _translate("MainWindow", "Output", None)) |
|
1132 | 1156 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabVoltage), _translate("MainWindow", "Voltage", None)) |
|
1133 | 1157 | self.specOpOk.setText(_translate("MainWindow", "Ok", None)) |
|
1134 | 1158 | self.specGraphClear.setText(_translate("MainWindow", "Clear", None)) |
|
1135 | 1159 | self.specOpCebCrossSpectra.setText(_translate("MainWindow", "Select Cross Spectra", None)) |
|
1136 | 1160 | self.specOpComChannel.setItemText(0, _translate("MainWindow", "Value", None)) |
|
1137 | 1161 | self.specOpComChannel.setItemText(1, _translate("MainWindow", "Index", None)) |
|
1138 | 1162 | self.specOpComHeights.setItemText(0, _translate("MainWindow", "Value", None)) |
|
1139 | 1163 | self.specOpComHeights.setItemText(1, _translate("MainWindow", "Index", None)) |
|
1140 | 1164 | self.specOpCebRemoveDC.setText(_translate("MainWindow", "Remove DC", None)) |
|
1141 | 1165 | self.specOpCebHeights.setText(_translate("MainWindow", "Select Heights", None)) |
|
1142 | 1166 | self.specOpCebChannel.setText(_translate("MainWindow", "Select Channel", None)) |
|
1143 | 1167 | self.label_31.setText(_translate("MainWindow", "x-y pairs", None)) |
|
1144 | 1168 | self.label_26.setText(_translate("MainWindow", "nFFTPoints", None)) |
|
1145 | 1169 | self.specOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Integration", None)) |
|
1146 | 1170 | self.specOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) |
|
1147 | 1171 | self.specOpCobIncInt.setItemText(1, _translate("MainWindow", "Profiles", None)) |
|
1148 | 1172 | self.specOpCebRadarfrequency.setText(_translate("MainWindow", "Radar Frequency", None)) |
|
1149 | 1173 | self.label_21.setText(_translate("MainWindow", "Profiles", None)) |
|
1150 | 1174 | self.specOpCebRemoveInt.setText(_translate("MainWindow", "Remove Interference", None)) |
|
1151 | 1175 | self.label_70.setText(_translate("MainWindow", "IppFactor", None)) |
|
1152 | 1176 | self.specOpCebgetNoise.setText(_translate("MainWindow", "Get Noise", None)) |
|
1153 | 1177 | self.specOpComRemoveDC.setItemText(0, _translate("MainWindow", "Mode 1", None)) |
|
1154 | 1178 | self.specOpComRemoveDC.setItemText(1, _translate("MainWindow", "Mode 2", None)) |
|
1155 | 1179 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabopSpectra), _translate("MainWindow", "Operation", None)) |
|
1156 | 1180 | self.label_44.setText(_translate("MainWindow", "Coherence Map", None)) |
|
1157 | 1181 | self.label_20.setText(_translate("MainWindow", "Tmin, Tmax:", None)) |
|
1158 | 1182 | self.label_25.setText(_translate("MainWindow", "Prefix", None)) |
|
1159 | 1183 | self.label_42.setText(_translate("MainWindow", "RTI Plot", None)) |
|
1160 | 1184 | self.label_16.setText(_translate("MainWindow", "Height range", None)) |
|
1161 | 1185 | self.label_17.setText(_translate("MainWindow", "dB range", None)) |
|
1162 | 1186 | self.label_18.setText(_translate("MainWindow", "Magnitud ", None)) |
|
1163 | 1187 | self.label_24.setText(_translate("MainWindow", "Path", None)) |
|
1164 | 1188 | self.label_46.setText(_translate("MainWindow", "Power Profile", None)) |
|
1165 | 1189 | self.label_22.setText(_translate("MainWindow", "Freq/Vel:", None)) |
|
1166 | 1190 | self.label_41.setText(_translate("MainWindow", "Cross Spectra Plot", None)) |
|
1167 | 1191 | self.specGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
1168 | 1192 | self.label_6.setText(_translate("MainWindow", "Channel List:", None)) |
|
1169 | 1193 | self.label_40.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
1170 | 1194 | self.label_43.setText(_translate("MainWindow", "Show", None)) |
|
1171 | 1195 | self.label_29.setText(_translate("MainWindow", "Wr Period:", None)) |
|
1172 | 1196 | self.label_47.setText(_translate("MainWindow", "Save", None)) |
|
1173 | 1197 | self.label_19.setText(_translate("MainWindow", "ftp", None)) |
|
1174 | 1198 | self.label_45.setText(_translate("MainWindow", "Noise", None)) |
|
1175 | 1199 | self.label_48.setText(_translate("MainWindow", "Time Range:", None)) |
|
1176 | 1200 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabgraphSpectra), _translate("MainWindow", "Graphics", None)) |
|
1177 | 1201 | self.label_39.setText(_translate("MainWindow", "Type:", None)) |
|
1178 | 1202 | self.specOutputComData.setItemText(0, _translate("MainWindow", ".pdata", None)) |
|
1179 | 1203 | self.label_34.setText(_translate("MainWindow", "Path:", None)) |
|
1180 | 1204 | self.specOutputToolPath.setText(_translate("MainWindow", "...", None)) |
|
1181 | 1205 | self.label_9.setText(_translate("MainWindow", "Blocks per File: ", None)) |
|
1182 | 1206 | self.label_38.setText(_translate("MainWindow", "Profile per Block: ", None)) |
|
1183 | 1207 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.taboutputSpectra), _translate("MainWindow", "Output", None)) |
|
1184 | 1208 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectra), _translate("MainWindow", "Spectra", None)) |
|
1185 | 1209 | self.specHeisGraphClear.setText(_translate("MainWindow", "Clear", None)) |
|
1186 | 1210 | self.specHeisOpOk.setText(_translate("MainWindow", "Ok", None)) |
|
1187 | 1211 | self.specHeisOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) |
|
1188 | 1212 | self.specHeisOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Intergration", None)) |
|
1189 | 1213 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabopSpectraHeis), _translate("MainWindow", "Operation", None)) |
|
1190 | 1214 | self.label_54.setText(_translate("MainWindow", "Prefix", None)) |
|
1191 | 1215 | self.specHeisGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
1192 | 1216 | self.label_62.setText(_translate("MainWindow", "ymin - ymax", None)) |
|
1193 | 1217 | self.label_63.setText(_translate("MainWindow", "Tmin - Tmax:", None)) |
|
1194 | 1218 | self.label_64.setText(_translate("MainWindow", "Time Range:", None)) |
|
1195 | 1219 | self.label_65.setText(_translate("MainWindow", "Wr Period", None)) |
|
1196 | 1220 | self.label_60.setText(_translate("MainWindow", "Channel List:", None)) |
|
1197 | 1221 | self.label_61.setText(_translate("MainWindow", "xmin - xmax", None)) |
|
1198 | 1222 | self.label_56.setText(_translate("MainWindow", "Save", None)) |
|
1199 | 1223 | self.label_57.setText(_translate("MainWindow", "ftp", None)) |
|
1200 | 1224 | self.label_58.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
1201 | 1225 | self.label_53.setText(_translate("MainWindow", "Path", None)) |
|
1202 | 1226 | self.label_55.setText(_translate("MainWindow", "Show", None)) |
|
1203 | 1227 | self.label_59.setText(_translate("MainWindow", "RTI PLot", None)) |
|
1204 | 1228 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabgraphSpectraHeis), _translate("MainWindow", "Graphics", None)) |
|
1205 | 1229 | self.label_67.setText(_translate("MainWindow", "Path:", None)) |
|
1206 | 1230 | self.label_68.setText(_translate("MainWindow", "Blocks per File:", None)) |
|
1207 | 1231 | self.label_66.setText(_translate("MainWindow", "Type:", None)) |
|
1208 | 1232 | self.specHeisOutputToolPath.setText(_translate("MainWindow", "...", None)) |
|
1209 | 1233 | self.specHeisOutputComdata.setItemText(0, _translate("MainWindow", ".fits", None)) |
|
1210 | 1234 | self.label_69.setText(_translate("MainWindow", "Metada", None)) |
|
1211 | 1235 | self.specHeisOutputMetadaToolPath.setText(_translate("MainWindow", "...", None)) |
|
1212 | 1236 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.taboutputSpectraHeis), _translate("MainWindow", "Output", None)) |
|
1213 | 1237 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectraHeis), _translate("MainWindow", "SpectraHeis", None)) |
|
1214 | 1238 | self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tabopCorrelation), _translate("MainWindow", "Operation", None)) |
|
1215 | 1239 | self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tabopCorrelation1), _translate("MainWindow", "Graphics", None)) |
|
1216 | 1240 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabCorrelation), _translate("MainWindow", "Correlation", None)) |
|
1241 | ||
|
1242 | ||
|
1217 | 1243 | self.tabConsole.setTabText(self.tabConsole.indexOf(self.tab_5), _translate("MainWindow", "Console", None)) |
|
1244 | ||
|
1218 | 1245 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabProjectProperty), _translate("MainWindow", "Project Property", None)) |
|
1219 | 1246 | self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None)) |
|
1220 | 1247 | self.menuProject.setTitle(_translate("MainWindow", "Project", None)) |
|
1221 | 1248 | self.menuRun.setTitle(_translate("MainWindow", "Run", None)) |
|
1222 | 1249 | self.menuOptions.setTitle(_translate("MainWindow", "Options", None)) |
|
1223 | 1250 | self.menuHelp.setTitle(_translate("MainWindow", "Help", None)) |
|
1224 | 1251 | self.actionOpen.setText(_translate("MainWindow", "Open", None)) |
|
1225 | 1252 | self.actionCreate.setText(_translate("MainWindow", "Create", None)) |
|
1226 | 1253 | self.actionSave.setText(_translate("MainWindow", "Save", None)) |
|
1227 | 1254 | self.actionClose.setText(_translate("MainWindow", "Close", None)) |
|
1228 | 1255 | self.actionStart.setText(_translate("MainWindow", "Start", None)) |
|
1229 | 1256 | self.actionPause.setText(_translate("MainWindow", "Pause", None)) |
|
1257 | self.actionStop.setText(_translate("MainWindow", "Stop", None)) | |
|
1230 | 1258 | self.actionAbout.setText(_translate("MainWindow", "About", None)) |
|
1231 | 1259 | self.actionOpenToolbar.setText(_translate("MainWindow", "openToolbar", None)) |
|
1232 | 1260 | self.actionOpenToolbar.setToolTip(_translate("MainWindow", "Open Project", None)) |
|
1233 | 1261 | self.actionCreateToolbar.setText(_translate("MainWindow", "createToolbar", None)) |
|
1234 | 1262 | self.actionCreateToolbar.setToolTip(_translate("MainWindow", "Create αΉroject", None)) |
|
1235 | 1263 | self.actionSaveToolbar.setText(_translate("MainWindow", "saveToolbar", None)) |
|
1236 | 1264 | self.actionSaveToolbar.setToolTip(_translate("MainWindow", "Save Project", None)) |
|
1237 | 1265 | self.actionStarToolbar.setText(_translate("MainWindow", "starToolbar", None)) |
|
1238 | 1266 | self.actionStarToolbar.setToolTip(_translate("MainWindow", "Start ", None)) |
|
1239 | 1267 | self.actionStopToolbar.setText(_translate("MainWindow", "stopToolbar", None)) |
|
1240 | 1268 | self.actionStopToolbar.setToolTip(_translate("MainWindow", "Stop", None)) |
|
1241 | 1269 | self.actionPauseToolbar.setText(_translate("MainWindow", "pauseToolbar", None)) |
|
1242 | 1270 | self.actionPauseToolbar.setToolTip(_translate("MainWindow", "Pause", None)) |
|
1243 | 1271 | self.actionAddPU.setText(_translate("MainWindow", "Add Processing Unit", None)) |
|
1244 | 1272 | self.actionFTP.setText(_translate("MainWindow", "FTP", None)) |
|
1245 | 1273 | |
|
1246 | 1274 | |
|
1247 |
class Ui_ |
|
|
1275 | class Ui_EnvWindow(object): | |
|
1276 | ||
|
1277 | def changeIcon(self): | |
|
1278 | ||
|
1279 | if self.a==1: | |
|
1280 | iconPauseRed = QtGui.QIcon() | |
|
1281 | iconPauseRed.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pausered.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1282 | self.actionPauseToolbar.setIcon(iconPauseRed) | |
|
1283 | self.a+=1 | |
|
1284 | return 0 | |
|
1285 | if self.a==2: | |
|
1286 | iconPause = QtGui.QIcon() | |
|
1287 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pause.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1288 | self.actionPauseToolbar.setIcon(iconPause) | |
|
1289 | self.a-=1 | |
|
1290 | return 0 | |
|
1291 | ||
|
1292 | def setupUi(self, MainWindow): | |
|
1293 | ||
|
1294 | MainWindow.setObjectName(_fromUtf8("MainWindow")) | |
|
1295 | MainWindow.resize(1203, 711) | |
|
1296 | ||
|
1297 | self.centralWidget = QtGui.QWidget(MainWindow) | |
|
1298 | self.centralWidget.setObjectName(_fromUtf8("centralWidget")) | |
|
1299 | self.gridLayout_16 = QtGui.QGridLayout(self.centralWidget) | |
|
1300 | self.gridLayout_16.setObjectName(_fromUtf8("gridLayout_16")) | |
|
1301 | self.splitter_2 = QtGui.QSplitter(self.centralWidget) | |
|
1302 | self.splitter_2.setOrientation(QtCore.Qt.Horizontal) | |
|
1303 | self.splitter_2.setObjectName(_fromUtf8("splitter_2")) | |
|
1304 | self.projectExplorerTree = QtGui.QTreeView(self.splitter_2) | |
|
1305 | self.projectExplorerTree.setObjectName(_fromUtf8("projectExplorerTree")) | |
|
1306 | self.splitter = QtGui.QSplitter(self.splitter_2) | |
|
1307 | self.splitter.setOrientation(QtCore.Qt.Vertical) | |
|
1308 | self.splitter.setObjectName(_fromUtf8("splitter")) | |
|
1309 | self.tabWidgetProject = QtGui.QTabWidget(self.splitter) | |
|
1310 | self.tabWidgetProject.setMinimumSize(QtCore.QSize(0, 278)) | |
|
1311 | self.tabWidgetProject.setMaximumSize(QtCore.QSize(16777215, 16777215)) | |
|
1312 | self.tabWidgetProject.setObjectName(_fromUtf8("tabWidgetProject")) | |
|
1313 | ||
|
1314 | self.tabConsole = QtGui.QTabWidget(self.splitter) | |
|
1315 | self.tabConsole.setMinimumSize(QtCore.QSize(0, 0)) | |
|
1316 | self.tabConsole.setObjectName(_fromUtf8("tabConsole")) | |
|
1317 | self.tab_5 = QtGui.QWidget() | |
|
1318 | self.tab_5.setObjectName(_fromUtf8("tab_5")) | |
|
1319 | self.gridLayout_4 = QtGui.QGridLayout(self.tab_5) | |
|
1320 | self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) | |
|
1321 | self.console = QtGui.QTextEdit(self.tab_5) | |
|
1322 | self.console.setObjectName(_fromUtf8("console")) | |
|
1323 | self.gridLayout_4.addWidget(self.console, 0, 0, 1, 1) | |
|
1324 | self.tabConsole.addTab(self.tab_5, _fromUtf8("")) | |
|
1325 | self.tabWidget = QtGui.QTabWidget(self.splitter_2) | |
|
1326 | self.tabWidget.setObjectName(_fromUtf8("tabWidget")) | |
|
1327 | self.tabProjectProperty = QtGui.QWidget() | |
|
1328 | self.tabProjectProperty.setObjectName(_fromUtf8("tabProjectProperty")) | |
|
1329 | self.gridLayout_8 = QtGui.QGridLayout(self.tabProjectProperty) | |
|
1330 | self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) | |
|
1331 | self.treeProjectProperties = QtGui.QTreeView(self.tabProjectProperty) | |
|
1332 | self.treeProjectProperties.setObjectName(_fromUtf8("treeProjectProperties")) | |
|
1333 | self.gridLayout_8.addWidget(self.treeProjectProperties, 0, 0, 1, 1) | |
|
1334 | self.tabWidget.addTab(self.tabProjectProperty, _fromUtf8("")) | |
|
1335 | self.gridLayout_16.addWidget(self.splitter_2, 1, 0, 1, 1) | |
|
1336 | ||
|
1337 | MainWindow.setCentralWidget(self.centralWidget) | |
|
1338 | self.toolBar = QtGui.QToolBar(MainWindow) | |
|
1339 | self.toolBar.setObjectName(_fromUtf8("toolBar")) | |
|
1340 | MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) | |
|
1341 | ||
|
1342 | self.menuBar = QtGui.QMenuBar(MainWindow) | |
|
1343 | self.menuBar.setGeometry(QtCore.QRect(0, 0, 1065, 25)) | |
|
1344 | self.menuBar.setObjectName(_fromUtf8("menuBar")) | |
|
1345 | self.menuProject = QtGui.QMenu(self.menuBar) | |
|
1346 | self.menuProject.setObjectName(_fromUtf8("menuProject")) | |
|
1347 | self.menuRun = QtGui.QMenu(self.menuBar) | |
|
1348 | self.menuRun.setObjectName(_fromUtf8("menuRun")) | |
|
1349 | self.menuOptions = QtGui.QMenu(self.menuBar) | |
|
1350 | self.menuOptions.setObjectName(_fromUtf8("menuOptions")) | |
|
1351 | self.menuHelp = QtGui.QMenu(self.menuBar) | |
|
1352 | self.menuHelp.setObjectName(_fromUtf8("menuHelp")) | |
|
1353 | MainWindow.setMenuBar(self.menuBar) | |
|
1354 | ||
|
1355 | iconOpen = QtGui.QIcon() | |
|
1356 | iconOpen.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/open.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1357 | iconCreate = QtGui.QIcon() | |
|
1358 | iconCreate.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/project.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1359 | iconSave = QtGui.QIcon() | |
|
1360 | iconSave.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/saveicon.jpeg")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1361 | iconStart = QtGui.QIcon() | |
|
1362 | iconStart.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/startServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1363 | iconStop = QtGui.QIcon() | |
|
1364 | iconStop.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/stopServer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1365 | iconPause = QtGui.QIcon() | |
|
1366 | iconPause.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/pause.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1367 | iconAddPU = QtGui.QIcon() | |
|
1368 | iconAddPU.addPixmap(QtGui.QPixmap(_fromUtf8("schainpy/gui/figure/add_PU.gif")), QtGui.QIcon.Normal, QtGui.QIcon.Off) | |
|
1369 | ||
|
1370 | self.actionOpen = QtGui.QAction(MainWindow) | |
|
1371 | self.actionOpen.setIcon(iconOpen) | |
|
1372 | self.actionOpen.setObjectName(_fromUtf8("actionOpen")) | |
|
1373 | self.actionCreate = QtGui.QAction(MainWindow) | |
|
1374 | self.actionCreate.setIcon(iconCreate) | |
|
1375 | self.actionCreate.setObjectName(_fromUtf8("actionCreate")) | |
|
1376 | self.actionSave = QtGui.QAction(MainWindow) | |
|
1377 | self.actionSave.setIcon(iconSave) | |
|
1378 | self.actionSave.setObjectName(_fromUtf8("actionSave")) | |
|
1379 | self.actionClose = QtGui.QAction(MainWindow) | |
|
1380 | self.actionClose.setObjectName(_fromUtf8("actionClose")) | |
|
1381 | self.actionStart = QtGui.QAction(MainWindow) | |
|
1382 | self.actionStart.setIcon(iconStart) | |
|
1383 | self.actionStart.setObjectName(_fromUtf8("actionStart")) | |
|
1384 | self.actionPause = QtGui.QAction(MainWindow) | |
|
1385 | self.actionPause.setIcon(iconPause) | |
|
1386 | self.actionPause.setObjectName(_fromUtf8("actionPause")) | |
|
1387 | self.actionStop = QtGui.QAction(MainWindow) | |
|
1388 | self.actionStop.setIcon(iconStop) | |
|
1389 | self.actionStop.setObjectName(_fromUtf8("actionStop")) | |
|
1390 | self.actionAbout = QtGui.QAction(MainWindow) | |
|
1391 | self.actionAbout.setObjectName(_fromUtf8("actionAbout")) | |
|
1392 | self.actionOpenToolbar = QtGui.QAction(MainWindow) | |
|
1393 | self.actionOpenToolbar.setIcon(iconOpen) | |
|
1394 | self.actionOpenToolbar.setObjectName(_fromUtf8("actionOpenToolbar")) | |
|
1395 | self.actionCreateToolbar = QtGui.QAction(MainWindow) | |
|
1396 | self.actionCreateToolbar.setIcon(iconCreate) | |
|
1397 | self.actionCreateToolbar.setObjectName(_fromUtf8("actionCreateToolbar")) | |
|
1398 | self.actionSaveToolbar = QtGui.QAction(MainWindow) | |
|
1399 | self.actionSaveToolbar.setIcon(iconSave) | |
|
1400 | self.actionSaveToolbar.setObjectName(_fromUtf8("actionSaveToolbar")) | |
|
1401 | self.actionStarToolbar = QtGui.QAction(MainWindow) | |
|
1402 | self.actionStarToolbar.setIcon(iconStart) | |
|
1403 | self.actionStarToolbar.setObjectName(_fromUtf8("actionStarToolbar")) | |
|
1404 | self.actionStopToolbar = QtGui.QAction(MainWindow) | |
|
1405 | self.actionStopToolbar.setIcon(iconStop) | |
|
1406 | self.actionStopToolbar.setObjectName(_fromUtf8("actionStopToolbar")) | |
|
1407 | self.actionPauseToolbar = QtGui.QAction(MainWindow) | |
|
1408 | self.actionPause.setIcon(iconPause) | |
|
1409 | self.actionPauseToolbar.setIcon(iconPause) | |
|
1410 | self.actionPauseToolbar.setObjectName(_fromUtf8("actionPauseToolbar")) | |
|
1411 | self.actionAddPU = QtGui.QAction(MainWindow) | |
|
1412 | self.actionAddPU.setIcon(iconAddPU) | |
|
1413 | self.actionAddPU.setObjectName(_fromUtf8("actionAddPU")) | |
|
1414 | self.actionFTP = QtGui.QAction(MainWindow) | |
|
1415 | self.actionFTP.setObjectName(_fromUtf8("actionFTP")) | |
|
1416 | self.toolBar.addAction(self.actionOpenToolbar) | |
|
1417 | self.toolBar.addSeparator() | |
|
1418 | self.toolBar.addAction(self.actionCreateToolbar) | |
|
1419 | self.toolBar.addSeparator() | |
|
1420 | self.toolBar.addAction(self.actionAddPU) | |
|
1421 | self.toolBar.addSeparator() | |
|
1422 | self.toolBar.addAction(self.actionSaveToolbar) | |
|
1423 | self.toolBar.addSeparator() | |
|
1424 | self.toolBar.addAction(self.actionStarToolbar) | |
|
1425 | self.toolBar.addSeparator() | |
|
1426 | self.toolBar.addAction(self.actionPauseToolbar) | |
|
1427 | self.toolBar.addSeparator() | |
|
1428 | self.toolBar.addAction(self.actionStopToolbar) | |
|
1429 | self.toolBar.addSeparator() | |
|
1430 | self.a=1 | |
|
1431 | self.actionPauseToolbar.triggered.connect(self.changeIcon) | |
|
1432 | ||
|
1433 | self.menuProject.addAction(self.actionOpen) | |
|
1434 | self.menuProject.addAction(self.actionCreate) | |
|
1435 | self.menuProject.addAction(self.actionSave) | |
|
1436 | self.menuProject.addAction(self.actionClose) | |
|
1437 | self.menuRun.addAction(self.actionStart) | |
|
1438 | self.menuRun.addAction(self.actionPause) | |
|
1439 | self.menuRun.addAction(self.actionStop) | |
|
1440 | self.menuOptions.addAction(self.actionFTP) | |
|
1441 | self.menuHelp.addAction(self.actionAbout) | |
|
1442 | self.menuBar.addAction(self.menuProject.menuAction()) | |
|
1443 | self.menuBar.addAction(self.menuRun.menuAction()) | |
|
1444 | self.menuBar.addAction(self.menuOptions.menuAction()) | |
|
1445 | self.menuBar.addAction(self.menuHelp.menuAction()) | |
|
1446 | ||
|
1447 | self.tabConsole.setCurrentIndex(0) | |
|
1448 | self.tabWidget.setCurrentIndex(0) | |
|
1449 | ||
|
1450 | def retranslateUi(self, MainWindow): | |
|
1451 | ||
|
1452 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) | |
|
1453 | ||
|
1454 | self.tabConsole.setTabText(self.tabConsole.indexOf(self.tab_5), _translate("MainWindow", "Console", None)) | |
|
1455 | ||
|
1456 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabProjectProperty), _translate("MainWindow", "Project Property", None)) | |
|
1457 | self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None)) | |
|
1458 | self.menuProject.setTitle(_translate("MainWindow", "Project", None)) | |
|
1459 | self.menuRun.setTitle(_translate("MainWindow", "Run", None)) | |
|
1460 | self.menuOptions.setTitle(_translate("MainWindow", "Options", None)) | |
|
1461 | self.menuHelp.setTitle(_translate("MainWindow", "Help", None)) | |
|
1462 | self.actionOpen.setText(_translate("MainWindow", "Open", None)) | |
|
1463 | self.actionCreate.setText(_translate("MainWindow", "Create", None)) | |
|
1464 | self.actionSave.setText(_translate("MainWindow", "Save", None)) | |
|
1465 | self.actionClose.setText(_translate("MainWindow", "Close", None)) | |
|
1466 | self.actionStart.setText(_translate("MainWindow", "Start", None)) | |
|
1467 | self.actionPause.setText(_translate("MainWindow", "Pause", None)) | |
|
1468 | self.actionStop.setText(_translate("MainWindow", "Stop", None)) | |
|
1469 | self.actionAbout.setText(_translate("MainWindow", "About", None)) | |
|
1470 | self.actionOpenToolbar.setText(_translate("MainWindow", "openToolbar", None)) | |
|
1471 | self.actionOpenToolbar.setToolTip(_translate("MainWindow", "Open Project", None)) | |
|
1472 | self.actionCreateToolbar.setText(_translate("MainWindow", "createToolbar", None)) | |
|
1473 | self.actionCreateToolbar.setToolTip(_translate("MainWindow", "Create αΉroject", None)) | |
|
1474 | self.actionSaveToolbar.setText(_translate("MainWindow", "saveToolbar", None)) | |
|
1475 | self.actionSaveToolbar.setToolTip(_translate("MainWindow", "Save Project", None)) | |
|
1476 | self.actionStarToolbar.setText(_translate("MainWindow", "starToolbar", None)) | |
|
1477 | self.actionStarToolbar.setToolTip(_translate("MainWindow", "Start ", None)) | |
|
1478 | self.actionStopToolbar.setText(_translate("MainWindow", "stopToolbar", None)) | |
|
1479 | self.actionStopToolbar.setToolTip(_translate("MainWindow", "Stop", None)) | |
|
1480 | self.actionPauseToolbar.setText(_translate("MainWindow", "pauseToolbar", None)) | |
|
1481 | self.actionPauseToolbar.setToolTip(_translate("MainWindow", "Pause", None)) | |
|
1482 | self.actionAddPU.setText(_translate("MainWindow", "Add Processing Unit", None)) | |
|
1483 | self.actionFTP.setText(_translate("MainWindow", "FTP", None)) | |
|
1484 | ||
|
1485 | class Ui_BasicWindow(Ui_EnvWindow, Ui_ProjectTab, Ui_VoltageTab, Ui_SpectraTab, Ui_SpectraHeisTab, Ui_CorrelationTab): | |
|
1248 | 1486 | |
|
1249 |
def setupUi(self, |
|
|
1487 | def setupUi(self, MainWindow): | |
|
1488 | ||
|
1489 | Ui_EnvWindow.setupUi(self, MainWindow) | |
|
1250 | 1490 | |
|
1251 |
Ui_ |
|
|
1491 | Ui_ProjectTab.setupUi(self) | |
|
1492 | Ui_VoltageTab.setupUi(self) | |
|
1493 | Ui_SpectraTab.setupUi(self) | |
|
1494 | Ui_SpectraHeisTab.setupUi(self) | |
|
1495 | Ui_CorrelationTab.setupUi(self) | |
|
1252 | 1496 | |
|
1253 |
|
|
|
1497 | self.retranslateUi(MainWindow) | |
|
1498 | ||
|
1499 | QtCore.QMetaObject.connectSlotsByName(MainWindow) | |
|
1500 | ||
|
1501 | def retranslateUi(self, MainWindow): | |
|
1502 | ||
|
1503 | Ui_EnvWindow.retranslateUi(self, MainWindow) | |
|
1504 | ||
|
1505 | Ui_ProjectTab.retranslateUi(self) | |
|
1506 | Ui_VoltageTab.retranslateUi(self) | |
|
1507 | Ui_SpectraTab.retranslateUi(self) | |
|
1508 | Ui_SpectraHeisTab.retranslateUi(self) | |
|
1509 | Ui_CorrelationTab.retranslateUi(self) | |
|
1254 | 1510 | |
|
1255 | Ui_MainWindow.retranslateUi(self,BasicWindow) | |
|
1256 | ||
|
1257 | ||
|
1258 | 1511 | |
|
1259 | 1512 | class Ui_AdvancedWindow(Ui_MainWindow): |
|
1260 | 1513 | |
|
1261 | 1514 | def setupUi(self, AdvancedWindow): |
|
1262 | 1515 | |
|
1263 | 1516 | Ui_MainWindow.setupUi(self, AdvancedWindow) |
|
1264 | 1517 | |
|
1265 | 1518 | def retranslateUi(self, AdvancedWindow): |
|
1266 | 1519 | |
|
1267 | 1520 | Ui_MainWindow.retranslateUi(self, AdvancedWindow) |
|
1268 | 1521 | |
|
1269 | 1522 | |
|
1270 | 1523 | |
|
1271 | 1524 | if __name__ == "__main__": |
|
1272 | 1525 | import sys |
|
1273 | 1526 | app = QtGui.QApplication(sys.argv) |
|
1274 | 1527 | MainWindow = QtGui.QMainWindow() |
|
1275 |
ui = Ui_ |
|
|
1528 | ui = Ui_BasicWindow() | |
|
1276 | 1529 | ui.setupUi(MainWindow) |
|
1277 | 1530 | MainWindow.show() |
|
1278 | 1531 | sys.exit(app.exec_()) |
|
1279 | 1532 |
@@ -1,940 +1,949 | |||
|
1 | 1 | ''' |
|
2 | 2 | @author: Daniel Suarez |
|
3 | 3 | ''' |
|
4 | 4 | import os |
|
5 | 5 | import glob |
|
6 | 6 | import ftplib |
|
7 | 7 | |
|
8 | 8 | try: |
|
9 | 9 | import paramiko |
|
10 | 10 | import scp |
|
11 | 11 | except: |
|
12 | 12 | print "You should install paramiko if you will use SSH protocol to upload files to a server" |
|
13 | 13 | |
|
14 | 14 | import multiprocessing |
|
15 | 15 | |
|
16 | 16 | import time |
|
17 | 17 | import threading |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | try: |
|
21 | 21 | from gevent import sleep |
|
22 | 22 | except: |
|
23 | 23 | from time import sleep |
|
24 | 24 | |
|
25 | 25 | from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation |
|
26 | 26 | |
|
27 | 27 | class Remote(threading.Thread): |
|
28 | 28 | """ |
|
29 | 29 | Remote is a parent class used to define the behaviour of FTP and SSH class. These clases are |
|
30 | 30 | used to upload or download files remotely. |
|
31 | 31 | |
|
32 | 32 | Non-standard Python modules used: |
|
33 | 33 | None |
|
34 | 34 | |
|
35 | 35 | Written by: |
|
36 | 36 | |
|
37 | 37 | "Miguel Urco":mailto:miguel.urco@jro.igp.gob.pe Jun. 03, 2015 |
|
38 | 38 | |
|
39 | 39 | """ |
|
40 | 40 | |
|
41 | 41 | server = None |
|
42 | 42 | username = None |
|
43 | 43 | password = None |
|
44 | 44 | remotefolder = None |
|
45 | 45 | |
|
46 | 46 | period = 60 |
|
47 | 47 | fileList = [] |
|
48 | 48 | bussy = False |
|
49 | 49 | |
|
50 | 50 | def __init__(self, server, username, password, remotefolder, period=60): |
|
51 | 51 | |
|
52 | 52 | threading.Thread.__init__(self) |
|
53 | 53 | self._stop = threading.Event() |
|
54 | 54 | |
|
55 | 55 | self.status = 0 |
|
56 | 56 | |
|
57 | 57 | self.period = period |
|
58 | 58 | self.fileList = [] |
|
59 | 59 | self.bussy = False |
|
60 | 60 | |
|
61 | 61 | self.stopFlag = False |
|
62 | 62 | |
|
63 | 63 | print "[Remote Server] Opening server: %s" %server |
|
64 | 64 | if self.open(server, username, password, remotefolder): |
|
65 | 65 | print "[Remote Server] %s server was opened successfully" %server |
|
66 | 66 | |
|
67 | 67 | def stop(self): |
|
68 | 68 | |
|
69 | 69 | self.stopFlag = True |
|
70 | 70 | |
|
71 | 71 | def open(self): |
|
72 | 72 | """ |
|
73 | 73 | Connect to server and create a connection class (FTP or SSH) to remote server. |
|
74 | 74 | """ |
|
75 | 75 | raise NotImplementedError, "Implement this method in child class" |
|
76 | 76 | |
|
77 | 77 | def close(self): |
|
78 | 78 | """ |
|
79 | 79 | Close connection to server |
|
80 | 80 | """ |
|
81 | 81 | raise NotImplementedError, "Implement this method in child class" |
|
82 | 82 | |
|
83 | 83 | def mkdir(self, remotefolder): |
|
84 | 84 | """ |
|
85 | 85 | Create a folder remotely |
|
86 | 86 | """ |
|
87 | 87 | raise NotImplementedError, "Implement this method in child class" |
|
88 | 88 | |
|
89 | 89 | def cd(self, remotefolder): |
|
90 | 90 | """ |
|
91 | 91 | Change working directory in remote server |
|
92 | 92 | """ |
|
93 | 93 | raise NotImplementedError, "Implement this method in child class" |
|
94 | 94 | |
|
95 | 95 | def download(self, filename, localfolder=None): |
|
96 | 96 | """ |
|
97 | 97 | Download a file from server to local host |
|
98 | 98 | """ |
|
99 | 99 | raise NotImplementedError, "Implement this method in child class" |
|
100 | 100 | |
|
101 | 101 | def sendFile(self, fullfilename): |
|
102 | 102 | """ |
|
103 | 103 | sendFile method is used to upload a local file to the current directory in remote server |
|
104 | 104 | |
|
105 | 105 | Inputs: |
|
106 | 106 | fullfilename - full path name of local file to store in remote directory |
|
107 | 107 | |
|
108 | 108 | Returns: |
|
109 | 109 | 0 in error case else 1 |
|
110 | 110 | """ |
|
111 | 111 | raise NotImplementedError, "Implement this method in child class" |
|
112 | 112 | |
|
113 | 113 | def upload(self, fullfilename, remotefolder=None): |
|
114 | 114 | """ |
|
115 | 115 | upload method is used to upload a local file to remote directory. This method changes |
|
116 | 116 | working directory before sending a file. |
|
117 | 117 | |
|
118 | 118 | Inputs: |
|
119 | 119 | fullfilename - full path name of local file to store in remote directory |
|
120 | 120 | |
|
121 | 121 | remotefolder - remote directory |
|
122 | 122 | |
|
123 | 123 | Returns: |
|
124 | 124 | 0 in error case else 1 |
|
125 | 125 | """ |
|
126 | 126 | print "[Remote Server] Uploading %s to %s:%s" %(fullfilename, self.server, self.remotefolder) |
|
127 | 127 | |
|
128 | 128 | if not self.status: |
|
129 | 129 | return 0 |
|
130 | 130 | |
|
131 | 131 | if remotefolder == None: |
|
132 | 132 | remotefolder = self.remotefolder |
|
133 | 133 | |
|
134 | 134 | if not self.cd(remotefolder): |
|
135 | 135 | return 0 |
|
136 | 136 | |
|
137 | 137 | if not self.sendFile(fullfilename): |
|
138 | 138 | print "[Remote Server] Error uploading file %s" %fullfilename |
|
139 | 139 | return 0 |
|
140 | 140 | |
|
141 | 141 | print "[Remote Server] upload finished successfully" |
|
142 | 142 | |
|
143 | 143 | return 1 |
|
144 | 144 | |
|
145 | 145 | def delete(self, filename): |
|
146 | 146 | """ |
|
147 | 147 | Remove a file from remote server |
|
148 | 148 | """ |
|
149 | 149 | pass |
|
150 | 150 | |
|
151 | 151 | def updateFileList(self, fileList): |
|
152 | 152 | """ |
|
153 | 153 | Remove a file from remote server |
|
154 | 154 | """ |
|
155 | 155 | |
|
156 | 156 | if fileList == self.fileList: |
|
157 | 157 | return 1 |
|
158 | 158 | |
|
159 | 159 | init = time.time() |
|
160 | 160 | |
|
161 | 161 | while(self.bussy): |
|
162 | 162 | sleep(0.1) |
|
163 | 163 | if time.time() - init > 2*self.period: |
|
164 | 164 | return 0 |
|
165 | 165 | |
|
166 | 166 | self.fileList = fileList |
|
167 | 167 | |
|
168 | 168 | return 1 |
|
169 | 169 | |
|
170 | 170 | def run(self): |
|
171 | 171 | |
|
172 | if not self.status: | |
|
173 | print "Finishing FTP service" | |
|
174 | return | |
|
175 | ||
|
172 | 176 | if not self.cd(self.remotefolder): |
|
173 | 177 | raise ValueError, "Could not access to the new remote directory: %s" %self.remotefolder |
|
174 | 178 | |
|
179 | sts = True | |
|
180 | ||
|
175 | 181 | while True: |
|
176 | 182 | |
|
177 | 183 | sleep(self.period) |
|
178 | 184 | |
|
179 | 185 | self.bussy = True |
|
180 | 186 | |
|
181 | 187 | for thisFile in self.fileList: |
|
182 | self.upload(thisFile, self.remotefolder) | |
|
188 | sts = self.upload(thisFile, self.remotefolder) | |
|
189 | if not sts: break | |
|
183 | 190 | |
|
191 | if not sts: break | |
|
192 | ||
|
184 | 193 | self.bussy = False |
|
185 | 194 | |
|
186 | 195 | if self.stopFlag: |
|
187 | 196 | break |
|
188 | 197 | |
|
189 | 198 | print "[Remote Server] Thread stopped successfully" |
|
190 | 199 | |
|
191 | 200 | class FTPClient(Remote): |
|
192 | 201 | |
|
193 | 202 | __ftpClientObj = None |
|
194 | 203 | |
|
195 | 204 | def __init__(self, server, username, password, remotefolder, period=60): |
|
196 | 205 | """ |
|
197 | 206 | """ |
|
198 | 207 | Remote.__init__(self, server, username, password, remotefolder, period) |
|
199 | 208 | |
|
200 | 209 | def open(self, server, username, password, remotefolder): |
|
201 | 210 | |
|
202 | 211 | """ |
|
203 | 212 | This method is used to set FTP parameters and establish a connection to remote server |
|
204 | 213 | |
|
205 | 214 | Inputs: |
|
206 | 215 | server - remote server IP Address |
|
207 | 216 | |
|
208 | 217 | username - remote server Username |
|
209 | 218 | |
|
210 | 219 | password - remote server password |
|
211 | 220 | |
|
212 | 221 | remotefolder - remote server current working directory |
|
213 | 222 | |
|
214 | 223 | Return: void |
|
215 | 224 | |
|
216 | 225 | Affects: |
|
217 | 226 | self.status - in case of error or fail connection this parameter is set to 0 else 1 |
|
218 | 227 | |
|
219 | 228 | """ |
|
220 | 229 | |
|
221 | 230 | if server == None: |
|
222 | 231 | raise ValueError, "FTP server should be defined" |
|
223 | 232 | |
|
224 | 233 | if username == None: |
|
225 | 234 | raise ValueError, "FTP username should be defined" |
|
226 | 235 | |
|
227 | 236 | if password == None: |
|
228 | 237 | raise ValueError, "FTP password should be defined" |
|
229 | 238 | |
|
230 | 239 | if remotefolder == None: |
|
231 | 240 | raise ValueError, "FTP remote folder should be defined" |
|
232 | 241 | |
|
233 | 242 | try: |
|
234 | 243 | ftpClientObj = ftplib.FTP(server) |
|
235 | 244 | except ftplib.all_errors: |
|
236 | 245 | print "FTP server connection fail: %s" %server |
|
237 | 246 | self.status = 0 |
|
238 | 247 | return 0 |
|
239 | 248 | |
|
240 | 249 | try: |
|
241 | 250 | ftpClientObj.login(username, password) |
|
242 | 251 | except ftplib.all_errors: |
|
243 | 252 | print "FTP username or password are incorrect" |
|
244 | 253 | self.status = 0 |
|
245 | 254 | return 0 |
|
246 | 255 | |
|
247 | 256 | if remotefolder == None: |
|
248 | 257 | remotefolder = ftpClientObj.pwd() |
|
249 | 258 | else: |
|
250 | 259 | try: |
|
251 | 260 | ftpClientObj.cwd(remotefolder) |
|
252 | 261 | except ftplib.all_errors: |
|
253 | 262 | print "FTP remote folder is invalid: %s" %remotefolder |
|
254 | 263 | remotefolder = ftpClientObj.pwd() |
|
255 | 264 | |
|
256 | 265 | self.server = server |
|
257 | 266 | self.username = username |
|
258 | 267 | self.password = password |
|
259 | 268 | self.remotefolder = remotefolder |
|
260 | 269 | self.__ftpClientObj = ftpClientObj |
|
261 | 270 | self.status = 1 |
|
262 | 271 | |
|
263 | 272 | return 1 |
|
264 | 273 | |
|
265 | 274 | def close(self): |
|
266 | 275 | """ |
|
267 | 276 | Close connection to remote server |
|
268 | 277 | """ |
|
269 | 278 | if not self.status: |
|
270 | 279 | return 0 |
|
271 | 280 | |
|
272 | 281 | self.__ftpClientObj.close() |
|
273 | 282 | |
|
274 | 283 | def mkdir(self, remotefolder): |
|
275 | 284 | """ |
|
276 | 285 | mkdir is used to make a new directory in remote server |
|
277 | 286 | |
|
278 | 287 | Input: |
|
279 | 288 | remotefolder - directory name |
|
280 | 289 | |
|
281 | 290 | Return: |
|
282 | 291 | 0 in error case else 1 |
|
283 | 292 | """ |
|
284 | 293 | if not self.status: |
|
285 | 294 | return 0 |
|
286 | 295 | |
|
287 | 296 | try: |
|
288 | 297 | self.__ftpClientObj.mkd(dirname) |
|
289 | 298 | except ftplib.all_errors: |
|
290 | 299 | print "Error creating remote folder: %s" %remotefolder |
|
291 | 300 | return 0 |
|
292 | 301 | |
|
293 | 302 | return 1 |
|
294 | 303 | |
|
295 | 304 | def cd(self, remotefolder): |
|
296 | 305 | """ |
|
297 | 306 | cd is used to change remote working directory on server |
|
298 | 307 | |
|
299 | 308 | Input: |
|
300 | 309 | remotefolder - current working directory |
|
301 | 310 | |
|
302 | 311 | Affects: |
|
303 | 312 | self.remotefolder |
|
304 | 313 | |
|
305 | 314 | Return: |
|
306 | 315 | 0 in case of error else 1 |
|
307 | 316 | """ |
|
308 | 317 | if not self.status: |
|
309 | 318 | return 0 |
|
310 | 319 | |
|
311 | 320 | if remotefolder == self.remotefolder: |
|
312 | 321 | return 1 |
|
313 | 322 | |
|
314 | 323 | try: |
|
315 | 324 | self.__ftpClientObj.cwd(remotefolder) |
|
316 | 325 | except ftplib.all_errors: |
|
317 | 326 | print 'Error changing to %s' %remotefolder |
|
318 | 327 | print 'Trying to create remote folder' |
|
319 | 328 | |
|
320 | 329 | if not self.mkdir(remotefolder): |
|
321 | 330 | print 'Remote folder could not be created' |
|
322 | 331 | return 0 |
|
323 | 332 | |
|
324 | 333 | try: |
|
325 | 334 | self.__ftpClientObj.cwd(remotefolder) |
|
326 | 335 | except ftplib.all_errors: |
|
327 | 336 | return 0 |
|
328 | 337 | |
|
329 | 338 | self.remotefolder = remotefolder |
|
330 | 339 | |
|
331 | 340 | return 1 |
|
332 | 341 | |
|
333 | 342 | def sendFile(self, fullfilename): |
|
334 | 343 | |
|
335 | 344 | if not self.status: |
|
336 | 345 | return 0 |
|
337 | 346 | |
|
338 | 347 | file = open(fullfilename, 'rb') |
|
339 | 348 | |
|
340 | 349 | filename = os.path.split(fullfilename)[-1] |
|
341 | 350 | |
|
342 | 351 | command = "STOR %s" %filename |
|
343 | 352 | |
|
344 | 353 | try: |
|
345 | 354 | self.__ftpClientObj.storbinary(command, file) |
|
346 | 355 | except ftplib.all_errors: |
|
347 | 356 | return 0 |
|
348 | 357 | |
|
349 | 358 | try: |
|
350 | 359 | self.__ftpClientObj.sendcmd('SITE CHMOD 755 ' + filename) |
|
351 | 360 | except ftplib.all_errors, e: |
|
352 | 361 | print e |
|
353 | 362 | |
|
354 | 363 | file.close() |
|
355 | 364 | |
|
356 | 365 | return 1 |
|
357 | 366 | |
|
358 | 367 | class SSHClient(Remote): |
|
359 | 368 | |
|
360 | 369 | __sshClientObj = None |
|
361 | 370 | __scpClientObj = None |
|
362 | 371 | |
|
363 | 372 | def __init__(self, server, username, password, remotefolder, period=60): |
|
364 | 373 | """ |
|
365 | 374 | """ |
|
366 | 375 | Remote.__init__(self, server, username, password, remotefolder, period) |
|
367 | 376 | |
|
368 | 377 | def open(self, server, username, password, remotefolder, port=22): |
|
369 | 378 | |
|
370 | 379 | """ |
|
371 | 380 | This method is used to set SSH parameters and establish a connection to a remote server |
|
372 | 381 | |
|
373 | 382 | Inputs: |
|
374 | 383 | server - remote server IP Address |
|
375 | 384 | |
|
376 | 385 | username - remote server Username |
|
377 | 386 | |
|
378 | 387 | password - remote server password |
|
379 | 388 | |
|
380 | 389 | remotefolder - remote server current working directory |
|
381 | 390 | |
|
382 | 391 | Return: void |
|
383 | 392 | |
|
384 | 393 | Affects: |
|
385 | 394 | self.status - in case of error or fail connection this parameter is set to 0 else 1 |
|
386 | 395 | |
|
387 | 396 | """ |
|
388 | 397 | |
|
389 | 398 | if server == None: |
|
390 | 399 | raise ValueError, "SSH server should be defined" |
|
391 | 400 | |
|
392 | 401 | if username == None: |
|
393 | 402 | raise ValueError, "SSH username should be defined" |
|
394 | 403 | |
|
395 | 404 | if password == None: |
|
396 | 405 | raise ValueError, "SSH password should be defined" |
|
397 | 406 | |
|
398 | 407 | if remotefolder == None: |
|
399 | 408 | raise ValueError, "SSH remote folder should be defined" |
|
400 | 409 | |
|
401 | 410 | try: |
|
402 | 411 | sshClientObj = paramiko.SSHClient() |
|
403 | 412 | except: |
|
404 | 413 | print "SSH server connection fail: %s" %server |
|
405 | 414 | self.status = 0 |
|
406 | 415 | return 0 |
|
407 | 416 | |
|
408 | 417 | sshClientObj.load_system_host_keys() |
|
409 | 418 | sshClientObj.set_missing_host_key_policy(paramiko.WarningPolicy()) |
|
410 | 419 | |
|
411 | 420 | try: |
|
412 | 421 | sshClientObj.connect(server, username=username, password=password, port=port) |
|
413 | 422 | except : |
|
414 | 423 | print "SSH username or password are incorrect: %s" |
|
415 | 424 | self.status = 0 |
|
416 | 425 | return 0 |
|
417 | 426 | |
|
418 | 427 | scpClientObj = scp.SCPClient(sshClientObj.get_transport(), socket_timeout=30) |
|
419 | 428 | |
|
420 | 429 | if remotefolder == None: |
|
421 | 430 | remotefolder = self.pwd() |
|
422 | 431 | |
|
423 | 432 | self.server = server |
|
424 | 433 | self.username = username |
|
425 | 434 | self.password = password |
|
426 | 435 | self.__sshClientObj = sshClientObj |
|
427 | 436 | self.__scpClientObj = scpClientObj |
|
428 | 437 | self.status = 1 |
|
429 | 438 | |
|
430 | 439 | if not self.cd(remotefolder): |
|
431 | 440 | raise ValueError, "Could not access to remote folder: %s" %remotefolder |
|
432 | 441 | return 0 |
|
433 | 442 | |
|
434 | 443 | self.remotefolder = remotefolder |
|
435 | 444 | |
|
436 | 445 | return 1 |
|
437 | 446 | |
|
438 | 447 | def close(self): |
|
439 | 448 | """ |
|
440 | 449 | Close connection to remote server |
|
441 | 450 | """ |
|
442 | 451 | if not self.status: |
|
443 | 452 | return 0 |
|
444 | 453 | |
|
445 | 454 | self.__sshObj.close() |
|
446 | 455 | |
|
447 | 456 | def __execute(self, command): |
|
448 | 457 | """ |
|
449 | 458 | __execute a command on remote server |
|
450 | 459 | |
|
451 | 460 | Input: |
|
452 | 461 | command - Exmaple 'ls -l' |
|
453 | 462 | |
|
454 | 463 | Return: |
|
455 | 464 | 0 in error case else 1 |
|
456 | 465 | """ |
|
457 | 466 | if not self.status: |
|
458 | 467 | return 0 |
|
459 | 468 | |
|
460 | 469 | stdin, stdout, stderr = self.__sshClientObj.exec_command(command) |
|
461 | 470 | |
|
462 | 471 | result = stderr.readlines() |
|
463 | 472 | if len(result) > 1: |
|
464 | 473 | return 0 |
|
465 | 474 | |
|
466 | 475 | result = stdout.readlines() |
|
467 | 476 | if len(result) > 1: |
|
468 | 477 | return result[0][:-1] |
|
469 | 478 | |
|
470 | 479 | return 1 |
|
471 | 480 | |
|
472 | 481 | def mkdir(self, remotefolder): |
|
473 | 482 | """ |
|
474 | 483 | mkdir is used to make a new directory in remote server |
|
475 | 484 | |
|
476 | 485 | Input: |
|
477 | 486 | remotefolder - directory name |
|
478 | 487 | |
|
479 | 488 | Return: |
|
480 | 489 | 0 in error case else 1 |
|
481 | 490 | """ |
|
482 | 491 | |
|
483 | 492 | command = 'mkdir %s' %remotefolder |
|
484 | 493 | |
|
485 | 494 | return self.__execute(command) |
|
486 | 495 | |
|
487 | 496 | def pwd(self): |
|
488 | 497 | |
|
489 | 498 | command = 'pwd' |
|
490 | 499 | |
|
491 | 500 | return self.__execute(command) |
|
492 | 501 | |
|
493 | 502 | def cd(self, remotefolder): |
|
494 | 503 | """ |
|
495 | 504 | cd is used to change remote working directory on server |
|
496 | 505 | |
|
497 | 506 | Input: |
|
498 | 507 | remotefolder - current working directory |
|
499 | 508 | |
|
500 | 509 | Affects: |
|
501 | 510 | self.remotefolder |
|
502 | 511 | |
|
503 | 512 | Return: |
|
504 | 513 | 0 in case of error else 1 |
|
505 | 514 | """ |
|
506 | 515 | if not self.status: |
|
507 | 516 | return 0 |
|
508 | 517 | |
|
509 | 518 | if remotefolder == self.remotefolder: |
|
510 | 519 | return 1 |
|
511 | 520 | |
|
512 | 521 | chk_command = "cd %s; pwd" %remotefolder |
|
513 | 522 | mkdir_command = "mkdir %s" %remotefolder |
|
514 | 523 | |
|
515 | 524 | if not self.__execute(chk_command): |
|
516 | 525 | if not self.__execute(mkdir_command): |
|
517 | 526 | self.remotefolder = None |
|
518 | 527 | return 0 |
|
519 | 528 | |
|
520 | 529 | self.remotefolder = remotefolder |
|
521 | 530 | |
|
522 | 531 | return 1 |
|
523 | 532 | |
|
524 | 533 | def sendFile(self, fullfilename): |
|
525 | 534 | |
|
526 | 535 | if not self.status: |
|
527 | 536 | return 0 |
|
528 | 537 | |
|
529 | 538 | try: |
|
530 | 539 | self.__scpClientObj.put(fullfilename, remote_path=self.remotefolder) |
|
531 | 540 | except: |
|
532 | 541 | return 0 |
|
533 | 542 | |
|
534 | 543 | remotefile = os.path.join(self.remotefolder, os.path.split(fullfilename)[-1]) |
|
535 | 544 | command = 'chmod 775 %s' %remotefile |
|
536 | 545 | |
|
537 | 546 | return self.__execute(command) |
|
538 | 547 | |
|
539 | 548 | class SendToServer(ProcessingUnit): |
|
540 | 549 | |
|
541 | 550 | def __init__(self): |
|
542 | 551 | |
|
543 | 552 | ProcessingUnit.__init__(self) |
|
544 | 553 | |
|
545 | 554 | self.isConfig = False |
|
546 | 555 | self.clientObj = None |
|
547 | 556 | |
|
548 | 557 | def setup(self, server, username, password, remotefolder, localfolder, ext='.png', period=60, protocol='ftp'): |
|
549 | 558 | |
|
550 | 559 | self.clientObj = None |
|
551 | 560 | self.localfolder = localfolder |
|
552 | 561 | self.ext = ext |
|
553 | 562 | self.period = period |
|
554 | 563 | |
|
555 | 564 | if str.lower(protocol) == 'ftp': |
|
556 | 565 | self.clientObj = FTPClient(server, username, password, remotefolder, period) |
|
557 | 566 | |
|
558 | 567 | if str.lower(protocol) == 'ssh': |
|
559 | 568 | self.clientObj = SSHClient(server, username, password, remotefolder, period) |
|
560 | 569 | |
|
561 | 570 | if not self.clientObj: |
|
562 | 571 | raise ValueError, "%s has been chosen as remote access protocol but it is not valid" %protocol |
|
563 | 572 | |
|
564 | 573 | self.clientObj.start() |
|
565 | 574 | |
|
566 | 575 | def findFiles(self): |
|
567 | 576 | |
|
568 | 577 | filenameList = glob.glob1(self.localfolder, '*%s' %self.ext) |
|
569 | 578 | |
|
570 | 579 | if len(filenameList) < 1: |
|
571 | 580 | return [] |
|
572 | 581 | |
|
573 | 582 | fullfilenameList = [os.path.join(self.localfolder, thisFile) for thisFile in filenameList] |
|
574 | 583 | |
|
575 | 584 | return fullfilenameList |
|
576 | 585 | |
|
577 | 586 | def run(self, **kwargs): |
|
578 | 587 | |
|
579 | 588 | if not self.isConfig: |
|
580 | 589 | self.init = time.time() |
|
581 | 590 | self.setup(**kwargs) |
|
582 | 591 | self.isConfig = True |
|
583 | 592 | |
|
584 | 593 | if time.time() - self.init >= self.period: |
|
585 | 594 | fullfilenameList = self.findFiles() |
|
586 | 595 | self.clientObj.updateFileList(fullfilenameList) |
|
587 | 596 | self.init = time.time() |
|
588 | 597 | |
|
589 | 598 | def close(self): |
|
590 | 599 | print "[Remote Server] Stopping thread" |
|
591 | 600 | self.clientObj.stop() |
|
592 | 601 | |
|
593 | 602 | |
|
594 | 603 | class FTP(object): |
|
595 | 604 | """ |
|
596 | 605 | Ftp is a public class used to define custom File Transfer Protocol from "ftplib" python module |
|
597 | 606 | |
|
598 | 607 | Non-standard Python modules used: None |
|
599 | 608 | |
|
600 | 609 | Written by "Daniel Suarez":mailto:daniel.suarez@jro.igp.gob.pe Oct. 26, 2010 |
|
601 | 610 | """ |
|
602 | 611 | |
|
603 | 612 | def __init__(self,server = None, username=None, password=None, remotefolder=None): |
|
604 | 613 | """ |
|
605 | 614 | This method is used to setting parameters for FTP and establishing connection to remote server |
|
606 | 615 | |
|
607 | 616 | Inputs: |
|
608 | 617 | server - remote server IP Address |
|
609 | 618 | |
|
610 | 619 | username - remote server Username |
|
611 | 620 | |
|
612 | 621 | password - remote server password |
|
613 | 622 | |
|
614 | 623 | remotefolder - remote server current working directory |
|
615 | 624 | |
|
616 | 625 | Return: void |
|
617 | 626 | |
|
618 | 627 | Affects: |
|
619 | 628 | self.status - in Error Case or Connection Failed this parameter is set to 1 else 0 |
|
620 | 629 | |
|
621 | 630 | self.folderList - sub-folder list of remote folder |
|
622 | 631 | |
|
623 | 632 | self.fileList - file list of remote folder |
|
624 | 633 | |
|
625 | 634 | |
|
626 | 635 | """ |
|
627 | 636 | |
|
628 | 637 | if ((server == None) and (username==None) and (password==None) and (remotefolder==None)): |
|
629 | 638 | server, username, password, remotefolder = self.parmsByDefault() |
|
630 | 639 | |
|
631 | 640 | self.server = server |
|
632 | 641 | self.username = username |
|
633 | 642 | self.password = password |
|
634 | 643 | self.remotefolder = remotefolder |
|
635 | 644 | self.file = None |
|
636 | 645 | self.ftp = None |
|
637 | 646 | self.status = 0 |
|
638 | 647 | |
|
639 | 648 | try: |
|
640 | 649 | self.ftp = ftplib.FTP(self.server) |
|
641 | 650 | self.ftp.login(self.username,self.password) |
|
642 | 651 | self.ftp.cwd(self.remotefolder) |
|
643 | 652 | # print 'Connect to FTP Server: Successfully' |
|
644 | 653 | |
|
645 | 654 | except ftplib.all_errors: |
|
646 | 655 | print 'Error FTP Service' |
|
647 | 656 | self.status = 1 |
|
648 | 657 | return |
|
649 | 658 | |
|
650 | 659 | |
|
651 | 660 | |
|
652 | 661 | self.dirList = [] |
|
653 | 662 | |
|
654 | 663 | try: |
|
655 | 664 | self.dirList = self.ftp.nlst() |
|
656 | 665 | |
|
657 | 666 | except ftplib.error_perm, resp: |
|
658 | 667 | if str(resp) == "550 No files found": |
|
659 | 668 | print "no files in this directory" |
|
660 | 669 | self.status = 1 |
|
661 | 670 | return |
|
662 | 671 | |
|
663 | 672 | except ftplib.all_errors: |
|
664 | 673 | print 'Error Displaying Dir-Files' |
|
665 | 674 | self.status = 1 |
|
666 | 675 | return |
|
667 | 676 | |
|
668 | 677 | self.fileList = [] |
|
669 | 678 | self.folderList = [] |
|
670 | 679 | #only for test |
|
671 | 680 | for f in self.dirList: |
|
672 | 681 | name, ext = os.path.splitext(f) |
|
673 | 682 | if ext != '': |
|
674 | 683 | self.fileList.append(f) |
|
675 | 684 | # print 'filename: %s - size: %d'%(f,self.ftp.size(f)) |
|
676 | 685 | |
|
677 | 686 | def parmsByDefault(self): |
|
678 | 687 | server = 'jro-app.igp.gob.pe' |
|
679 | 688 | username = 'wmaster' |
|
680 | 689 | password = 'mst2010vhf' |
|
681 | 690 | remotefolder = '/home/wmaster/graficos' |
|
682 | 691 | |
|
683 | 692 | return server, username, password, remotefolder |
|
684 | 693 | |
|
685 | 694 | |
|
686 | 695 | def mkd(self,dirname): |
|
687 | 696 | """ |
|
688 | 697 | mkd is used to make directory in remote server |
|
689 | 698 | |
|
690 | 699 | Input: |
|
691 | 700 | dirname - directory name |
|
692 | 701 | |
|
693 | 702 | Return: |
|
694 | 703 | 1 in error case else 0 |
|
695 | 704 | """ |
|
696 | 705 | try: |
|
697 | 706 | self.ftp.mkd(dirname) |
|
698 | 707 | except: |
|
699 | 708 | print 'Error creating remote folder:%s'%dirname |
|
700 | 709 | return 1 |
|
701 | 710 | |
|
702 | 711 | return 0 |
|
703 | 712 | |
|
704 | 713 | |
|
705 | 714 | def delete(self,filename): |
|
706 | 715 | """ |
|
707 | 716 | delete is used to delete file in current working directory of remote server |
|
708 | 717 | |
|
709 | 718 | Input: |
|
710 | 719 | filename - filename to delete in remote folder |
|
711 | 720 | |
|
712 | 721 | Return: |
|
713 | 722 | 1 in error case else 0 |
|
714 | 723 | """ |
|
715 | 724 | |
|
716 | 725 | try: |
|
717 | 726 | self.ftp.delete(filename) |
|
718 | 727 | except: |
|
719 | 728 | print 'Error deleting remote file:%s'%filename |
|
720 | 729 | return 1 |
|
721 | 730 | |
|
722 | 731 | return 0 |
|
723 | 732 | |
|
724 | 733 | def download(self,filename,localfolder): |
|
725 | 734 | """ |
|
726 | 735 | download is used to downloading file from remote folder into local folder |
|
727 | 736 | |
|
728 | 737 | Inputs: |
|
729 | 738 | filename - filename to donwload |
|
730 | 739 | |
|
731 | 740 | localfolder - directory local to store filename |
|
732 | 741 | |
|
733 | 742 | Returns: |
|
734 | 743 | self.status - 1 in error case else 0 |
|
735 | 744 | """ |
|
736 | 745 | |
|
737 | 746 | self.status = 0 |
|
738 | 747 | |
|
739 | 748 | |
|
740 | 749 | if not(filename in self.fileList): |
|
741 | 750 | print 'filename:%s not exists'%filename |
|
742 | 751 | self.status = 1 |
|
743 | 752 | return self.status |
|
744 | 753 | |
|
745 | 754 | newfilename = os.path.join(localfolder,filename) |
|
746 | 755 | |
|
747 | 756 | self.file = open(newfilename, 'wb') |
|
748 | 757 | |
|
749 | 758 | try: |
|
750 | 759 | print 'Download: ' + filename |
|
751 | 760 | self.ftp.retrbinary('RETR ' + filename, self.__handleDownload) |
|
752 | 761 | print 'Download Complete' |
|
753 | 762 | except ftplib.all_errors: |
|
754 | 763 | print 'Error Downloading ' + filename |
|
755 | 764 | self.status = 1 |
|
756 | 765 | return self.status |
|
757 | 766 | |
|
758 | 767 | self.file.close() |
|
759 | 768 | |
|
760 | 769 | return self.status |
|
761 | 770 | |
|
762 | 771 | |
|
763 | 772 | def __handleDownload(self,block): |
|
764 | 773 | """ |
|
765 | 774 | __handleDownload is used to handle writing file |
|
766 | 775 | """ |
|
767 | 776 | self.file.write(block) |
|
768 | 777 | |
|
769 | 778 | |
|
770 | 779 | def upload(self,filename,remotefolder=None): |
|
771 | 780 | """ |
|
772 | 781 | upload is used to uploading local file to remote directory |
|
773 | 782 | |
|
774 | 783 | Inputs: |
|
775 | 784 | filename - full path name of local file to store in remote directory |
|
776 | 785 | |
|
777 | 786 | remotefolder - remote directory |
|
778 | 787 | |
|
779 | 788 | Returns: |
|
780 | 789 | self.status - 1 in error case else 0 |
|
781 | 790 | """ |
|
782 | 791 | |
|
783 | 792 | if remotefolder == None: |
|
784 | 793 | remotefolder = self.remotefolder |
|
785 | 794 | |
|
786 | 795 | self.status = 0 |
|
787 | 796 | |
|
788 | 797 | try: |
|
789 | 798 | self.ftp.cwd(remotefolder) |
|
790 | 799 | |
|
791 | 800 | self.file = open(filename, 'rb') |
|
792 | 801 | |
|
793 | 802 | (head, tail) = os.path.split(filename) |
|
794 | 803 | |
|
795 | 804 | command = "STOR " + tail |
|
796 | 805 | |
|
797 | 806 | print 'Uploading: ' + tail |
|
798 | 807 | self.ftp.storbinary(command, self.file) |
|
799 | 808 | print 'Upload Completed' |
|
800 | 809 | |
|
801 | 810 | except ftplib.all_errors: |
|
802 | 811 | print 'Error Uploading ' + tail |
|
803 | 812 | self.status = 1 |
|
804 | 813 | return self.status |
|
805 | 814 | |
|
806 | 815 | self.file.close() |
|
807 | 816 | |
|
808 | 817 | #back to initial directory in __init__() |
|
809 | 818 | self.ftp.cwd(self.remotefolder) |
|
810 | 819 | |
|
811 | 820 | return self.status |
|
812 | 821 | |
|
813 | 822 | |
|
814 | 823 | def dir(self,remotefolder): |
|
815 | 824 | """ |
|
816 | 825 | dir is used to change working directory of remote server and get folder and file list |
|
817 | 826 | |
|
818 | 827 | Input: |
|
819 | 828 | remotefolder - current working directory |
|
820 | 829 | |
|
821 | 830 | Affects: |
|
822 | 831 | self.fileList - file list of working directory |
|
823 | 832 | |
|
824 | 833 | Return: |
|
825 | 834 | infoList - list with filenames and size of file in bytes |
|
826 | 835 | |
|
827 | 836 | self.folderList - folder list |
|
828 | 837 | """ |
|
829 | 838 | |
|
830 | 839 | self.remotefolder = remotefolder |
|
831 | 840 | print 'Change to ' + self.remotefolder |
|
832 | 841 | try: |
|
833 | 842 | self.ftp.cwd(remotefolder) |
|
834 | 843 | except ftplib.all_errors: |
|
835 | 844 | print 'Error Change to ' + self.remotefolder |
|
836 | 845 | infoList = None |
|
837 | 846 | self.folderList = None |
|
838 | 847 | return infoList,self.folderList |
|
839 | 848 | |
|
840 | 849 | self.dirList = [] |
|
841 | 850 | |
|
842 | 851 | try: |
|
843 | 852 | self.dirList = self.ftp.nlst() |
|
844 | 853 | |
|
845 | 854 | except ftplib.error_perm, resp: |
|
846 | 855 | if str(resp) == "550 No files found": |
|
847 | 856 | print "no files in this directory" |
|
848 | 857 | infoList = None |
|
849 | 858 | self.folderList = None |
|
850 | 859 | return infoList,self.folderList |
|
851 | 860 | except ftplib.all_errors: |
|
852 | 861 | print 'Error Displaying Dir-Files' |
|
853 | 862 | infoList = None |
|
854 | 863 | self.folderList = None |
|
855 | 864 | return infoList,self.folderList |
|
856 | 865 | |
|
857 | 866 | infoList = [] |
|
858 | 867 | self.fileList = [] |
|
859 | 868 | self.folderList = [] |
|
860 | 869 | for f in self.dirList: |
|
861 | 870 | name,ext = os.path.splitext(f) |
|
862 | 871 | if ext != '': |
|
863 | 872 | self.fileList.append(f) |
|
864 | 873 | value = (f,self.ftp.size(f)) |
|
865 | 874 | infoList.append(value) |
|
866 | 875 | |
|
867 | 876 | if ext == '': |
|
868 | 877 | self.folderList.append(f) |
|
869 | 878 | |
|
870 | 879 | return infoList,self.folderList |
|
871 | 880 | |
|
872 | 881 | |
|
873 | 882 | def close(self): |
|
874 | 883 | """ |
|
875 | 884 | close is used to close and end FTP connection |
|
876 | 885 | |
|
877 | 886 | Inputs: None |
|
878 | 887 | |
|
879 | 888 | Return: void |
|
880 | 889 | |
|
881 | 890 | """ |
|
882 | 891 | self.ftp.close() |
|
883 | 892 | |
|
884 | 893 | class SendByFTP(Operation): |
|
885 | 894 | |
|
886 | 895 | def __init__(self): |
|
887 | 896 | |
|
888 | 897 | self.status = 1 |
|
889 | 898 | self.counter = 0 |
|
890 | 899 | |
|
891 | 900 | def error_print(self, ValueError): |
|
892 | 901 | |
|
893 | 902 | print ValueError, 'Error FTP' |
|
894 | 903 | print "don't worry the program is running..." |
|
895 | 904 | |
|
896 | 905 | def worker_ftp(self, server, username, password, remotefolder, filenameList): |
|
897 | 906 | |
|
898 | 907 | self.ftpClientObj = FTP(server, username, password, remotefolder) |
|
899 | 908 | for filename in filenameList: |
|
900 | 909 | self.ftpClientObj.upload(filename) |
|
901 | 910 | self.ftpClientObj.close() |
|
902 | 911 | |
|
903 | 912 | def ftp_thread(self, server, username, password, remotefolder): |
|
904 | 913 | if not(self.status): |
|
905 | 914 | return |
|
906 | 915 | |
|
907 | 916 | p = multiprocessing.Process(target=self.worker_ftp, args=(server, username, password, remotefolder, self.filenameList,)) |
|
908 | 917 | p.start() |
|
909 | 918 | |
|
910 | 919 | p.join(3) |
|
911 | 920 | |
|
912 | 921 | if p.is_alive(): |
|
913 | 922 | p.terminate() |
|
914 | 923 | p.join() |
|
915 | 924 | print 'killing ftp process...' |
|
916 | 925 | self.status = 0 |
|
917 | 926 | return |
|
918 | 927 | |
|
919 | 928 | self.status = 1 |
|
920 | 929 | return |
|
921 | 930 | |
|
922 | 931 | def filterByExt(self, ext, localfolder): |
|
923 | 932 | fnameList = glob.glob1(localfolder,ext) |
|
924 | 933 | self.filenameList = [os.path.join(localfolder,x) for x in fnameList] |
|
925 | 934 | |
|
926 | 935 | if len(self.filenameList) == 0: |
|
927 | 936 | self.status = 0 |
|
928 | 937 | |
|
929 | 938 | def run(self, dataOut, ext, localfolder, remotefolder, server, username, password, period=1): |
|
930 | 939 | |
|
931 | 940 | self.counter += 1 |
|
932 | 941 | if self.counter >= period: |
|
933 | 942 | self.filterByExt(ext, localfolder) |
|
934 | 943 | |
|
935 | 944 | self.ftp_thread(server, username, password, remotefolder) |
|
936 | 945 | |
|
937 | 946 | self.counter = 0 |
|
938 | 947 | |
|
939 | 948 | self.status = 1 |
|
940 | 949 |
|
1 | NO CONTENT: file was removed |
@@ -1,298 +0,0 | |||
|
1 | import os.path | |
|
2 | import ftplib | |
|
3 | ||
|
4 | ||
|
5 | class Ftp(): | |
|
6 | """ | |
|
7 | Ftp is a public class used to define custom File Transfer Protocol from "ftplib" python module | |
|
8 | ||
|
9 | Non-standard Python modules used: None | |
|
10 | ||
|
11 | Written by "Daniel Suarez":mailto:daniel.suarez@jro.igp.gob.pe Oct. 26, 2010 | |
|
12 | """ | |
|
13 | ||
|
14 | def __init__(self,host = None, username=None, passw=None, remotefolder=None): | |
|
15 | """ | |
|
16 | This method is used to setting parameters for FTP and establishing connection to remote host | |
|
17 | ||
|
18 | Inputs: | |
|
19 | host - remote host IP Address | |
|
20 | ||
|
21 | username - remote host Username | |
|
22 | ||
|
23 | passw - remote host Passw | |
|
24 | ||
|
25 | remotefolder - remote host current working directory | |
|
26 | ||
|
27 | Return: void | |
|
28 | ||
|
29 | Affects: | |
|
30 | self.status - in Error Case or Connection Failed this parameter is set to 1 else 0 | |
|
31 | ||
|
32 | self.folderList - sub-folder list of remote folder | |
|
33 | ||
|
34 | self.fileList - file list of remote folder | |
|
35 | ||
|
36 | ||
|
37 | """ | |
|
38 | ||
|
39 | if ((host == None) and (username==None) and (passw==None) and (remotefolder==None)): | |
|
40 | host, username, passw, remotefolder = self.parmsByDefault() | |
|
41 | ||
|
42 | self.host = host | |
|
43 | self.username = username | |
|
44 | self.passw = passw | |
|
45 | self.remotefolder = remotefolder | |
|
46 | self.file = None | |
|
47 | self.ftp = None | |
|
48 | self.status = 0 | |
|
49 | ||
|
50 | try: | |
|
51 | self.ftp = ftplib.FTP(self.host) | |
|
52 | self.ftp.login(self.username,self.passw) | |
|
53 | self.ftp.cwd(self.remotefolder) | |
|
54 | # print 'Connect to FTP Server: Successfully' | |
|
55 | ||
|
56 | except ftplib.all_errors: | |
|
57 | print 'Error FTP Service' | |
|
58 | self.status = 1 | |
|
59 | return | |
|
60 | ||
|
61 | ||
|
62 | ||
|
63 | self.dirList = [] | |
|
64 | ||
|
65 | try: | |
|
66 | self.dirList = self.ftp.nlst() | |
|
67 | ||
|
68 | except ftplib.error_perm, resp: | |
|
69 | if str(resp) == "550 No files found": | |
|
70 | print "no files in this directory" | |
|
71 | self.status = 1 | |
|
72 | return | |
|
73 | ||
|
74 | except ftplib.all_errors: | |
|
75 | print 'Error Displaying Dir-Files' | |
|
76 | self.status = 1 | |
|
77 | return | |
|
78 | ||
|
79 | self.fileList = [] | |
|
80 | self.folderList = [] | |
|
81 | #only for test | |
|
82 | for f in self.dirList: | |
|
83 | name, ext = os.path.splitext(f) | |
|
84 | if ext != '': | |
|
85 | self.fileList.append(f) | |
|
86 | # print 'filename: %s - size: %d'%(f,self.ftp.size(f)) | |
|
87 | ||
|
88 | def parmsByDefault(self): | |
|
89 | host = 'jro-app.igp.gob.pe' | |
|
90 | username = 'wmaster' | |
|
91 | passw = 'mst2010vhf' | |
|
92 | remotefolder = '/home/wmaster/graficos' | |
|
93 | ||
|
94 | # host = 'jro.igp.gob.pe' | |
|
95 | # username = 'operaciones' | |
|
96 | # passw = 'mst2010vhf' | |
|
97 | # remotefolder = '/users/databases/on-line' | |
|
98 | ||
|
99 | return host, username, passw, remotefolder | |
|
100 | ||
|
101 | ||
|
102 | def mkd(self,dirname): | |
|
103 | """ | |
|
104 | mkd is used to make directory in remote host | |
|
105 | ||
|
106 | Input: | |
|
107 | dirname - directory name | |
|
108 | ||
|
109 | Return: | |
|
110 | 1 in error case else 0 | |
|
111 | """ | |
|
112 | try: | |
|
113 | self.ftp.mkd(dirname) | |
|
114 | except: | |
|
115 | print 'Error creating remote folder:%s'%dirname | |
|
116 | return 1 | |
|
117 | ||
|
118 | return 0 | |
|
119 | ||
|
120 | ||
|
121 | def delete(self,filename): | |
|
122 | """ | |
|
123 | delete is used to delete file in current working directory of remote host | |
|
124 | ||
|
125 | Input: | |
|
126 | filename - filename to delete in remote folder | |
|
127 | ||
|
128 | Return: | |
|
129 | 1 in error case else 0 | |
|
130 | """ | |
|
131 | ||
|
132 | try: | |
|
133 | self.ftp.delete(filename) | |
|
134 | except: | |
|
135 | print 'Error deleting remote file:%s'%filename | |
|
136 | return 1 | |
|
137 | ||
|
138 | return 0 | |
|
139 | ||
|
140 | def download(self,filename,localfolder): | |
|
141 | """ | |
|
142 | download is used to downloading file from remote folder into local folder | |
|
143 | ||
|
144 | Inputs: | |
|
145 | filename - filename to donwload | |
|
146 | ||
|
147 | localfolder - directory local to store filename | |
|
148 | ||
|
149 | Returns: | |
|
150 | self.status - 1 in error case else 0 | |
|
151 | """ | |
|
152 | ||
|
153 | self.status = 0 | |
|
154 | ||
|
155 | ||
|
156 | if not(filename in self.fileList): | |
|
157 | print 'filename:%s not exists'%filename | |
|
158 | self.status = 1 | |
|
159 | return self.status | |
|
160 | ||
|
161 | newfilename = os.path.join(localfolder,filename) | |
|
162 | ||
|
163 | self.file = open(newfilename, 'wb') | |
|
164 | ||
|
165 | try: | |
|
166 | print 'Download: ' + filename | |
|
167 | self.ftp.retrbinary('RETR ' + filename, self.__handleDownload) | |
|
168 | print 'Download Complete' | |
|
169 | except ftplib.all_errors: | |
|
170 | print 'Error Downloading ' + filename | |
|
171 | self.status = 1 | |
|
172 | return self.status | |
|
173 | ||
|
174 | self.file.close() | |
|
175 | ||
|
176 | return self.status | |
|
177 | ||
|
178 | ||
|
179 | def __handleDownload(self,block): | |
|
180 | """ | |
|
181 | __handleDownload is used to handle writing file | |
|
182 | """ | |
|
183 | self.file.write(block) | |
|
184 | ||
|
185 | ||
|
186 | def upload(self,filename,remotefolder=None): | |
|
187 | """ | |
|
188 | upload is used to uploading local file to remote directory | |
|
189 | ||
|
190 | Inputs: | |
|
191 | filename - full path name of local file to store in remote directory | |
|
192 | ||
|
193 | remotefolder - remote directory | |
|
194 | ||
|
195 | Returns: | |
|
196 | self.status - 1 in error case else 0 | |
|
197 | """ | |
|
198 | ||
|
199 | if remotefolder == None: | |
|
200 | remotefolder = self.remotefolder | |
|
201 | ||
|
202 | self.status = 0 | |
|
203 | ||
|
204 | try: | |
|
205 | self.ftp.cwd(remotefolder) | |
|
206 | ||
|
207 | self.file = open(filename, 'rb') | |
|
208 | ||
|
209 | (head, tail) = os.path.split(filename) | |
|
210 | ||
|
211 | command = "STOR " + tail | |
|
212 | ||
|
213 | print 'Uploading: ' + tail | |
|
214 | self.ftp.storbinary(command, self.file) | |
|
215 | print 'Upload Completed' | |
|
216 | ||
|
217 | except ftplib.all_errors: | |
|
218 | print 'Error Uploading ' + tail | |
|
219 | self.status = 1 | |
|
220 | return self.status | |
|
221 | ||
|
222 | self.file.close() | |
|
223 | ||
|
224 | #back to initial directory in __init__() | |
|
225 | self.ftp.cwd(self.remotefolder) | |
|
226 | ||
|
227 | return self.status | |
|
228 | ||
|
229 | ||
|
230 | def dir(self,remotefolder): | |
|
231 | """ | |
|
232 | dir is used to change working directory of remote host and get folder and file list | |
|
233 | ||
|
234 | Input: | |
|
235 | remotefolder - current working directory | |
|
236 | ||
|
237 | Affects: | |
|
238 | self.fileList - file list of working directory | |
|
239 | ||
|
240 | Return: | |
|
241 | infoList - list with filenames and size of file in bytes | |
|
242 | ||
|
243 | self.folderList - folder list | |
|
244 | """ | |
|
245 | ||
|
246 | self.remotefolder = remotefolder | |
|
247 | print 'Change to ' + self.remotefolder | |
|
248 | try: | |
|
249 | self.ftp.cwd(remotefolder) | |
|
250 | except ftplib.all_errors: | |
|
251 | print 'Error Change to ' + self.remotefolder | |
|
252 | infoList = None | |
|
253 | self.folderList = None | |
|
254 | return infoList,self.folderList | |
|
255 | ||
|
256 | self.dirList = [] | |
|
257 | ||
|
258 | try: | |
|
259 | self.dirList = self.ftp.nlst() | |
|
260 | ||
|
261 | except ftplib.error_perm, resp: | |
|
262 | if str(resp) == "550 No files found": | |
|
263 | print "no files in this directory" | |
|
264 | infoList = None | |
|
265 | self.folderList = None | |
|
266 | return infoList,self.folderList | |
|
267 | except ftplib.all_errors: | |
|
268 | print 'Error Displaying Dir-Files' | |
|
269 | infoList = None | |
|
270 | self.folderList = None | |
|
271 | return infoList,self.folderList | |
|
272 | ||
|
273 | infoList = [] | |
|
274 | self.fileList = [] | |
|
275 | self.folderList = [] | |
|
276 | for f in self.dirList: | |
|
277 | name,ext = os.path.splitext(f) | |
|
278 | if ext != '': | |
|
279 | self.fileList.append(f) | |
|
280 | value = (f,self.ftp.size(f)) | |
|
281 | infoList.append(value) | |
|
282 | ||
|
283 | if ext == '': | |
|
284 | self.folderList.append(f) | |
|
285 | ||
|
286 | return infoList,self.folderList | |
|
287 | ||
|
288 | ||
|
289 | def close(self): | |
|
290 | """ | |
|
291 | close is used to close and end FTP connection | |
|
292 | ||
|
293 | Inputs: None | |
|
294 | ||
|
295 | Return: void | |
|
296 | ||
|
297 | """ | |
|
298 | self.ftp.close() No newline at end of file |
This diff has been collapsed as it changes many lines, (538 lines changed) Show them Hide them | |||
@@ -1,538 +0,0 | |||
|
1 | import os | |
|
2 | import numpy | |
|
3 | import time, datetime | |
|
4 | import mpldriver_gui | |
|
5 | from customftp import * | |
|
6 | import Queue | |
|
7 | import threading | |
|
8 | ||
|
9 | class FTP_Thread (threading.Thread): | |
|
10 | def __init__(self): | |
|
11 | threading.Thread.__init__(self) | |
|
12 | self.exitFlag = 0 | |
|
13 | self.queueLock = threading.Lock() | |
|
14 | self.workQueue = Queue.Queue() | |
|
15 | ||
|
16 | def run(self): | |
|
17 | self.send_data() | |
|
18 | ||
|
19 | def fin(self): | |
|
20 | self.exitFlag = 1 | |
|
21 | ||
|
22 | def put_data(self, data): | |
|
23 | # Fill the queue | |
|
24 | self.queueLock.acquire() | |
|
25 | self.workQueue.put(data) | |
|
26 | self.queueLock.release() | |
|
27 | ||
|
28 | def send_data(self): | |
|
29 | while not self.exitFlag: | |
|
30 | if self.workQueue.qsize(): | |
|
31 | ||
|
32 | data = self.workQueue.get(True) | |
|
33 | ||
|
34 | try: | |
|
35 | ftpObj = Ftp(host=data['server'], | |
|
36 | username=data['username'], | |
|
37 | passw=data['password'], | |
|
38 | remotefolder=data['folder']) | |
|
39 | ||
|
40 | ftpObj.upload(data['figfilename']) | |
|
41 | ftpObj.close() | |
|
42 | except: | |
|
43 | print ValueError, 'Error FTP' | |
|
44 | print "don't worry still running the program" | |
|
45 | ||
|
46 | ||
|
47 | class Figure(): | |
|
48 | ||
|
49 | __driver = mpldriver_gui | |
|
50 | __isConfigThread = False | |
|
51 | fig = None | |
|
52 | ||
|
53 | id = None | |
|
54 | wintitle = None | |
|
55 | width = None | |
|
56 | height = None | |
|
57 | nplots = None | |
|
58 | timerange = None | |
|
59 | ||
|
60 | axesObjList = [] | |
|
61 | ||
|
62 | WIDTH = None | |
|
63 | HEIGHT = None | |
|
64 | PREFIX = 'fig' | |
|
65 | ||
|
66 | FTP_WEI = None #(WW) | |
|
67 | EXP_CODE = None #(EXP) | |
|
68 | SUB_EXP_CODE = None #(SS) | |
|
69 | PLOT_CODE = None #(TT) | |
|
70 | PLOT_POS = None #(NN) | |
|
71 | ||
|
72 | ||
|
73 | ||
|
74 | def __init__(self): | |
|
75 | ||
|
76 | raise ValueError, "This method is not implemented" | |
|
77 | ||
|
78 | def getSubplots(self): | |
|
79 | ||
|
80 | raise ValueError, "Abstract method: This method should be defined" | |
|
81 | ||
|
82 | def getAxesObjList(self): | |
|
83 | ||
|
84 | return self.axesObjList | |
|
85 | ||
|
86 | def getScreenDim(self, widthplot, heightplot): | |
|
87 | ||
|
88 | nrow, ncol = self.getSubplots() | |
|
89 | widthscreen = widthplot*ncol | |
|
90 | heightscreen = heightplot*nrow | |
|
91 | ||
|
92 | return widthscreen, heightscreen | |
|
93 | ||
|
94 | def getFilename(self, name, ext='.png'): | |
|
95 | path = '%s%03d' %(self.PREFIX, self.id) | |
|
96 | filename = '%s_%s%s' %(self.PREFIX, name, ext) | |
|
97 | return os.path.join(path, filename) | |
|
98 | ||
|
99 | def createFigure(self, id, wintitle, widthplot=None, heightplot=None): | |
|
100 | ||
|
101 | if widthplot == None: | |
|
102 | widthplot = self.WIDTH | |
|
103 | ||
|
104 | if heightplot == None: | |
|
105 | heightplot = self.HEIGHT | |
|
106 | ||
|
107 | self.id = id | |
|
108 | ||
|
109 | self.wintitle = wintitle | |
|
110 | ||
|
111 | self.widthscreen, self.heightscreen = self.getScreenDim(widthplot, heightplot) | |
|
112 | ||
|
113 | self.fig = self.__driver.createFigure(id=self.id, | |
|
114 | wintitle=self.wintitle, | |
|
115 | width=self.widthscreen, | |
|
116 | height=self.heightscreen) | |
|
117 | ||
|
118 | self.axesObjList = [] | |
|
119 | ||
|
120 | return self.fig | |
|
121 | ||
|
122 | def clearAxes(self): | |
|
123 | self.axesObjList = [] | |
|
124 | ||
|
125 | def addAxes(self, *args): | |
|
126 | axesObj = Axes(self.fig, *args) | |
|
127 | self.axesObjList.append(axesObj) | |
|
128 | ||
|
129 | def saveFigure(self, figpath, figfile, *args): | |
|
130 | ||
|
131 | filename = os.path.join(figpath, figfile) | |
|
132 | ||
|
133 | fullpath = os.path.split(filename)[0] | |
|
134 | ||
|
135 | if not os.path.exists(fullpath): | |
|
136 | subpath = os.path.split(fullpath)[0] | |
|
137 | ||
|
138 | if not os.path.exists(subpath): | |
|
139 | os.mkdir(subpath) | |
|
140 | ||
|
141 | os.mkdir(fullpath) | |
|
142 | ||
|
143 | self.__driver.saveFigure(self.fig, filename, *args) | |
|
144 | ||
|
145 | def getTimeLim(self, x, xmin, xmax): | |
|
146 | ||
|
147 | if self.timerange != None: | |
|
148 | txmin = x[0] - x[0]%self.timerange | |
|
149 | else: | |
|
150 | txmin = numpy.min(x) | |
|
151 | ||
|
152 | thisdatetime = datetime.datetime.utcfromtimestamp(txmin) | |
|
153 | thisdate = datetime.datetime.combine(thisdatetime.date(), datetime.time(0,0,0)) | |
|
154 | ||
|
155 | #################################################### | |
|
156 | #If the x is out of xrange | |
|
157 | if xmax < (thisdatetime - thisdate).seconds/(60*60.): | |
|
158 | xmin = None | |
|
159 | xmax = None | |
|
160 | ||
|
161 | if xmin == None: | |
|
162 | td = thisdatetime - thisdate | |
|
163 | xmin = td.seconds/(60*60.) | |
|
164 | ||
|
165 | if xmax == None: | |
|
166 | xmax = xmin + self.timerange/(60*60.) | |
|
167 | ||
|
168 | mindt = thisdate + datetime.timedelta(hours=xmin) - datetime.timedelta(seconds=time.timezone) | |
|
169 | tmin = time.mktime(mindt.timetuple()) | |
|
170 | ||
|
171 | maxdt = thisdate + datetime.timedelta(hours=xmax) - datetime.timedelta(seconds=time.timezone) | |
|
172 | tmax = time.mktime(maxdt.timetuple()) | |
|
173 | ||
|
174 | self.timerange = tmax - tmin | |
|
175 | ||
|
176 | return tmin, tmax | |
|
177 | ||
|
178 | def sendByFTP(self, figfilename, server, folder, username, password): | |
|
179 | ftpObj = Ftp(host=server, username=username, passw=password, remotefolder=folder) | |
|
180 | ftpObj.upload(figfilename) | |
|
181 | ftpObj.close() | |
|
182 | ||
|
183 | def sendByFTP_Thread(self, figfilename, server, folder, username, password): | |
|
184 | data = {'figfilename':figfilename,'server':server,'folder':folder,'username':username,'password':password} | |
|
185 | ||
|
186 | if not(self.__isConfigThread): | |
|
187 | ||
|
188 | self.thread = FTP_Thread() | |
|
189 | self.thread.start() | |
|
190 | self.__isConfigThread = True | |
|
191 | ||
|
192 | self.thread.put_data(data) | |
|
193 | ||
|
194 | ||
|
195 | def getNameToFtp(self, thisDatetime, FTP_WEI, EXP_CODE, SUB_EXP_CODE, PLOT_CODE, PLOT_POS): | |
|
196 | YEAR_STR = '%4.4d'%thisDatetime.timetuple().tm_year | |
|
197 | DOY_STR = '%3.3d'%thisDatetime.timetuple().tm_yday | |
|
198 | FTP_WEI = '%2.2d'%FTP_WEI | |
|
199 | EXP_CODE = '%3.3d'%EXP_CODE | |
|
200 | SUB_EXP_CODE = '%2.2d'%SUB_EXP_CODE | |
|
201 | PLOT_CODE = '%2.2d'%PLOT_CODE | |
|
202 | PLOT_POS = '%2.2d'%PLOT_POS | |
|
203 | name = YEAR_STR + DOY_STR + FTP_WEI + EXP_CODE + SUB_EXP_CODE + PLOT_CODE + PLOT_POS | |
|
204 | return name | |
|
205 | ||
|
206 | def draw(self): | |
|
207 | self.__driver.draw(self.fig) | |
|
208 | ||
|
209 | axesList = property(getAxesObjList) | |
|
210 | ||
|
211 | class Axes: | |
|
212 | ||
|
213 | __driver = mpldriver_gui | |
|
214 | fig = None | |
|
215 | ax = None | |
|
216 | plot = None | |
|
217 | __missing = 1E30 | |
|
218 | __firsttime = None | |
|
219 | ||
|
220 | __showprofile = False | |
|
221 | ||
|
222 | xmin = None | |
|
223 | xmax = None | |
|
224 | ymin = None | |
|
225 | ymax = None | |
|
226 | zmin = None | |
|
227 | zmax = None | |
|
228 | ||
|
229 | x_buffer = None | |
|
230 | z_buffer = None | |
|
231 | ||
|
232 | decimationx = None | |
|
233 | decimationy = None | |
|
234 | ||
|
235 | __MAXNUMX = 1000. | |
|
236 | __MAXNUMY = 500. | |
|
237 | ||
|
238 | def __init__(self, *args): | |
|
239 | ||
|
240 | """ | |
|
241 | ||
|
242 | Input: | |
|
243 | *args : Los parametros necesarios son | |
|
244 | fig, nrow, ncol, xpos, ypos, colspan, rowspan | |
|
245 | """ | |
|
246 | ||
|
247 | ax = self.__driver.createAxes(*args) | |
|
248 | self.fig = args[0] | |
|
249 | self.ax = ax | |
|
250 | self.plot = None | |
|
251 | ||
|
252 | self.__firsttime = True | |
|
253 | self.idlineList = [] | |
|
254 | ||
|
255 | self.x_buffer = numpy.array([]) | |
|
256 | self.z_buffer = numpy.array([]) | |
|
257 | ||
|
258 | def pcolor(self, x, y, z, | |
|
259 | xmin=None, xmax=None, | |
|
260 | ymin=None, ymax=None, | |
|
261 | zmin=None, zmax=None, | |
|
262 | xlabel='', ylabel='', | |
|
263 | title='', rti = False, colormap='jet', | |
|
264 | **kwargs): | |
|
265 | ||
|
266 | """ | |
|
267 | Input: | |
|
268 | x : | |
|
269 | y : | |
|
270 | x : | |
|
271 | xmin : | |
|
272 | xmax : | |
|
273 | ymin : | |
|
274 | ymax : | |
|
275 | zmin : | |
|
276 | zmax : | |
|
277 | xlabel : | |
|
278 | ylabel : | |
|
279 | title : | |
|
280 | **kwargs : Los parametros aceptados son | |
|
281 | ticksize=9, | |
|
282 | cblabel='' | |
|
283 | rti = True or False | |
|
284 | """ | |
|
285 | ||
|
286 | if self.__firsttime: | |
|
287 | ||
|
288 | if xmin == None: xmin = numpy.nanmin(x) | |
|
289 | if xmax == None: xmax = numpy.nanmax(x) | |
|
290 | if ymin == None: ymin = numpy.nanmin(y) | |
|
291 | if ymax == None: ymax = numpy.nanmax(y) | |
|
292 | if zmin == None: zmin = numpy.nanmin(z) | |
|
293 | if zmax == None: zmax = numpy.nanmax(z) | |
|
294 | ||
|
295 | ||
|
296 | self.plot = self.__driver.createPcolor(self.ax, x, y, z, | |
|
297 | xmin, xmax, | |
|
298 | ymin, ymax, | |
|
299 | zmin, zmax, | |
|
300 | xlabel=xlabel, | |
|
301 | ylabel=ylabel, | |
|
302 | title=title, | |
|
303 | colormap=colormap, | |
|
304 | **kwargs) | |
|
305 | ||
|
306 | if self.xmin == None: self.xmin = xmin | |
|
307 | if self.xmax == None: self.xmax = xmax | |
|
308 | if self.ymin == None: self.ymin = ymin | |
|
309 | if self.ymax == None: self.ymax = ymax | |
|
310 | if self.zmin == None: self.zmin = zmin | |
|
311 | if self.zmax == None: self.zmax = zmax | |
|
312 | ||
|
313 | self.__firsttime = False | |
|
314 | return | |
|
315 | ||
|
316 | if rti: | |
|
317 | self.__driver.addpcolor(self.ax, x, y, z, self.zmin, self.zmax, | |
|
318 | xlabel=xlabel, | |
|
319 | ylabel=ylabel, | |
|
320 | title=title, | |
|
321 | colormap=colormap) | |
|
322 | return | |
|
323 | ||
|
324 | self.__driver.pcolor(self.plot, z, | |
|
325 | xlabel=xlabel, | |
|
326 | ylabel=ylabel, | |
|
327 | title=title) | |
|
328 | ||
|
329 | ||
|
330 | def pline(self, x, y, | |
|
331 | xmin=None, xmax=None, | |
|
332 | ymin=None, ymax=None, | |
|
333 | xlabel='', ylabel='', | |
|
334 | title='', | |
|
335 | **kwargs): | |
|
336 | ||
|
337 | """ | |
|
338 | ||
|
339 | Input: | |
|
340 | x : | |
|
341 | y : | |
|
342 | xmin : | |
|
343 | xmax : | |
|
344 | ymin : | |
|
345 | ymax : | |
|
346 | xlabel : | |
|
347 | ylabel : | |
|
348 | title : | |
|
349 | **kwargs : Los parametros aceptados son | |
|
350 | ||
|
351 | ticksize | |
|
352 | ytick_visible | |
|
353 | """ | |
|
354 | ||
|
355 | if self.__firsttime: | |
|
356 | ||
|
357 | if xmin == None: xmin = numpy.nanmin(x) | |
|
358 | if xmax == None: xmax = numpy.nanmax(x) | |
|
359 | if ymin == None: ymin = numpy.nanmin(y) | |
|
360 | if ymax == None: ymax = numpy.nanmax(y) | |
|
361 | ||
|
362 | self.plot = self.__driver.createPline(self.ax, x, y, | |
|
363 | xmin, xmax, | |
|
364 | ymin, ymax, | |
|
365 | xlabel=xlabel, | |
|
366 | ylabel=ylabel, | |
|
367 | title=title, | |
|
368 | **kwargs) | |
|
369 | ||
|
370 | self.idlineList.append(0) | |
|
371 | self.__firsttime = False | |
|
372 | return | |
|
373 | ||
|
374 | self.__driver.pline(self.plot, x, y, xlabel=xlabel, | |
|
375 | ylabel=ylabel, | |
|
376 | title=title) | |
|
377 | ||
|
378 | def pmultiline(self, x, y, | |
|
379 | xmin=None, xmax=None, | |
|
380 | ymin=None, ymax=None, | |
|
381 | xlabel='', ylabel='', | |
|
382 | title='', | |
|
383 | **kwargs): | |
|
384 | ||
|
385 | if self.__firsttime: | |
|
386 | ||
|
387 | if xmin == None: xmin = numpy.nanmin(x) | |
|
388 | if xmax == None: xmax = numpy.nanmax(x) | |
|
389 | if ymin == None: ymin = numpy.nanmin(y) | |
|
390 | if ymax == None: ymax = numpy.nanmax(y) | |
|
391 | ||
|
392 | self.plot = self.__driver.createPmultiline(self.ax, x, y, | |
|
393 | xmin, xmax, | |
|
394 | ymin, ymax, | |
|
395 | xlabel=xlabel, | |
|
396 | ylabel=ylabel, | |
|
397 | title=title, | |
|
398 | **kwargs) | |
|
399 | self.__firsttime = False | |
|
400 | return | |
|
401 | ||
|
402 | self.__driver.pmultiline(self.plot, x, y, xlabel=xlabel, | |
|
403 | ylabel=ylabel, | |
|
404 | title=title) | |
|
405 | ||
|
406 | def pmultilineyaxis(self, x, y, | |
|
407 | xmin=None, xmax=None, | |
|
408 | ymin=None, ymax=None, | |
|
409 | xlabel='', ylabel='', | |
|
410 | title='', | |
|
411 | **kwargs): | |
|
412 | ||
|
413 | if self.__firsttime: | |
|
414 | ||
|
415 | if xmin == None: xmin = numpy.nanmin(x) | |
|
416 | if xmax == None: xmax = numpy.nanmax(x) | |
|
417 | if ymin == None: ymin = numpy.nanmin(y) | |
|
418 | if ymax == None: ymax = numpy.nanmax(y) | |
|
419 | ||
|
420 | self.plot = self.__driver.createPmultilineYAxis(self.ax, x, y, | |
|
421 | xmin, xmax, | |
|
422 | ymin, ymax, | |
|
423 | xlabel=xlabel, | |
|
424 | ylabel=ylabel, | |
|
425 | title=title, | |
|
426 | **kwargs) | |
|
427 | if self.xmin == None: self.xmin = xmin | |
|
428 | if self.xmax == None: self.xmax = xmax | |
|
429 | if self.ymin == None: self.ymin = ymin | |
|
430 | if self.ymax == None: self.ymax = ymax | |
|
431 | ||
|
432 | self.__firsttime = False | |
|
433 | return | |
|
434 | ||
|
435 | self.__driver.pmultilineyaxis(self.plot, x, y, xlabel=xlabel, | |
|
436 | ylabel=ylabel, | |
|
437 | title=title) | |
|
438 | ||
|
439 | def addpline(self, x, y, idline, **kwargs): | |
|
440 | lines = self.ax.lines | |
|
441 | ||
|
442 | if idline in self.idlineList: | |
|
443 | self.__driver.set_linedata(self.ax, x, y, idline) | |
|
444 | ||
|
445 | if idline not in(self.idlineList): | |
|
446 | self.__driver.addpline(self.ax, x, y, **kwargs) | |
|
447 | self.idlineList.append(idline) | |
|
448 | ||
|
449 | return | |
|
450 | ||
|
451 | def pcolorbuffer(self, x, y, z, | |
|
452 | xmin=None, xmax=None, | |
|
453 | ymin=None, ymax=None, | |
|
454 | zmin=None, zmax=None, | |
|
455 | xlabel='', ylabel='', | |
|
456 | title='', rti = True, colormap='jet', | |
|
457 | maxNumX = None, maxNumY = None, | |
|
458 | **kwargs): | |
|
459 | ||
|
460 | if maxNumX == None: | |
|
461 | maxNumX = self.__MAXNUMX | |
|
462 | ||
|
463 | if maxNumY == None: | |
|
464 | maxNumY = self.__MAXNUMY | |
|
465 | ||
|
466 | if self.__firsttime: | |
|
467 | self.z_buffer = z | |
|
468 | self.x_buffer = numpy.hstack((self.x_buffer, x)) | |
|
469 | ||
|
470 | if xmin == None: xmin = numpy.nanmin(x) | |
|
471 | if xmax == None: xmax = numpy.nanmax(x) | |
|
472 | if ymin == None: ymin = numpy.nanmin(y) | |
|
473 | if ymax == None: ymax = numpy.nanmax(y) | |
|
474 | if zmin == None: zmin = numpy.nanmin(z) | |
|
475 | if zmax == None: zmax = numpy.nanmax(z) | |
|
476 | ||
|
477 | ||
|
478 | self.plot = self.__driver.createPcolor(self.ax, self.x_buffer, y, z, | |
|
479 | xmin, xmax, | |
|
480 | ymin, ymax, | |
|
481 | zmin, zmax, | |
|
482 | xlabel=xlabel, | |
|
483 | ylabel=ylabel, | |
|
484 | title=title, | |
|
485 | colormap=colormap, | |
|
486 | **kwargs) | |
|
487 | ||
|
488 | if self.xmin == None: self.xmin = xmin | |
|
489 | if self.xmax == None: self.xmax = xmax | |
|
490 | if self.ymin == None: self.ymin = ymin | |
|
491 | if self.ymax == None: self.ymax = ymax | |
|
492 | if self.zmin == None: self.zmin = zmin | |
|
493 | if self.zmax == None: self.zmax = zmax | |
|
494 | ||
|
495 | self.__firsttime = False | |
|
496 | return | |
|
497 | ||
|
498 | self.x_buffer = numpy.hstack((self.x_buffer, x[-1])) | |
|
499 | self.z_buffer = numpy.hstack((self.z_buffer, z)) | |
|
500 | ||
|
501 | if self.decimationx == None: | |
|
502 | deltax = float(self.xmax - self.xmin)/maxNumX | |
|
503 | deltay = float(self.ymax - self.ymin)/maxNumY | |
|
504 | ||
|
505 | resolutionx = self.x_buffer[2]-self.x_buffer[0] | |
|
506 | resolutiony = y[1]-y[0] | |
|
507 | ||
|
508 | self.decimationx = numpy.ceil(deltax / resolutionx) | |
|
509 | self.decimationy = numpy.ceil(deltay / resolutiony) | |
|
510 | ||
|
511 | z_buffer = self.z_buffer.reshape(-1,len(y)) | |
|
512 | ||
|
513 | x_buffer = self.x_buffer[::self.decimationx] | |
|
514 | y_buffer = y[::self.decimationy] | |
|
515 | z_buffer = z_buffer[::self.decimationx, ::self.decimationy] | |
|
516 | #=================================================== | |
|
517 | ||
|
518 | x_buffer, y_buffer, z_buffer = self.__fillGaps(x_buffer, y_buffer, z_buffer) | |
|
519 | ||
|
520 | self.__driver.addpcolorbuffer(self.ax, x_buffer, y_buffer, z_buffer, self.zmin, self.zmax, | |
|
521 | xlabel=xlabel, | |
|
522 | ylabel=ylabel, | |
|
523 | title=title, | |
|
524 | colormap=colormap) | |
|
525 | def __fillGaps(self, x_buffer, y_buffer, z_buffer): | |
|
526 | ||
|
527 | deltas = x_buffer[1:] - x_buffer[0:-1] | |
|
528 | x_median = numpy.median(deltas) | |
|
529 | ||
|
530 | index = numpy.where(deltas >= 2*x_median) | |
|
531 | ||
|
532 | if len(index[0]) != 0: | |
|
533 | z_buffer[index[0],::] = self.__missing | |
|
534 | z_buffer = numpy.ma.masked_inside(z_buffer,0.99*self.__missing,1.01*self.__missing) | |
|
535 | ||
|
536 | return x_buffer, y_buffer, z_buffer | |
|
537 | ||
|
538 | No newline at end of file |
@@ -1,326 +0,0 | |||
|
1 | import numpy | |
|
2 | import datetime | |
|
3 | import sys | |
|
4 | ||
|
5 | from matplotlib.figure import Figure | |
|
6 | from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas | |
|
7 | ||
|
8 | from mpl_toolkits.axes_grid1 import make_axes_locatable | |
|
9 | from matplotlib.ticker import * | |
|
10 | import matplotlib.gridspec as gridspec | |
|
11 | import matplotlib.cm as cm | |
|
12 | import matplotlib.colorbar | |
|
13 | ||
|
14 | def createFigure(id, wintitle, width, height, facecolor="w"): | |
|
15 | figsize = (width,height) | |
|
16 | fig = Figure(figsize=figsize, facecolor=facecolor) | |
|
17 | ||
|
18 | return fig | |
|
19 | ||
|
20 | def createAxes(fig, nrow, ncol, x, y, ratio): | |
|
21 | width_ratios = [] | |
|
22 | for i in range(ncol): | |
|
23 | if i%2==0: | |
|
24 | width_ratios.append(ratio) | |
|
25 | else: | |
|
26 | width_ratios.append(1) | |
|
27 | ||
|
28 | gs = gridspec.GridSpec(nrow, ncol, width_ratios=width_ratios) | |
|
29 | ax = fig.add_subplot(gs[x,y]) | |
|
30 | ||
|
31 | return ax | |
|
32 | ||
|
33 | def saveFigure(fig, filename): | |
|
34 | fig.savefig(filename) | |
|
35 | ||
|
36 | ||
|
37 | def printLabels(ax, xlabel, ylabel, title): | |
|
38 | ||
|
39 | ax.set_xlabel(xlabel, size=11) | |
|
40 | ax.set_ylabel(ylabel, size=11) | |
|
41 | ax.set_title(title, size=12) | |
|
42 | ||
|
43 | def createPcolor(ax, x, y, z, xmin, xmax, ymin, ymax, zmin, zmax, | |
|
44 | xlabel='', ylabel='', title='', ticksize = 9, | |
|
45 | colormap='jet',cblabel='', cbsize="5%", | |
|
46 | XAxisAsTime=False): | |
|
47 | ||
|
48 | divider = make_axes_locatable(ax) | |
|
49 | ax_cb = divider.new_horizontal(size=cbsize, pad=0.05) | |
|
50 | fig = ax.get_figure() | |
|
51 | fig.add_axes(ax_cb) | |
|
52 | ||
|
53 | ax.set_xlim([xmin,xmax]) | |
|
54 | ax.set_ylim([ymin,ymax]) | |
|
55 | ||
|
56 | printLabels(ax, xlabel, ylabel, title) | |
|
57 | ||
|
58 | imesh = ax.pcolormesh(x,y,z.T, vmin=zmin, vmax=zmax, cmap=cm.get_cmap(colormap)) | |
|
59 | cb = fig.colorbar(imesh, cax=ax_cb) | |
|
60 | cb.set_label(cblabel) | |
|
61 | ||
|
62 | for tick in ax.yaxis.get_major_ticks(): | |
|
63 | tick.label.set_fontsize(ticksize) | |
|
64 | ||
|
65 | for tick in ax.xaxis.get_major_ticks(): | |
|
66 | tick.label.set_fontsize(ticksize) | |
|
67 | ||
|
68 | for tick in cb.ax.get_yticklabels(): | |
|
69 | tick.set_fontsize(ticksize) | |
|
70 | ||
|
71 | ax_cb.yaxis.tick_right() | |
|
72 | ||
|
73 | if '0.' in matplotlib.__version__[0:2]: | |
|
74 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
75 | return imesh | |
|
76 | ||
|
77 | if '1.0.' in matplotlib.__version__[0:4]: | |
|
78 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
79 | return imesh | |
|
80 | ||
|
81 | fig.tight_layout() | |
|
82 | ||
|
83 | if XAxisAsTime: | |
|
84 | ||
|
85 | func = lambda x, pos: ('%s') %(datetime.datetime.utcfromtimestamp(x).strftime("%H:%M:%S")) | |
|
86 | ax.xaxis.set_major_formatter(FuncFormatter(func)) | |
|
87 | ax.xaxis.set_major_locator(LinearLocator(7)) | |
|
88 | ||
|
89 | return imesh | |
|
90 | ||
|
91 | def pcolor(imesh, z, xlabel='', ylabel='', title=''): | |
|
92 | ||
|
93 | z = z.T | |
|
94 | ||
|
95 | ax = imesh.get_axes() | |
|
96 | ||
|
97 | printLabels(ax, xlabel, ylabel, title) | |
|
98 | ||
|
99 | imesh.set_array(z.ravel()) | |
|
100 | ||
|
101 | def addpcolorbuffer(ax, x, y, z, zmin, zmax, xlabel='', ylabel='', title='', colormap='jet'): | |
|
102 | ||
|
103 | printLabels(ax, xlabel, ylabel, title) | |
|
104 | ||
|
105 | ax.collections.remove(ax.collections[0]) | |
|
106 | ||
|
107 | ax.pcolormesh(x,y,z.T,vmin=zmin,vmax=zmax, cmap=matplotlib.pyplot.get_cmap(colormap)) | |
|
108 | ||
|
109 | ||
|
110 | def draw(fig): | |
|
111 | ||
|
112 | if type(fig) == 'int': | |
|
113 | raise ValueError, "This parameter should be of tpye matplotlib figure" | |
|
114 | ||
|
115 | fig.canvas.draw() | |
|
116 | ||
|
117 | ||
|
118 | def createPline(ax, x, y, xmin, xmax, ymin, ymax, xlabel='', ylabel='', title='', | |
|
119 | ticksize=9, xtick_visible=True, ytick_visible=True, | |
|
120 | nxticks=4, nyticks=10, | |
|
121 | grid=None): | |
|
122 | ||
|
123 | """ | |
|
124 | ||
|
125 | Input: | |
|
126 | grid : None, 'both', 'x', 'y' | |
|
127 | """ | |
|
128 | fig = ax.get_figure() | |
|
129 | ax.set_xlim([xmin,xmax]) | |
|
130 | ax.set_ylim([ymin,ymax]) | |
|
131 | ||
|
132 | printLabels(ax, xlabel, ylabel, title) | |
|
133 | ||
|
134 | ###################################################### | |
|
135 | if (xmax-xmin)<=1: | |
|
136 | xtickspos = numpy.linspace(xmin,xmax,nxticks) | |
|
137 | xtickspos = numpy.array([float("%.1f"%i) for i in xtickspos]) | |
|
138 | ax.set_xticks(xtickspos) | |
|
139 | else: | |
|
140 | xtickspos = numpy.arange(nxticks)*int((xmax-xmin)/(nxticks)) + int(xmin) | |
|
141 | # xtickspos = numpy.arange(nxticks)*float(xmax-xmin)/float(nxticks) + int(xmin) | |
|
142 | ax.set_xticks(xtickspos) | |
|
143 | ||
|
144 | for tick in ax.get_xticklabels(): | |
|
145 | tick.set_visible(xtick_visible) | |
|
146 | ||
|
147 | for tick in ax.xaxis.get_major_ticks(): | |
|
148 | tick.label.set_fontsize(ticksize) | |
|
149 | ||
|
150 | ###################################################### | |
|
151 | for tick in ax.get_yticklabels(): | |
|
152 | tick.set_visible(ytick_visible) | |
|
153 | ||
|
154 | for tick in ax.yaxis.get_major_ticks(): | |
|
155 | tick.label.set_fontsize(ticksize) | |
|
156 | ||
|
157 | ax.plot(x, y) | |
|
158 | iplot = ax.lines[-1] | |
|
159 | ||
|
160 | ###################################################### | |
|
161 | if '0.' in matplotlib.__version__[0:2]: | |
|
162 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
163 | return iplot | |
|
164 | ||
|
165 | if '1.0.' in matplotlib.__version__[0:4]: | |
|
166 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
167 | return iplot | |
|
168 | ||
|
169 | if grid != None: | |
|
170 | ax.grid(b=True, which='major', axis=grid) | |
|
171 | fig.tight_layout() | |
|
172 | return iplot | |
|
173 | ||
|
174 | def set_linedata(ax, x, y, idline): | |
|
175 | ||
|
176 | ax.lines[idline].set_data(x,y) | |
|
177 | ||
|
178 | def pline(iplot, x, y, xlabel='', ylabel='', title=''): | |
|
179 | ||
|
180 | ax = iplot.get_axes() | |
|
181 | ||
|
182 | printLabels(ax, xlabel, ylabel, title) | |
|
183 | ||
|
184 | set_linedata(ax, x, y, idline=0) | |
|
185 | ||
|
186 | def addpline(ax, x, y, color, linestyle, lw): | |
|
187 | ||
|
188 | ax.plot(x,y,color=color,linestyle=linestyle,lw=lw) | |
|
189 | ||
|
190 | def createPmultiline(ax, x, y, xmin, xmax, ymin, ymax, xlabel='', ylabel='', title='', legendlabels=None, | |
|
191 | ticksize=9, xtick_visible=True, ytick_visible=True, | |
|
192 | nxticks=4, nyticks=10, | |
|
193 | grid=None): | |
|
194 | ||
|
195 | """ | |
|
196 | ||
|
197 | Input: | |
|
198 | grid : None, 'both', 'x', 'y' | |
|
199 | """ | |
|
200 | ||
|
201 | # matplotlib.pyplot.ioff() | |
|
202 | fig = ax.get_figure() | |
|
203 | ||
|
204 | lines = ax.plot(x.T, y) | |
|
205 | leg = ax.legend(lines, legendlabels, loc='upper right') | |
|
206 | leg.get_frame().set_alpha(0.5) | |
|
207 | ax.set_xlim([xmin,xmax]) | |
|
208 | ax.set_ylim([ymin,ymax]) | |
|
209 | printLabels(ax, xlabel, ylabel, title) | |
|
210 | ||
|
211 | xtickspos = numpy.arange(nxticks)*int((xmax-xmin)/(nxticks)) + int(xmin) | |
|
212 | ax.set_xticks(xtickspos) | |
|
213 | ||
|
214 | for tick in ax.get_xticklabels(): | |
|
215 | tick.set_visible(xtick_visible) | |
|
216 | ||
|
217 | for tick in ax.xaxis.get_major_ticks(): | |
|
218 | tick.label.set_fontsize(ticksize) | |
|
219 | ||
|
220 | for tick in ax.get_yticklabels(): | |
|
221 | tick.set_visible(ytick_visible) | |
|
222 | ||
|
223 | for tick in ax.yaxis.get_major_ticks(): | |
|
224 | tick.label.set_fontsize(ticksize) | |
|
225 | ||
|
226 | iplot = ax.lines[-1] | |
|
227 | ||
|
228 | if '0.' in matplotlib.__version__[0:2]: | |
|
229 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
230 | return iplot | |
|
231 | ||
|
232 | if '1.0.' in matplotlib.__version__[0:4]: | |
|
233 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
234 | return iplot | |
|
235 | ||
|
236 | if grid != None: | |
|
237 | ax.grid(b=True, which='major', axis=grid) | |
|
238 | ||
|
239 | # matplotlib.pyplot.tight_layout() | |
|
240 | # | |
|
241 | # matplotlib.pyplot.ion() | |
|
242 | ||
|
243 | fig.tight_layout() | |
|
244 | ||
|
245 | return iplot | |
|
246 | ||
|
247 | ||
|
248 | def pmultiline(iplot, x, y, xlabel='', ylabel='', title=''): | |
|
249 | ||
|
250 | ax = iplot.get_axes() | |
|
251 | ||
|
252 | printLabels(ax, xlabel, ylabel, title) | |
|
253 | ||
|
254 | for i in range(len(ax.lines)): | |
|
255 | line = ax.lines[i] | |
|
256 | line.set_data(x[i,:],y) | |
|
257 | ||
|
258 | def createPmultilineYAxis(ax, x, y, xmin, xmax, ymin, ymax, xlabel='', ylabel='', title='', legendlabels=None, | |
|
259 | ticksize=9, xtick_visible=True, ytick_visible=True, | |
|
260 | nxticks=4, nyticks=10, marker='.', markersize=10, linestyle="None", | |
|
261 | grid=None, XAxisAsTime=False): | |
|
262 | ||
|
263 | ||
|
264 | # matplotlib.pyplot.ioff() | |
|
265 | fig = ax.get_figure() | |
|
266 | ||
|
267 | lines = ax.plot(x, y.T, linestyle='None', marker='.', markersize=markersize) | |
|
268 | leg = ax.legend(lines, legendlabels, loc='upper left', bbox_to_anchor=(1.01, 1.00), numpoints=1, handlelength=1.5, \ | |
|
269 | handletextpad=0.5, borderpad=0.5, labelspacing=0.5, borderaxespad=0.) | |
|
270 | ||
|
271 | for label in leg.get_texts(): label.set_fontsize(9) | |
|
272 | ||
|
273 | ax.set_xlim([xmin,xmax]) | |
|
274 | ax.set_ylim([ymin,ymax]) | |
|
275 | printLabels(ax, xlabel, ylabel, title) | |
|
276 | ||
|
277 | # xtickspos = numpy.arange(nxticks)*int((xmax-xmin)/(nxticks)) + int(xmin) | |
|
278 | # ax.set_xticks(xtickspos) | |
|
279 | ||
|
280 | for tick in ax.get_xticklabels(): | |
|
281 | tick.set_visible(xtick_visible) | |
|
282 | ||
|
283 | for tick in ax.xaxis.get_major_ticks(): | |
|
284 | tick.label.set_fontsize(ticksize) | |
|
285 | ||
|
286 | for tick in ax.get_yticklabels(): | |
|
287 | tick.set_visible(ytick_visible) | |
|
288 | ||
|
289 | for tick in ax.yaxis.get_major_ticks(): | |
|
290 | tick.label.set_fontsize(ticksize) | |
|
291 | ||
|
292 | iplot = ax.lines[-1] | |
|
293 | ||
|
294 | if '0.' in matplotlib.__version__[0:2]: | |
|
295 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
296 | return iplot | |
|
297 | ||
|
298 | if '1.0.' in matplotlib.__version__[0:4]: | |
|
299 | print "The matplotlib version has to be updated to 1.1 or newer" | |
|
300 | return iplot | |
|
301 | ||
|
302 | if grid != None: | |
|
303 | ax.grid(b=True, which='major', axis=grid) | |
|
304 | ||
|
305 | # matplotlib.pyplot.tight_layout() | |
|
306 | ||
|
307 | if XAxisAsTime: | |
|
308 | ||
|
309 | func = lambda x, pos: ('%s') %(datetime.datetime.utcfromtimestamp(x).strftime("%H:%M:%S")) | |
|
310 | ax.xaxis.set_major_formatter(FuncFormatter(func)) | |
|
311 | ax.xaxis.set_major_locator(LinearLocator(7)) | |
|
312 | ||
|
313 | fig.tight_layout() | |
|
314 | # matplotlib.pyplot.ion() | |
|
315 | ||
|
316 | return iplot | |
|
317 | ||
|
318 | def pmultilineyaxis(iplot, x, y, xlabel='', ylabel='', title=''): | |
|
319 | ||
|
320 | ax = iplot.get_axes() | |
|
321 | ||
|
322 | printLabels(ax, xlabel, ylabel, title) | |
|
323 | ||
|
324 | for i in range(len(ax.lines)): | |
|
325 | line = ax.lines[i] | |
|
326 | line.set_data(x,y[i,:]) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now