@@ -1,5854 +1,5861 | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | Module implementing MainWindow. |
|
3 | Module implementing MainWindow. | |
4 | #+++++++++++++GUI V1++++++++++++++# |
|
4 | #+++++++++++++GUI V1++++++++++++++# | |
5 | @author: AlexanderValdezPortocarrero ñ_ñ |
|
5 | @author: AlexanderValdezPortocarrero ñ_ñ | |
6 | """ |
|
6 | """ | |
7 | import os, sys, time |
|
7 | import os, sys, time | |
8 | import datetime |
|
8 | import datetime | |
9 | import numpy |
|
9 | import numpy | |
10 | import Queue |
|
10 | import Queue | |
11 |
|
11 | |||
12 | from collections import OrderedDict |
|
12 | from collections import OrderedDict | |
13 | from os.path import expanduser |
|
13 | from os.path import expanduser | |
14 | from time import sleep |
|
14 | from time import sleep | |
15 | # from gevent import sleep |
|
15 | # from gevent import sleep | |
16 |
|
16 | |||
17 | import ast |
|
17 | import ast | |
18 |
|
18 | |||
19 | from PyQt4.QtGui import QMainWindow |
|
19 | from PyQt4.QtGui import QMainWindow | |
20 | from PyQt4.QtCore import pyqtSignature |
|
20 | from PyQt4.QtCore import pyqtSignature | |
21 | from PyQt4.QtCore import pyqtSignal |
|
21 | from PyQt4.QtCore import pyqtSignal | |
22 | from PyQt4 import QtCore |
|
22 | from PyQt4 import QtCore | |
23 | from PyQt4 import QtGui |
|
23 | from PyQt4 import QtGui | |
24 | # from PyQt4.QtCore import QThread |
|
24 | # from PyQt4.QtCore import QThread | |
25 | # from PyQt4.QtCore import QObject, SIGNAL |
|
25 | # from PyQt4.QtCore import QObject, SIGNAL | |
26 |
|
26 | |||
27 | from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess |
|
27 | from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess | |
28 | from schainpy.gui.viewer.ui_ftp import Ui_Ftp |
|
28 | from schainpy.gui.viewer.ui_ftp import Ui_Ftp | |
29 | from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow |
|
29 | from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow | |
30 | from schainpy.controller_api import ControllerThread |
|
30 | from schainpy.controller_api import ControllerThread | |
31 | from schainpy.controller import Project |
|
31 | from schainpy.controller import Project | |
32 |
|
32 | |||
33 | from propertiesViewModel import TreeModel, PropertyBuffer |
|
33 | from propertiesViewModel import TreeModel, PropertyBuffer | |
34 | from parametersModel import ProjectParms |
|
34 | from parametersModel import ProjectParms | |
35 |
|
35 | |||
36 | from schainpy.gui.figures import tools |
|
36 | from schainpy.gui.figures import tools | |
37 |
|
37 | |||
38 | FIGURES_PATH = tools.get_path() |
|
38 | FIGURES_PATH = tools.get_path() | |
39 | TEMPORAL_FILE = ".temp.xml" |
|
39 | TEMPORAL_FILE = ".temp.xml" | |
40 |
|
40 | |||
41 | def isRadarFile(file): |
|
41 | def isRadarFile(file): | |
42 | try: |
|
42 | try: | |
43 | year = int(file[1:5]) |
|
43 | year = int(file[1:5]) | |
44 | doy = int(file[5:8]) |
|
44 | doy = int(file[5:8]) | |
45 | set = int(file[8:11]) |
|
45 | set = int(file[8:11]) | |
46 | except: |
|
46 | except: | |
47 | return 0 |
|
47 | return 0 | |
48 |
|
48 | |||
49 | return 1 |
|
49 | return 1 | |
50 |
|
50 | |||
51 | def isRadarPath(path): |
|
51 | def isRadarPath(path): | |
52 | try: |
|
52 | try: | |
53 | year = int(path[1:5]) |
|
53 | year = int(path[1:5]) | |
54 | doy = int(path[5:8]) |
|
54 | doy = int(path[5:8]) | |
55 | except: |
|
55 | except: | |
56 | return 0 |
|
56 | return 0 | |
57 |
|
57 | |||
58 | return 1 |
|
58 | return 1 | |
59 |
|
59 | |||
60 | def isInt(value): |
|
60 | def isInt(value): | |
61 |
|
61 | |||
62 | try: |
|
62 | try: | |
63 | int(value) |
|
63 | int(value) | |
64 | except: |
|
64 | except: | |
65 | return 0 |
|
65 | return 0 | |
66 |
|
66 | |||
67 | return 1 |
|
67 | return 1 | |
68 |
|
68 | |||
69 | def isFloat(value): |
|
69 | def isFloat(value): | |
70 |
|
70 | |||
71 | try: |
|
71 | try: | |
72 | float(value) |
|
72 | float(value) | |
73 | except: |
|
73 | except: | |
74 | return 0 |
|
74 | return 0 | |
75 |
|
75 | |||
76 | return 1 |
|
76 | return 1 | |
77 |
|
77 | |||
78 | def isList(value): |
|
78 | def isList(value): | |
79 |
|
79 | |||
80 | x = ast.literal_eval(value) |
|
80 | x = ast.literal_eval(value) | |
81 |
|
81 | |||
82 | if type(x) in (tuple, list): |
|
82 | if type(x) in (tuple, list): | |
83 | return 1 |
|
83 | return 1 | |
84 |
|
84 | |||
85 | return 0 |
|
85 | return 0 | |
86 |
|
86 | |||
87 | class BasicWindow(QMainWindow, Ui_BasicWindow): |
|
87 | class BasicWindow(QMainWindow, Ui_BasicWindow): | |
88 | """ |
|
88 | """ | |
89 | """ |
|
89 | """ | |
90 | def __init__(self, parent=None): |
|
90 | def __init__(self, parent=None): | |
91 | """ |
|
91 | """ | |
92 |
|
92 | |||
93 | """ |
|
93 | """ | |
94 | QMainWindow.__init__(self, parent) |
|
94 | QMainWindow.__init__(self, parent) | |
95 | self.setupUi(self) |
|
95 | self.setupUi(self) | |
96 | self.__puObjDict = {} |
|
96 | self.__puObjDict = {} | |
97 | self.__itemTreeDict = {} |
|
97 | self.__itemTreeDict = {} | |
98 | self.readUnitConfObjList = [] |
|
98 | self.readUnitConfObjList = [] | |
99 | self.operObjList = [] |
|
99 | self.operObjList = [] | |
100 | self.projecObjView = None |
|
100 | self.projecObjView = None | |
101 | self.idProject = 0 |
|
101 | self.idProject = 0 | |
102 | # self.idImag = 0 |
|
102 | # self.idImag = 0 | |
103 |
|
103 | |||
104 | self.idImagscope = 0 |
|
104 | self.idImagscope = 0 | |
105 | self.idImagspectra = 0 |
|
105 | self.idImagspectra = 0 | |
106 | self.idImagcross = 0 |
|
106 | self.idImagcross = 0 | |
107 | self.idImagrti = 0 |
|
107 | self.idImagrti = 0 | |
108 | self.idImagcoherence = 0 |
|
108 | self.idImagcoherence = 0 | |
109 | self.idImagpower = 0 |
|
109 | self.idImagpower = 0 | |
110 | self.idImagrtinoise = 0 |
|
110 | self.idImagrtinoise = 0 | |
111 | self.idImagspectraHeis = 0 |
|
111 | self.idImagspectraHeis = 0 | |
112 | self.idImagrtiHeis = 0 |
|
112 | self.idImagrtiHeis = 0 | |
113 |
|
113 | |||
114 | self.dataPath = None |
|
114 | self.dataPath = None | |
115 | self.online = 0 |
|
115 | self.online = 0 | |
116 | self.walk = 0 |
|
116 | self.walk = 0 | |
117 | self.create = False |
|
117 | self.create = False | |
118 | self.selectedItemTree = None |
|
118 | self.selectedItemTree = None | |
119 | self.controllerThread = None |
|
119 | self.controllerThread = None | |
120 | # self.commCtrlPThread = None |
|
120 | # self.commCtrlPThread = None | |
121 | # self.create_figure() |
|
121 | # self.create_figure() | |
122 | self.temporalFTP = ftpBuffer() |
|
122 | self.temporalFTP = ftpBuffer() | |
123 | self.projectProperCaracteristica = [] |
|
123 | self.projectProperCaracteristica = [] | |
124 | self.projectProperPrincipal = [] |
|
124 | self.projectProperPrincipal = [] | |
125 | self.projectProperDescripcion = [] |
|
125 | self.projectProperDescripcion = [] | |
126 | self.volProperCaracteristica = [] |
|
126 | self.volProperCaracteristica = [] | |
127 | self.volProperPrincipal = [] |
|
127 | self.volProperPrincipal = [] | |
128 | self.volProperDescripcion = [] |
|
128 | self.volProperDescripcion = [] | |
129 | self.specProperCaracteristica = [] |
|
129 | self.specProperCaracteristica = [] | |
130 | self.specProperPrincipal = [] |
|
130 | self.specProperPrincipal = [] | |
131 | self.specProperDescripcion = [] |
|
131 | self.specProperDescripcion = [] | |
132 |
|
132 | |||
133 | self.specHeisProperCaracteristica = [] |
|
133 | self.specHeisProperCaracteristica = [] | |
134 | self.specHeisProperPrincipal = [] |
|
134 | self.specHeisProperPrincipal = [] | |
135 | self.specHeisProperDescripcion = [] |
|
135 | self.specHeisProperDescripcion = [] | |
136 |
|
136 | |||
137 | # self.pathWorkSpace = './' |
|
137 | # self.pathWorkSpace = './' | |
138 |
|
138 | |||
139 | self.__projectObjDict = {} |
|
139 | self.__projectObjDict = {} | |
140 | self.__operationObjDict = {} |
|
140 | self.__operationObjDict = {} | |
141 |
|
141 | |||
142 | self.__puLocalFolder2FTP = {} |
|
142 | self.__puLocalFolder2FTP = {} | |
143 | self.__enable = False |
|
143 | self.__enable = False | |
144 |
|
144 | |||
145 | # self.create_comm() |
|
145 | # self.create_comm() | |
146 | self.create_updating_timer() |
|
146 | self.create_updating_timer() | |
147 | self.setGUIStatus() |
|
147 | self.setGUIStatus() | |
148 |
|
148 | |||
149 | @pyqtSignature("") |
|
149 | @pyqtSignature("") | |
150 | def on_actionOpen_triggered(self): |
|
150 | def on_actionOpen_triggered(self): | |
151 | """ |
|
151 | """ | |
152 | Slot documentation goes here. |
|
152 | Slot documentation goes here. | |
153 | """ |
|
153 | """ | |
154 | self.openProject() |
|
154 | self.openProject() | |
155 |
|
155 | |||
156 | @pyqtSignature("") |
|
156 | @pyqtSignature("") | |
157 | def on_actionCreate_triggered(self): |
|
157 | def on_actionCreate_triggered(self): | |
158 | """ |
|
158 | """ | |
159 | Slot documentation goes here. |
|
159 | Slot documentation goes here. | |
160 | """ |
|
160 | """ | |
161 | self.setInputsProject_View() |
|
161 | self.setInputsProject_View() | |
162 | self.create = True |
|
162 | self.create = True | |
163 |
|
163 | |||
164 | @pyqtSignature("") |
|
164 | @pyqtSignature("") | |
165 | def on_actionSave_triggered(self): |
|
165 | def on_actionSave_triggered(self): | |
166 | """ |
|
166 | """ | |
167 | Slot documentation goes here. |
|
167 | Slot documentation goes here. | |
168 | """ |
|
168 | """ | |
169 | self.saveProject() |
|
169 | self.saveProject() | |
170 |
|
170 | |||
171 | @pyqtSignature("") |
|
171 | @pyqtSignature("") | |
172 | def on_actionClose_triggered(self): |
|
172 | def on_actionClose_triggered(self): | |
173 | """ |
|
173 | """ | |
174 | Slot documentation goes here. |
|
174 | Slot documentation goes here. | |
175 | """ |
|
175 | """ | |
176 | self.close() |
|
176 | self.close() | |
177 |
|
177 | |||
178 | @pyqtSignature("") |
|
178 | @pyqtSignature("") | |
179 | def on_actionStart_triggered(self): |
|
179 | def on_actionStart_triggered(self): | |
180 | """ |
|
180 | """ | |
181 | """ |
|
181 | """ | |
182 | self.playProject() |
|
182 | self.playProject() | |
183 |
|
183 | |||
184 | @pyqtSignature("") |
|
184 | @pyqtSignature("") | |
185 | def on_actionPause_triggered(self): |
|
185 | def on_actionPause_triggered(self): | |
186 | """ |
|
186 | """ | |
187 | """ |
|
187 | """ | |
188 | self.pauseProject() |
|
188 | self.pauseProject() | |
189 |
|
189 | |||
190 | @pyqtSignature("") |
|
190 | @pyqtSignature("") | |
191 | def on_actionStop_triggered(self): |
|
191 | def on_actionStop_triggered(self): | |
192 | """ |
|
192 | """ | |
193 | """ |
|
193 | """ | |
194 | self.stopProject() |
|
194 | self.stopProject() | |
195 |
|
195 | |||
196 | @pyqtSignature("") |
|
196 | @pyqtSignature("") | |
197 | def on_actionAbout_triggered(self): |
|
197 | def on_actionAbout_triggered(self): | |
198 | """ |
|
198 | """ | |
199 | """ |
|
199 | """ | |
200 | self.aboutEvent() |
|
200 | self.aboutEvent() | |
201 |
|
201 | |||
202 | @pyqtSignature("") |
|
202 | @pyqtSignature("") | |
203 | def on_actionFTP_triggered(self): |
|
203 | def on_actionFTP_triggered(self): | |
204 | """ |
|
204 | """ | |
205 | """ |
|
205 | """ | |
206 | self.configFTPWindowObj = Ftp(self) |
|
206 | self.configFTPWindowObj = Ftp(self) | |
207 |
|
207 | |||
208 | if not self.temporalFTP.create: |
|
208 | if not self.temporalFTP.create: | |
209 | self.temporalFTP.setwithoutconfiguration() |
|
209 | self.temporalFTP.setwithoutconfiguration() | |
210 |
|
210 | |||
211 | self.configFTPWindowObj.setParmsfromTemporal(self.temporalFTP.server, |
|
211 | self.configFTPWindowObj.setParmsfromTemporal(self.temporalFTP.server, | |
212 | self.temporalFTP.remotefolder, |
|
212 | self.temporalFTP.remotefolder, | |
213 | self.temporalFTP.username, |
|
213 | self.temporalFTP.username, | |
214 | self.temporalFTP.password, |
|
214 | self.temporalFTP.password, | |
215 | self.temporalFTP.ftp_wei, |
|
215 | self.temporalFTP.ftp_wei, | |
216 | self.temporalFTP.exp_code, |
|
216 | self.temporalFTP.exp_code, | |
217 | self.temporalFTP.sub_exp_code, |
|
217 | self.temporalFTP.sub_exp_code, | |
218 | self.temporalFTP.plot_pos) |
|
218 | self.temporalFTP.plot_pos) | |
219 |
|
219 | |||
220 | self.configFTPWindowObj.show() |
|
220 | self.configFTPWindowObj.show() | |
221 | self.configFTPWindowObj.closed.connect(self.createFTPConfig) |
|
221 | self.configFTPWindowObj.closed.connect(self.createFTPConfig) | |
222 |
|
222 | |||
223 | def createFTPConfig(self): |
|
223 | def createFTPConfig(self): | |
224 |
|
224 | |||
225 | if not self.configFTPWindowObj.create: |
|
225 | if not self.configFTPWindowObj.create: | |
226 | self.console.clear() |
|
226 | self.console.clear() | |
227 | self.console.append("There is no FTP configuration") |
|
227 | self.console.append("There is no FTP configuration") | |
228 | return |
|
228 | return | |
229 |
|
229 | |||
230 | self.console.append("Push Ok in Spectra view to Add FTP Configuration") |
|
230 | self.console.append("Push Ok in Spectra view to Add FTP Configuration") | |
231 |
|
231 | |||
232 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow() |
|
232 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow() | |
233 | self.temporalFTP.save(server=server, |
|
233 | self.temporalFTP.save(server=server, | |
234 | remotefolder=remotefolder, |
|
234 | remotefolder=remotefolder, | |
235 | username=username, |
|
235 | username=username, | |
236 | password=password, |
|
236 | password=password, | |
237 | ftp_wei=ftp_wei, |
|
237 | ftp_wei=ftp_wei, | |
238 | exp_code=exp_code, |
|
238 | exp_code=exp_code, | |
239 | sub_exp_code=sub_exp_code, |
|
239 | sub_exp_code=sub_exp_code, | |
240 | plot_pos=plot_pos) |
|
240 | plot_pos=plot_pos) | |
241 |
|
241 | |||
242 | @pyqtSignature("") |
|
242 | @pyqtSignature("") | |
243 | def on_actionOpenToolbar_triggered(self): |
|
243 | def on_actionOpenToolbar_triggered(self): | |
244 | """ |
|
244 | """ | |
245 | Slot documentation goes here. |
|
245 | Slot documentation goes here. | |
246 | """ |
|
246 | """ | |
247 | self.openProject() |
|
247 | self.openProject() | |
248 |
|
248 | |||
249 | @pyqtSignature("") |
|
249 | @pyqtSignature("") | |
250 | def on_actionCreateToolbar_triggered(self): |
|
250 | def on_actionCreateToolbar_triggered(self): | |
251 | """ |
|
251 | """ | |
252 | Slot documentation goes here. |
|
252 | Slot documentation goes here. | |
253 | """ |
|
253 | """ | |
254 | self.setInputsProject_View() |
|
254 | self.setInputsProject_View() | |
255 | self.create = True |
|
255 | self.create = True | |
256 |
|
256 | |||
257 | @pyqtSignature("") |
|
257 | @pyqtSignature("") | |
258 | def on_actionAddPU_triggered(self): |
|
258 | def on_actionAddPU_triggered(self): | |
259 | if len(self.__projectObjDict) == 0: |
|
259 | if len(self.__projectObjDict) == 0: | |
260 | outputstr = "First Create a Project then add Processing Unit" |
|
260 | outputstr = "First Create a Project then add Processing Unit" | |
261 | self.console.clear() |
|
261 | self.console.clear() | |
262 | self.console.append(outputstr) |
|
262 | self.console.append(outputstr) | |
263 | return 0 |
|
263 | return 0 | |
264 | else: |
|
264 | else: | |
265 | self.addPUWindow() |
|
265 | self.addPUWindow() | |
266 | self.console.clear() |
|
266 | self.console.clear() | |
267 | self.console.append("Please, Choose the type of Processing Unit") |
|
267 | self.console.append("Please, Choose the type of Processing Unit") | |
268 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
268 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") | |
269 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
269 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") | |
270 | self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
270 | self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") | |
271 |
|
271 | |||
272 |
|
272 | |||
273 | @pyqtSignature("") |
|
273 | @pyqtSignature("") | |
274 | def on_actionSaveToolbar_triggered(self): |
|
274 | def on_actionSaveToolbar_triggered(self): | |
275 | """ |
|
275 | """ | |
276 | Slot documentation goes here. |
|
276 | Slot documentation goes here. | |
277 | """ |
|
277 | """ | |
278 | self.saveProject() |
|
278 | self.saveProject() | |
279 |
|
279 | |||
280 | @pyqtSignature("") |
|
280 | @pyqtSignature("") | |
281 | def on_actionStarToolbar_triggered(self): |
|
281 | def on_actionStarToolbar_triggered(self): | |
282 | """ |
|
282 | """ | |
283 | Slot documentation goes here. |
|
283 | Slot documentation goes here. | |
284 | """ |
|
284 | """ | |
285 | self.playProject() |
|
285 | self.playProject() | |
286 |
|
286 | |||
287 | @pyqtSignature("") |
|
287 | @pyqtSignature("") | |
288 | def on_actionPauseToolbar_triggered(self): |
|
288 | def on_actionPauseToolbar_triggered(self): | |
289 |
|
289 | |||
290 | self.pauseProject() |
|
290 | self.pauseProject() | |
291 |
|
291 | |||
292 | @pyqtSignature("") |
|
292 | @pyqtSignature("") | |
293 | def on_actionStopToolbar_triggered(self): |
|
293 | def on_actionStopToolbar_triggered(self): | |
294 | """ |
|
294 | """ | |
295 | Slot documentation goes here. |
|
295 | Slot documentation goes here. | |
296 | """ |
|
296 | """ | |
297 | self.stopProject() |
|
297 | self.stopProject() | |
298 |
|
298 | |||
299 | @pyqtSignature("int") |
|
299 | @pyqtSignature("int") | |
300 | def on_proComReadMode_activated(self, index): |
|
300 | def on_proComReadMode_activated(self, index): | |
301 | """ |
|
301 | """ | |
302 | SELECCION DEL MODO DE LECTURA ON=1, OFF=0 |
|
302 | SELECCION DEL MODO DE LECTURA ON=1, OFF=0 | |
303 | """ |
|
303 | """ | |
304 | if index == 0: |
|
304 | if index == 0: | |
305 | self.online = 0 |
|
305 | self.online = 0 | |
306 | self.proDelay.setText("0") |
|
306 | self.proDelay.setText("0") | |
307 | self.proSet.setText("") |
|
307 | self.proSet.setText("") | |
308 | self.proSet.setEnabled(False) |
|
308 | self.proSet.setEnabled(False) | |
309 | self.proDelay.setEnabled(False) |
|
309 | self.proDelay.setEnabled(False) | |
310 | elif index == 1: |
|
310 | elif index == 1: | |
311 | self.online = 1 |
|
311 | self.online = 1 | |
312 | self.proSet.setText("") |
|
312 | self.proSet.setText("") | |
313 | self.proDelay.setText("5") |
|
313 | self.proDelay.setText("5") | |
314 | self.proSet.setEnabled(True) |
|
314 | self.proSet.setEnabled(True) | |
315 | self.proDelay.setEnabled(True) |
|
315 | self.proDelay.setEnabled(True) | |
316 |
|
316 | |||
317 | @pyqtSignature("int") |
|
317 | @pyqtSignature("int") | |
318 | def on_proComDataType_activated(self, index): |
|
318 | def on_proComDataType_activated(self, index): | |
319 | """ |
|
319 | """ | |
320 | Voltage or Spectra |
|
320 | Voltage or Spectra | |
321 | """ |
|
321 | """ | |
322 | self.labelSet.show() |
|
322 | self.labelSet.show() | |
323 | self.proSet.show() |
|
323 | self.proSet.show() | |
324 |
|
324 | |||
325 | self.labExpLabel.show() |
|
325 | self.labExpLabel.show() | |
326 | self.proExpLabel.show() |
|
326 | self.proExpLabel.show() | |
327 |
|
327 | |||
328 | self.labelIPPKm.hide() |
|
328 | self.labelIPPKm.hide() | |
329 | self.proIPPKm.hide() |
|
329 | self.proIPPKm.hide() | |
330 |
|
330 | |||
331 | if index == 0: |
|
331 | if index == 0: | |
332 | extension = '.r' |
|
332 | extension = '.r' | |
333 | elif index == 1: |
|
333 | elif index == 1: | |
334 | extension = '.pdata' |
|
334 | extension = '.pdata' | |
335 | elif index == 2: |
|
335 | elif index == 2: | |
336 | extension = '.fits' |
|
336 | extension = '.fits' | |
337 | elif index == 3: |
|
337 | elif index == 3: | |
338 | extension = '.hdf5' |
|
338 | extension = '.hdf5' | |
339 |
|
339 | |||
340 | self.labelIPPKm.show() |
|
340 | self.labelIPPKm.show() | |
341 | self.proIPPKm.show() |
|
341 | self.proIPPKm.show() | |
342 |
|
342 | |||
343 | self.labelSet.hide() |
|
343 | self.labelSet.hide() | |
344 | self.proSet.hide() |
|
344 | self.proSet.hide() | |
345 |
|
345 | |||
346 | self.labExpLabel.hide() |
|
346 | self.labExpLabel.hide() | |
347 | self.proExpLabel.hide() |
|
347 | self.proExpLabel.hide() | |
348 |
|
348 | |||
349 | self.proDataType.setText(extension) |
|
349 | self.proDataType.setText(extension) | |
350 |
|
350 | |||
351 | @pyqtSignature("int") |
|
351 | @pyqtSignature("int") | |
352 | def on_proComWalk_activated(self, index): |
|
352 | def on_proComWalk_activated(self, index): | |
353 | """ |
|
353 | """ | |
354 |
|
354 | |||
355 | """ |
|
355 | """ | |
356 | if index == 0: |
|
356 | if index == 0: | |
357 | self.walk = 0 |
|
357 | self.walk = 0 | |
358 | elif index == 1: |
|
358 | elif index == 1: | |
359 | self.walk = 1 |
|
359 | self.walk = 1 | |
360 |
|
360 | |||
361 | @pyqtSignature("") |
|
361 | @pyqtSignature("") | |
362 | def on_proToolPath_clicked(self): |
|
362 | def on_proToolPath_clicked(self): | |
363 | """ |
|
363 | """ | |
364 | Choose your path |
|
364 | Choose your path | |
365 | """ |
|
365 | """ | |
366 |
|
366 | |||
367 | current_dpath = './' |
|
367 | current_dpath = './' | |
368 | if self.dataPath: |
|
368 | if self.dataPath: | |
369 | current_dpath = self.dataPath |
|
369 | current_dpath = self.dataPath | |
370 |
|
370 | |||
371 | datapath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', current_dpath, QtGui.QFileDialog.ShowDirsOnly)) |
|
371 | datapath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', current_dpath, QtGui.QFileDialog.ShowDirsOnly)) | |
372 |
|
372 | |||
373 | #If it was canceled |
|
373 | #If it was canceled | |
374 | if not datapath: |
|
374 | if not datapath: | |
375 | return |
|
375 | return | |
376 |
|
376 | |||
377 | #If any change was done |
|
377 | #If any change was done | |
378 | if datapath == self.dataPath: |
|
378 | if datapath == self.dataPath: | |
379 | return |
|
379 | return | |
380 |
|
380 | |||
381 | self.proDataPath.setText(datapath) |
|
381 | self.proDataPath.setText(datapath) | |
382 |
|
382 | |||
383 | self.actionStart.setEnabled(False) |
|
383 | self.actionStart.setEnabled(False) | |
384 | self.actionStarToolbar.setEnabled(False) |
|
384 | self.actionStarToolbar.setEnabled(False) | |
385 | self.proOk.setEnabled(False) |
|
385 | self.proOk.setEnabled(False) | |
386 |
|
386 | |||
387 | self.proComStartDate.clear() |
|
387 | self.proComStartDate.clear() | |
388 | self.proComEndDate.clear() |
|
388 | self.proComEndDate.clear() | |
389 |
|
389 | |||
390 | if not os.path.exists(datapath): |
|
390 | if not os.path.exists(datapath): | |
391 |
|
391 | |||
392 | self.console.clear() |
|
392 | self.console.clear() | |
393 | self.console.append("Write a valid path") |
|
393 | self.console.append("Write a valid path") | |
394 | return |
|
394 | return | |
395 |
|
395 | |||
396 | self.dataPath = datapath |
|
396 | self.dataPath = datapath | |
397 |
|
397 | |||
398 | self.console.clear() |
|
398 | self.console.clear() | |
399 | self.console.append("Select the read mode and press 'load button'") |
|
399 | self.console.append("Select the read mode and press 'load button'") | |
400 |
|
400 | |||
401 |
|
401 | |||
402 | @pyqtSignature("") |
|
402 | @pyqtSignature("") | |
403 | def on_proLoadButton_clicked(self): |
|
403 | def on_proLoadButton_clicked(self): | |
404 |
|
404 | |||
405 | self.console.clear() |
|
405 | self.console.clear() | |
406 |
|
406 | |||
407 | if not self.getSelectedProjectObj(): |
|
407 | if not self.getSelectedProjectObj(): | |
408 | self.console.append("Please select a Project before Load files") |
|
408 | self.console.append("Please select a Project before Load files") | |
409 | return |
|
409 | return | |
410 |
|
410 | |||
411 | parameter_list = self.checkInputsProject() |
|
411 | parameter_list = self.checkInputsProject() | |
412 |
|
412 | |||
413 | if not parameter_list[0]: |
|
413 | if not parameter_list[0]: | |
414 | return |
|
414 | return | |
415 |
|
415 | |||
416 | parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel = parameter_list |
|
416 | parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel = parameter_list | |
417 |
|
417 | |||
418 | if read_mode == "Offline": |
|
418 | if read_mode == "Offline": | |
419 | self.proComStartDate.clear() |
|
419 | self.proComStartDate.clear() | |
420 | self.proComEndDate.clear() |
|
420 | self.proComEndDate.clear() | |
421 | self.proComStartDate.setEnabled(True) |
|
421 | self.proComStartDate.setEnabled(True) | |
422 | self.proComEndDate.setEnabled(True) |
|
422 | self.proComEndDate.setEnabled(True) | |
423 | self.proStartTime.setEnabled(True) |
|
423 | self.proStartTime.setEnabled(True) | |
424 | self.proEndTime.setEnabled(True) |
|
424 | self.proEndTime.setEnabled(True) | |
425 | self.frame_2.setEnabled(True) |
|
425 | self.frame_2.setEnabled(True) | |
426 |
|
426 | |||
427 | if read_mode == "Online": |
|
427 | if read_mode == "Online": | |
428 | self.proComStartDate.addItem("1960/01/30") |
|
428 | self.proComStartDate.addItem("1960/01/30") | |
429 | self.proComEndDate.addItem("2018/12/31") |
|
429 | self.proComEndDate.addItem("2018/12/31") | |
430 | self.proComStartDate.setEnabled(False) |
|
430 | self.proComStartDate.setEnabled(False) | |
431 | self.proComEndDate.setEnabled(False) |
|
431 | self.proComEndDate.setEnabled(False) | |
432 | self.proStartTime.setEnabled(False) |
|
432 | self.proStartTime.setEnabled(False) | |
433 | self.proEndTime.setEnabled(False) |
|
433 | self.proEndTime.setEnabled(False) | |
434 | self.frame_2.setEnabled(True) |
|
434 | self.frame_2.setEnabled(True) | |
435 |
|
435 | |||
436 | self.loadDays(data_path, ext, walk, expLabel) |
|
436 | self.loadDays(data_path, ext, walk, expLabel) | |
437 |
|
437 | |||
438 | @pyqtSignature("int") |
|
438 | @pyqtSignature("int") | |
439 | def on_proComStartDate_activated(self, index): |
|
439 | def on_proComStartDate_activated(self, index): | |
440 | """ |
|
440 | """ | |
441 | SELECCION DEL RANGO DE FECHAS -START DATE |
|
441 | SELECCION DEL RANGO DE FECHAS -START DATE | |
442 | """ |
|
442 | """ | |
443 | stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() - 1 |
|
443 | stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() - 1 | |
444 |
|
444 | |||
445 | self.proComEndDate.clear() |
|
445 | self.proComEndDate.clear() | |
446 | for i in self.dateList[index:]: |
|
446 | for i in self.dateList[index:]: | |
447 | self.proComEndDate.addItem(i) |
|
447 | self.proComEndDate.addItem(i) | |
448 |
|
448 | |||
449 | if self.proComEndDate.count() - stopIndex - 1 >= 0: |
|
449 | if self.proComEndDate.count() - stopIndex - 1 >= 0: | |
450 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex - 1) |
|
450 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex - 1) | |
451 | else: |
|
451 | else: | |
452 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) |
|
452 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) | |
453 |
|
453 | |||
454 | @pyqtSignature("int") |
|
454 | @pyqtSignature("int") | |
455 | def on_proComEndDate_activated(self, index): |
|
455 | def on_proComEndDate_activated(self, index): | |
456 | """ |
|
456 | """ | |
457 | SELECCION DEL RANGO DE FECHAS-END DATE |
|
457 | SELECCION DEL RANGO DE FECHAS-END DATE | |
458 | """ |
|
458 | """ | |
459 | pass |
|
459 | pass | |
460 |
|
460 | |||
461 | @pyqtSignature("") |
|
461 | @pyqtSignature("") | |
462 | def on_proOk_clicked(self): |
|
462 | def on_proOk_clicked(self): | |
463 | """ |
|
463 | """ | |
464 | Añade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml. |
|
464 | Añade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml. | |
465 | Prepara la configuración del diágrama del Arbol del treeView numero 2 |
|
465 | Prepara la configuración del diágrama del Arbol del treeView numero 2 | |
466 | """ |
|
466 | """ | |
467 |
|
467 | |||
468 | self.actionStart.setEnabled(False) |
|
468 | self.actionStart.setEnabled(False) | |
469 | self.actionStarToolbar.setEnabled(False) |
|
469 | self.actionStarToolbar.setEnabled(False) | |
470 |
|
470 | |||
471 | self.console.clear() |
|
471 | self.console.clear() | |
472 |
|
472 | |||
473 | if self.create: |
|
473 | if self.create: | |
474 |
|
474 | |||
475 | projectId = self.__getNewProjectId() |
|
475 | projectId = self.__getNewProjectId() | |
476 |
|
476 | |||
477 | if not projectId: |
|
477 | if not projectId: | |
478 | return 0 |
|
478 | return 0 | |
479 |
|
479 | |||
480 | projectObjView = self.createProjectView(projectId) |
|
480 | projectObjView = self.createProjectView(projectId) | |
481 |
|
481 | |||
482 | if not projectObjView: |
|
482 | if not projectObjView: | |
483 | return 0 |
|
483 | return 0 | |
484 |
|
484 | |||
485 | readUnitObj = self.createReadUnitView(projectObjView) |
|
485 | readUnitObj = self.createReadUnitView(projectObjView) | |
486 |
|
486 | |||
487 | if not readUnitObj: |
|
487 | if not readUnitObj: | |
488 | return 0 |
|
488 | return 0 | |
489 |
|
489 | |||
490 | else: |
|
490 | else: | |
491 | projectObjView = self.updateProjectView() |
|
491 | projectObjView = self.updateProjectView() | |
492 |
|
492 | |||
493 | if not projectObjView: |
|
493 | if not projectObjView: | |
494 | return 0 |
|
494 | return 0 | |
495 |
|
495 | |||
496 | projectId = projectObjView.getId() |
|
496 | projectId = projectObjView.getId() | |
497 | idReadUnit = projectObjView.getReadUnitId() |
|
497 | idReadUnit = projectObjView.getReadUnitId() | |
498 | readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit) |
|
498 | readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit) | |
499 |
|
499 | |||
500 | if not readUnitObj: |
|
500 | if not readUnitObj: | |
501 | return 0 |
|
501 | return 0 | |
502 |
|
502 | |||
503 | self.__itemTreeDict[projectId].setText(projectObjView.name) |
|
503 | self.__itemTreeDict[projectId].setText(projectObjView.name) | |
504 | # Project Properties |
|
504 | # Project Properties | |
505 | self.refreshProjectProperties(projectObjView) |
|
505 | self.refreshProjectProperties(projectObjView) | |
506 | # Disable tabProject after finish the creation |
|
506 | # Disable tabProject after finish the creation | |
507 |
|
507 | |||
508 | self.actionStart.setEnabled(True) |
|
508 | self.actionStart.setEnabled(True) | |
509 | self.actionStarToolbar.setEnabled(True) |
|
509 | self.actionStarToolbar.setEnabled(True) | |
510 | self.console.clear() |
|
510 | self.console.clear() | |
511 | self.console.append("The project parameters were validated") |
|
511 | self.console.append("The project parameters were validated") | |
512 |
|
512 | |||
513 | return 1 |
|
513 | return 1 | |
514 |
|
514 | |||
515 | @pyqtSignature("") |
|
515 | @pyqtSignature("") | |
516 | def on_proClear_clicked(self): |
|
516 | def on_proClear_clicked(self): | |
517 |
|
517 | |||
518 | self.console.clear() |
|
518 | self.console.clear() | |
519 |
|
519 | |||
520 | @pyqtSignature("int") |
|
520 | @pyqtSignature("int") | |
521 | def on_volOpCebChannels_stateChanged(self, p0): |
|
521 | def on_volOpCebChannels_stateChanged(self, p0): | |
522 | """ |
|
522 | """ | |
523 | Check Box habilita operaciones de Selecci�n de Canales |
|
523 | Check Box habilita operaciones de Selecci�n de Canales | |
524 | """ |
|
524 | """ | |
525 | if p0 == 2: |
|
525 | if p0 == 2: | |
526 | self.volOpComChannels.setEnabled(True) |
|
526 | self.volOpComChannels.setEnabled(True) | |
527 | self.volOpChannel.setEnabled(True) |
|
527 | self.volOpChannel.setEnabled(True) | |
528 |
|
528 | |||
529 | if p0 == 0: |
|
529 | if p0 == 0: | |
530 | self.volOpComChannels.setEnabled(False) |
|
530 | self.volOpComChannels.setEnabled(False) | |
531 | self.volOpChannel.setEnabled(False) |
|
531 | self.volOpChannel.setEnabled(False) | |
532 | self.volOpChannel.clear() |
|
532 | self.volOpChannel.clear() | |
533 |
|
533 | |||
534 | @pyqtSignature("int") |
|
534 | @pyqtSignature("int") | |
535 | def on_volOpCebHeights_stateChanged(self, p0): |
|
535 | def on_volOpCebHeights_stateChanged(self, p0): | |
536 | """ |
|
536 | """ | |
537 | Check Box habilita operaciones de Selecci�n de Alturas |
|
537 | Check Box habilita operaciones de Selecci�n de Alturas | |
538 | """ |
|
538 | """ | |
539 | if p0 == 2: |
|
539 | if p0 == 2: | |
540 | self.volOpHeights.setEnabled(True) |
|
540 | self.volOpHeights.setEnabled(True) | |
541 | self.volOpComHeights.setEnabled(True) |
|
541 | self.volOpComHeights.setEnabled(True) | |
542 |
|
542 | |||
543 | if p0 == 0: |
|
543 | if p0 == 0: | |
544 | self.volOpHeights.setEnabled(False) |
|
544 | self.volOpHeights.setEnabled(False) | |
545 | self.volOpHeights.clear() |
|
545 | self.volOpHeights.clear() | |
546 | self.volOpComHeights.setEnabled(False) |
|
546 | self.volOpComHeights.setEnabled(False) | |
547 |
|
547 | |||
548 | @pyqtSignature("int") |
|
548 | @pyqtSignature("int") | |
549 | def on_volOpCebFilter_stateChanged(self, p0): |
|
549 | def on_volOpCebFilter_stateChanged(self, p0): | |
550 | """ |
|
550 | """ | |
551 | Name='Decoder', optype='other' |
|
551 | Name='Decoder', optype='other' | |
552 | """ |
|
552 | """ | |
553 | if p0 == 2: |
|
553 | if p0 == 2: | |
554 | self.volOpFilter.setEnabled(True) |
|
554 | self.volOpFilter.setEnabled(True) | |
555 |
|
555 | |||
556 | if p0 == 0: |
|
556 | if p0 == 0: | |
557 | self.volOpFilter.setEnabled(False) |
|
557 | self.volOpFilter.setEnabled(False) | |
558 | self.volOpFilter.clear() |
|
558 | self.volOpFilter.clear() | |
559 |
|
559 | |||
560 | @pyqtSignature("int") |
|
560 | @pyqtSignature("int") | |
561 | def on_volOpCebProfile_stateChanged(self, p0): |
|
561 | def on_volOpCebProfile_stateChanged(self, p0): | |
562 | """ |
|
562 | """ | |
563 | Check Box habilita ingreso del rango de Perfiles |
|
563 | Check Box habilita ingreso del rango de Perfiles | |
564 | """ |
|
564 | """ | |
565 | if p0 == 2: |
|
565 | if p0 == 2: | |
566 | self.volOpComProfile.setEnabled(True) |
|
566 | self.volOpComProfile.setEnabled(True) | |
567 | self.volOpProfile.setEnabled(True) |
|
567 | self.volOpProfile.setEnabled(True) | |
568 |
|
568 | |||
569 | if p0 == 0: |
|
569 | if p0 == 0: | |
570 | self.volOpComProfile.setEnabled(False) |
|
570 | self.volOpComProfile.setEnabled(False) | |
571 | self.volOpProfile.setEnabled(False) |
|
571 | self.volOpProfile.setEnabled(False) | |
572 | self.volOpProfile.clear() |
|
572 | self.volOpProfile.clear() | |
573 |
|
573 | |||
574 | @pyqtSignature("int") |
|
574 | @pyqtSignature("int") | |
575 | def on_volOpComProfile_activated(self, index): |
|
575 | def on_volOpComProfile_activated(self, index): | |
576 | """ |
|
576 | """ | |
577 | Check Box habilita ingreso del rango de Perfiles |
|
577 | Check Box habilita ingreso del rango de Perfiles | |
578 | """ |
|
578 | """ | |
579 | #Profile List |
|
579 | #Profile List | |
580 | if index == 0: |
|
580 | if index == 0: | |
581 | self.volOpProfile.setToolTip('List of selected profiles. Example: 0, 1, 2, 3, 4, 5, 6, 7') |
|
581 | self.volOpProfile.setToolTip('List of selected profiles. Example: 0, 1, 2, 3, 4, 5, 6, 7') | |
582 |
|
582 | |||
583 | #Profile Range |
|
583 | #Profile Range | |
584 | if index == 1: |
|
584 | if index == 1: | |
585 | self.volOpProfile.setToolTip('Minimum and maximum profile index. Example: 0, 7') |
|
585 | self.volOpProfile.setToolTip('Minimum and maximum profile index. Example: 0, 7') | |
586 |
|
586 | |||
587 | #Profile Range List |
|
587 | #Profile Range List | |
588 | if index == 2: |
|
588 | if index == 2: | |
589 | self.volOpProfile.setToolTip('List of profile ranges. Example: (0, 7), (12, 19), (100, 200)') |
|
589 | self.volOpProfile.setToolTip('List of profile ranges. Example: (0, 7), (12, 19), (100, 200)') | |
590 |
|
590 | |||
591 | @pyqtSignature("int") |
|
591 | @pyqtSignature("int") | |
592 | def on_volOpCebDecodification_stateChanged(self, p0): |
|
592 | def on_volOpCebDecodification_stateChanged(self, p0): | |
593 | """ |
|
593 | """ | |
594 | Check Box habilita |
|
594 | Check Box habilita | |
595 | """ |
|
595 | """ | |
596 | if p0 == 2: |
|
596 | if p0 == 2: | |
597 | self.volOpComCode.setEnabled(True) |
|
597 | self.volOpComCode.setEnabled(True) | |
598 | self.volOpComMode.setEnabled(True) |
|
598 | self.volOpComMode.setEnabled(True) | |
599 | if p0 == 0: |
|
599 | if p0 == 0: | |
600 | self.volOpComCode.setEnabled(False) |
|
600 | self.volOpComCode.setEnabled(False) | |
601 | self.volOpComMode.setEnabled(False) |
|
601 | self.volOpComMode.setEnabled(False) | |
602 |
|
602 | |||
603 | @pyqtSignature("int") |
|
603 | @pyqtSignature("int") | |
604 | def on_volOpComCode_activated(self, index): |
|
604 | def on_volOpComCode_activated(self, index): | |
605 | """ |
|
605 | """ | |
606 | Check Box habilita ingreso |
|
606 | Check Box habilita ingreso | |
607 | """ |
|
607 | """ | |
608 | if index == 13: |
|
608 | if index == 13: | |
609 | self.volOpCode.setEnabled(True) |
|
609 | self.volOpCode.setEnabled(True) | |
610 | else: |
|
610 | else: | |
611 | self.volOpCode.setEnabled(False) |
|
611 | self.volOpCode.setEnabled(False) | |
612 |
|
612 | |||
613 | if index == 0: |
|
613 | if index == 0: | |
614 | code = '' |
|
614 | code = '' | |
615 | self.volOpCode.setText(str(code)) |
|
615 | self.volOpCode.setText(str(code)) | |
616 | return |
|
616 | return | |
617 |
|
617 | |||
618 | if index == 1: |
|
618 | if index == 1: | |
619 | code = '(1,1,-1)' |
|
619 | code = '(1,1,-1)' | |
620 | nCode = '1' |
|
620 | nCode = '1' | |
621 | nBaud = '3' |
|
621 | nBaud = '3' | |
622 | if index == 2: |
|
622 | if index == 2: | |
623 | code = '(1,1,-1,1)' |
|
623 | code = '(1,1,-1,1)' | |
624 | nCode = '1' |
|
624 | nCode = '1' | |
625 | nBaud = '4' |
|
625 | nBaud = '4' | |
626 | if index == 3: |
|
626 | if index == 3: | |
627 | code = '(1,1,1,-1,1)' |
|
627 | code = '(1,1,1,-1,1)' | |
628 | nCode = '1' |
|
628 | nCode = '1' | |
629 | nBaud = '5' |
|
629 | nBaud = '5' | |
630 | if index == 4: |
|
630 | if index == 4: | |
631 | code = '(1,1,1,-1,-1,1,-1)' |
|
631 | code = '(1,1,1,-1,-1,1,-1)' | |
632 | nCode = '1' |
|
632 | nCode = '1' | |
633 | nBaud = '7' |
|
633 | nBaud = '7' | |
634 | if index == 5: |
|
634 | if index == 5: | |
635 | code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1)' |
|
635 | code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1)' | |
636 | nCode = '1' |
|
636 | nCode = '1' | |
637 | nBaud = '11' |
|
637 | nBaud = '11' | |
638 | if index == 6: |
|
638 | if index == 6: | |
639 | code = '(1,1,1,1,1,-1,-1,1,1,-1,1,-1,1)' |
|
639 | code = '(1,1,1,1,1,-1,-1,1,1,-1,1,-1,1)' | |
640 | nCode = '1' |
|
640 | nCode = '1' | |
641 | nBaud = '13' |
|
641 | nBaud = '13' | |
642 | if index == 7: |
|
642 | if index == 7: | |
643 | code = '(1,1,-1,-1,-1,1)' |
|
643 | code = '(1,1,-1,-1,-1,1)' | |
644 | nCode = '2' |
|
644 | nCode = '2' | |
645 | nBaud = '3' |
|
645 | nBaud = '3' | |
646 | if index == 8: |
|
646 | if index == 8: | |
647 | code = '(1,1,-1,1,-1,-1,1,-1)' |
|
647 | code = '(1,1,-1,1,-1,-1,1,-1)' | |
648 | nCode = '2' |
|
648 | nCode = '2' | |
649 | nBaud = '4' |
|
649 | nBaud = '4' | |
650 | if index == 9: |
|
650 | if index == 9: | |
651 | code = '(1,1,1,-1,1,-1,-1,-1,1,-1)' |
|
651 | code = '(1,1,1,-1,1,-1,-1,-1,1,-1)' | |
652 | nCode = '2' |
|
652 | nCode = '2' | |
653 | nBaud = '5' |
|
653 | nBaud = '5' | |
654 | if index == 10: |
|
654 | if index == 10: | |
655 | code = '(1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1)' |
|
655 | code = '(1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1)' | |
656 | nCode = '2' |
|
656 | nCode = '2' | |
657 | nBaud = '7' |
|
657 | nBaud = '7' | |
658 | if index == 11: |
|
658 | if index == 11: | |
659 | code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1 ,-1 ,-1 ,1 ,1,1,-1 ,1 ,1 ,-1 ,1)' |
|
659 | code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1 ,-1 ,-1 ,1 ,1,1,-1 ,1 ,1 ,-1 ,1)' | |
660 | nCode = '2' |
|
660 | nCode = '2' | |
661 | nBaud = '11' |
|
661 | nBaud = '11' | |
662 | if index == 12: |
|
662 | if index == 12: | |
663 | code = '(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)' |
|
663 | code = '(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)' | |
664 | nCode = '2' |
|
664 | nCode = '2' | |
665 | nBaud = '13' |
|
665 | nBaud = '13' | |
666 |
|
666 | |||
667 | code = ast.literal_eval(code) |
|
667 | code = ast.literal_eval(code) | |
668 | nCode = int(nCode) |
|
668 | nCode = int(nCode) | |
669 | nBaud = int(nBaud) |
|
669 | nBaud = int(nBaud) | |
670 |
|
670 | |||
671 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() |
|
671 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() | |
672 |
|
672 | |||
673 | self.volOpCode.setText(str(code)) |
|
673 | self.volOpCode.setText(str(code)) | |
674 |
|
674 | |||
675 | @pyqtSignature("int") |
|
675 | @pyqtSignature("int") | |
676 | def on_volOpCebFlip_stateChanged(self, p0): |
|
676 | def on_volOpCebFlip_stateChanged(self, p0): | |
677 | """ |
|
677 | """ | |
678 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
678 | Check Box habilita ingresode del numero de Integraciones a realizar | |
679 | """ |
|
679 | """ | |
680 | if p0 == 2: |
|
680 | if p0 == 2: | |
681 | self.volOpFlip.setEnabled(True) |
|
681 | self.volOpFlip.setEnabled(True) | |
682 | if p0 == 0: |
|
682 | if p0 == 0: | |
683 | self.volOpFlip.setEnabled(False) |
|
683 | self.volOpFlip.setEnabled(False) | |
684 | self.volOpFlip.clear() |
|
684 | self.volOpFlip.clear() | |
685 |
|
685 | |||
686 | @pyqtSignature("int") |
|
686 | @pyqtSignature("int") | |
687 | def on_volOpCebCohInt_stateChanged(self, p0): |
|
687 | def on_volOpCebCohInt_stateChanged(self, p0): | |
688 | """ |
|
688 | """ | |
689 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
689 | Check Box habilita ingresode del numero de Integraciones a realizar | |
690 | """ |
|
690 | """ | |
691 | if p0 == 2: |
|
691 | if p0 == 2: | |
692 | self.volOpCohInt.setEnabled(True) |
|
692 | self.volOpCohInt.setEnabled(True) | |
693 | if p0 == 0: |
|
693 | if p0 == 0: | |
694 | self.volOpCohInt.setEnabled(False) |
|
694 | self.volOpCohInt.setEnabled(False) | |
695 | self.volOpCohInt.clear() |
|
695 | self.volOpCohInt.clear() | |
696 |
|
696 | |||
697 | @pyqtSignature("int") |
|
697 | @pyqtSignature("int") | |
698 | def on_volOpCebRadarfrequency_stateChanged(self, p0): |
|
698 | def on_volOpCebRadarfrequency_stateChanged(self, p0): | |
699 | """ |
|
699 | """ | |
700 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
700 | Check Box habilita ingresode del numero de Integraciones a realizar | |
701 | """ |
|
701 | """ | |
702 | if p0 == 2: |
|
702 | if p0 == 2: | |
703 | self.volOpRadarfrequency.setEnabled(True) |
|
703 | self.volOpRadarfrequency.setEnabled(True) | |
704 | if p0 == 0: |
|
704 | if p0 == 0: | |
705 | self.volOpRadarfrequency.clear() |
|
705 | self.volOpRadarfrequency.clear() | |
706 | self.volOpRadarfrequency.setEnabled(False) |
|
706 | self.volOpRadarfrequency.setEnabled(False) | |
707 |
|
707 | |||
708 | @pyqtSignature("") |
|
708 | @pyqtSignature("") | |
709 | def on_volOutputToolPath_clicked(self): |
|
709 | def on_volOutputToolPath_clicked(self): | |
710 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
710 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
711 | self.volOutputPath.setText(dirOutPath) |
|
711 | self.volOutputPath.setText(dirOutPath) | |
712 |
|
712 | |||
713 | @pyqtSignature("") |
|
713 | @pyqtSignature("") | |
714 | def on_specOutputToolPath_clicked(self): |
|
714 | def on_specOutputToolPath_clicked(self): | |
715 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
715 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
716 | self.specOutputPath.setText(dirOutPath) |
|
716 | self.specOutputPath.setText(dirOutPath) | |
717 |
|
717 | |||
718 | @pyqtSignature("") |
|
718 | @pyqtSignature("") | |
719 | def on_specHeisOutputToolPath_clicked(self): |
|
719 | def on_specHeisOutputToolPath_clicked(self): | |
720 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
720 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
721 | self.specHeisOutputPath.setText(dirOutPath) |
|
721 | self.specHeisOutputPath.setText(dirOutPath) | |
722 |
|
722 | |||
723 | @pyqtSignature("") |
|
723 | @pyqtSignature("") | |
724 | def on_specHeisOutputMetadaToolPath_clicked(self): |
|
724 | def on_specHeisOutputMetadaToolPath_clicked(self): | |
725 |
|
725 | |||
726 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) |
|
726 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) | |
727 | self.specHeisOutputMetada.setText(filename) |
|
727 | self.specHeisOutputMetada.setText(filename) | |
728 |
|
728 | |||
729 | @pyqtSignature("") |
|
729 | @pyqtSignature("") | |
730 | def on_volOpOk_clicked(self): |
|
730 | def on_volOpOk_clicked(self): | |
731 | """ |
|
731 | """ | |
732 | BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES A�ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO |
|
732 | BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES A�ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO | |
733 | PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML |
|
733 | PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML | |
734 | """ |
|
734 | """ | |
735 |
|
735 | |||
736 | checkPath = False |
|
736 | checkPath = False | |
737 |
|
737 | |||
738 | self.actionSaveToolbar.setEnabled(False) |
|
738 | self.actionSaveToolbar.setEnabled(False) | |
739 | self.actionStarToolbar.setEnabled(False) |
|
739 | self.actionStarToolbar.setEnabled(False) | |
740 |
|
740 | |||
741 | self.console.clear() |
|
741 | self.console.clear() | |
742 | self.console.append("Checking input parameters ...") |
|
742 | self.console.append("Checking input parameters ...") | |
743 |
|
743 | |||
744 | puObj = self.getSelectedItemObj() |
|
744 | puObj = self.getSelectedItemObj() | |
745 | puObj.removeOperations() |
|
745 | puObj.removeOperations() | |
746 |
|
746 | |||
747 | if self.volOpCebRadarfrequency.isChecked(): |
|
747 | if self.volOpCebRadarfrequency.isChecked(): | |
748 | value = str(self.volOpRadarfrequency.text()) |
|
748 | value = str(self.volOpRadarfrequency.text()) | |
749 | format = 'float' |
|
749 | format = 'float' | |
750 | name_operation = 'setRadarFrequency' |
|
750 | name_operation = 'setRadarFrequency' | |
751 | name_parameter = 'frequency' |
|
751 | name_parameter = 'frequency' | |
752 | if not value == "": |
|
752 | if not value == "": | |
753 | try: |
|
753 | try: | |
754 | radarfreq = float(self.volOpRadarfrequency.text())*1e6 |
|
754 | radarfreq = float(self.volOpRadarfrequency.text())*1e6 | |
755 | except: |
|
755 | except: | |
756 | self.console.clear() |
|
756 | self.console.clear() | |
757 | self.console.append("Invalid value '%s' for Radar Frequency" %value) |
|
757 | self.console.append("Invalid value '%s' for Radar Frequency" %value) | |
758 | return 0 |
|
758 | return 0 | |
759 |
|
759 | |||
760 | opObj = puObj.addOperation(name=name_operation) |
|
760 | opObj = puObj.addOperation(name=name_operation) | |
761 | if not opObj.addParameter(name=name_parameter, value=radarfreq, format=format): |
|
761 | if not opObj.addParameter(name=name_parameter, value=radarfreq, format=format): | |
762 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
762 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) | |
763 | return 0 |
|
763 | return 0 | |
764 |
|
764 | |||
765 | if self.volOpCebChannels.isChecked(): |
|
765 | if self.volOpCebChannels.isChecked(): | |
766 | value = str(self.volOpChannel.text()) |
|
766 | value = str(self.volOpChannel.text()) | |
767 |
|
767 | |||
768 | if value == "": |
|
768 | if value == "": | |
769 | print "Please fill channel list" |
|
769 | print "Please fill channel list" | |
770 | return 0 |
|
770 | return 0 | |
771 |
|
771 | |||
772 | format = 'intlist' |
|
772 | format = 'intlist' | |
773 | if self.volOpComChannels.currentIndex() == 0: |
|
773 | if self.volOpComChannels.currentIndex() == 0: | |
774 | name_operation = "selectChannels" |
|
774 | name_operation = "selectChannels" | |
775 | name_parameter = 'channelList' |
|
775 | name_parameter = 'channelList' | |
776 | else: |
|
776 | else: | |
777 | name_operation = "selectChannelsByIndex" |
|
777 | name_operation = "selectChannelsByIndex" | |
778 | name_parameter = 'channelIndexList' |
|
778 | name_parameter = 'channelIndexList' | |
779 |
|
779 | |||
780 | opObj = puObj.addOperation(name=name_operation) |
|
780 | opObj = puObj.addOperation(name=name_operation) | |
781 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
781 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
782 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
782 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) | |
783 | return 0 |
|
783 | return 0 | |
784 |
|
784 | |||
785 | if self.volOpCebHeights.isChecked(): |
|
785 | if self.volOpCebHeights.isChecked(): | |
786 | value = str(self.volOpHeights.text()) |
|
786 | value = str(self.volOpHeights.text()) | |
787 |
|
787 | |||
788 | if value == "": |
|
788 | if value == "": | |
789 | print "Please fill height range" |
|
789 | print "Please fill height range" | |
790 | return 0 |
|
790 | return 0 | |
791 |
|
791 | |||
792 | valueList = value.split(',') |
|
792 | valueList = value.split(',') | |
793 | format = 'float' |
|
793 | format = 'float' | |
794 | if self.volOpComHeights.currentIndex() == 0: |
|
794 | if self.volOpComHeights.currentIndex() == 0: | |
795 | name_operation = 'selectHeights' |
|
795 | name_operation = 'selectHeights' | |
796 | name_parameter1 = 'minHei' |
|
796 | name_parameter1 = 'minHei' | |
797 | name_parameter2 = 'maxHei' |
|
797 | name_parameter2 = 'maxHei' | |
798 | else: |
|
798 | else: | |
799 | name_operation = 'selectHeightsByIndex' |
|
799 | name_operation = 'selectHeightsByIndex' | |
800 | name_parameter1 = 'minIndex' |
|
800 | name_parameter1 = 'minIndex' | |
801 | name_parameter2 = 'maxIndex' |
|
801 | name_parameter2 = 'maxIndex' | |
802 |
|
802 | |||
803 | opObj = puObj.addOperation(name=name_operation) |
|
803 | opObj = puObj.addOperation(name=name_operation) | |
804 | opObj.addParameter(name=name_parameter1, value=valueList[0], format=format) |
|
804 | opObj.addParameter(name=name_parameter1, value=valueList[0], format=format) | |
805 | opObj.addParameter(name=name_parameter2, value=valueList[1], format=format) |
|
805 | opObj.addParameter(name=name_parameter2, value=valueList[1], format=format) | |
806 |
|
806 | |||
807 | if self.volOpCebFilter.isChecked(): |
|
807 | if self.volOpCebFilter.isChecked(): | |
808 | value = str(self.volOpFilter.text()) |
|
808 | value = str(self.volOpFilter.text()) | |
809 | if value == "": |
|
809 | if value == "": | |
810 | print "Please fill filter value" |
|
810 | print "Please fill filter value" | |
811 | return 0 |
|
811 | return 0 | |
812 |
|
812 | |||
813 | format = 'int' |
|
813 | format = 'int' | |
814 | name_operation = 'filterByHeights' |
|
814 | name_operation = 'filterByHeights' | |
815 | name_parameter = 'window' |
|
815 | name_parameter = 'window' | |
816 | opObj = puObj.addOperation(name=name_operation) |
|
816 | opObj = puObj.addOperation(name=name_operation) | |
817 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
817 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
818 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
818 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) | |
819 | return 0 |
|
819 | return 0 | |
820 |
|
820 | |||
821 | if self.volOpCebProfile.isChecked(): |
|
821 | if self.volOpCebProfile.isChecked(): | |
822 | value = str(self.volOpProfile.text()) |
|
822 | value = str(self.volOpProfile.text()) | |
823 |
|
823 | |||
824 | if value == "": |
|
824 | if value == "": | |
825 | print "Please fill profile value" |
|
825 | print "Please fill profile value" | |
826 | return 0 |
|
826 | return 0 | |
827 |
|
827 | |||
828 | format = 'intlist' |
|
828 | format = 'intlist' | |
829 | optype = 'other' |
|
829 | optype = 'other' | |
830 | name_operation = 'ProfileSelector' |
|
830 | name_operation = 'ProfileSelector' | |
831 | if self.volOpComProfile.currentIndex() == 0: |
|
831 | if self.volOpComProfile.currentIndex() == 0: | |
832 | name_parameter = 'profileList' |
|
832 | name_parameter = 'profileList' | |
833 | if self.volOpComProfile.currentIndex() == 1: |
|
833 | if self.volOpComProfile.currentIndex() == 1: | |
834 | name_parameter = 'profileRangeList' |
|
834 | name_parameter = 'profileRangeList' | |
835 | if self.volOpComProfile.currentIndex() == 2: |
|
835 | if self.volOpComProfile.currentIndex() == 2: | |
836 | name_parameter = 'rangeList' |
|
836 | name_parameter = 'rangeList' | |
837 |
|
837 | |||
838 | opObj = puObj.addOperation(name='ProfileSelector', optype='other') |
|
838 | opObj = puObj.addOperation(name='ProfileSelector', optype='other') | |
839 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
839 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
840 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
840 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) | |
841 | return 0 |
|
841 | return 0 | |
842 |
|
842 | |||
843 | if self.volOpCebDecodification.isChecked(): |
|
843 | if self.volOpCebDecodification.isChecked(): | |
844 | name_operation = 'Decoder' |
|
844 | name_operation = 'Decoder' | |
845 |
|
845 | |||
846 | #User defined |
|
846 | #User defined | |
847 | nBaud = None |
|
847 | nBaud = None | |
848 | nCode = None |
|
848 | nCode = None | |
849 |
|
849 | |||
850 | code = str(self.volOpCode.text()) |
|
850 | code = str(self.volOpCode.text()) | |
851 | try: |
|
851 | try: | |
852 | code_tmp = ast.literal_eval(code) |
|
852 | code_tmp = ast.literal_eval(code) | |
853 | except: |
|
853 | except: | |
854 | code_tmp = [] |
|
854 | code_tmp = [] | |
855 |
|
855 | |||
856 | if len(code_tmp) < 1: |
|
856 | if len(code_tmp) < 1: | |
857 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
857 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") | |
858 | return 0 |
|
858 | return 0 | |
859 |
|
859 | |||
860 | if type(code_tmp) not in (tuple, list): |
|
860 | if type(code_tmp) not in (tuple, list): | |
861 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
861 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") | |
862 | return 0 |
|
862 | return 0 | |
863 |
|
863 | |||
864 | if len(code_tmp) > 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1], [1,1,-1] ] |
|
864 | if len(code_tmp) > 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1], [1,1,-1] ] | |
865 | nBaud = len(code_tmp[0]) |
|
865 | nBaud = len(code_tmp[0]) | |
866 | nCode = len(code_tmp) |
|
866 | nCode = len(code_tmp) | |
867 | elif len(code_tmp) == 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1] ] |
|
867 | elif len(code_tmp) == 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1] ] | |
868 | nBaud = len(code_tmp[0]) |
|
868 | nBaud = len(code_tmp[0]) | |
869 | nCode = 1 |
|
869 | nCode = 1 | |
870 | elif type(code_tmp[0]) in (int, float): #[1,-1,1] or (1,-1,1) |
|
870 | elif type(code_tmp[0]) in (int, float): #[1,-1,1] or (1,-1,1) | |
871 | nBaud = len(code_tmp) |
|
871 | nBaud = len(code_tmp) | |
872 | nCode = 1 |
|
872 | nCode = 1 | |
873 | else: |
|
873 | else: | |
874 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
874 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") | |
875 | return 0 |
|
875 | return 0 | |
876 |
|
876 | |||
877 | if not nBaud or not nCode: |
|
877 | if not nBaud or not nCode: | |
878 | self.console.append("Please write a right value for Code") |
|
878 | self.console.append("Please write a right value for Code") | |
879 | return 0 |
|
879 | return 0 | |
880 |
|
880 | |||
881 | opObj = puObj.addOperation(name='Decoder', optype='other') |
|
881 | opObj = puObj.addOperation(name='Decoder', optype='other') | |
882 |
|
882 | |||
883 | code = code.replace("(", "") |
|
883 | code = code.replace("(", "") | |
884 | code = code.replace(")", "") |
|
884 | code = code.replace(")", "") | |
885 | code = code.replace("[", "") |
|
885 | code = code.replace("[", "") | |
886 | code = code.replace("]", "") |
|
886 | code = code.replace("]", "") | |
887 |
|
887 | |||
888 | if not opObj.addParameter(name='code', value=code, format='intlist'): |
|
888 | if not opObj.addParameter(name='code', value=code, format='intlist'): | |
889 | self.console.append("Please write a right value for Code") |
|
889 | self.console.append("Please write a right value for Code") | |
890 | return 0 |
|
890 | return 0 | |
891 | if not opObj.addParameter(name='nCode', value=nCode, format='int'): |
|
891 | if not opObj.addParameter(name='nCode', value=nCode, format='int'): | |
892 | self.console.append("Please write a right value for Code") |
|
892 | self.console.append("Please write a right value for Code") | |
893 | return 0 |
|
893 | return 0 | |
894 | if not opObj.addParameter(name='nBaud', value=nBaud, format='int'): |
|
894 | if not opObj.addParameter(name='nBaud', value=nBaud, format='int'): | |
895 | self.console.append("Please write a right value for Code") |
|
895 | self.console.append("Please write a right value for Code") | |
896 | return 0 |
|
896 | return 0 | |
897 |
|
897 | |||
898 | name_parameter = 'mode' |
|
898 | name_parameter = 'mode' | |
899 | format = 'int' |
|
899 | format = 'int' | |
900 |
|
900 | |||
901 | value = str(self.volOpComMode.currentIndex()) |
|
901 | value = str(self.volOpComMode.currentIndex()) | |
902 |
|
902 | |||
903 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
903 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
904 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
904 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) | |
905 | return 0 |
|
905 | return 0 | |
906 |
|
906 | |||
907 |
|
907 | |||
908 | if self.volOpCebFlip.isChecked(): |
|
908 | if self.volOpCebFlip.isChecked(): | |
909 | name_operation = 'deFlip' |
|
909 | name_operation = 'deFlip' | |
910 | optype = 'self' |
|
910 | optype = 'self' | |
911 |
|
911 | |||
912 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
912 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
913 |
|
913 | |||
914 | name_parameter = 'channelList' |
|
914 | name_parameter = 'channelList' | |
915 | format = 'intlist' |
|
915 | format = 'intlist' | |
916 | value = str(self.volOpFlip.text()) |
|
916 | value = str(self.volOpFlip.text()) | |
917 |
|
917 | |||
918 | if value != "": |
|
918 | if value != "": | |
919 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
919 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
920 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
920 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) | |
921 | return 0 |
|
921 | return 0 | |
922 |
|
922 | |||
923 | if self.volOpCebCohInt.isChecked(): |
|
923 | if self.volOpCebCohInt.isChecked(): | |
924 | name_operation = 'CohInt' |
|
924 | name_operation = 'CohInt' | |
925 | optype = 'other' |
|
925 | optype = 'other' | |
926 | value = str(self.volOpCohInt.text()) |
|
926 | value = str(self.volOpCohInt.text()) | |
927 |
|
927 | |||
928 | if value == "": |
|
928 | if value == "": | |
929 | print "Please fill number of coherent integrations" |
|
929 | print "Please fill number of coherent integrations" | |
930 | return 0 |
|
930 | return 0 | |
931 |
|
931 | |||
932 | name_parameter = 'n' |
|
932 | name_parameter = 'n' | |
933 | format = 'float' |
|
933 | format = 'float' | |
934 |
|
934 | |||
935 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
935 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
936 |
|
936 | |||
937 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
937 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
938 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
938 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) | |
939 | return 0 |
|
939 | return 0 | |
940 |
|
940 | |||
941 | if self.volGraphCebshow.isChecked(): |
|
941 | if self.volGraphCebshow.isChecked(): | |
942 | name_operation = 'Scope' |
|
942 | name_operation = 'Scope' | |
943 | optype = 'other' |
|
943 | optype = 'other' | |
944 | name_parameter = 'type' |
|
944 | name_parameter = 'type' | |
945 | value = 'Scope' |
|
945 | value = 'Scope' | |
946 | if self.idImagscope == 0: |
|
946 | if self.idImagscope == 0: | |
947 | self.idImagscope = 100 |
|
947 | self.idImagscope = 100 | |
948 | else: |
|
948 | else: | |
949 | self.idImagscope = self.idImagscope + 1 |
|
949 | self.idImagscope = self.idImagscope + 1 | |
950 |
|
950 | |||
951 | name_parameter1 = 'id' |
|
951 | name_parameter1 = 'id' | |
952 | value1 = int(self.idImagscope) |
|
952 | value1 = int(self.idImagscope) | |
953 | format1 = 'int' |
|
953 | format1 = 'int' | |
954 | format = 'str' |
|
954 | format = 'str' | |
955 |
|
955 | |||
956 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
956 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
957 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
957 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
958 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) |
|
958 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) | |
959 |
|
959 | |||
960 | channelList = str(self.volGraphChannelList.text()).replace(" ","") |
|
960 | channelList = str(self.volGraphChannelList.text()).replace(" ","") | |
961 | xvalue = str(self.volGraphfreqrange.text()).replace(" ","") |
|
961 | xvalue = str(self.volGraphfreqrange.text()).replace(" ","") | |
962 | yvalue = str(self.volGraphHeightrange.text()).replace(" ","") |
|
962 | yvalue = str(self.volGraphHeightrange.text()).replace(" ","") | |
963 |
|
963 | |||
964 | if channelList: |
|
964 | if channelList: | |
965 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
965 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
966 |
|
966 | |||
967 | if xvalue: |
|
967 | if xvalue: | |
968 | xvalueList = xvalue.split(',') |
|
968 | xvalueList = xvalue.split(',') | |
969 | try: |
|
969 | try: | |
970 | value0 = float(xvalueList[0]) |
|
970 | value0 = float(xvalueList[0]) | |
971 | value1 = float(xvalueList[1]) |
|
971 | value1 = float(xvalueList[1]) | |
972 | except: |
|
972 | except: | |
973 | return 0 |
|
973 | return 0 | |
974 | opObj.addParameter(name='xmin', value=value0, format='float') |
|
974 | opObj.addParameter(name='xmin', value=value0, format='float') | |
975 | opObj.addParameter(name='xmax', value=value1, format='float') |
|
975 | opObj.addParameter(name='xmax', value=value1, format='float') | |
976 |
|
976 | |||
977 |
|
977 | |||
978 | if not yvalue == "": |
|
978 | if not yvalue == "": | |
979 | yvalueList = yvalue.split(",") |
|
979 | yvalueList = yvalue.split(",") | |
980 | try: |
|
980 | try: | |
981 | value0 = int(yvalueList[0]) |
|
981 | value0 = int(yvalueList[0]) | |
982 | value1 = int(yvalueList[1]) |
|
982 | value1 = int(yvalueList[1]) | |
983 | except: |
|
983 | except: | |
984 | return 0 |
|
984 | return 0 | |
985 |
|
985 | |||
986 | opObj.addParameter(name='ymin', value=value0, format='int') |
|
986 | opObj.addParameter(name='ymin', value=value0, format='int') | |
987 | opObj.addParameter(name='ymax', value=value1, format='int') |
|
987 | opObj.addParameter(name='ymax', value=value1, format='int') | |
988 |
|
988 | |||
989 | if self.volGraphCebSave.isChecked(): |
|
989 | if self.volGraphCebSave.isChecked(): | |
990 | checkPath = True |
|
990 | checkPath = True | |
991 | opObj.addParameter(name='save', value='1', format='int') |
|
991 | opObj.addParameter(name='save', value='1', format='int') | |
992 | opObj.addParameter(name='figpath', value=str(self.volGraphPath.text()), format='str') |
|
992 | opObj.addParameter(name='figpath', value=str(self.volGraphPath.text()), format='str') | |
993 | value = str(self.volGraphPrefix.text()).replace(" ","") |
|
993 | value = str(self.volGraphPrefix.text()).replace(" ","") | |
994 | if value: |
|
994 | if value: | |
995 | opObj.addParameter(name='figfile', value=value, format='str') |
|
995 | opObj.addParameter(name='figfile', value=value, format='str') | |
996 |
|
996 | |||
997 | localfolder = None |
|
997 | localfolder = None | |
998 | if checkPath: |
|
998 | if checkPath: | |
999 | localfolder = str(self.volGraphPath.text()) |
|
999 | localfolder = str(self.volGraphPath.text()) | |
1000 | if localfolder == '': |
|
1000 | if localfolder == '': | |
1001 | self.console.clear() |
|
1001 | self.console.clear() | |
1002 | self.console.append("Graphic path should be defined") |
|
1002 | self.console.append("Graphic path should be defined") | |
1003 | return 0 |
|
1003 | return 0 | |
1004 |
|
1004 | |||
1005 | # if something happend |
|
1005 | # if something happend | |
1006 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage') |
|
1006 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage') | |
1007 | if parms_ok: |
|
1007 | if parms_ok: | |
1008 | name_operation = 'VoltageWriter' |
|
1008 | name_operation = 'VoltageWriter' | |
1009 | optype = 'other' |
|
1009 | optype = 'other' | |
1010 | name_parameter1 = 'path' |
|
1010 | name_parameter1 = 'path' | |
1011 | name_parameter2 = 'blocksPerFile' |
|
1011 | name_parameter2 = 'blocksPerFile' | |
1012 | name_parameter3 = 'profilesPerBlock' |
|
1012 | name_parameter3 = 'profilesPerBlock' | |
1013 | value1 = output_path |
|
1013 | value1 = output_path | |
1014 | value2 = blocksperfile |
|
1014 | value2 = blocksperfile | |
1015 | value3 = profilesperblock |
|
1015 | value3 = profilesperblock | |
1016 | format = "int" |
|
1016 | format = "int" | |
1017 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1017 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
1018 | opObj.addParameter(name=name_parameter1, value=value1) |
|
1018 | opObj.addParameter(name=name_parameter1, value=value1) | |
1019 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
1019 | opObj.addParameter(name=name_parameter2, value=value2, format=format) | |
1020 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
1020 | opObj.addParameter(name=name_parameter3, value=value3, format=format) | |
1021 |
|
1021 | |||
1022 | self.console.clear() |
|
1022 | self.console.clear() | |
1023 | try: |
|
1023 | try: | |
1024 | self.refreshPUProperties(puObj) |
|
1024 | self.refreshPUProperties(puObj) | |
1025 | except: |
|
1025 | except: | |
1026 | self.console.append("An error reading input parameters was found ...Check them!") |
|
1026 | self.console.append("An error reading input parameters was found ...Check them!") | |
1027 | return 0 |
|
1027 | return 0 | |
1028 |
|
1028 | |||
1029 | self.console.append("Save your project and press Play button to start signal processing") |
|
1029 | self.console.append("Save your project and press Play button to start signal processing") | |
1030 |
|
1030 | |||
1031 | self.actionSaveToolbar.setEnabled(True) |
|
1031 | self.actionSaveToolbar.setEnabled(True) | |
1032 | self.actionStarToolbar.setEnabled(True) |
|
1032 | self.actionStarToolbar.setEnabled(True) | |
1033 |
|
1033 | |||
1034 | return 1 |
|
1034 | return 1 | |
1035 |
|
1035 | |||
1036 | """ |
|
1036 | """ | |
1037 | Voltage Graph |
|
1037 | Voltage Graph | |
1038 | """ |
|
1038 | """ | |
1039 | @pyqtSignature("int") |
|
1039 | @pyqtSignature("int") | |
1040 | def on_volGraphCebSave_stateChanged(self, p0): |
|
1040 | def on_volGraphCebSave_stateChanged(self, p0): | |
1041 | """ |
|
1041 | """ | |
1042 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1042 | Check Box habilita ingresode del numero de Integraciones a realizar | |
1043 | """ |
|
1043 | """ | |
1044 | if p0 == 2: |
|
1044 | if p0 == 2: | |
1045 | self.volGraphPath.setEnabled(True) |
|
1045 | self.volGraphPath.setEnabled(True) | |
1046 | self.volGraphPrefix.setEnabled(True) |
|
1046 | self.volGraphPrefix.setEnabled(True) | |
1047 | self.volGraphToolPath.setEnabled(True) |
|
1047 | self.volGraphToolPath.setEnabled(True) | |
1048 |
|
1048 | |||
1049 | if p0 == 0: |
|
1049 | if p0 == 0: | |
1050 | self.volGraphPath.setEnabled(False) |
|
1050 | self.volGraphPath.setEnabled(False) | |
1051 | self.volGraphPrefix.setEnabled(False) |
|
1051 | self.volGraphPrefix.setEnabled(False) | |
1052 | self.volGraphToolPath.setEnabled(False) |
|
1052 | self.volGraphToolPath.setEnabled(False) | |
1053 |
|
1053 | |||
1054 | @pyqtSignature("") |
|
1054 | @pyqtSignature("") | |
1055 | def on_volGraphToolPath_clicked(self): |
|
1055 | def on_volGraphToolPath_clicked(self): | |
1056 | """ |
|
1056 | """ | |
1057 | Donde se guardan los DATOS |
|
1057 | Donde se guardan los DATOS | |
1058 | """ |
|
1058 | """ | |
1059 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1059 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
1060 | self.volGraphPath.setText(save_path) |
|
1060 | self.volGraphPath.setText(save_path) | |
1061 |
|
1061 | |||
1062 | if not os.path.exists(save_path): |
|
1062 | if not os.path.exists(save_path): | |
1063 | self.console.clear() |
|
1063 | self.console.clear() | |
1064 | self.console.append("Set a valid path") |
|
1064 | self.console.append("Set a valid path") | |
1065 | self.volGraphOk.setEnabled(False) |
|
1065 | self.volGraphOk.setEnabled(False) | |
1066 | return |
|
1066 | return | |
1067 |
|
1067 | |||
1068 | @pyqtSignature("int") |
|
1068 | @pyqtSignature("int") | |
1069 | def on_volGraphCebshow_stateChanged(self, p0): |
|
1069 | def on_volGraphCebshow_stateChanged(self, p0): | |
1070 | """ |
|
1070 | """ | |
1071 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1071 | Check Box habilita ingresode del numero de Integraciones a realizar | |
1072 | """ |
|
1072 | """ | |
1073 | if p0 == 0: |
|
1073 | if p0 == 0: | |
1074 |
|
1074 | |||
1075 | self.volGraphChannelList.setEnabled(False) |
|
1075 | self.volGraphChannelList.setEnabled(False) | |
1076 | self.volGraphfreqrange.setEnabled(False) |
|
1076 | self.volGraphfreqrange.setEnabled(False) | |
1077 | self.volGraphHeightrange.setEnabled(False) |
|
1077 | self.volGraphHeightrange.setEnabled(False) | |
1078 | if p0 == 2: |
|
1078 | if p0 == 2: | |
1079 |
|
1079 | |||
1080 | self.volGraphChannelList.setEnabled(True) |
|
1080 | self.volGraphChannelList.setEnabled(True) | |
1081 | self.volGraphfreqrange.setEnabled(True) |
|
1081 | self.volGraphfreqrange.setEnabled(True) | |
1082 | self.volGraphHeightrange.setEnabled(True) |
|
1082 | self.volGraphHeightrange.setEnabled(True) | |
1083 |
|
1083 | |||
1084 | """ |
|
1084 | """ | |
1085 | Spectra operation |
|
1085 | Spectra operation | |
1086 | """ |
|
1086 | """ | |
1087 | @pyqtSignature("int") |
|
1087 | @pyqtSignature("int") | |
1088 | def on_specOpCebRadarfrequency_stateChanged(self, p0): |
|
1088 | def on_specOpCebRadarfrequency_stateChanged(self, p0): | |
1089 | """ |
|
1089 | """ | |
1090 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1090 | Check Box habilita ingresode del numero de Integraciones a realizar | |
1091 | """ |
|
1091 | """ | |
1092 | if p0 == 2: |
|
1092 | if p0 == 2: | |
1093 | self.specOpRadarfrequency.setEnabled(True) |
|
1093 | self.specOpRadarfrequency.setEnabled(True) | |
1094 | if p0 == 0: |
|
1094 | if p0 == 0: | |
1095 | self.specOpRadarfrequency.clear() |
|
1095 | self.specOpRadarfrequency.clear() | |
1096 | self.specOpRadarfrequency.setEnabled(False) |
|
1096 | self.specOpRadarfrequency.setEnabled(False) | |
1097 |
|
1097 | |||
1098 |
|
1098 | |||
1099 | @pyqtSignature("int") |
|
1099 | @pyqtSignature("int") | |
1100 | def on_specOpCebCrossSpectra_stateChanged(self, p0): |
|
1100 | def on_specOpCebCrossSpectra_stateChanged(self, p0): | |
1101 | """ |
|
1101 | """ | |
1102 | Habilita la opcion de a�adir el par�metro CrossSpectra a la Unidad de Procesamiento . |
|
1102 | Habilita la opcion de a�adir el par�metro CrossSpectra a la Unidad de Procesamiento . | |
1103 | """ |
|
1103 | """ | |
1104 | if p0 == 2: |
|
1104 | if p0 == 2: | |
1105 | # self.specOpnFFTpoints.setEnabled(True) |
|
1105 | # self.specOpnFFTpoints.setEnabled(True) | |
1106 | self.specOppairsList.setEnabled(True) |
|
1106 | self.specOppairsList.setEnabled(True) | |
1107 | if p0 == 0: |
|
1107 | if p0 == 0: | |
1108 | # self.specOpnFFTpoints.setEnabled(False) |
|
1108 | # self.specOpnFFTpoints.setEnabled(False) | |
1109 | self.specOppairsList.setEnabled(False) |
|
1109 | self.specOppairsList.setEnabled(False) | |
1110 |
|
1110 | |||
1111 | @pyqtSignature("int") |
|
1111 | @pyqtSignature("int") | |
1112 | def on_specOpCebChannel_stateChanged(self, p0): |
|
1112 | def on_specOpCebChannel_stateChanged(self, p0): | |
1113 | """ |
|
1113 | """ | |
1114 | Habilita la opcion de a�adir el par�metro numero de Canales a la Unidad de Procesamiento . |
|
1114 | Habilita la opcion de a�adir el par�metro numero de Canales a la Unidad de Procesamiento . | |
1115 | """ |
|
1115 | """ | |
1116 | if p0 == 2: |
|
1116 | if p0 == 2: | |
1117 | self.specOpChannel.setEnabled(True) |
|
1117 | self.specOpChannel.setEnabled(True) | |
1118 | self.specOpComChannel.setEnabled(True) |
|
1118 | self.specOpComChannel.setEnabled(True) | |
1119 | if p0 == 0: |
|
1119 | if p0 == 0: | |
1120 | self.specOpChannel.setEnabled(False) |
|
1120 | self.specOpChannel.setEnabled(False) | |
1121 | self.specOpComChannel.setEnabled(False) |
|
1121 | self.specOpComChannel.setEnabled(False) | |
1122 |
|
1122 | |||
1123 | @pyqtSignature("int") |
|
1123 | @pyqtSignature("int") | |
1124 | def on_specOpCebHeights_stateChanged(self, p0): |
|
1124 | def on_specOpCebHeights_stateChanged(self, p0): | |
1125 | """ |
|
1125 | """ | |
1126 | Habilita la opcion de a�adir el par�metro de alturas a la Unidad de Procesamiento . |
|
1126 | Habilita la opcion de a�adir el par�metro de alturas a la Unidad de Procesamiento . | |
1127 | """ |
|
1127 | """ | |
1128 | if p0 == 2: |
|
1128 | if p0 == 2: | |
1129 | self.specOpComHeights.setEnabled(True) |
|
1129 | self.specOpComHeights.setEnabled(True) | |
1130 | self.specOpHeights.setEnabled(True) |
|
1130 | self.specOpHeights.setEnabled(True) | |
1131 | if p0 == 0: |
|
1131 | if p0 == 0: | |
1132 | self.specOpComHeights.setEnabled(False) |
|
1132 | self.specOpComHeights.setEnabled(False) | |
1133 | self.specOpHeights.setEnabled(False) |
|
1133 | self.specOpHeights.setEnabled(False) | |
1134 |
|
1134 | |||
1135 |
|
1135 | |||
1136 | @pyqtSignature("int") |
|
1136 | @pyqtSignature("int") | |
1137 | def on_specOpCebIncoherent_stateChanged(self, p0): |
|
1137 | def on_specOpCebIncoherent_stateChanged(self, p0): | |
1138 | """ |
|
1138 | """ | |
1139 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . |
|
1139 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . | |
1140 | """ |
|
1140 | """ | |
1141 | if p0 == 2: |
|
1141 | if p0 == 2: | |
1142 | self.specOpIncoherent.setEnabled(True) |
|
1142 | self.specOpIncoherent.setEnabled(True) | |
1143 | if p0 == 0: |
|
1143 | if p0 == 0: | |
1144 | self.specOpIncoherent.setEnabled(False) |
|
1144 | self.specOpIncoherent.setEnabled(False) | |
1145 |
|
1145 | |||
1146 | @pyqtSignature("int") |
|
1146 | @pyqtSignature("int") | |
1147 | def on_specOpCebRemoveDC_stateChanged(self, p0): |
|
1147 | def on_specOpCebRemoveDC_stateChanged(self, p0): | |
1148 | """ |
|
1148 | """ | |
1149 | Habilita la opcion de a�adir el par�metro remover DC a la Unidad de Procesamiento . |
|
1149 | Habilita la opcion de a�adir el par�metro remover DC a la Unidad de Procesamiento . | |
1150 | """ |
|
1150 | """ | |
1151 | if p0 == 2: |
|
1151 | if p0 == 2: | |
1152 | self.specOpComRemoveDC.setEnabled(True) |
|
1152 | self.specOpComRemoveDC.setEnabled(True) | |
1153 | if p0 == 0: |
|
1153 | if p0 == 0: | |
1154 | self.specOpComRemoveDC.setEnabled(False) |
|
1154 | self.specOpComRemoveDC.setEnabled(False) | |
1155 |
|
1155 | |||
1156 | @pyqtSignature("int") |
|
1156 | @pyqtSignature("int") | |
1157 | def on_specOpCebgetNoise_stateChanged(self, p0): |
|
1157 | def on_specOpCebgetNoise_stateChanged(self, p0): | |
1158 | """ |
|
1158 | """ | |
1159 | Habilita la opcion de a�adir la estimacion de ruido a la Unidad de Procesamiento . |
|
1159 | Habilita la opcion de a�adir la estimacion de ruido a la Unidad de Procesamiento . | |
1160 | """ |
|
1160 | """ | |
1161 | if p0 == 2: |
|
1161 | if p0 == 2: | |
1162 | self.specOpgetNoise.setEnabled(True) |
|
1162 | self.specOpgetNoise.setEnabled(True) | |
1163 |
|
1163 | |||
1164 | if p0 == 0: |
|
1164 | if p0 == 0: | |
1165 | self.specOpgetNoise.setEnabled(False) |
|
1165 | self.specOpgetNoise.setEnabled(False) | |
1166 |
|
1166 | |||
1167 | @pyqtSignature("") |
|
1167 | @pyqtSignature("") | |
1168 | def on_specOpOk_clicked(self): |
|
1168 | def on_specOpOk_clicked(self): | |
1169 | """ |
|
1169 | """ | |
1170 | AÑADE OPERACION SPECTRA |
|
1170 | AÑADE OPERACION SPECTRA | |
1171 | """ |
|
1171 | """ | |
1172 |
|
1172 | |||
1173 | addFTP = False |
|
1173 | addFTP = False | |
1174 | checkPath = False |
|
1174 | checkPath = False | |
1175 |
|
1175 | |||
1176 | self.actionSaveToolbar.setEnabled(False) |
|
1176 | self.actionSaveToolbar.setEnabled(False) | |
1177 | self.actionStarToolbar.setEnabled(False) |
|
1177 | self.actionStarToolbar.setEnabled(False) | |
1178 |
|
1178 | |||
1179 | self.console.clear() |
|
1179 | self.console.clear() | |
1180 | self.console.append("Checking input parameters ...") |
|
1180 | self.console.append("Checking input parameters ...") | |
1181 |
|
1181 | |||
1182 | projectObj = self.getSelectedProjectObj() |
|
1182 | projectObj = self.getSelectedProjectObj() | |
1183 |
|
1183 | |||
1184 | if not projectObj: |
|
1184 | if not projectObj: | |
1185 | self.console.append("Please select a project before update it") |
|
1185 | self.console.append("Please select a project before update it") | |
1186 | return |
|
1186 | return | |
1187 |
|
1187 | |||
1188 | puObj = self.getSelectedItemObj() |
|
1188 | puObj = self.getSelectedItemObj() | |
1189 |
|
1189 | |||
1190 | puObj.removeOperations() |
|
1190 | puObj.removeOperations() | |
1191 |
|
1191 | |||
1192 | if self.specOpCebRadarfrequency.isChecked(): |
|
1192 | if self.specOpCebRadarfrequency.isChecked(): | |
1193 | value = str(self.specOpRadarfrequency.text()) |
|
1193 | value = str(self.specOpRadarfrequency.text()) | |
1194 | format = 'float' |
|
1194 | format = 'float' | |
1195 | name_operation = 'setRadarFrequency' |
|
1195 | name_operation = 'setRadarFrequency' | |
1196 | name_parameter = 'frequency' |
|
1196 | name_parameter = 'frequency' | |
1197 |
|
1197 | |||
1198 | if not isFloat(value): |
|
1198 | if not isFloat(value): | |
1199 | self.console.clear() |
|
1199 | self.console.clear() | |
1200 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1200 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
1201 | return 0 |
|
1201 | return 0 | |
1202 |
|
1202 | |||
1203 | radarfreq = float(value)*1e6 |
|
1203 | radarfreq = float(value)*1e6 | |
1204 | opObj = puObj.addOperation(name=name_operation) |
|
1204 | opObj = puObj.addOperation(name=name_operation) | |
1205 | opObj.addParameter(name=name_parameter, value=radarfreq, format=format) |
|
1205 | opObj.addParameter(name=name_parameter, value=radarfreq, format=format) | |
1206 |
|
1206 | |||
1207 | inputId = puObj.getInputId() |
|
1207 | inputId = puObj.getInputId() | |
1208 | inputPuObj = projectObj.getProcUnitObj(inputId) |
|
1208 | inputPuObj = projectObj.getProcUnitObj(inputId) | |
1209 |
|
1209 | |||
1210 | if inputPuObj.datatype == 'Voltage' or inputPuObj.datatype == 'USRP': |
|
1210 | if inputPuObj.datatype == 'Voltage' or inputPuObj.datatype == 'USRP': | |
1211 |
|
1211 | |||
1212 | value = str(self.specOpnFFTpoints.text()) |
|
1212 | value = str(self.specOpnFFTpoints.text()) | |
1213 |
|
1213 | |||
1214 | if not isInt(value): |
|
1214 | if not isInt(value): | |
1215 | self.console.append("Invalid value '%s' for '%s'" %(value, 'nFFTPoints')) |
|
1215 | self.console.append("Invalid value '%s' for '%s'" %(value, 'nFFTPoints')) | |
1216 | return 0 |
|
1216 | return 0 | |
1217 |
|
1217 | |||
1218 | puObj.addParameter(name='nFFTPoints', value=value, format='int') |
|
1218 | puObj.addParameter(name='nFFTPoints', value=value, format='int') | |
1219 |
|
1219 | |||
1220 | value = str(self.specOpProfiles.text()) |
|
1220 | value = str(self.specOpProfiles.text()) | |
1221 | if not isInt(value): |
|
1221 | if not isInt(value): | |
1222 | self.console.append("Please write a value on Profiles field") |
|
1222 | self.console.append("Please write a value on Profiles field") | |
1223 | else: |
|
1223 | else: | |
1224 | puObj.addParameter(name='nProfiles', value=value, format='int') |
|
1224 | puObj.addParameter(name='nProfiles', value=value, format='int') | |
1225 |
|
1225 | |||
1226 | value = str(self.specOpippFactor.text()) |
|
1226 | value = str(self.specOpippFactor.text()) | |
1227 | if not isInt(value): |
|
1227 | if not isInt(value): | |
1228 | self.console.append("Please write a value on IppFactor field") |
|
1228 | self.console.append("Please write a value on IppFactor field") | |
1229 | else: |
|
1229 | else: | |
1230 | puObj.addParameter(name='ippFactor' , value=value , format='int') |
|
1230 | puObj.addParameter(name='ippFactor' , value=value , format='int') | |
1231 |
|
1231 | |||
1232 | if self.specOpCebCrossSpectra.isChecked(): |
|
1232 | if self.specOpCebCrossSpectra.isChecked(): | |
1233 | name_parameter = 'pairsList' |
|
1233 | name_parameter = 'pairsList' | |
1234 | format = 'pairslist' |
|
1234 | format = 'pairslist' | |
1235 | value = str(self.specOppairsList.text()) |
|
1235 | value = str(self.specOppairsList.text()) | |
1236 |
|
1236 | |||
1237 | if value == "": |
|
1237 | if value == "": | |
1238 | print "Please fill the pairs list field" |
|
1238 | print "Please fill the pairs list field" | |
1239 | return 0 |
|
1239 | return 0 | |
1240 |
|
1240 | |||
1241 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
1241 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
1242 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
1242 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) | |
1243 | return 0 |
|
1243 | return 0 | |
1244 |
|
1244 | |||
1245 | if self.specOpCebHeights.isChecked(): |
|
1245 | if self.specOpCebHeights.isChecked(): | |
1246 | value = str(self.specOpHeights.text()) |
|
1246 | value = str(self.specOpHeights.text()) | |
1247 |
|
1247 | |||
1248 | if value == "": |
|
1248 | if value == "": | |
1249 | self.console.append("Empty value for '%s'" %(value, "Height range")) |
|
1249 | self.console.append("Empty value for '%s'" %(value, "Height range")) | |
1250 | return 0 |
|
1250 | return 0 | |
1251 |
|
1251 | |||
1252 | valueList = value.split(',') |
|
1252 | valueList = value.split(',') | |
1253 | format = 'float' |
|
1253 | format = 'float' | |
1254 | value0 = valueList[0] |
|
1254 | value0 = valueList[0] | |
1255 | value1 = valueList[1] |
|
1255 | value1 = valueList[1] | |
1256 |
|
1256 | |||
1257 | if not isFloat(value0) or not isFloat(value1): |
|
1257 | if not isFloat(value0) or not isFloat(value1): | |
1258 | self.console.append("Invalid value '%s' for '%s'" %(value, "Height range")) |
|
1258 | self.console.append("Invalid value '%s' for '%s'" %(value, "Height range")) | |
1259 | return 0 |
|
1259 | return 0 | |
1260 |
|
1260 | |||
1261 | if self.specOpComHeights.currentIndex() == 0: |
|
1261 | if self.specOpComHeights.currentIndex() == 0: | |
1262 | name_operation = 'selectHeights' |
|
1262 | name_operation = 'selectHeights' | |
1263 | name_parameter1 = 'minHei' |
|
1263 | name_parameter1 = 'minHei' | |
1264 | name_parameter2 = 'maxHei' |
|
1264 | name_parameter2 = 'maxHei' | |
1265 | else: |
|
1265 | else: | |
1266 | name_operation = 'selectHeightsByIndex' |
|
1266 | name_operation = 'selectHeightsByIndex' | |
1267 | name_parameter1 = 'minIndex' |
|
1267 | name_parameter1 = 'minIndex' | |
1268 | name_parameter2 = 'maxIndex' |
|
1268 | name_parameter2 = 'maxIndex' | |
1269 |
|
1269 | |||
1270 | opObj = puObj.addOperation(name=name_operation) |
|
1270 | opObj = puObj.addOperation(name=name_operation) | |
1271 | opObj.addParameter(name=name_parameter1, value=value0, format=format) |
|
1271 | opObj.addParameter(name=name_parameter1, value=value0, format=format) | |
1272 | opObj.addParameter(name=name_parameter2, value=value1, format=format) |
|
1272 | opObj.addParameter(name=name_parameter2, value=value1, format=format) | |
1273 |
|
1273 | |||
1274 | if self.specOpCebChannel.isChecked(): |
|
1274 | if self.specOpCebChannel.isChecked(): | |
1275 |
|
1275 | |||
1276 | if self.specOpComChannel.currentIndex() == 0: |
|
1276 | if self.specOpComChannel.currentIndex() == 0: | |
1277 | name_operation = "selectChannels" |
|
1277 | name_operation = "selectChannels" | |
1278 | name_parameter = 'channelList' |
|
1278 | name_parameter = 'channelList' | |
1279 | else: |
|
1279 | else: | |
1280 | name_operation = "selectChannelsByIndex" |
|
1280 | name_operation = "selectChannelsByIndex" | |
1281 | name_parameter = 'channelIndexList' |
|
1281 | name_parameter = 'channelIndexList' | |
1282 |
|
1282 | |||
1283 | format = 'intlist' |
|
1283 | format = 'intlist' | |
1284 | value = str(self.specOpChannel.text()) |
|
1284 | value = str(self.specOpChannel.text()) | |
1285 |
|
1285 | |||
1286 | if value == "": |
|
1286 | if value == "": | |
1287 | print "Please fill channel list" |
|
1287 | print "Please fill channel list" | |
1288 | return 0 |
|
1288 | return 0 | |
1289 |
|
1289 | |||
1290 | if not isList(value): |
|
1290 | if not isList(value): | |
1291 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1291 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
1292 | return 0 |
|
1292 | return 0 | |
1293 |
|
1293 | |||
1294 | opObj = puObj.addOperation(name=name_operation) |
|
1294 | opObj = puObj.addOperation(name=name_operation) | |
1295 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1295 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
1296 |
|
1296 | |||
1297 | if self.specOpCebIncoherent.isChecked(): |
|
1297 | if self.specOpCebIncoherent.isChecked(): | |
1298 |
|
1298 | |||
1299 | name_operation = 'IncohInt' |
|
1299 | name_operation = 'IncohInt' | |
1300 | optype = 'other' |
|
1300 | optype = 'other' | |
1301 |
|
1301 | |||
1302 | if self.specOpCobIncInt.currentIndex() == 0: |
|
1302 | if self.specOpCobIncInt.currentIndex() == 0: | |
1303 | name_parameter = 'timeInterval' |
|
1303 | name_parameter = 'timeInterval' | |
1304 | format = 'float' |
|
1304 | format = 'float' | |
1305 | else: |
|
1305 | else: | |
1306 | name_parameter = 'n' |
|
1306 | name_parameter = 'n' | |
1307 | format = 'float' |
|
1307 | format = 'float' | |
1308 |
|
1308 | |||
1309 | value = str(self.specOpIncoherent.text()) |
|
1309 | value = str(self.specOpIncoherent.text()) | |
1310 |
|
1310 | |||
1311 | if value == "": |
|
1311 | if value == "": | |
1312 | print "Please fill Incoherent integration value" |
|
1312 | print "Please fill Incoherent integration value" | |
1313 | return 0 |
|
1313 | return 0 | |
1314 |
|
1314 | |||
1315 | if not isFloat(value): |
|
1315 | if not isFloat(value): | |
1316 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1316 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
1317 | return 0 |
|
1317 | return 0 | |
1318 |
|
1318 | |||
1319 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1319 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
1320 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1320 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
1321 |
|
1321 | |||
1322 | if self.specOpCebRemoveDC.isChecked(): |
|
1322 | if self.specOpCebRemoveDC.isChecked(): | |
1323 | name_operation = 'removeDC' |
|
1323 | name_operation = 'removeDC' | |
1324 | name_parameter = 'mode' |
|
1324 | name_parameter = 'mode' | |
1325 | format = 'int' |
|
1325 | format = 'int' | |
1326 | if self.specOpComRemoveDC.currentIndex() == 0: |
|
1326 | if self.specOpComRemoveDC.currentIndex() == 0: | |
1327 | value = 1 |
|
1327 | value = 1 | |
1328 | else: |
|
1328 | else: | |
1329 | value = 2 |
|
1329 | value = 2 | |
1330 | opObj = puObj.addOperation(name=name_operation) |
|
1330 | opObj = puObj.addOperation(name=name_operation) | |
1331 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1331 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
1332 |
|
1332 | |||
1333 | if self.specOpCebRemoveInt.isChecked(): |
|
1333 | if self.specOpCebRemoveInt.isChecked(): | |
1334 | name_operation = 'removeInterference' |
|
1334 | name_operation = 'removeInterference' | |
1335 | opObj = puObj.addOperation(name=name_operation) |
|
1335 | opObj = puObj.addOperation(name=name_operation) | |
1336 |
|
1336 | |||
1337 |
|
1337 | |||
1338 | if self.specOpCebgetNoise.isChecked(): |
|
1338 | if self.specOpCebgetNoise.isChecked(): | |
1339 | value = str(self.specOpgetNoise.text()) |
|
1339 | value = str(self.specOpgetNoise.text()) | |
1340 | valueList = value.split(',') |
|
1340 | valueList = value.split(',') | |
1341 | format = 'float' |
|
1341 | format = 'float' | |
1342 | name_operation = "getNoise" |
|
1342 | name_operation = "getNoise" | |
1343 | opObj = puObj.addOperation(name=name_operation) |
|
1343 | opObj = puObj.addOperation(name=name_operation) | |
1344 |
|
1344 | |||
1345 | if not value == '': |
|
1345 | if not value == '': | |
1346 | valueList = value.split(',') |
|
1346 | valueList = value.split(',') | |
1347 | length = len(valueList) |
|
1347 | length = len(valueList) | |
1348 | if length == 1: |
|
1348 | if length == 1: | |
1349 | try: |
|
1349 | try: | |
1350 | value1 = float(valueList[0]) |
|
1350 | value1 = float(valueList[0]) | |
1351 | except: |
|
1351 | except: | |
1352 | self.console.clear() |
|
1352 | self.console.clear() | |
1353 | self.console.append("Please Write correct parameter Get Noise") |
|
1353 | self.console.append("Please Write correct parameter Get Noise") | |
1354 | return 0 |
|
1354 | return 0 | |
1355 | name1 = 'minHei' |
|
1355 | name1 = 'minHei' | |
1356 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1356 | opObj.addParameter(name=name1, value=value1, format=format) | |
1357 | elif length == 2: |
|
1357 | elif length == 2: | |
1358 | try: |
|
1358 | try: | |
1359 | value1 = float(valueList[0]) |
|
1359 | value1 = float(valueList[0]) | |
1360 | value2 = float(valueList[1]) |
|
1360 | value2 = float(valueList[1]) | |
1361 | except: |
|
1361 | except: | |
1362 | self.console.clear() |
|
1362 | self.console.clear() | |
1363 | self.console.append("Please Write corrects parameter Get Noise") |
|
1363 | self.console.append("Please Write corrects parameter Get Noise") | |
1364 | return 0 |
|
1364 | return 0 | |
1365 | name1 = 'minHei' |
|
1365 | name1 = 'minHei' | |
1366 | name2 = 'maxHei' |
|
1366 | name2 = 'maxHei' | |
1367 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1367 | opObj.addParameter(name=name1, value=value1, format=format) | |
1368 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1368 | opObj.addParameter(name=name2, value=value2, format=format) | |
1369 |
|
1369 | |||
1370 | elif length == 3: |
|
1370 | elif length == 3: | |
1371 | try: |
|
1371 | try: | |
1372 | value1 = float(valueList[0]) |
|
1372 | value1 = float(valueList[0]) | |
1373 | value2 = float(valueList[1]) |
|
1373 | value2 = float(valueList[1]) | |
1374 | value3 = float(valueList[2]) |
|
1374 | value3 = float(valueList[2]) | |
1375 | except: |
|
1375 | except: | |
1376 | self.console.clear() |
|
1376 | self.console.clear() | |
1377 | self.console.append("Please Write corrects parameter Get Noise") |
|
1377 | self.console.append("Please Write corrects parameter Get Noise") | |
1378 | return 0 |
|
1378 | return 0 | |
1379 | name1 = 'minHei' |
|
1379 | name1 = 'minHei' | |
1380 | name2 = 'maxHei' |
|
1380 | name2 = 'maxHei' | |
1381 | name3 = 'minVel' |
|
1381 | name3 = 'minVel' | |
1382 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1382 | opObj.addParameter(name=name1, value=value1, format=format) | |
1383 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1383 | opObj.addParameter(name=name2, value=value2, format=format) | |
1384 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1384 | opObj.addParameter(name=name3, value=value3, format=format) | |
1385 |
|
1385 | |||
1386 | elif length == 4: |
|
1386 | elif length == 4: | |
1387 | try: |
|
1387 | try: | |
1388 | value1 = float(valueList[0]) |
|
1388 | value1 = float(valueList[0]) | |
1389 | value2 = float(valueList[1]) |
|
1389 | value2 = float(valueList[1]) | |
1390 | value3 = float(valueList[2]) |
|
1390 | value3 = float(valueList[2]) | |
1391 | value4 = float(valueList[3]) |
|
1391 | value4 = float(valueList[3]) | |
1392 | except: |
|
1392 | except: | |
1393 | self.console.clear() |
|
1393 | self.console.clear() | |
1394 | self.console.append("Please Write corrects parameter Get Noise") |
|
1394 | self.console.append("Please Write corrects parameter Get Noise") | |
1395 | return 0 |
|
1395 | return 0 | |
1396 | name1 = 'minHei' |
|
1396 | name1 = 'minHei' | |
1397 | name2 = 'maxHei' |
|
1397 | name2 = 'maxHei' | |
1398 | name3 = 'minVel' |
|
1398 | name3 = 'minVel' | |
1399 | name4 = 'maxVel' |
|
1399 | name4 = 'maxVel' | |
1400 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1400 | opObj.addParameter(name=name1, value=value1, format=format) | |
1401 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1401 | opObj.addParameter(name=name2, value=value2, format=format) | |
1402 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1402 | opObj.addParameter(name=name3, value=value3, format=format) | |
1403 | opObj.addParameter(name=name4, value=value4, format=format) |
|
1403 | opObj.addParameter(name=name4, value=value4, format=format) | |
1404 |
|
1404 | |||
1405 | elif length > 4: |
|
1405 | elif length > 4: | |
1406 | self.console.clear() |
|
1406 | self.console.clear() | |
1407 | self.console.append("Get Noise Operation only accepts 4 parameters") |
|
1407 | self.console.append("Get Noise Operation only accepts 4 parameters") | |
1408 | return 0 |
|
1408 | return 0 | |
1409 |
|
1409 | |||
1410 | channelList = str(self.specGgraphChannelList.text()).replace(" ","") |
|
1410 | channelList = str(self.specGgraphChannelList.text()).replace(" ","") | |
1411 | vel_range = str(self.specGgraphFreq.text()).replace(" ","") |
|
1411 | vel_range = str(self.specGgraphFreq.text()).replace(" ","") | |
1412 | hei_range = str(self.specGgraphHeight.text()).replace(" ","") |
|
1412 | hei_range = str(self.specGgraphHeight.text()).replace(" ","") | |
1413 | db_range = str(self.specGgraphDbsrange.text()).replace(" ","") |
|
1413 | db_range = str(self.specGgraphDbsrange.text()).replace(" ","") | |
1414 |
|
1414 | |||
1415 | trange = str(self.specGgraphTminTmax.text()).replace(" ","") |
|
1415 | trange = str(self.specGgraphTminTmax.text()).replace(" ","") | |
1416 | magrange = str(self.specGgraphmagnitud.text()).replace(" ","") |
|
1416 | magrange = str(self.specGgraphmagnitud.text()).replace(" ","") | |
1417 | phaserange = str(self.specGgraphPhase.text()).replace(" ","") |
|
1417 | phaserange = str(self.specGgraphPhase.text()).replace(" ","") | |
1418 | # timerange = str(self.specGgraphTimeRange.text()).replace(" ","") |
|
1418 | # timerange = str(self.specGgraphTimeRange.text()).replace(" ","") | |
1419 |
|
1419 | |||
1420 | figpath = str(self.specGraphPath.text()) |
|
1420 | figpath = str(self.specGraphPath.text()) | |
1421 | figfile = str(self.specGraphPrefix.text()).replace(" ","") |
|
1421 | figfile = str(self.specGraphPrefix.text()).replace(" ","") | |
1422 | try: |
|
1422 | try: | |
1423 | wrperiod = int(str(self.specGgraphftpratio.text()).replace(" ","")) |
|
1423 | wrperiod = int(str(self.specGgraphftpratio.text()).replace(" ","")) | |
1424 | except: |
|
1424 | except: | |
1425 | wrperiod = None |
|
1425 | wrperiod = None | |
1426 |
|
1426 | |||
1427 | #-----Spectra Plot----- |
|
1427 | #-----Spectra Plot----- | |
1428 | if self.specGraphCebSpectraplot.isChecked(): |
|
1428 | if self.specGraphCebSpectraplot.isChecked(): | |
1429 |
|
1429 | |||
1430 | opObj = puObj.addOperation(name='SpectraPlot', optype='other') |
|
1430 | opObj = puObj.addOperation(name='SpectraPlot', optype='other') | |
1431 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1431 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1432 |
|
1432 | |||
1433 | if not channelList == '': |
|
1433 | if not channelList == '': | |
1434 |
|
1434 | |||
1435 | if not isList(channelList): |
|
1435 | if not isList(channelList): | |
1436 | self.console.append("Invalid channelList") |
|
1436 | self.console.append("Invalid channelList") | |
1437 | return 0 |
|
1437 | return 0 | |
1438 |
|
1438 | |||
1439 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1439 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1440 |
|
1440 | |||
1441 | if not vel_range == '': |
|
1441 | if not vel_range == '': | |
1442 | xvalueList = vel_range.split(',') |
|
1442 | xvalueList = vel_range.split(',') | |
1443 | try: |
|
1443 | try: | |
1444 | value1 = float(xvalueList[0]) |
|
1444 | value1 = float(xvalueList[0]) | |
1445 | value2 = float(xvalueList[1]) |
|
1445 | value2 = float(xvalueList[1]) | |
1446 | except: |
|
1446 | except: | |
1447 | self.console.clear() |
|
1447 | self.console.clear() | |
1448 | self.console.append("Invalid velocity/frequency range") |
|
1448 | self.console.append("Invalid velocity/frequency range") | |
1449 | return 0 |
|
1449 | return 0 | |
1450 |
|
1450 | |||
1451 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1451 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1452 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1452 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1453 |
|
1453 | |||
1454 | if not hei_range == '': |
|
1454 | if not hei_range == '': | |
1455 | yvalueList = hei_range.split(",") |
|
1455 | yvalueList = hei_range.split(",") | |
1456 | try: |
|
1456 | try: | |
1457 | value1 = float(yvalueList[0]) |
|
1457 | value1 = float(yvalueList[0]) | |
1458 | value2 = float(yvalueList[1]) |
|
1458 | value2 = float(yvalueList[1]) | |
1459 | except: |
|
1459 | except: | |
1460 | self.console.clear() |
|
1460 | self.console.clear() | |
1461 | self.console.append("Invalid height range") |
|
1461 | self.console.append("Invalid height range") | |
1462 | return 0 |
|
1462 | return 0 | |
1463 |
|
1463 | |||
1464 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1464 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1465 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1465 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1466 |
|
1466 | |||
1467 | if not db_range == '': |
|
1467 | if not db_range == '': | |
1468 | zvalueList = db_range.split(",") |
|
1468 | zvalueList = db_range.split(",") | |
1469 | try: |
|
1469 | try: | |
1470 | value1 = float(zvalueList[0]) |
|
1470 | value1 = float(zvalueList[0]) | |
1471 | value2 = float(zvalueList[1]) |
|
1471 | value2 = float(zvalueList[1]) | |
1472 | except: |
|
1472 | except: | |
1473 | self.console.clear() |
|
1473 | self.console.clear() | |
1474 | self.console.append("Invalid db range") |
|
1474 | self.console.append("Invalid db range") | |
1475 | return 0 |
|
1475 | return 0 | |
1476 |
|
1476 | |||
1477 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1477 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1478 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1478 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1479 |
|
1479 | |||
1480 | if self.specGraphSaveSpectra.isChecked(): |
|
1480 | if self.specGraphSaveSpectra.isChecked(): | |
1481 | checkPath = True |
|
1481 | checkPath = True | |
1482 | opObj.addParameter(name='save', value=1 , format='bool') |
|
1482 | opObj.addParameter(name='save', value=1 , format='bool') | |
1483 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1483 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1484 | if figfile: |
|
1484 | if figfile: | |
1485 | opObj.addParameter(name='figfile', value=figfile, format='str') |
|
1485 | opObj.addParameter(name='figfile', value=figfile, format='str') | |
1486 | if wrperiod: |
|
1486 | if wrperiod: | |
1487 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1487 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1488 |
|
1488 | |||
1489 | if self.specGraphftpSpectra.isChecked(): |
|
1489 | if self.specGraphftpSpectra.isChecked(): | |
1490 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1490 | opObj.addParameter(name='ftp', value='1', format='int') | |
1491 | self.addFTPConf2Operation(puObj, opObj) |
|
1491 | self.addFTPConf2Operation(puObj, opObj) | |
1492 | addFTP = True |
|
1492 | addFTP = True | |
1493 |
|
1493 | |||
1494 | if self.specGraphCebCrossSpectraplot.isChecked(): |
|
1494 | if self.specGraphCebCrossSpectraplot.isChecked(): | |
1495 |
|
1495 | |||
1496 | opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other') |
|
1496 | opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other') | |
1497 | # opObj.addParameter(name='power_cmap', value='jet', format='str') |
|
1497 | # opObj.addParameter(name='power_cmap', value='jet', format='str') | |
1498 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1498 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') | |
1499 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1499 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
1500 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1500 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1501 |
|
1501 | |||
1502 | if not vel_range == '': |
|
1502 | if not vel_range == '': | |
1503 | xvalueList = vel_range.split(',') |
|
1503 | xvalueList = vel_range.split(',') | |
1504 | try: |
|
1504 | try: | |
1505 | value1 = float(xvalueList[0]) |
|
1505 | value1 = float(xvalueList[0]) | |
1506 | value2 = float(xvalueList[1]) |
|
1506 | value2 = float(xvalueList[1]) | |
1507 | except: |
|
1507 | except: | |
1508 | self.console.clear() |
|
1508 | self.console.clear() | |
1509 | self.console.append("Invalid velocity/frequency range") |
|
1509 | self.console.append("Invalid velocity/frequency range") | |
1510 | return 0 |
|
1510 | return 0 | |
1511 |
|
1511 | |||
1512 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1512 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1513 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1513 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1514 |
|
1514 | |||
1515 | if not hei_range == '': |
|
1515 | if not hei_range == '': | |
1516 | yvalueList = hei_range.split(",") |
|
1516 | yvalueList = hei_range.split(",") | |
1517 | try: |
|
1517 | try: | |
1518 | value1 = float(yvalueList[0]) |
|
1518 | value1 = float(yvalueList[0]) | |
1519 | value2 = float(yvalueList[1]) |
|
1519 | value2 = float(yvalueList[1]) | |
1520 | except: |
|
1520 | except: | |
1521 | self.console.clear() |
|
1521 | self.console.clear() | |
1522 | self.console.append("Invalid height range") |
|
1522 | self.console.append("Invalid height range") | |
1523 | return 0 |
|
1523 | return 0 | |
1524 |
|
1524 | |||
1525 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1525 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1526 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1526 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1527 |
|
1527 | |||
1528 | if not db_range == '': |
|
1528 | if not db_range == '': | |
1529 | zvalueList = db_range.split(",") |
|
1529 | zvalueList = db_range.split(",") | |
1530 | try: |
|
1530 | try: | |
1531 | value1 = float(zvalueList[0]) |
|
1531 | value1 = float(zvalueList[0]) | |
1532 | value2 = float(zvalueList[1]) |
|
1532 | value2 = float(zvalueList[1]) | |
1533 | except: |
|
1533 | except: | |
1534 | self.console.clear() |
|
1534 | self.console.clear() | |
1535 | self.console.append("Invalid db range") |
|
1535 | self.console.append("Invalid db range") | |
1536 | return 0 |
|
1536 | return 0 | |
1537 |
|
1537 | |||
1538 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1538 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1539 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1539 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1540 |
|
1540 | |||
1541 | if not magrange == '': |
|
1541 | if not magrange == '': | |
1542 | zvalueList = magrange.split(",") |
|
1542 | zvalueList = magrange.split(",") | |
1543 | try: |
|
1543 | try: | |
1544 | value1 = float(zvalueList[0]) |
|
1544 | value1 = float(zvalueList[0]) | |
1545 | value2 = float(zvalueList[1]) |
|
1545 | value2 = float(zvalueList[1]) | |
1546 | except: |
|
1546 | except: | |
1547 | self.console.clear() |
|
1547 | self.console.clear() | |
1548 | self.console.append("Invalid magnitude range") |
|
1548 | self.console.append("Invalid magnitude range") | |
1549 | return 0 |
|
1549 | return 0 | |
1550 |
|
1550 | |||
1551 | opObj.addParameter(name='coh_min', value=value1, format='float') |
|
1551 | opObj.addParameter(name='coh_min', value=value1, format='float') | |
1552 | opObj.addParameter(name='coh_max', value=value2, format='float') |
|
1552 | opObj.addParameter(name='coh_max', value=value2, format='float') | |
1553 |
|
1553 | |||
1554 | if not phaserange == '': |
|
1554 | if not phaserange == '': | |
1555 | zvalueList = phaserange.split(",") |
|
1555 | zvalueList = phaserange.split(",") | |
1556 | try: |
|
1556 | try: | |
1557 | value1 = float(zvalueList[0]) |
|
1557 | value1 = float(zvalueList[0]) | |
1558 | value2 = float(zvalueList[1]) |
|
1558 | value2 = float(zvalueList[1]) | |
1559 | except: |
|
1559 | except: | |
1560 | self.console.clear() |
|
1560 | self.console.clear() | |
1561 | self.console.append("Invalid phase range") |
|
1561 | self.console.append("Invalid phase range") | |
1562 | return 0 |
|
1562 | return 0 | |
1563 |
|
1563 | |||
1564 | opObj.addParameter(name='phase_min', value=value1, format='float') |
|
1564 | opObj.addParameter(name='phase_min', value=value1, format='float') | |
1565 | opObj.addParameter(name='phase_max', value=value2, format='float') |
|
1565 | opObj.addParameter(name='phase_max', value=value2, format='float') | |
1566 |
|
1566 | |||
1567 | if self.specGraphSaveCross.isChecked(): |
|
1567 | if self.specGraphSaveCross.isChecked(): | |
1568 | checkPath = True |
|
1568 | checkPath = True | |
1569 | opObj.addParameter(name='save', value='1', format='bool') |
|
1569 | opObj.addParameter(name='save', value='1', format='bool') | |
1570 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1570 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1571 | if figfile: |
|
1571 | if figfile: | |
1572 | opObj.addParameter(name='figfile', value=figfile, format='str') |
|
1572 | opObj.addParameter(name='figfile', value=figfile, format='str') | |
1573 | if wrperiod: |
|
1573 | if wrperiod: | |
1574 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1574 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1575 |
|
1575 | |||
1576 | if self.specGraphftpCross.isChecked(): |
|
1576 | if self.specGraphftpCross.isChecked(): | |
1577 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1577 | opObj.addParameter(name='ftp', value='1', format='int') | |
1578 | self.addFTPConf2Operation(puObj, opObj) |
|
1578 | self.addFTPConf2Operation(puObj, opObj) | |
1579 | addFTP = True |
|
1579 | addFTP = True | |
1580 |
|
1580 | |||
1581 | if self.specGraphCebRTIplot.isChecked(): |
|
1581 | if self.specGraphCebRTIplot.isChecked(): | |
1582 |
|
1582 | |||
1583 | opObj = puObj.addOperation(name='RTIPlot', optype='other') |
|
1583 | opObj = puObj.addOperation(name='RTIPlot', optype='other') | |
1584 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1584 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1585 |
|
1585 | |||
1586 | if not channelList == '': |
|
1586 | if not channelList == '': | |
1587 | if not isList(channelList): |
|
1587 | if not isList(channelList): | |
1588 | self.console.append("Invalid channelList") |
|
1588 | self.console.append("Invalid channelList") | |
1589 | return 0 |
|
1589 | return 0 | |
1590 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1590 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1591 |
|
1591 | |||
1592 | if not trange == '': |
|
1592 | if not trange == '': | |
1593 | xvalueList = trange.split(',') |
|
1593 | xvalueList = trange.split(',') | |
1594 | try: |
|
1594 | try: | |
1595 | value1 = float(xvalueList[0]) |
|
1595 | value1 = float(xvalueList[0]) | |
1596 | value2 = float(xvalueList[1]) |
|
1596 | value2 = float(xvalueList[1]) | |
1597 | except: |
|
1597 | except: | |
1598 | self.console.clear() |
|
1598 | self.console.clear() | |
1599 | self.console.append("Invalid time range") |
|
1599 | self.console.append("Invalid time range") | |
1600 | return 0 |
|
1600 | return 0 | |
1601 |
|
1601 | |||
1602 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1602 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1603 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1603 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1604 |
|
1604 | |||
1605 | # if not timerange == '': |
|
1605 | # if not timerange == '': | |
1606 | # try: |
|
1606 | # try: | |
1607 | # timerange = float(timerange) |
|
1607 | # timerange = float(timerange) | |
1608 | # except: |
|
1608 | # except: | |
1609 | # self.console.clear() |
|
1609 | # self.console.clear() | |
1610 | # self.console.append("Invalid time range") |
|
1610 | # self.console.append("Invalid time range") | |
1611 | # return 0 |
|
1611 | # return 0 | |
1612 | # |
|
1612 | # | |
1613 | # opObj.addParameter(name='timerange', value=timerange, format='float') |
|
1613 | # opObj.addParameter(name='timerange', value=timerange, format='float') | |
1614 |
|
1614 | |||
1615 | if not hei_range == '': |
|
1615 | if not hei_range == '': | |
1616 | yvalueList = hei_range.split(",") |
|
1616 | yvalueList = hei_range.split(",") | |
1617 | try: |
|
1617 | try: | |
1618 | value1 = float(yvalueList[0]) |
|
1618 | value1 = float(yvalueList[0]) | |
1619 | value2 = float(yvalueList[1]) |
|
1619 | value2 = float(yvalueList[1]) | |
1620 | except: |
|
1620 | except: | |
1621 | self.console.clear() |
|
1621 | self.console.clear() | |
1622 | self.console.append("Invalid height range") |
|
1622 | self.console.append("Invalid height range") | |
1623 | return 0 |
|
1623 | return 0 | |
1624 |
|
1624 | |||
1625 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1625 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1626 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1626 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1627 |
|
1627 | |||
1628 | if not db_range == '': |
|
1628 | if not db_range == '': | |
1629 | zvalueList = db_range.split(",") |
|
1629 | zvalueList = db_range.split(",") | |
1630 | try: |
|
1630 | try: | |
1631 | value1 = float(zvalueList[0]) |
|
1631 | value1 = float(zvalueList[0]) | |
1632 | value2 = float(zvalueList[1]) |
|
1632 | value2 = float(zvalueList[1]) | |
1633 | except: |
|
1633 | except: | |
1634 | self.console.clear() |
|
1634 | self.console.clear() | |
1635 | self.console.append("Invalid db range") |
|
1635 | self.console.append("Invalid db range") | |
1636 | return 0 |
|
1636 | return 0 | |
1637 |
|
1637 | |||
1638 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1638 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1639 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1639 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1640 |
|
1640 | |||
1641 | if self.specGraphSaveRTIplot.isChecked(): |
|
1641 | if self.specGraphSaveRTIplot.isChecked(): | |
1642 | checkPath = True |
|
1642 | checkPath = True | |
1643 | opObj.addParameter(name='save', value='1', format='bool') |
|
1643 | opObj.addParameter(name='save', value='1', format='bool') | |
1644 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1644 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1645 | if figfile: |
|
1645 | if figfile: | |
1646 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1646 | opObj.addParameter(name='figfile', value=value, format='str') | |
1647 | if wrperiod: |
|
1647 | if wrperiod: | |
1648 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1648 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1649 |
|
1649 | |||
1650 | if self.specGraphftpRTIplot.isChecked(): |
|
1650 | if self.specGraphftpRTIplot.isChecked(): | |
1651 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1651 | opObj.addParameter(name='ftp', value='1', format='int') | |
1652 | self.addFTPConf2Operation(puObj, opObj) |
|
1652 | self.addFTPConf2Operation(puObj, opObj) | |
1653 | addFTP = True |
|
1653 | addFTP = True | |
1654 |
|
1654 | |||
1655 | if self.specGraphCebCoherencmap.isChecked(): |
|
1655 | if self.specGraphCebCoherencmap.isChecked(): | |
1656 |
|
1656 | |||
1657 | opObj = puObj.addOperation(name='CoherenceMap', optype='other') |
|
1657 | opObj = puObj.addOperation(name='CoherenceMap', optype='other') | |
1658 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1658 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
1659 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1659 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') | |
1660 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1660 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
1661 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1661 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1662 |
|
1662 | |||
1663 | # if not timerange == '': |
|
1663 | # if not timerange == '': | |
1664 | # try: |
|
1664 | # try: | |
1665 | # timerange = int(timerange) |
|
1665 | # timerange = int(timerange) | |
1666 | # except: |
|
1666 | # except: | |
1667 | # self.console.clear() |
|
1667 | # self.console.clear() | |
1668 | # self.console.append("Invalid time range") |
|
1668 | # self.console.append("Invalid time range") | |
1669 | # return 0 |
|
1669 | # return 0 | |
1670 | # |
|
1670 | # | |
1671 | # opObj.addParameter(name='timerange', value=timerange, format='int') |
|
1671 | # opObj.addParameter(name='timerange', value=timerange, format='int') | |
1672 |
|
1672 | |||
1673 | if not trange == '': |
|
1673 | if not trange == '': | |
1674 | xvalueList = trange.split(',') |
|
1674 | xvalueList = trange.split(',') | |
1675 | try: |
|
1675 | try: | |
1676 | value1 = float(xvalueList[0]) |
|
1676 | value1 = float(xvalueList[0]) | |
1677 | value2 = float(xvalueList[1]) |
|
1677 | value2 = float(xvalueList[1]) | |
1678 | except: |
|
1678 | except: | |
1679 | self.console.clear() |
|
1679 | self.console.clear() | |
1680 | self.console.append("Invalid time range") |
|
1680 | self.console.append("Invalid time range") | |
1681 | return 0 |
|
1681 | return 0 | |
1682 |
|
1682 | |||
1683 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1683 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1684 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1684 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1685 |
|
1685 | |||
1686 | if not hei_range == '': |
|
1686 | if not hei_range == '': | |
1687 | yvalueList = hei_range.split(",") |
|
1687 | yvalueList = hei_range.split(",") | |
1688 | try: |
|
1688 | try: | |
1689 | value1 = float(yvalueList[0]) |
|
1689 | value1 = float(yvalueList[0]) | |
1690 | value2 = float(yvalueList[1]) |
|
1690 | value2 = float(yvalueList[1]) | |
1691 | except: |
|
1691 | except: | |
1692 | self.console.clear() |
|
1692 | self.console.clear() | |
1693 | self.console.append("Invalid height range") |
|
1693 | self.console.append("Invalid height range") | |
1694 | return 0 |
|
1694 | return 0 | |
1695 |
|
1695 | |||
1696 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1696 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1697 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1697 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1698 |
|
1698 | |||
1699 | if not magrange == '': |
|
1699 | if not magrange == '': | |
1700 | zvalueList = magrange.split(",") |
|
1700 | zvalueList = magrange.split(",") | |
1701 | try: |
|
1701 | try: | |
1702 | value1 = float(zvalueList[0]) |
|
1702 | value1 = float(zvalueList[0]) | |
1703 | value2 = float(zvalueList[1]) |
|
1703 | value2 = float(zvalueList[1]) | |
1704 | except: |
|
1704 | except: | |
1705 | self.console.clear() |
|
1705 | self.console.clear() | |
1706 | self.console.append("Invalid magnitude range") |
|
1706 | self.console.append("Invalid magnitude range") | |
1707 | return 0 |
|
1707 | return 0 | |
1708 |
|
1708 | |||
1709 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1709 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1710 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1710 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1711 |
|
1711 | |||
1712 | if not phaserange == '': |
|
1712 | if not phaserange == '': | |
1713 | zvalueList = phaserange.split(",") |
|
1713 | zvalueList = phaserange.split(",") | |
1714 | try: |
|
1714 | try: | |
1715 | value1 = float(zvalueList[0]) |
|
1715 | value1 = float(zvalueList[0]) | |
1716 | value2 = float(zvalueList[1]) |
|
1716 | value2 = float(zvalueList[1]) | |
1717 | except: |
|
1717 | except: | |
1718 | self.console.clear() |
|
1718 | self.console.clear() | |
1719 | self.console.append("Invalid phase range") |
|
1719 | self.console.append("Invalid phase range") | |
1720 | return 0 |
|
1720 | return 0 | |
1721 |
|
1721 | |||
1722 | opObj.addParameter(name='phase_min', value=value1, format='float') |
|
1722 | opObj.addParameter(name='phase_min', value=value1, format='float') | |
1723 | opObj.addParameter(name='phase_max', value=value2, format='float') |
|
1723 | opObj.addParameter(name='phase_max', value=value2, format='float') | |
1724 |
|
1724 | |||
1725 | if self.specGraphSaveCoherencemap.isChecked(): |
|
1725 | if self.specGraphSaveCoherencemap.isChecked(): | |
1726 | checkPath = True |
|
1726 | checkPath = True | |
1727 | opObj.addParameter(name='save', value='1', format='bool') |
|
1727 | opObj.addParameter(name='save', value='1', format='bool') | |
1728 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1728 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1729 | if figfile: |
|
1729 | if figfile: | |
1730 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1730 | opObj.addParameter(name='figfile', value=value, format='str') | |
1731 | if wrperiod: |
|
1731 | if wrperiod: | |
1732 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1732 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1733 |
|
1733 | |||
1734 | if self.specGraphftpCoherencemap.isChecked(): |
|
1734 | if self.specGraphftpCoherencemap.isChecked(): | |
1735 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1735 | opObj.addParameter(name='ftp', value='1', format='int') | |
1736 | self.addFTPConf2Operation(puObj, opObj) |
|
1736 | self.addFTPConf2Operation(puObj, opObj) | |
1737 | addFTP = True |
|
1737 | addFTP = True | |
1738 |
|
1738 | |||
1739 | if self.specGraphPowerprofile.isChecked(): |
|
1739 | if self.specGraphPowerprofile.isChecked(): | |
1740 |
|
1740 | |||
1741 | opObj = puObj.addOperation(name='PowerProfilePlot', optype='other') |
|
1741 | opObj = puObj.addOperation(name='PowerProfilePlot', optype='other') | |
1742 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1742 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1743 |
|
1743 | |||
1744 | if not channelList == '': |
|
1744 | if not channelList == '': | |
1745 | if not isList(channelList): |
|
1745 | if not isList(channelList): | |
1746 | self.console.append("Invalid channelList") |
|
1746 | self.console.append("Invalid channelList") | |
1747 | return 0 |
|
1747 | return 0 | |
1748 |
|
1748 | |||
1749 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1749 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1750 |
|
1750 | |||
1751 | if not db_range == '': |
|
1751 | if not db_range == '': | |
1752 | xvalueList = db_range.split(',') |
|
1752 | xvalueList = db_range.split(',') | |
1753 | try: |
|
1753 | try: | |
1754 | value1 = float(xvalueList[0]) |
|
1754 | value1 = float(xvalueList[0]) | |
1755 | value2 = float(xvalueList[1]) |
|
1755 | value2 = float(xvalueList[1]) | |
1756 | except: |
|
1756 | except: | |
1757 | self.console.clear() |
|
1757 | self.console.clear() | |
1758 | self.console.append("Invalid db range") |
|
1758 | self.console.append("Invalid db range") | |
1759 | return 0 |
|
1759 | return 0 | |
1760 |
|
1760 | |||
1761 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1761 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1762 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1762 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1763 |
|
1763 | |||
1764 | if not hei_range == '': |
|
1764 | if not hei_range == '': | |
1765 | yvalueList = hei_range.split(",") |
|
1765 | yvalueList = hei_range.split(",") | |
1766 | try: |
|
1766 | try: | |
1767 | value1 = float(yvalueList[0]) |
|
1767 | value1 = float(yvalueList[0]) | |
1768 | value2 = float(yvalueList[1]) |
|
1768 | value2 = float(yvalueList[1]) | |
1769 | except: |
|
1769 | except: | |
1770 | self.console.clear() |
|
1770 | self.console.clear() | |
1771 | self.console.append("Invalid height range") |
|
1771 | self.console.append("Invalid height range") | |
1772 | return 0 |
|
1772 | return 0 | |
1773 |
|
1773 | |||
1774 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1774 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1775 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1775 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1776 |
|
1776 | |||
1777 | if self.specGraphSavePowerprofile.isChecked(): |
|
1777 | if self.specGraphSavePowerprofile.isChecked(): | |
1778 | checkPath = True |
|
1778 | checkPath = True | |
1779 | opObj.addParameter(name='save', value='1', format='bool') |
|
1779 | opObj.addParameter(name='save', value='1', format='bool') | |
1780 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1780 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1781 | if figfile: |
|
1781 | if figfile: | |
1782 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1782 | opObj.addParameter(name='figfile', value=value, format='str') | |
1783 | if wrperiod: |
|
1783 | if wrperiod: | |
1784 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1784 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1785 |
|
1785 | |||
1786 | if self.specGraphftpPowerprofile.isChecked(): |
|
1786 | if self.specGraphftpPowerprofile.isChecked(): | |
1787 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1787 | opObj.addParameter(name='ftp', value='1', format='int') | |
1788 | self.addFTPConf2Operation(puObj, opObj) |
|
1788 | self.addFTPConf2Operation(puObj, opObj) | |
1789 | addFTP = True |
|
1789 | addFTP = True | |
1790 | # rti noise |
|
1790 | # rti noise | |
1791 |
|
1791 | |||
1792 | if self.specGraphCebRTInoise.isChecked(): |
|
1792 | if self.specGraphCebRTInoise.isChecked(): | |
1793 |
|
1793 | |||
1794 | opObj = puObj.addOperation(name='Noise', optype='other') |
|
1794 | opObj = puObj.addOperation(name='Noise', optype='other') | |
1795 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1795 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1796 |
|
1796 | |||
1797 | if not channelList == '': |
|
1797 | if not channelList == '': | |
1798 | if not isList(channelList): |
|
1798 | if not isList(channelList): | |
1799 | self.console.append("Invalid channelList") |
|
1799 | self.console.append("Invalid channelList") | |
1800 | return 0 |
|
1800 | return 0 | |
1801 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1801 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1802 |
|
1802 | |||
1803 | # if not timerange == '': |
|
1803 | # if not timerange == '': | |
1804 | # try: |
|
1804 | # try: | |
1805 | # timerange = float(timerange) |
|
1805 | # timerange = float(timerange) | |
1806 | # except: |
|
1806 | # except: | |
1807 | # self.console.clear() |
|
1807 | # self.console.clear() | |
1808 | # self.console.append("Invalid time range") |
|
1808 | # self.console.append("Invalid time range") | |
1809 | # return 0 |
|
1809 | # return 0 | |
1810 | # |
|
1810 | # | |
1811 | # opObj.addParameter(name='timerange', value=timerange, format='float') |
|
1811 | # opObj.addParameter(name='timerange', value=timerange, format='float') | |
1812 |
|
1812 | |||
1813 | if not trange == '': |
|
1813 | if not trange == '': | |
1814 | xvalueList = trange.split(',') |
|
1814 | xvalueList = trange.split(',') | |
1815 | try: |
|
1815 | try: | |
1816 | value1 = float(xvalueList[0]) |
|
1816 | value1 = float(xvalueList[0]) | |
1817 | value2 = float(xvalueList[1]) |
|
1817 | value2 = float(xvalueList[1]) | |
1818 | except: |
|
1818 | except: | |
1819 | self.console.clear() |
|
1819 | self.console.clear() | |
1820 | self.console.append("Invalid time range") |
|
1820 | self.console.append("Invalid time range") | |
1821 | return 0 |
|
1821 | return 0 | |
1822 |
|
1822 | |||
1823 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1823 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1824 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1824 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1825 |
|
1825 | |||
1826 | if not db_range == '': |
|
1826 | if not db_range == '': | |
1827 | yvalueList = db_range.split(",") |
|
1827 | yvalueList = db_range.split(",") | |
1828 | try: |
|
1828 | try: | |
1829 | value1 = float(yvalueList[0]) |
|
1829 | value1 = float(yvalueList[0]) | |
1830 | value2 = float(yvalueList[1]) |
|
1830 | value2 = float(yvalueList[1]) | |
1831 | except: |
|
1831 | except: | |
1832 | self.console.clear() |
|
1832 | self.console.clear() | |
1833 | self.console.append("Invalid db range") |
|
1833 | self.console.append("Invalid db range") | |
1834 | return 0 |
|
1834 | return 0 | |
1835 |
|
1835 | |||
1836 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1836 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1837 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1837 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1838 |
|
1838 | |||
1839 | if self.specGraphSaveRTInoise.isChecked(): |
|
1839 | if self.specGraphSaveRTInoise.isChecked(): | |
1840 | checkPath = True |
|
1840 | checkPath = True | |
1841 | opObj.addParameter(name='save', value='1', format='bool') |
|
1841 | opObj.addParameter(name='save', value='1', format='bool') | |
1842 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1842 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1843 | if figfile: |
|
1843 | if figfile: | |
1844 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1844 | opObj.addParameter(name='figfile', value=value, format='str') | |
1845 | if wrperiod: |
|
1845 | if wrperiod: | |
1846 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1846 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1847 |
|
1847 | |||
1848 | # test_ftp |
|
1848 | # test_ftp | |
1849 | if self.specGraphftpRTInoise.isChecked(): |
|
1849 | if self.specGraphftpRTInoise.isChecked(): | |
1850 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1850 | opObj.addParameter(name='ftp', value='1', format='int') | |
1851 | self.addFTPConf2Operation(puObj, opObj) |
|
1851 | self.addFTPConf2Operation(puObj, opObj) | |
1852 | addFTP = True |
|
1852 | addFTP = True | |
1853 |
|
1853 | |||
1854 | if checkPath: |
|
1854 | if checkPath: | |
1855 | if not figpath: |
|
1855 | if not figpath: | |
1856 | self.console.clear() |
|
1856 | self.console.clear() | |
1857 | self.console.append("Graphic path should be defined") |
|
1857 | self.console.append("Graphic path should be defined") | |
1858 | return 0 |
|
1858 | return 0 | |
1859 |
|
1859 | |||
1860 | if addFTP and not figpath: |
|
1860 | if addFTP and not figpath: | |
1861 | self.console.clear() |
|
1861 | self.console.clear() | |
1862 | self.console.append("You have to save the plots before sending them to FTP Server") |
|
1862 | self.console.append("You have to save the plots before sending them to FTP Server") | |
1863 | return 0 |
|
1863 | return 0 | |
1864 |
|
1864 | |||
1865 | # if something happend |
|
1865 | # if something happend | |
1866 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') |
|
1866 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') | |
1867 | if parms_ok: |
|
1867 | if parms_ok: | |
1868 | opObj = puObj.addOperation(name='SpectraWriter', optype='other') |
|
1868 | opObj = puObj.addOperation(name='SpectraWriter', optype='other') | |
1869 | opObj.addParameter(name='path', value=output_path) |
|
1869 | opObj.addParameter(name='path', value=output_path) | |
1870 | opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int') |
|
1870 | opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int') | |
1871 |
|
1871 | |||
1872 | self.console.clear() |
|
1872 | self.console.clear() | |
1873 | try: |
|
1873 | try: | |
1874 | self.refreshPUProperties(puObj) |
|
1874 | self.refreshPUProperties(puObj) | |
1875 | except: |
|
1875 | except: | |
1876 | self.console.append("An error reading input parameters was found ... Check them!") |
|
1876 | self.console.append("An error reading input parameters was found ... Check them!") | |
1877 | return 0 |
|
1877 | return 0 | |
1878 |
|
1878 | |||
1879 | self.console.append("Save your project and press Play button to start signal processing") |
|
1879 | self.console.append("Save your project and press Play button to start signal processing") | |
1880 |
|
1880 | |||
1881 | self.actionSaveToolbar.setEnabled(True) |
|
1881 | self.actionSaveToolbar.setEnabled(True) | |
1882 | self.actionStarToolbar.setEnabled(True) |
|
1882 | self.actionStarToolbar.setEnabled(True) | |
1883 |
|
1883 | |||
1884 | return 1 |
|
1884 | return 1 | |
1885 |
|
1885 | |||
1886 | """ |
|
1886 | """ | |
1887 | Spectra Graph |
|
1887 | Spectra Graph | |
1888 | """ |
|
1888 | """ | |
1889 | @pyqtSignature("int") |
|
1889 | @pyqtSignature("int") | |
1890 | def on_specGraphCebSpectraplot_stateChanged(self, p0): |
|
1890 | def on_specGraphCebSpectraplot_stateChanged(self, p0): | |
1891 |
|
1891 | |||
1892 | self.__checkSpecGraphFilters() |
|
1892 | self.__checkSpecGraphFilters() | |
1893 |
|
1893 | |||
1894 |
|
1894 | |||
1895 | @pyqtSignature("int") |
|
1895 | @pyqtSignature("int") | |
1896 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): |
|
1896 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): | |
1897 |
|
1897 | |||
1898 | self.__checkSpecGraphFilters() |
|
1898 | self.__checkSpecGraphFilters() | |
1899 |
|
1899 | |||
1900 | @pyqtSignature("int") |
|
1900 | @pyqtSignature("int") | |
1901 | def on_specGraphCebRTIplot_stateChanged(self, p0): |
|
1901 | def on_specGraphCebRTIplot_stateChanged(self, p0): | |
1902 |
|
1902 | |||
1903 | self.__checkSpecGraphFilters() |
|
1903 | self.__checkSpecGraphFilters() | |
1904 |
|
1904 | |||
1905 |
|
1905 | |||
1906 | @pyqtSignature("int") |
|
1906 | @pyqtSignature("int") | |
1907 | def on_specGraphCebRTInoise_stateChanged(self, p0): |
|
1907 | def on_specGraphCebRTInoise_stateChanged(self, p0): | |
1908 |
|
1908 | |||
1909 | self.__checkSpecGraphFilters() |
|
1909 | self.__checkSpecGraphFilters() | |
1910 |
|
1910 | |||
1911 |
|
1911 | |||
1912 | @pyqtSignature("int") |
|
1912 | @pyqtSignature("int") | |
1913 | def on_specGraphCebCoherencmap_stateChanged(self, p0): |
|
1913 | def on_specGraphCebCoherencmap_stateChanged(self, p0): | |
1914 |
|
1914 | |||
1915 | self.__checkSpecGraphFilters() |
|
1915 | self.__checkSpecGraphFilters() | |
1916 |
|
1916 | |||
1917 | @pyqtSignature("int") |
|
1917 | @pyqtSignature("int") | |
1918 | def on_specGraphPowerprofile_stateChanged(self, p0): |
|
1918 | def on_specGraphPowerprofile_stateChanged(self, p0): | |
1919 |
|
1919 | |||
1920 | self.__checkSpecGraphFilters() |
|
1920 | self.__checkSpecGraphFilters() | |
1921 |
|
1921 | |||
1922 | @pyqtSignature("int") |
|
1922 | @pyqtSignature("int") | |
1923 | def on_specGraphPhase_stateChanged(self, p0): |
|
1923 | def on_specGraphPhase_stateChanged(self, p0): | |
1924 |
|
1924 | |||
1925 | self.__checkSpecGraphFilters() |
|
1925 | self.__checkSpecGraphFilters() | |
1926 |
|
1926 | |||
1927 | @pyqtSignature("int") |
|
1927 | @pyqtSignature("int") | |
1928 | def on_specGraphSaveSpectra_stateChanged(self, p0): |
|
1928 | def on_specGraphSaveSpectra_stateChanged(self, p0): | |
1929 | """ |
|
1929 | """ | |
1930 | """ |
|
1930 | """ | |
1931 | self.__checkSpecGraphSaving() |
|
1931 | self.__checkSpecGraphSaving() | |
1932 |
|
1932 | |||
1933 | @pyqtSignature("int") |
|
1933 | @pyqtSignature("int") | |
1934 | def on_specGraphSaveCross_stateChanged(self, p0): |
|
1934 | def on_specGraphSaveCross_stateChanged(self, p0): | |
1935 |
|
1935 | |||
1936 | self.__checkSpecGraphSaving() |
|
1936 | self.__checkSpecGraphSaving() | |
1937 |
|
1937 | |||
1938 | @pyqtSignature("int") |
|
1938 | @pyqtSignature("int") | |
1939 | def on_specGraphSaveRTIplot_stateChanged(self, p0): |
|
1939 | def on_specGraphSaveRTIplot_stateChanged(self, p0): | |
1940 |
|
1940 | |||
1941 | self.__checkSpecGraphSaving() |
|
1941 | self.__checkSpecGraphSaving() | |
1942 |
|
1942 | |||
1943 | @pyqtSignature("int") |
|
1943 | @pyqtSignature("int") | |
1944 | def on_specGraphSaveRTInoise_stateChanged(self, p0): |
|
1944 | def on_specGraphSaveRTInoise_stateChanged(self, p0): | |
1945 |
|
1945 | |||
1946 | self.__checkSpecGraphSaving() |
|
1946 | self.__checkSpecGraphSaving() | |
1947 |
|
1947 | |||
1948 | @pyqtSignature("int") |
|
1948 | @pyqtSignature("int") | |
1949 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): |
|
1949 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): | |
1950 |
|
1950 | |||
1951 | self.__checkSpecGraphSaving() |
|
1951 | self.__checkSpecGraphSaving() | |
1952 |
|
1952 | |||
1953 | @pyqtSignature("int") |
|
1953 | @pyqtSignature("int") | |
1954 | def on_specGraphSavePowerprofile_stateChanged(self, p0): |
|
1954 | def on_specGraphSavePowerprofile_stateChanged(self, p0): | |
1955 |
|
1955 | |||
1956 | self.__checkSpecGraphSaving() |
|
1956 | self.__checkSpecGraphSaving() | |
1957 |
|
1957 | |||
1958 | @pyqtSignature("int") |
|
1958 | @pyqtSignature("int") | |
1959 | def on_specGraphftpSpectra_stateChanged(self, p0): |
|
1959 | def on_specGraphftpSpectra_stateChanged(self, p0): | |
1960 | """ |
|
1960 | """ | |
1961 | """ |
|
1961 | """ | |
1962 | self.__checkSpecGraphFTP() |
|
1962 | self.__checkSpecGraphFTP() | |
1963 |
|
1963 | |||
1964 |
|
1964 | |||
1965 | @pyqtSignature("int") |
|
1965 | @pyqtSignature("int") | |
1966 | def on_specGraphftpCross_stateChanged(self, p0): |
|
1966 | def on_specGraphftpCross_stateChanged(self, p0): | |
1967 |
|
1967 | |||
1968 | self.__checkSpecGraphFTP() |
|
1968 | self.__checkSpecGraphFTP() | |
1969 |
|
1969 | |||
1970 | @pyqtSignature("int") |
|
1970 | @pyqtSignature("int") | |
1971 | def on_specGraphftpRTIplot_stateChanged(self, p0): |
|
1971 | def on_specGraphftpRTIplot_stateChanged(self, p0): | |
1972 |
|
1972 | |||
1973 | self.__checkSpecGraphFTP() |
|
1973 | self.__checkSpecGraphFTP() | |
1974 |
|
1974 | |||
1975 | @pyqtSignature("int") |
|
1975 | @pyqtSignature("int") | |
1976 | def on_specGraphftpRTInoise_stateChanged(self, p0): |
|
1976 | def on_specGraphftpRTInoise_stateChanged(self, p0): | |
1977 |
|
1977 | |||
1978 | self.__checkSpecGraphFTP() |
|
1978 | self.__checkSpecGraphFTP() | |
1979 |
|
1979 | |||
1980 | @pyqtSignature("int") |
|
1980 | @pyqtSignature("int") | |
1981 | def on_specGraphftpCoherencemap_stateChanged(self, p0): |
|
1981 | def on_specGraphftpCoherencemap_stateChanged(self, p0): | |
1982 |
|
1982 | |||
1983 | self.__checkSpecGraphFTP() |
|
1983 | self.__checkSpecGraphFTP() | |
1984 |
|
1984 | |||
1985 | @pyqtSignature("int") |
|
1985 | @pyqtSignature("int") | |
1986 | def on_specGraphftpPowerprofile_stateChanged(self, p0): |
|
1986 | def on_specGraphftpPowerprofile_stateChanged(self, p0): | |
1987 |
|
1987 | |||
1988 | self.__checkSpecGraphFTP() |
|
1988 | self.__checkSpecGraphFTP() | |
1989 |
|
1989 | |||
1990 | @pyqtSignature("") |
|
1990 | @pyqtSignature("") | |
1991 | def on_specGraphToolPath_clicked(self): |
|
1991 | def on_specGraphToolPath_clicked(self): | |
1992 | """ |
|
1992 | """ | |
1993 | """ |
|
1993 | """ | |
1994 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1994 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
1995 | self.specGraphPath.setText(save_path) |
|
1995 | self.specGraphPath.setText(save_path) | |
1996 | if not os.path.exists(save_path): |
|
1996 | if not os.path.exists(save_path): | |
1997 | self.console.clear() |
|
1997 | self.console.clear() | |
1998 | self.console.append("Write a valid path") |
|
1998 | self.console.append("Write a valid path") | |
1999 | return |
|
1999 | return | |
2000 |
|
2000 | |||
2001 | @pyqtSignature("") |
|
2001 | @pyqtSignature("") | |
2002 | def on_specGraphClear_clicked(self): |
|
2002 | def on_specGraphClear_clicked(self): | |
2003 | return |
|
2003 | return | |
2004 |
|
2004 | |||
2005 | @pyqtSignature("") |
|
2005 | @pyqtSignature("") | |
2006 | def on_specHeisGraphToolPath_clicked(self): |
|
2006 | def on_specHeisGraphToolPath_clicked(self): | |
2007 | """ |
|
2007 | """ | |
2008 | """ |
|
2008 | """ | |
2009 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
2009 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
2010 | self.specHeisGraphPath.setText(save_path) |
|
2010 | self.specHeisGraphPath.setText(save_path) | |
2011 | if not os.path.exists(save_path): |
|
2011 | if not os.path.exists(save_path): | |
2012 | self.console.clear() |
|
2012 | self.console.clear() | |
2013 | self.console.append("Write a valid path") |
|
2013 | self.console.append("Write a valid path") | |
2014 | return |
|
2014 | return | |
2015 |
|
2015 | |||
2016 | @pyqtSignature("int") |
|
2016 | @pyqtSignature("int") | |
2017 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): |
|
2017 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): | |
2018 | """ |
|
2018 | """ | |
2019 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . |
|
2019 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . | |
2020 | """ |
|
2020 | """ | |
2021 | if p0 == 2: |
|
2021 | if p0 == 2: | |
2022 | self.specHeisOpIncoherent.setEnabled(True) |
|
2022 | self.specHeisOpIncoherent.setEnabled(True) | |
2023 | self.specHeisOpCobIncInt.setEnabled(True) |
|
2023 | self.specHeisOpCobIncInt.setEnabled(True) | |
2024 | if p0 == 0: |
|
2024 | if p0 == 0: | |
2025 | self.specHeisOpIncoherent.setEnabled(False) |
|
2025 | self.specHeisOpIncoherent.setEnabled(False) | |
2026 | self.specHeisOpCobIncInt.setEnabled(False) |
|
2026 | self.specHeisOpCobIncInt.setEnabled(False) | |
2027 |
|
2027 | |||
2028 | @pyqtSignature("") |
|
2028 | @pyqtSignature("") | |
2029 | def on_specHeisOpOk_clicked(self): |
|
2029 | def on_specHeisOpOk_clicked(self): | |
2030 | """ |
|
2030 | """ | |
2031 | AÑADE OPERACION SPECTRAHEIS |
|
2031 | AÑADE OPERACION SPECTRAHEIS | |
2032 | """ |
|
2032 | """ | |
2033 | addFTP = False |
|
2033 | addFTP = False | |
2034 | checkPath = False |
|
2034 | checkPath = False | |
2035 |
|
2035 | |||
2036 | self.actionSaveToolbar.setEnabled(False) |
|
2036 | self.actionSaveToolbar.setEnabled(False) | |
2037 | self.actionStarToolbar.setEnabled(False) |
|
2037 | self.actionStarToolbar.setEnabled(False) | |
2038 |
|
2038 | |||
2039 | self.console.clear() |
|
2039 | self.console.clear() | |
2040 | self.console.append("Checking input parameters ...") |
|
2040 | self.console.append("Checking input parameters ...") | |
2041 |
|
2041 | |||
2042 | puObj = self.getSelectedItemObj() |
|
2042 | puObj = self.getSelectedItemObj() | |
2043 | puObj.removeOperations() |
|
2043 | puObj.removeOperations() | |
2044 |
|
2044 | |||
2045 | if self.specHeisOpCebIncoherent.isChecked(): |
|
2045 | if self.specHeisOpCebIncoherent.isChecked(): | |
2046 | value = str(self.specHeisOpIncoherent.text()) |
|
2046 | value = str(self.specHeisOpIncoherent.text()) | |
2047 | name_operation = 'IncohInt4SpectraHeis' |
|
2047 | name_operation = 'IncohInt4SpectraHeis' | |
2048 | optype = 'other' |
|
2048 | optype = 'other' | |
2049 |
|
2049 | |||
2050 | name_parameter = 'timeInterval' |
|
2050 | name_parameter = 'timeInterval' | |
2051 | format = 'float' |
|
2051 | format = 'float' | |
2052 |
|
2052 | |||
2053 | if self.specOpCobIncInt.currentIndex() == 0: |
|
2053 | if self.specOpCobIncInt.currentIndex() == 0: | |
2054 | name_parameter = 'timeInterval' |
|
2054 | name_parameter = 'timeInterval' | |
2055 | format = 'float' |
|
2055 | format = 'float' | |
2056 |
|
2056 | |||
2057 | if not isFloat(value): |
|
2057 | if not isFloat(value): | |
2058 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2058 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
2059 | return 0 |
|
2059 | return 0 | |
2060 |
|
2060 | |||
2061 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2061 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
2062 |
|
2062 | |||
2063 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
2063 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
2064 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2064 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
2065 | return 0 |
|
2065 | return 0 | |
|
2066 | ||||
|
2067 | channelList = str(self.specHeisGgraphChannelList.text()) | |||
|
2068 | freq_range = str(self.specHeisGgraphXminXmax.text()) | |||
|
2069 | power_range = str(self.specHeisGgraphYminYmax.text()) | |||
|
2070 | time_range = str(self.specHeisGgraphTminTmax.text()) | |||
|
2071 | timerange = str(self.specHeisGgraphTimeRange.text()) | |||
2066 |
|
2072 | |||
2067 | # ---- Spectra Plot----- |
|
2073 | # ---- Spectra Plot----- | |
2068 |
if self.specHeisGraphCebSpectraplot.isChecked(): |
|
2074 | if self.specHeisGraphCebSpectraplot.isChecked(): | |
|
2075 | ||||
2069 | name_operation = 'SpectraHeisScope' |
|
2076 | name_operation = 'SpectraHeisScope' | |
2070 | optype = 'other' |
|
2077 | optype = 'other' | |
|
2078 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |||
2071 |
|
2079 | |||
2072 | name_parameter = 'id' |
|
2080 | name_parameter = 'id' | |
2073 | format = 'int' |
|
2081 | format = 'int' | |
2074 |
|
||||
2075 | channelList = str(self.specHeisGgraphChannelList.text()) |
|
|||
2076 | xvalue = str(self.specHeisGgraphXminXmax.text()) |
|
|||
2077 | yvalue = str(self.specHeisGgraphYminYmax.text()) |
|
|||
2078 |
|
||||
2079 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
2080 | value = opObj.id |
|
2082 | value = opObj.id | |
2081 |
|
2083 | |||
2082 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
2084 | if not opObj.addParameter(name=name_parameter, value=value, format=format): | |
2083 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2085 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) | |
2084 | return 0 |
|
2086 | return 0 | |
2085 |
|
2087 | |||
2086 | if not channelList == '': |
|
2088 | if not (channelList == ''): | |
2087 | name_parameter = 'channelList' |
|
2089 | name_parameter = 'channelList' | |
2088 | format = 'intlist' |
|
2090 | format = 'intlist' | |
2089 |
|
2091 | |||
2090 | if not isList(channelList): |
|
2092 | if not isList(channelList): | |
2091 | self.console.append("Invalid value '%s' for '%s'" %(channelList, name_parameter)) |
|
2093 | self.console.append("Invalid value '%s' for '%s'" %(channelList, name_parameter)) | |
2092 | return 0 |
|
2094 | return 0 | |
2093 |
|
2095 | |||
2094 | opObj.addParameter(name=name_parameter, value=channelList, format=format) |
|
2096 | opObj.addParameter(name=name_parameter, value=channelList, format=format) | |
2095 |
|
2097 | |||
2096 |
if not |
|
2098 | if not freq_range == '': | |
2097 |
xvalueList = |
|
2099 | xvalueList = freq_range.split(',') | |
2098 |
|
2100 | |||
2099 | if len(xvalueList) != 2: |
|
2101 | if len(xvalueList) != 2: | |
2100 |
self.console.append("Invalid value '%s' for '%s'" %( |
|
2102 | self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange")) | |
2101 | return 0 |
|
2103 | return 0 | |
2102 |
|
2104 | |||
2103 | value1 = xvalueList[0] |
|
2105 | value1 = xvalueList[0] | |
2104 | value2 = xvalueList[1] |
|
2106 | value2 = xvalueList[1] | |
2105 |
|
2107 | |||
2106 | if not isFloat(value1) or not isFloat(value2): |
|
2108 | if not isFloat(value1) or not isFloat(value2): | |
2107 |
self.console.append("Invalid value '%s' for '%s'" %( |
|
2109 | self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange")) | |
2108 | return 0 |
|
2110 | return 0 | |
2109 |
|
2111 | |||
2110 | name1 = 'xmin' |
|
2112 | name1 = 'xmin' | |
2111 | name2 = 'xmax' |
|
2113 | name2 = 'xmax' | |
2112 | format = 'float' |
|
2114 | format = 'float' | |
2113 |
|
2115 | |||
2114 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2116 | opObj.addParameter(name=name1, value=value1, format=format) | |
2115 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2117 | opObj.addParameter(name=name2, value=value2, format=format) | |
2116 |
|
2118 | |||
2117 | #------specHeisGgraphYmin-Ymax--- |
|
2119 | #------specHeisGgraphYmin-Ymax--- | |
2118 |
if not |
|
2120 | if not power_range == '': | |
2119 |
yvalueList = |
|
2121 | yvalueList = power_range.split(",") | |
2120 |
|
2122 | |||
2121 | if len(yvalueList) != 2: |
|
2123 | if len(yvalueList) != 2: | |
2122 |
self.console.append("Invalid value '%s' for '%s'" %( |
|
2124 | self.console.append("Invalid value '%s' for '%s'" %(power_range, "xrange")) | |
2123 | return 0 |
|
2125 | return 0 | |
2124 |
|
2126 | |||
2125 | value1 = yvalueList[0] |
|
2127 | value1 = yvalueList[0] | |
2126 | value2 = yvalueList[1] |
|
2128 | value2 = yvalueList[1] | |
2127 |
|
2129 | |||
2128 | if not isFloat(value1) or not isFloat(value2): |
|
2130 | if not isFloat(value1) or not isFloat(value2): | |
2129 |
self.console.append("Invalid value '%s' for '%s'" %( |
|
2131 | self.console.append("Invalid value '%s' for '%s'" %(power_range, "yrange")) | |
2130 | return 0 |
|
2132 | return 0 | |
2131 |
|
2133 | |||
2132 | name1 = 'ymin' |
|
2134 | name1 = 'ymin' | |
2133 | name2 = 'ymax' |
|
2135 | name2 = 'ymax' | |
2134 | format = 'float' |
|
2136 | format = 'float' | |
2135 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2137 | opObj.addParameter(name=name1, value=value1, format=format) | |
2136 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2138 | opObj.addParameter(name=name2, value=value2, format=format) | |
2137 |
|
2139 | |||
2138 | if self.specHeisGraphSaveSpectra.isChecked(): |
|
2140 | if self.specHeisGraphSaveSpectra.isChecked(): | |
2139 | checkPath = True |
|
2141 | checkPath = True | |
2140 | name_parameter1 = 'save' |
|
2142 | name_parameter1 = 'save' | |
2141 | name_parameter2 = 'figpath' |
|
2143 | name_parameter2 = 'figpath' | |
2142 | name_parameter3 = 'figfile' |
|
2144 | name_parameter3 = 'figfile' | |
2143 | value1 = '1' |
|
2145 | value1 = '1' | |
2144 | value2 = str(self.specHeisGraphPath.text()) |
|
2146 | value2 = str(self.specHeisGraphPath.text()) | |
2145 | value3 = str(self.specHeisGraphPrefix.text()) |
|
2147 | value3 = str(self.specHeisGraphPrefix.text()) | |
2146 | format1 = 'bool' |
|
2148 | format1 = 'bool' | |
2147 | format2 = 'str' |
|
2149 | format2 = 'str' | |
2148 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) |
|
2150 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) | |
2149 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2151 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) | |
2150 | if not value3 == "": |
|
2152 | if not value3 == "": | |
2151 | try: |
|
2153 | try: | |
2152 | value3 = str(self.specHeisGraphPrefix.text()) |
|
2154 | value3 = str(self.specHeisGraphPrefix.text()) | |
2153 | except: |
|
2155 | except: | |
2154 | self.console.clear() |
|
2156 | self.console.clear() | |
2155 | self.console.append("Please Write prefix") |
|
2157 | self.console.append("Please Write prefix") | |
2156 | return 0 |
|
2158 | return 0 | |
2157 | opObj.addParameter(name='figfile', value=str(self.specHeisGraphPrefix.text()), format='str') |
|
2159 | opObj.addParameter(name='figfile', value=str(self.specHeisGraphPrefix.text()), format='str') | |
2158 |
|
2160 | |||
2159 | # opObj.addParameter(name=name_parameter3, value=value3, format=format2) |
|
2161 | # opObj.addParameter(name=name_parameter3, value=value3, format=format2) | |
2160 | # opObj.addParameter(name='wr_period', value='5',format='int') |
|
2162 | # opObj.addParameter(name='wr_period', value='5',format='int') | |
2161 |
|
2163 | |||
2162 | if self.specHeisGraphftpSpectra.isChecked(): |
|
2164 | if self.specHeisGraphftpSpectra.isChecked(): | |
2163 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2165 | opObj.addParameter(name='ftp', value='1', format='int') | |
2164 | self.addFTPConf2Operation(puObj, opObj) |
|
2166 | self.addFTPConf2Operation(puObj, opObj) | |
2165 | addFTP = True |
|
2167 | addFTP = True | |
2166 |
|
2168 | |||
2167 | if self.specHeisGraphCebRTIplot.isChecked(): |
|
2169 | if self.specHeisGraphCebRTIplot.isChecked(): | |
2168 | name_operation = 'RTIfromSpectraHeis' |
|
2170 | name_operation = 'RTIfromSpectraHeis' | |
2169 | optype = 'other' |
|
2171 | optype = 'other' | |
2170 |
|
2172 | |||
2171 | name_parameter = 'id' |
|
2173 | name_parameter = 'id' | |
2172 | format = 'int' |
|
2174 | format = 'int' | |
2173 |
|
2175 | |||
2174 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2176 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
2175 | value = opObj.id |
|
2177 | value = opObj.id | |
2176 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
2178 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
2177 |
|
||||
2178 | channelList = str(self.specHeisGgraphChannelList.text()) |
|
|||
2179 | xvalue = str(self.specHeisGgraphTminTmax.text()) |
|
|||
2180 | yvalue = str(self.specHeisGgraphYminYmax.text()) |
|
|||
2181 | timerange = str(self.specHeisGgraphTimeRange.text()) |
|
|||
2182 |
|
2179 | |||
2183 | if not channelList == '': |
|
2180 | if not channelList == '': | |
2184 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
2181 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
2185 |
|
2182 | |||
2186 |
if not |
|
2183 | if not time_range == '': | |
2187 |
xvalueList = |
|
2184 | xvalueList = time_range.split(',') | |
2188 | try: |
|
2185 | try: | |
2189 | value = float(xvalueList[0]) |
|
2186 | value = float(xvalueList[0]) | |
2190 | value = float(xvalueList[1]) |
|
2187 | value = float(xvalueList[1]) | |
2191 | except: |
|
2188 | except: | |
2192 | return 0 |
|
2189 | return 0 | |
2193 | format = 'float' |
|
2190 | format = 'float' | |
2194 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
2191 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) | |
2195 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
2192 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) | |
2196 |
|
2193 | |||
2197 | if not timerange == '': |
|
2194 | if not timerange == '': | |
2198 | format = 'int' |
|
2195 | format = 'int' | |
2199 | try: |
|
2196 | try: | |
2200 | timerange = int(timerange) |
|
2197 | timerange = int(timerange) | |
2201 | except: |
|
2198 | except: | |
2202 | return 0 |
|
2199 | return 0 | |
2203 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
2200 | opObj.addParameter(name='timerange', value=timerange, format=format) | |
2204 |
|
2201 | |||
2205 |
|
2202 | |||
2206 |
if not |
|
2203 | if not power_range == '': | |
2207 |
yvalueList = |
|
2204 | yvalueList = power_range.split(",") | |
2208 | try: |
|
2205 | try: | |
2209 | value = float(yvalueList[0]) |
|
2206 | value = float(yvalueList[0]) | |
2210 | value = float(yvalueList[1]) |
|
2207 | value = float(yvalueList[1]) | |
2211 | except: |
|
2208 | except: | |
2212 |
|
|
2209 | return 0 | |
|
2210 | ||||
2213 | format = 'float' |
|
2211 | format = 'float' | |
2214 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
2212 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) | |
2215 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
2213 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) | |
2216 |
|
2214 | |||
2217 | if self.specHeisGraphSaveRTIplot.isChecked(): |
|
2215 | if self.specHeisGraphSaveRTIplot.isChecked(): | |
2218 | checkPath = True |
|
2216 | checkPath = True | |
2219 | opObj.addParameter(name='save', value='1', format='bool') |
|
2217 | opObj.addParameter(name='save', value='1', format='bool') | |
2220 | opObj.addParameter(name='figpath', value=str(self.specHeisGraphPath.text()), format='str') |
|
2218 | opObj.addParameter(name='figpath', value=str(self.specHeisGraphPath.text()), format='str') | |
2221 | value = str(self.specHeisGraphPrefix.text()) |
|
2219 | value = str(self.specHeisGraphPrefix.text()) | |
2222 | if not value == "": |
|
2220 | if not value == "": | |
2223 | try: |
|
2221 | try: | |
2224 | value = str(self.specHeisGraphPrefix.text()) |
|
2222 | value = str(self.specHeisGraphPrefix.text()) | |
2225 | except: |
|
2223 | except: | |
2226 | self.console.clear() |
|
2224 | self.console.clear() | |
2227 | self.console.append("Please Write prefix") |
|
2225 | self.console.append("Please Write prefix") | |
2228 | return 0 |
|
2226 | return 0 | |
2229 | opObj.addParameter(name='figfile', value=value, format='str') |
|
2227 | opObj.addParameter(name='figfile', value=value, format='str') | |
2230 |
|
2228 | |||
2231 | # test_ftp |
|
2229 | # test_ftp | |
2232 | if self.specHeisGraphftpRTIplot.isChecked(): |
|
2230 | if self.specHeisGraphftpRTIplot.isChecked(): | |
2233 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2231 | opObj.addParameter(name='ftp', value='1', format='int') | |
2234 | self.addFTPConf2Operation(puObj, opObj) |
|
2232 | self.addFTPConf2Operation(puObj, opObj) | |
2235 | addFTP = True |
|
2233 | addFTP = True | |
2236 |
|
2234 | |||
2237 | localfolder = None |
|
2235 | localfolder = None | |
2238 | if checkPath: |
|
2236 | if checkPath: | |
2239 | localfolder = str(self.specHeisGraphPath.text()) |
|
2237 | localfolder = str(self.specHeisGraphPath.text()) | |
2240 | if localfolder == '': |
|
2238 | if localfolder == '': | |
2241 | self.console.clear() |
|
2239 | self.console.clear() | |
2242 | self.console.append("Graphic path should be defined") |
|
2240 | self.console.append("Graphic path should be defined") | |
2243 | return 0 |
|
2241 | return 0 | |
2244 |
|
2242 | |||
2245 | if addFTP and not localfolder: |
|
2243 | if addFTP and not localfolder: | |
2246 | self.console.clear() |
|
2244 | self.console.clear() | |
2247 | self.console.append("You should save plots before send them to FTP Server") |
|
2245 | self.console.append("You should save plots before send them to FTP Server") | |
2248 | return 0 |
|
2246 | return 0 | |
2249 |
|
2247 | |||
2250 | # if something happened |
|
2248 | # if something happened | |
2251 | parms_ok, output_path, blocksperfile, metada = self.checkInputsPUSave(datatype='SpectraHeis') |
|
2249 | parms_ok, output_path, blocksperfile, metada = self.checkInputsPUSave(datatype='SpectraHeis') | |
2252 | if parms_ok: |
|
2250 | if parms_ok: | |
2253 | name_operation = 'FitsWriter' |
|
2251 | name_operation = 'FitsWriter' | |
2254 | optype = 'other' |
|
2252 | optype = 'other' | |
2255 | name_parameter1 = 'path' |
|
2253 | name_parameter1 = 'path' | |
2256 | name_parameter2 = 'dataBlocksPerFile' |
|
2254 | name_parameter2 = 'dataBlocksPerFile' | |
2257 | name_parameter3 = 'metadatafile' |
|
2255 | name_parameter3 = 'metadatafile' | |
2258 | value1 = output_path |
|
2256 | value1 = output_path | |
2259 | value2 = blocksperfile |
|
2257 | value2 = blocksperfile | |
2260 | value3 = metada |
|
2258 | value3 = metada | |
2261 | format2 = "int" |
|
2259 | format2 = "int" | |
2262 | format3 = "str" |
|
2260 | format3 = "str" | |
2263 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2261 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
2264 | opObj.addParameter(name=name_parameter1, value=value1) |
|
2262 | opObj.addParameter(name=name_parameter1, value=value1) | |
2265 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2263 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) | |
2266 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) |
|
2264 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) | |
2267 |
|
2265 | |||
2268 | self.console.clear() |
|
2266 | self.console.clear() | |
2269 | try: |
|
2267 | try: | |
2270 | self.refreshPUProperties(puObj) |
|
2268 | self.refreshPUProperties(puObj) | |
2271 | except: |
|
2269 | except: | |
2272 | self.console.append("An error reading input parameters was found ... Check them!") |
|
2270 | self.console.append("An error reading input parameters was found ... Check them!") | |
2273 | return 0 |
|
2271 | return 0 | |
2274 |
|
2272 | |||
2275 | self.console.append("Save your project and press Play button to start signal processing") |
|
2273 | self.console.append("Save your project and press Play button to start signal processing") | |
2276 |
|
2274 | |||
2277 | self.actionSaveToolbar.setEnabled(True) |
|
2275 | self.actionSaveToolbar.setEnabled(True) | |
2278 | self.actionStarToolbar.setEnabled(True) |
|
2276 | self.actionStarToolbar.setEnabled(True) | |
2279 |
|
2277 | |||
2280 | return 1 |
|
2278 | return 1 | |
2281 | @pyqtSignature("int") |
|
2279 | @pyqtSignature("int") | |
2282 | def on_specHeisGraphCebSpectraplot_stateChanged(self, p0): |
|
2280 | def on_specHeisGraphCebSpectraplot_stateChanged(self, p0): | |
2283 |
|
2281 | |||
2284 | if p0 == 2: |
|
2282 | if p0 == 2: | |
2285 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2283 | self.specHeisGgraphChannelList.setEnabled(True) | |
2286 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
2284 | self.specHeisGgraphXminXmax.setEnabled(True) | |
2287 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2285 | self.specHeisGgraphYminYmax.setEnabled(True) | |
2288 | if p0 == 0: |
|
2286 | if p0 == 0: | |
2289 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
2287 | self.specHeisGgraphXminXmax.setEnabled(False) | |
2290 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2288 | self.specHeisGgraphYminYmax.setEnabled(False) | |
2291 |
|
2289 | |||
2292 | @pyqtSignature("int") |
|
2290 | @pyqtSignature("int") | |
2293 | def on_specHeisGraphCebRTIplot_stateChanged(self, p0): |
|
2291 | def on_specHeisGraphCebRTIplot_stateChanged(self, p0): | |
2294 |
|
2292 | |||
2295 | if p0 == 2: |
|
2293 | if p0 == 2: | |
2296 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2294 | self.specHeisGgraphChannelList.setEnabled(True) | |
2297 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
2295 | self.specHeisGgraphTminTmax.setEnabled(True) | |
2298 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2296 | self.specHeisGgraphYminYmax.setEnabled(True) | |
2299 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
2297 | self.specHeisGgraphTimeRange.setEnabled(True) | |
2300 |
|
2298 | |||
2301 | if p0 == 0: |
|
2299 | if p0 == 0: | |
2302 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
2300 | self.specHeisGgraphTminTmax.setEnabled(False) | |
2303 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2301 | self.specHeisGgraphYminYmax.setEnabled(False) | |
2304 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
2302 | self.specHeisGgraphTimeRange.setEnabled(False) | |
2305 |
|
2303 | |||
2306 | @pyqtSignature("int") |
|
2304 | @pyqtSignature("int") | |
2307 | def on_specHeisGraphSaveSpectra_stateChanged(self, p0): |
|
2305 | def on_specHeisGraphSaveSpectra_stateChanged(self, p0): | |
2308 | """ |
|
2306 | """ | |
2309 | """ |
|
2307 | """ | |
2310 | if p0 == 2: |
|
2308 | if p0 == 2: | |
2311 | self.specHeisGraphPath.setEnabled(True) |
|
2309 | self.specHeisGraphPath.setEnabled(True) | |
2312 | self.specHeisGraphPrefix.setEnabled(True) |
|
2310 | self.specHeisGraphPrefix.setEnabled(True) | |
2313 | self.specHeisGraphToolPath.setEnabled(True) |
|
2311 | self.specHeisGraphToolPath.setEnabled(True) | |
2314 | if p0 == 0: |
|
2312 | if p0 == 0: | |
2315 | self.specHeisGraphPath.setEnabled(False) |
|
2313 | self.specHeisGraphPath.setEnabled(False) | |
2316 | self.specHeisGraphPrefix.setEnabled(False) |
|
2314 | self.specHeisGraphPrefix.setEnabled(False) | |
2317 | self.specHeisGraphToolPath.setEnabled(False) |
|
2315 | self.specHeisGraphToolPath.setEnabled(False) | |
2318 |
|
2316 | |||
2319 | @pyqtSignature("int") |
|
2317 | @pyqtSignature("int") | |
2320 | def on_specHeisGraphSaveRTIplot_stateChanged(self, p0): |
|
2318 | def on_specHeisGraphSaveRTIplot_stateChanged(self, p0): | |
2321 | if p0 == 2: |
|
2319 | if p0 == 2: | |
2322 | self.specHeisGraphPath.setEnabled(True) |
|
2320 | self.specHeisGraphPath.setEnabled(True) | |
2323 | self.specHeisGraphPrefix.setEnabled(True) |
|
2321 | self.specHeisGraphPrefix.setEnabled(True) | |
2324 | self.specHeisGraphToolPath.setEnabled(True) |
|
2322 | self.specHeisGraphToolPath.setEnabled(True) | |
2325 |
|
2323 | |||
2326 | @pyqtSignature("int") |
|
2324 | @pyqtSignature("int") | |
2327 | def on_specHeisGraphftpSpectra_stateChanged(self, p0): |
|
2325 | def on_specHeisGraphftpSpectra_stateChanged(self, p0): | |
2328 | """ |
|
2326 | """ | |
2329 | """ |
|
2327 | """ | |
2330 | if p0 == 2: |
|
2328 | if p0 == 2: | |
2331 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2329 | self.specHeisGgraphftpratio.setEnabled(True) | |
2332 |
|
2330 | |||
2333 | if p0 == 0: |
|
2331 | if p0 == 0: | |
2334 | self.specHeisGgraphftpratio.setEnabled(False) |
|
2332 | self.specHeisGgraphftpratio.setEnabled(False) | |
2335 |
|
2333 | |||
2336 | @pyqtSignature("int") |
|
2334 | @pyqtSignature("int") | |
2337 | def on_specHeisGraphftpRTIplot_stateChanged(self, p0): |
|
2335 | def on_specHeisGraphftpRTIplot_stateChanged(self, p0): | |
2338 | if p0 == 2: |
|
2336 | if p0 == 2: | |
2339 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2337 | self.specHeisGgraphftpratio.setEnabled(True) | |
2340 |
|
2338 | |||
2341 | @pyqtSignature("") |
|
2339 | @pyqtSignature("") | |
2342 | def on_specHeisGraphClear_clicked(self): |
|
2340 | def on_specHeisGraphClear_clicked(self): | |
2343 | pass |
|
2341 | pass | |
2344 |
|
2342 | |||
2345 | def __checkSpecGraphSaving(self): |
|
2343 | def __checkSpecGraphSaving(self): | |
2346 |
|
2344 | |||
2347 | enable = False |
|
2345 | enable = False | |
2348 |
|
2346 | |||
2349 | if self.specGraphSaveSpectra.checkState(): |
|
2347 | if self.specGraphSaveSpectra.checkState(): | |
2350 | enable = True |
|
2348 | enable = True | |
2351 |
|
2349 | |||
2352 | if self.specGraphSaveCross.checkState(): |
|
2350 | if self.specGraphSaveCross.checkState(): | |
2353 | enable = True |
|
2351 | enable = True | |
2354 |
|
2352 | |||
2355 | if self.specGraphSaveRTIplot.checkState(): |
|
2353 | if self.specGraphSaveRTIplot.checkState(): | |
2356 | enable = True |
|
2354 | enable = True | |
2357 |
|
2355 | |||
2358 | if self.specGraphSaveCoherencemap.checkState(): |
|
2356 | if self.specGraphSaveCoherencemap.checkState(): | |
2359 | enable = True |
|
2357 | enable = True | |
2360 |
|
2358 | |||
2361 | if self.specGraphSavePowerprofile.checkState(): |
|
2359 | if self.specGraphSavePowerprofile.checkState(): | |
2362 | enable = True |
|
2360 | enable = True | |
2363 |
|
2361 | |||
2364 | if self.specGraphSaveRTInoise.checkState(): |
|
2362 | if self.specGraphSaveRTInoise.checkState(): | |
2365 | enable = True |
|
2363 | enable = True | |
2366 |
|
2364 | |||
2367 | self.specGraphPath.setEnabled(enable) |
|
2365 | self.specGraphPath.setEnabled(enable) | |
2368 | self.specGraphPrefix.setEnabled(enable) |
|
2366 | self.specGraphPrefix.setEnabled(enable) | |
2369 | self.specGraphToolPath.setEnabled(enable) |
|
2367 | self.specGraphToolPath.setEnabled(enable) | |
2370 |
|
2368 | |||
2371 | self.specGgraphftpratio.setEnabled(enable) |
|
2369 | self.specGgraphftpratio.setEnabled(enable) | |
2372 |
|
2370 | |||
2373 | def __checkSpecGraphFTP(self): |
|
2371 | def __checkSpecGraphFTP(self): | |
2374 |
|
2372 | |||
2375 | enable = False |
|
2373 | enable = False | |
2376 |
|
2374 | |||
2377 | if self.specGraphftpSpectra.checkState(): |
|
2375 | if self.specGraphftpSpectra.checkState(): | |
2378 | enable = True |
|
2376 | enable = True | |
2379 |
|
2377 | |||
2380 | if self.specGraphftpCross.checkState(): |
|
2378 | if self.specGraphftpCross.checkState(): | |
2381 | enable = True |
|
2379 | enable = True | |
2382 |
|
2380 | |||
2383 | if self.specGraphftpRTIplot.checkState(): |
|
2381 | if self.specGraphftpRTIplot.checkState(): | |
2384 | enable = True |
|
2382 | enable = True | |
2385 |
|
2383 | |||
2386 | if self.specGraphftpCoherencemap.checkState(): |
|
2384 | if self.specGraphftpCoherencemap.checkState(): | |
2387 | enable = True |
|
2385 | enable = True | |
2388 |
|
2386 | |||
2389 | if self.specGraphftpPowerprofile.checkState(): |
|
2387 | if self.specGraphftpPowerprofile.checkState(): | |
2390 | enable = True |
|
2388 | enable = True | |
2391 |
|
2389 | |||
2392 | if self.specGraphftpRTInoise.checkState(): |
|
2390 | if self.specGraphftpRTInoise.checkState(): | |
2393 | enable = True |
|
2391 | enable = True | |
2394 |
|
2392 | |||
2395 | # self.specGgraphftpratio.setEnabled(enable) |
|
2393 | # self.specGgraphftpratio.setEnabled(enable) | |
2396 |
|
2394 | |||
2397 | def __checkSpecGraphFilters(self): |
|
2395 | def __checkSpecGraphFilters(self): | |
2398 |
|
2396 | |||
2399 | freq = False |
|
2397 | freq = False | |
2400 | height = False |
|
2398 | height = False | |
2401 | db = False |
|
2399 | db = False | |
2402 | time = False |
|
2400 | time = False | |
2403 | magnitud = False |
|
2401 | magnitud = False | |
2404 | phase = False |
|
2402 | phase = False | |
2405 | channelList = False |
|
2403 | channelList = False | |
2406 |
|
2404 | |||
2407 | if self.specGraphCebSpectraplot.checkState(): |
|
2405 | if self.specGraphCebSpectraplot.checkState(): | |
2408 | freq = True |
|
2406 | freq = True | |
2409 | height = True |
|
2407 | height = True | |
2410 | db = True |
|
2408 | db = True | |
2411 | channelList = True |
|
2409 | channelList = True | |
2412 |
|
2410 | |||
2413 | if self.specGraphCebCrossSpectraplot.checkState(): |
|
2411 | if self.specGraphCebCrossSpectraplot.checkState(): | |
2414 | freq = True |
|
2412 | freq = True | |
2415 | height = True |
|
2413 | height = True | |
2416 | db = True |
|
2414 | db = True | |
2417 | magnitud = True |
|
2415 | magnitud = True | |
2418 | phase = True |
|
2416 | phase = True | |
2419 |
|
2417 | |||
2420 | if self.specGraphCebRTIplot.checkState(): |
|
2418 | if self.specGraphCebRTIplot.checkState(): | |
2421 | height = True |
|
2419 | height = True | |
2422 | db = True |
|
2420 | db = True | |
2423 | time = True |
|
2421 | time = True | |
2424 | channelList = True |
|
2422 | channelList = True | |
2425 |
|
2423 | |||
2426 | if self.specGraphCebCoherencmap.checkState(): |
|
2424 | if self.specGraphCebCoherencmap.checkState(): | |
2427 | height = True |
|
2425 | height = True | |
2428 | time = True |
|
2426 | time = True | |
2429 | magnitud = True |
|
2427 | magnitud = True | |
2430 | phase = True |
|
2428 | phase = True | |
2431 |
|
2429 | |||
2432 | if self.specGraphPowerprofile.checkState(): |
|
2430 | if self.specGraphPowerprofile.checkState(): | |
2433 | height = True |
|
2431 | height = True | |
2434 | db = True |
|
2432 | db = True | |
2435 | channelList = True |
|
2433 | channelList = True | |
2436 |
|
2434 | |||
2437 | if self.specGraphCebRTInoise.checkState(): |
|
2435 | if self.specGraphCebRTInoise.checkState(): | |
2438 | db = True |
|
2436 | db = True | |
2439 | time = True |
|
2437 | time = True | |
2440 | channelList = True |
|
2438 | channelList = True | |
2441 |
|
2439 | |||
2442 |
|
2440 | |||
2443 | self.specGgraphFreq.setEnabled(freq) |
|
2441 | self.specGgraphFreq.setEnabled(freq) | |
2444 | self.specGgraphHeight.setEnabled(height) |
|
2442 | self.specGgraphHeight.setEnabled(height) | |
2445 | self.specGgraphDbsrange.setEnabled(db) |
|
2443 | self.specGgraphDbsrange.setEnabled(db) | |
2446 | self.specGgraphTminTmax.setEnabled(time) |
|
2444 | self.specGgraphTminTmax.setEnabled(time) | |
2447 |
|
2445 | |||
2448 | self.specGgraphmagnitud.setEnabled(magnitud) |
|
2446 | self.specGgraphmagnitud.setEnabled(magnitud) | |
2449 | self.specGgraphPhase.setEnabled(phase) |
|
2447 | self.specGgraphPhase.setEnabled(phase) | |
2450 | self.specGgraphChannelList.setEnabled(channelList) |
|
2448 | self.specGgraphChannelList.setEnabled(channelList) | |
2451 |
|
2449 | |||
2452 | def __getParmsFromProjectWindow(self): |
|
2450 | def __getParmsFromProjectWindow(self): | |
2453 | """ |
|
2451 | """ | |
2454 | Check Inputs Project: |
|
2452 | Check Inputs Project: | |
2455 | - project_name |
|
2453 | - project_name | |
2456 | - datatype |
|
2454 | - datatype | |
2457 | - ext |
|
2455 | - ext | |
2458 | - data_path |
|
2456 | - data_path | |
2459 | - readmode |
|
2457 | - readmode | |
2460 | - delay |
|
2458 | - delay | |
2461 | - set |
|
2459 | - set | |
2462 | - walk |
|
2460 | - walk | |
2463 | """ |
|
2461 | """ | |
2464 | parms_ok = True |
|
2462 | parms_ok = True | |
2465 |
|
2463 | |||
2466 | project_name = str(self.proName.text()) |
|
2464 | project_name = str(self.proName.text()) | |
2467 |
|
2465 | |||
2468 | if project_name == '' or project_name == None: |
|
2466 | if project_name == '' or project_name == None: | |
2469 | outputstr = "Enter a project Name" |
|
2467 | outputstr = "Enter a project Name" | |
2470 | self.console.append(outputstr) |
|
2468 | self.console.append(outputstr) | |
2471 | parms_ok = False |
|
2469 | parms_ok = False | |
2472 | project_name = None |
|
2470 | project_name = None | |
2473 |
|
2471 | |||
2474 | description = str(self.proDescription.toPlainText()) |
|
2472 | description = str(self.proDescription.toPlainText()) | |
2475 |
|
2473 | |||
2476 | datatype = str(self.proComDataType.currentText()) |
|
2474 | datatype = str(self.proComDataType.currentText()) | |
2477 |
|
2475 | |||
2478 | ext = str(self.proDataType.text()) |
|
2476 | ext = str(self.proDataType.text()) | |
2479 |
|
2477 | |||
2480 | dpath = str(self.proDataPath.text()) |
|
2478 | dpath = str(self.proDataPath.text()) | |
2481 |
|
2479 | |||
2482 | if dpath == '': |
|
2480 | if dpath == '': | |
2483 | outputstr = 'Datapath is empty' |
|
2481 | outputstr = 'Datapath is empty' | |
2484 | self.console.append(outputstr) |
|
2482 | self.console.append(outputstr) | |
2485 | parms_ok = False |
|
2483 | parms_ok = False | |
2486 | dpath = None |
|
2484 | dpath = None | |
2487 |
|
2485 | |||
2488 | if dpath != None: |
|
2486 | if dpath != None: | |
2489 | if not os.path.isdir(dpath): |
|
2487 | if not os.path.isdir(dpath): | |
2490 | outputstr = 'Datapath (%s) does not exist' % dpath |
|
2488 | outputstr = 'Datapath (%s) does not exist' % dpath | |
2491 | self.console.append(outputstr) |
|
2489 | self.console.append(outputstr) | |
2492 | parms_ok = False |
|
2490 | parms_ok = False | |
2493 | dpath = None |
|
2491 | dpath = None | |
2494 |
|
2492 | |||
2495 | online = int(self.proComReadMode.currentIndex()) |
|
2493 | online = int(self.proComReadMode.currentIndex()) | |
2496 |
|
2494 | |||
2497 | delay = None |
|
2495 | delay = None | |
2498 | if online==1: |
|
2496 | if online==1: | |
2499 | try: |
|
2497 | try: | |
2500 | delay = int(str(self.proDelay.text())) |
|
2498 | delay = int(str(self.proDelay.text())) | |
2501 | except: |
|
2499 | except: | |
2502 | outputstr = 'Delay value (%s) must be a integer number' %str(self.proDelay.text()) |
|
2500 | outputstr = 'Delay value (%s) must be a integer number' %str(self.proDelay.text()) | |
2503 | self.console.append(outputstr) |
|
2501 | self.console.append(outputstr) | |
2504 | parms_ok = False |
|
2502 | parms_ok = False | |
2505 |
|
2503 | |||
2506 |
|
2504 | |||
2507 | set = None |
|
2505 | set = None | |
2508 | value = str(self.proSet.text()) |
|
2506 | value = str(self.proSet.text()) | |
2509 | try: |
|
2507 | try: | |
2510 | set = int(value) |
|
2508 | set = int(value) | |
2511 | except: |
|
2509 | except: | |
2512 | pass |
|
2510 | pass | |
2513 |
|
2511 | |||
2514 | ippKm = None |
|
2512 | ippKm = None | |
2515 |
|
2513 | |||
2516 | value = str(self.proIPPKm.text()) |
|
2514 | value = str(self.proIPPKm.text()) | |
2517 |
|
2515 | |||
2518 | try: |
|
2516 | try: | |
2519 | ippKm = float(value) |
|
2517 | ippKm = float(value) | |
2520 | except: |
|
2518 | except: | |
2521 | if datatype=="USRP": |
|
2519 | if datatype=="USRP": | |
2522 | outputstr = 'IPP value "%s" must be a float number' % str(self.proIPPKm.text()) |
|
2520 | outputstr = 'IPP value "%s" must be a float number' % str(self.proIPPKm.text()) | |
2523 | self.console.append(outputstr) |
|
2521 | self.console.append(outputstr) | |
2524 | parms_ok = False |
|
2522 | parms_ok = False | |
2525 |
|
2523 | |||
2526 | walk = int(self.proComWalk.currentIndex()) |
|
2524 | walk = int(self.proComWalk.currentIndex()) | |
2527 | expLabel = str(self.proExpLabel.text()) |
|
2525 | expLabel = str(self.proExpLabel.text()) | |
2528 |
|
2526 | |||
2529 | startDate = str(self.proComStartDate.currentText()) |
|
2527 | startDate = str(self.proComStartDate.currentText()) | |
2530 | endDate = str(self.proComEndDate.currentText()) |
|
2528 | endDate = str(self.proComEndDate.currentText()) | |
2531 |
|
2529 | |||
2532 | # startDateList = startDate.split("/") |
|
2530 | # startDateList = startDate.split("/") | |
2533 | # endDateList = endDate.split("/") |
|
2531 | # endDateList = endDate.split("/") | |
2534 | # |
|
2532 | # | |
2535 | # startDate = datetime.date(int(startDateList[0]), int(startDateList[1]), int(startDateList[2])) |
|
2533 | # startDate = datetime.date(int(startDateList[0]), int(startDateList[1]), int(startDateList[2])) | |
2536 | # endDate = datetime.date(int(endDateList[0]), int(endDateList[1]), int(endDateList[2])) |
|
2534 | # endDate = datetime.date(int(endDateList[0]), int(endDateList[1]), int(endDateList[2])) | |
2537 |
|
2535 | |||
2538 | startTime = self.proStartTime.time() |
|
2536 | startTime = self.proStartTime.time() | |
2539 | endTime = self.proEndTime.time() |
|
2537 | endTime = self.proEndTime.time() | |
2540 |
|
2538 | |||
2541 | startTime = str(startTime.toString("H:m:s")) |
|
2539 | startTime = str(startTime.toString("H:m:s")) | |
2542 | endTime = str(endTime.toString("H:m:s")) |
|
2540 | endTime = str(endTime.toString("H:m:s")) | |
2543 |
|
2541 | |||
2544 | projectParms = ProjectParms() |
|
2542 | projectParms = ProjectParms() | |
2545 |
|
2543 | |||
2546 | projectParms.name = project_name |
|
2544 | projectParms.name = project_name | |
2547 | projectParms.description = description |
|
2545 | projectParms.description = description | |
2548 | projectParms.datatype = datatype |
|
2546 | projectParms.datatype = datatype | |
2549 | projectParms.ext = ext |
|
2547 | projectParms.ext = ext | |
2550 | projectParms.dpath = dpath |
|
2548 | projectParms.dpath = dpath | |
2551 | projectParms.online = online |
|
2549 | projectParms.online = online | |
2552 | projectParms.startDate = startDate |
|
2550 | projectParms.startDate = startDate | |
2553 | projectParms.endDate = endDate |
|
2551 | projectParms.endDate = endDate | |
2554 | projectParms.startTime = startTime |
|
2552 | projectParms.startTime = startTime | |
2555 | projectParms.endTime = endTime |
|
2553 | projectParms.endTime = endTime | |
2556 | projectParms.delay = delay |
|
2554 | projectParms.delay = delay | |
2557 | projectParms.walk = walk |
|
2555 | projectParms.walk = walk | |
2558 | projectParms.expLabel = expLabel |
|
2556 | projectParms.expLabel = expLabel | |
2559 | projectParms.set = set |
|
2557 | projectParms.set = set | |
2560 | projectParms.ippKm = ippKm |
|
2558 | projectParms.ippKm = ippKm | |
2561 | projectParms.parmsOk = parms_ok |
|
2559 | projectParms.parmsOk = parms_ok | |
2562 |
|
2560 | |||
2563 | return projectParms |
|
2561 | return projectParms | |
2564 |
|
2562 | |||
2565 |
|
2563 | |||
2566 | def __getParmsFromProjectObj(self, projectObjView): |
|
2564 | def __getParmsFromProjectObj(self, projectObjView): | |
2567 |
|
2565 | |||
2568 | parms_ok = True |
|
2566 | parms_ok = True | |
2569 |
|
2567 | |||
2570 | project_name, description = projectObjView.name, projectObjView.description |
|
2568 | project_name, description = projectObjView.name, projectObjView.description | |
2571 |
|
2569 | |||
2572 | readUnitObj = projectObjView.getReadUnitObj() |
|
2570 | readUnitObj = projectObjView.getReadUnitObj() | |
2573 | datatype = readUnitObj.datatype |
|
2571 | datatype = readUnitObj.datatype | |
2574 |
|
2572 | |||
2575 | operationObj = readUnitObj.getOperationObj(name='run') |
|
2573 | operationObj = readUnitObj.getOperationObj(name='run') | |
2576 |
|
2574 | |||
2577 | dpath = operationObj.getParameterValue(parameterName='path') |
|
2575 | dpath = operationObj.getParameterValue(parameterName='path') | |
2578 | startDate = operationObj.getParameterValue(parameterName='startDate') |
|
2576 | startDate = operationObj.getParameterValue(parameterName='startDate') | |
2579 | endDate = operationObj.getParameterValue(parameterName='endDate') |
|
2577 | endDate = operationObj.getParameterValue(parameterName='endDate') | |
2580 |
|
2578 | |||
2581 | startDate = startDate.strftime("%Y/%m/%d") |
|
2579 | startDate = startDate.strftime("%Y/%m/%d") | |
2582 | endDate = endDate.strftime("%Y/%m/%d") |
|
2580 | endDate = endDate.strftime("%Y/%m/%d") | |
2583 |
|
2581 | |||
2584 | startTime = operationObj.getParameterValue(parameterName='startTime') |
|
2582 | startTime = operationObj.getParameterValue(parameterName='startTime') | |
2585 | endTime = operationObj.getParameterValue(parameterName='endTime') |
|
2583 | endTime = operationObj.getParameterValue(parameterName='endTime') | |
2586 |
|
2584 | |||
2587 | startTime = startTime.strftime("%H:%M:%S") |
|
2585 | startTime = startTime.strftime("%H:%M:%S") | |
2588 | endTime = endTime.strftime("%H:%M:%S") |
|
2586 | endTime = endTime.strftime("%H:%M:%S") | |
2589 |
|
2587 | |||
2590 | online = 0 |
|
2588 | online = 0 | |
2591 | try: |
|
2589 | try: | |
2592 | online = operationObj.getParameterValue(parameterName='online') |
|
2590 | online = operationObj.getParameterValue(parameterName='online') | |
2593 | except: |
|
2591 | except: | |
2594 | pass |
|
2592 | pass | |
2595 |
|
2593 | |||
2596 | delay = '' |
|
2594 | delay = '' | |
2597 | try: |
|
2595 | try: | |
2598 | delay = operationObj.getParameterValue(parameterName='delay') |
|
2596 | delay = operationObj.getParameterValue(parameterName='delay') | |
2599 | except: |
|
2597 | except: | |
2600 | pass |
|
2598 | pass | |
2601 |
|
2599 | |||
2602 | walk = 0 |
|
2600 | walk = 0 | |
2603 | try: |
|
2601 | try: | |
2604 | walk = operationObj.getParameterValue(parameterName='walk') |
|
2602 | walk = operationObj.getParameterValue(parameterName='walk') | |
2605 | except: |
|
2603 | except: | |
2606 | pass |
|
2604 | pass | |
2607 |
|
2605 | |||
2608 | set = '' |
|
2606 | set = '' | |
2609 | try: |
|
2607 | try: | |
2610 | set = operationObj.getParameterValue(parameterName='set') |
|
2608 | set = operationObj.getParameterValue(parameterName='set') | |
2611 | except: |
|
2609 | except: | |
2612 | pass |
|
2610 | pass | |
2613 |
|
2611 | |||
2614 | expLabel = '' |
|
2612 | expLabel = '' | |
2615 | try: |
|
2613 | try: | |
2616 | expLabel = operationObj.getParameterValue(parameterName='expLabel') |
|
2614 | expLabel = operationObj.getParameterValue(parameterName='expLabel') | |
2617 | except: |
|
2615 | except: | |
2618 | pass |
|
2616 | pass | |
2619 |
|
2617 | |||
2620 | ippKm = '' |
|
2618 | ippKm = '' | |
2621 | if datatype.lower() == 'usrp': |
|
2619 | if datatype.lower() == 'usrp': | |
2622 | try: |
|
2620 | try: | |
2623 | ippKm = operationObj.getParameterValue(parameterName='ippKm') |
|
2621 | ippKm = operationObj.getParameterValue(parameterName='ippKm') | |
2624 | except: |
|
2622 | except: | |
2625 | pass |
|
2623 | pass | |
2626 |
|
2624 | |||
2627 | projectParms = ProjectParms() |
|
2625 | projectParms = ProjectParms() | |
2628 |
|
2626 | |||
2629 | projectParms.name = project_name |
|
2627 | projectParms.name = project_name | |
2630 | projectParms.description = description |
|
2628 | projectParms.description = description | |
2631 | projectParms.datatype = datatype |
|
2629 | projectParms.datatype = datatype | |
2632 | projectParms.ext = None |
|
2630 | projectParms.ext = None | |
2633 | projectParms.dpath = dpath |
|
2631 | projectParms.dpath = dpath | |
2634 | projectParms.online = online |
|
2632 | projectParms.online = online | |
2635 | projectParms.startDate = startDate |
|
2633 | projectParms.startDate = startDate | |
2636 | projectParms.endDate = endDate |
|
2634 | projectParms.endDate = endDate | |
2637 | projectParms.startTime = startTime |
|
2635 | projectParms.startTime = startTime | |
2638 | projectParms.endTime = endTime |
|
2636 | projectParms.endTime = endTime | |
2639 | projectParms.delay=delay |
|
2637 | projectParms.delay=delay | |
2640 | projectParms.walk=walk |
|
2638 | projectParms.walk=walk | |
2641 | projectParms.set=set |
|
2639 | projectParms.set=set | |
2642 | projectParms.ippKm=ippKm |
|
2640 | projectParms.ippKm=ippKm | |
2643 | projectParms.expLabel = expLabel |
|
2641 | projectParms.expLabel = expLabel | |
2644 | projectParms.parmsOk=parms_ok |
|
2642 | projectParms.parmsOk=parms_ok | |
2645 |
|
2643 | |||
2646 | return projectParms |
|
2644 | return projectParms | |
2647 |
|
2645 | |||
2648 | def refreshProjectWindow(self, projectObjView): |
|
2646 | def refreshProjectWindow(self, projectObjView): | |
2649 |
|
2647 | |||
2650 | projectParms = self.__getParmsFromProjectObj(projectObjView) |
|
2648 | projectParms = self.__getParmsFromProjectObj(projectObjView) | |
2651 |
|
2649 | |||
2652 | index = projectParms.getDatatypeIndex() |
|
2650 | index = projectParms.getDatatypeIndex() | |
2653 |
|
2651 | |||
2654 | self.proName.setText(projectParms.name) |
|
2652 | self.proName.setText(projectParms.name) | |
2655 | self.proDescription.clear() |
|
2653 | self.proDescription.clear() | |
2656 | self.proDescription.append(projectParms.description) |
|
2654 | self.proDescription.append(projectParms.description) | |
2657 |
|
2655 | |||
2658 | self.on_proComDataType_activated(index=index) |
|
2656 | self.on_proComDataType_activated(index=index) | |
2659 | self.proDataPath.setText(projectParms.dpath) |
|
2657 | self.proDataPath.setText(projectParms.dpath) | |
2660 | self.proComDataType.setCurrentIndex(index) |
|
2658 | self.proComDataType.setCurrentIndex(index) | |
2661 | self.proComReadMode.setCurrentIndex(projectParms.online) |
|
2659 | self.proComReadMode.setCurrentIndex(projectParms.online) | |
2662 | self.proDelay.setText(str(projectParms.delay)) |
|
2660 | self.proDelay.setText(str(projectParms.delay)) | |
2663 | self.proSet.setText(str(projectParms.set)) |
|
2661 | self.proSet.setText(str(projectParms.set)) | |
2664 | self.proIPPKm.setText(str(projectParms.ippKm)) |
|
2662 | self.proIPPKm.setText(str(projectParms.ippKm)) | |
2665 | self.proComWalk.setCurrentIndex(projectParms.walk) |
|
2663 | self.proComWalk.setCurrentIndex(projectParms.walk) | |
2666 | self.proExpLabel.setText(str(projectParms.expLabel).strip()) |
|
2664 | self.proExpLabel.setText(str(projectParms.expLabel).strip()) | |
2667 |
|
2665 | |||
2668 | dateList = self.loadDays(data_path = projectParms.dpath, |
|
2666 | dateList = self.loadDays(data_path = projectParms.dpath, | |
2669 | ext = projectParms.getExt(), |
|
2667 | ext = projectParms.getExt(), | |
2670 | walk = projectParms.walk, |
|
2668 | walk = projectParms.walk, | |
2671 | expLabel = projectParms.expLabel) |
|
2669 | expLabel = projectParms.expLabel) | |
2672 |
|
2670 | |||
2673 | try: |
|
2671 | try: | |
2674 | startDateIndex = dateList.index(projectParms.startDate) |
|
2672 | startDateIndex = dateList.index(projectParms.startDate) | |
2675 | except: |
|
2673 | except: | |
2676 | startDateIndex = 0 |
|
2674 | startDateIndex = 0 | |
2677 |
|
2675 | |||
2678 | try: |
|
2676 | try: | |
2679 | endDateIndex = dateList.index(projectParms.endDate) |
|
2677 | endDateIndex = dateList.index(projectParms.endDate) | |
2680 | except: |
|
2678 | except: | |
2681 | endDateIndex = int(self.proComEndDate.count()-1) |
|
2679 | endDateIndex = int(self.proComEndDate.count()-1) | |
2682 |
|
2680 | |||
2683 | self.proComStartDate.setCurrentIndex(startDateIndex) |
|
2681 | self.proComStartDate.setCurrentIndex(startDateIndex) | |
2684 | self.proComEndDate.setCurrentIndex(endDateIndex) |
|
2682 | self.proComEndDate.setCurrentIndex(endDateIndex) | |
2685 |
|
2683 | |||
2686 | startlist = projectParms.startTime.split(":") |
|
2684 | startlist = projectParms.startTime.split(":") | |
2687 | endlist = projectParms.endTime.split(":") |
|
2685 | endlist = projectParms.endTime.split(":") | |
2688 |
|
2686 | |||
2689 | self.time.setHMS(int(startlist[0]), int(startlist[1]), int(startlist[2])) |
|
2687 | self.time.setHMS(int(startlist[0]), int(startlist[1]), int(startlist[2])) | |
2690 | self.proStartTime.setTime(self.time) |
|
2688 | self.proStartTime.setTime(self.time) | |
2691 |
|
2689 | |||
2692 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
2690 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) | |
2693 | self.proEndTime.setTime(self.time) |
|
2691 | self.proEndTime.setTime(self.time) | |
2694 |
|
2692 | |||
2695 |
|
2693 | |||
2696 | def __refreshVoltageWindow(self, puObj): |
|
2694 | def __refreshVoltageWindow(self, puObj): | |
2697 |
|
2695 | |||
2698 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2696 | opObj = puObj.getOperationObj(name='setRadarFrequency') | |
2699 | if opObj == None: |
|
2697 | if opObj == None: | |
2700 | self.volOpRadarfrequency.clear() |
|
2698 | self.volOpRadarfrequency.clear() | |
2701 | self.volOpCebRadarfrequency.setCheckState(0) |
|
2699 | self.volOpCebRadarfrequency.setCheckState(0) | |
2702 | else: |
|
2700 | else: | |
2703 | value = opObj.getParameterValue(parameterName='frequency') |
|
2701 | value = opObj.getParameterValue(parameterName='frequency') | |
2704 | value = str(float(value)/1e6) |
|
2702 | value = str(float(value)/1e6) | |
2705 | self.volOpRadarfrequency.setText(value) |
|
2703 | self.volOpRadarfrequency.setText(value) | |
2706 | self.volOpRadarfrequency.setEnabled(True) |
|
2704 | self.volOpRadarfrequency.setEnabled(True) | |
2707 | self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
2705 | self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) | |
2708 |
|
2706 | |||
2709 | opObj = puObj.getOperationObj(name="selectChannels") |
|
2707 | opObj = puObj.getOperationObj(name="selectChannels") | |
2710 |
|
2708 | |||
2711 | if opObj == None: |
|
2709 | if opObj == None: | |
2712 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") |
|
2710 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") | |
2713 |
|
2711 | |||
2714 | if opObj == None: |
|
2712 | if opObj == None: | |
2715 | self.volOpChannel.clear() |
|
2713 | self.volOpChannel.clear() | |
2716 | self.volOpCebChannels.setCheckState(0) |
|
2714 | self.volOpCebChannels.setCheckState(0) | |
2717 | else: |
|
2715 | else: | |
2718 | channelEnabled = False |
|
2716 | channelEnabled = False | |
2719 | try: |
|
2717 | try: | |
2720 | value = opObj.getParameterValue(parameterName='channelList') |
|
2718 | value = opObj.getParameterValue(parameterName='channelList') | |
2721 | value = str(value)[1:-1] |
|
2719 | value = str(value)[1:-1] | |
2722 | channelEnabled = True |
|
2720 | channelEnabled = True | |
2723 | channelMode = 0 |
|
2721 | channelMode = 0 | |
2724 | except: |
|
2722 | except: | |
2725 | pass |
|
2723 | pass | |
2726 | try: |
|
2724 | try: | |
2727 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
2725 | value = opObj.getParameterValue(parameterName='channelIndexList') | |
2728 | value = str(value)[1:-1] |
|
2726 | value = str(value)[1:-1] | |
2729 | channelEnabled = True |
|
2727 | channelEnabled = True | |
2730 | channelMode = 1 |
|
2728 | channelMode = 1 | |
2731 | except: |
|
2729 | except: | |
2732 | pass |
|
2730 | pass | |
2733 |
|
2731 | |||
2734 | if channelEnabled: |
|
2732 | if channelEnabled: | |
2735 | self.volOpChannel.setText(value) |
|
2733 | self.volOpChannel.setText(value) | |
2736 | self.volOpChannel.setEnabled(True) |
|
2734 | self.volOpChannel.setEnabled(True) | |
2737 | self.volOpCebChannels.setCheckState(QtCore.Qt.Checked) |
|
2735 | self.volOpCebChannels.setCheckState(QtCore.Qt.Checked) | |
2738 | self.volOpComChannels.setCurrentIndex(channelMode) |
|
2736 | self.volOpComChannels.setCurrentIndex(channelMode) | |
2739 |
|
2737 | |||
2740 | opObj = puObj.getOperationObj(name="selectHeights") |
|
2738 | opObj = puObj.getOperationObj(name="selectHeights") | |
2741 | if opObj == None: |
|
2739 | if opObj == None: | |
2742 | self.volOpHeights.clear() |
|
2740 | self.volOpHeights.clear() | |
2743 | self.volOpCebHeights.setCheckState(0) |
|
2741 | self.volOpCebHeights.setCheckState(0) | |
2744 | else: |
|
2742 | else: | |
2745 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
2743 | value1 = int(opObj.getParameterValue(parameterName='minHei')) | |
2746 | value1 = str(value1) |
|
2744 | value1 = str(value1) | |
2747 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
2745 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) | |
2748 | value2 = str(value2) |
|
2746 | value2 = str(value2) | |
2749 | value = value1 + "," + value2 |
|
2747 | value = value1 + "," + value2 | |
2750 | self.volOpHeights.setText(value) |
|
2748 | self.volOpHeights.setText(value) | |
2751 | self.volOpHeights.setEnabled(True) |
|
2749 | self.volOpHeights.setEnabled(True) | |
2752 | self.volOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
2750 | self.volOpCebHeights.setCheckState(QtCore.Qt.Checked) | |
2753 |
|
2751 | |||
2754 | opObj = puObj.getOperationObj(name="filterByHeights") |
|
2752 | opObj = puObj.getOperationObj(name="filterByHeights") | |
2755 | if opObj == None: |
|
2753 | if opObj == None: | |
2756 | self.volOpFilter.clear() |
|
2754 | self.volOpFilter.clear() | |
2757 | self.volOpCebFilter.setCheckState(0) |
|
2755 | self.volOpCebFilter.setCheckState(0) | |
2758 | else: |
|
2756 | else: | |
2759 | value = opObj.getParameterValue(parameterName='window') |
|
2757 | value = opObj.getParameterValue(parameterName='window') | |
2760 | value = str(value) |
|
2758 | value = str(value) | |
2761 | self.volOpFilter.setText(value) |
|
2759 | self.volOpFilter.setText(value) | |
2762 | self.volOpFilter.setEnabled(True) |
|
2760 | self.volOpFilter.setEnabled(True) | |
2763 | self.volOpCebFilter.setCheckState(QtCore.Qt.Checked) |
|
2761 | self.volOpCebFilter.setCheckState(QtCore.Qt.Checked) | |
2764 |
|
2762 | |||
2765 | opObj = puObj.getOperationObj(name="ProfileSelector") |
|
2763 | opObj = puObj.getOperationObj(name="ProfileSelector") | |
2766 | if opObj == None: |
|
2764 | if opObj == None: | |
2767 | self.volOpProfile.clear() |
|
2765 | self.volOpProfile.clear() | |
2768 | self.volOpCebProfile.setCheckState(0) |
|
2766 | self.volOpCebProfile.setCheckState(0) | |
2769 | else: |
|
2767 | else: | |
2770 | for parmObj in opObj.getParameterObjList(): |
|
2768 | for parmObj in opObj.getParameterObjList(): | |
2771 |
|
2769 | |||
2772 | if parmObj.name == "profileList": |
|
2770 | if parmObj.name == "profileList": | |
2773 | value = parmObj.getValue() |
|
2771 | value = parmObj.getValue() | |
2774 | value = str(value)[1:-1] |
|
2772 | value = str(value)[1:-1] | |
2775 | self.volOpProfile.setText(value) |
|
2773 | self.volOpProfile.setText(value) | |
2776 | self.volOpProfile.setEnabled(True) |
|
2774 | self.volOpProfile.setEnabled(True) | |
2777 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2775 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) | |
2778 | self.volOpComProfile.setCurrentIndex(0) |
|
2776 | self.volOpComProfile.setCurrentIndex(0) | |
2779 |
|
2777 | |||
2780 | if parmObj.name == "profileRangeList": |
|
2778 | if parmObj.name == "profileRangeList": | |
2781 | value = parmObj.getValue() |
|
2779 | value = parmObj.getValue() | |
2782 | value = str(value)[1:-1] |
|
2780 | value = str(value)[1:-1] | |
2783 | self.volOpProfile.setText(value) |
|
2781 | self.volOpProfile.setText(value) | |
2784 | self.volOpProfile.setEnabled(True) |
|
2782 | self.volOpProfile.setEnabled(True) | |
2785 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2783 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) | |
2786 | self.volOpComProfile.setCurrentIndex(1) |
|
2784 | self.volOpComProfile.setCurrentIndex(1) | |
2787 |
|
2785 | |||
2788 | if parmObj.name == "rangeList": |
|
2786 | if parmObj.name == "rangeList": | |
2789 | value = parmObj.getValue() |
|
2787 | value = parmObj.getValue() | |
2790 | value = str(value)[1:-1] |
|
2788 | value = str(value)[1:-1] | |
2791 | self.volOpProfile.setText(value) |
|
2789 | self.volOpProfile.setText(value) | |
2792 | self.volOpProfile.setEnabled(True) |
|
2790 | self.volOpProfile.setEnabled(True) | |
2793 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2791 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) | |
2794 | self.volOpComProfile.setCurrentIndex(2) |
|
2792 | self.volOpComProfile.setCurrentIndex(2) | |
2795 |
|
2793 | |||
2796 | opObj = puObj.getOperationObj(name="Decoder") |
|
2794 | opObj = puObj.getOperationObj(name="Decoder") | |
2797 | self.volOpCode.setText("") |
|
2795 | self.volOpCode.setText("") | |
2798 | if opObj == None: |
|
2796 | if opObj == None: | |
2799 | self.volOpCebDecodification.setCheckState(0) |
|
2797 | self.volOpCebDecodification.setCheckState(0) | |
2800 | else: |
|
2798 | else: | |
2801 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) |
|
2799 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) | |
2802 |
|
2800 | |||
2803 | parmObj = opObj.getParameterObj('code') |
|
2801 | parmObj = opObj.getParameterObj('code') | |
2804 |
|
2802 | |||
2805 | if parmObj == None: |
|
2803 | if parmObj == None: | |
2806 | self.volOpComCode.setCurrentIndex(0) |
|
2804 | self.volOpComCode.setCurrentIndex(0) | |
2807 | else: |
|
2805 | else: | |
2808 |
|
2806 | |||
2809 | parmObj1 = opObj.getParameterObj('nCode') |
|
2807 | parmObj1 = opObj.getParameterObj('nCode') | |
2810 | parmObj2 = opObj.getParameterObj('nBaud') |
|
2808 | parmObj2 = opObj.getParameterObj('nBaud') | |
2811 |
|
2809 | |||
2812 | if parmObj1 == None or parmObj2 == None: |
|
2810 | if parmObj1 == None or parmObj2 == None: | |
2813 | self.volOpComCode.setCurrentIndex(0) |
|
2811 | self.volOpComCode.setCurrentIndex(0) | |
2814 | else: |
|
2812 | else: | |
2815 | code = ast.literal_eval(str(parmObj.getValue())) |
|
2813 | code = ast.literal_eval(str(parmObj.getValue())) | |
2816 | nCode = parmObj1.getValue() |
|
2814 | nCode = parmObj1.getValue() | |
2817 | nBaud = parmObj2.getValue() |
|
2815 | nBaud = parmObj2.getValue() | |
2818 |
|
2816 | |||
2819 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() |
|
2817 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() | |
2820 |
|
2818 | |||
2821 | #User defined by default |
|
2819 | #User defined by default | |
2822 | self.volOpComCode.setCurrentIndex(13) |
|
2820 | self.volOpComCode.setCurrentIndex(13) | |
2823 | self.volOpCode.setText(str(code)) |
|
2821 | self.volOpCode.setText(str(code)) | |
2824 |
|
2822 | |||
2825 | if nCode == 1: |
|
2823 | if nCode == 1: | |
2826 | if nBaud == 3: |
|
2824 | if nBaud == 3: | |
2827 | self.volOpComCode.setCurrentIndex(1) |
|
2825 | self.volOpComCode.setCurrentIndex(1) | |
2828 | if nBaud == 4: |
|
2826 | if nBaud == 4: | |
2829 | self.volOpComCode.setCurrentIndex(2) |
|
2827 | self.volOpComCode.setCurrentIndex(2) | |
2830 | if nBaud == 5: |
|
2828 | if nBaud == 5: | |
2831 | self.volOpComCode.setCurrentIndex(3) |
|
2829 | self.volOpComCode.setCurrentIndex(3) | |
2832 | if nBaud == 7: |
|
2830 | if nBaud == 7: | |
2833 | self.volOpComCode.setCurrentIndex(4) |
|
2831 | self.volOpComCode.setCurrentIndex(4) | |
2834 | if nBaud == 11: |
|
2832 | if nBaud == 11: | |
2835 | self.volOpComCode.setCurrentIndex(5) |
|
2833 | self.volOpComCode.setCurrentIndex(5) | |
2836 | if nBaud == 13: |
|
2834 | if nBaud == 13: | |
2837 | self.volOpComCode.setCurrentIndex(6) |
|
2835 | self.volOpComCode.setCurrentIndex(6) | |
2838 |
|
2836 | |||
2839 | if nCode == 2: |
|
2837 | if nCode == 2: | |
2840 | if nBaud == 3: |
|
2838 | if nBaud == 3: | |
2841 | self.volOpComCode.setCurrentIndex(7) |
|
2839 | self.volOpComCode.setCurrentIndex(7) | |
2842 | if nBaud == 4: |
|
2840 | if nBaud == 4: | |
2843 | self.volOpComCode.setCurrentIndex(8) |
|
2841 | self.volOpComCode.setCurrentIndex(8) | |
2844 | if nBaud == 5: |
|
2842 | if nBaud == 5: | |
2845 | self.volOpComCode.setCurrentIndex(9) |
|
2843 | self.volOpComCode.setCurrentIndex(9) | |
2846 | if nBaud == 7: |
|
2844 | if nBaud == 7: | |
2847 | self.volOpComCode.setCurrentIndex(10) |
|
2845 | self.volOpComCode.setCurrentIndex(10) | |
2848 | if nBaud == 11: |
|
2846 | if nBaud == 11: | |
2849 | self.volOpComCode.setCurrentIndex(11) |
|
2847 | self.volOpComCode.setCurrentIndex(11) | |
2850 | if nBaud == 13: |
|
2848 | if nBaud == 13: | |
2851 | self.volOpComCode.setCurrentIndex(12) |
|
2849 | self.volOpComCode.setCurrentIndex(12) | |
2852 |
|
2850 | |||
2853 |
|
2851 | |||
2854 | opObj = puObj.getOperationObj(name="deFlip") |
|
2852 | opObj = puObj.getOperationObj(name="deFlip") | |
2855 | if opObj == None: |
|
2853 | if opObj == None: | |
2856 | self.volOpFlip.clear() |
|
2854 | self.volOpFlip.clear() | |
2857 | self.volOpFlip.setEnabled(False) |
|
2855 | self.volOpFlip.setEnabled(False) | |
2858 | self.volOpCebFlip.setCheckState(0) |
|
2856 | self.volOpCebFlip.setCheckState(0) | |
2859 | else: |
|
2857 | else: | |
2860 | try: |
|
2858 | try: | |
2861 | value = opObj.getParameterValue(parameterName='channelList') |
|
2859 | value = opObj.getParameterValue(parameterName='channelList') | |
2862 | value = str(value)[1:-1] |
|
2860 | value = str(value)[1:-1] | |
2863 | except: |
|
2861 | except: | |
2864 | value = "" |
|
2862 | value = "" | |
2865 |
|
2863 | |||
2866 | self.volOpFlip.setText(value) |
|
2864 | self.volOpFlip.setText(value) | |
2867 | self.volOpFlip.setEnabled(True) |
|
2865 | self.volOpFlip.setEnabled(True) | |
2868 | self.volOpCebFlip.setCheckState(QtCore.Qt.Checked) |
|
2866 | self.volOpCebFlip.setCheckState(QtCore.Qt.Checked) | |
2869 |
|
2867 | |||
2870 | opObj = puObj.getOperationObj(name="CohInt") |
|
2868 | opObj = puObj.getOperationObj(name="CohInt") | |
2871 | if opObj == None: |
|
2869 | if opObj == None: | |
2872 | self.volOpCohInt.clear() |
|
2870 | self.volOpCohInt.clear() | |
2873 | self.volOpCebCohInt.setCheckState(0) |
|
2871 | self.volOpCebCohInt.setCheckState(0) | |
2874 | else: |
|
2872 | else: | |
2875 | value = opObj.getParameterValue(parameterName='n') |
|
2873 | value = opObj.getParameterValue(parameterName='n') | |
2876 | self.volOpCohInt.setText(str(value)) |
|
2874 | self.volOpCohInt.setText(str(value)) | |
2877 | self.volOpCohInt.setEnabled(True) |
|
2875 | self.volOpCohInt.setEnabled(True) | |
2878 | self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked) |
|
2876 | self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked) | |
2879 |
|
2877 | |||
2880 | opObj = puObj.getOperationObj(name='Scope') |
|
2878 | opObj = puObj.getOperationObj(name='Scope') | |
2881 | if opObj == None: |
|
2879 | if opObj == None: | |
2882 | self.volGraphCebshow.setCheckState(0) |
|
2880 | self.volGraphCebshow.setCheckState(0) | |
2883 | else: |
|
2881 | else: | |
2884 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) |
|
2882 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) | |
2885 |
|
2883 | |||
2886 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
2884 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
2887 |
|
2885 | |||
2888 | if parmObj == None: |
|
2886 | if parmObj == None: | |
2889 | self.volGraphChannelList.clear() |
|
2887 | self.volGraphChannelList.clear() | |
2890 | else: |
|
2888 | else: | |
2891 | value = parmObj.getValue() |
|
2889 | value = parmObj.getValue() | |
2892 | value = str(value) |
|
2890 | value = str(value) | |
2893 | self.volGraphChannelList.setText(value) |
|
2891 | self.volGraphChannelList.setText(value) | |
2894 | self.volOpProfile.setEnabled(True) |
|
2892 | self.volOpProfile.setEnabled(True) | |
2895 |
|
2893 | |||
2896 | parmObj1 = opObj.getParameterObj(parameterName='xmin') |
|
2894 | parmObj1 = opObj.getParameterObj(parameterName='xmin') | |
2897 | parmObj2 = opObj.getParameterObj(parameterName='xmax') |
|
2895 | parmObj2 = opObj.getParameterObj(parameterName='xmax') | |
2898 |
|
2896 | |||
2899 | if parmObj1 == None or parmObj2 ==None: |
|
2897 | if parmObj1 == None or parmObj2 ==None: | |
2900 | self.volGraphfreqrange.clear() |
|
2898 | self.volGraphfreqrange.clear() | |
2901 | else: |
|
2899 | else: | |
2902 | value1 = parmObj1.getValue() |
|
2900 | value1 = parmObj1.getValue() | |
2903 | value1 = str(value1) |
|
2901 | value1 = str(value1) | |
2904 | value2 = parmObj2.getValue() |
|
2902 | value2 = parmObj2.getValue() | |
2905 | value2 = str(value2) |
|
2903 | value2 = str(value2) | |
2906 | value = value1 + "," + value2 |
|
2904 | value = value1 + "," + value2 | |
2907 | self.volGraphfreqrange.setText(value) |
|
2905 | self.volGraphfreqrange.setText(value) | |
2908 |
|
2906 | |||
2909 | parmObj1 = opObj.getParameterObj(parameterName='ymin') |
|
2907 | parmObj1 = opObj.getParameterObj(parameterName='ymin') | |
2910 | parmObj2 = opObj.getParameterObj(parameterName='ymax') |
|
2908 | parmObj2 = opObj.getParameterObj(parameterName='ymax') | |
2911 |
|
2909 | |||
2912 | if parmObj1 == None or parmObj2 ==None: |
|
2910 | if parmObj1 == None or parmObj2 ==None: | |
2913 | self.volGraphHeightrange.clear() |
|
2911 | self.volGraphHeightrange.clear() | |
2914 | else: |
|
2912 | else: | |
2915 | value1 = parmObj1.getValue() |
|
2913 | value1 = parmObj1.getValue() | |
2916 | value1 = str(value1) |
|
2914 | value1 = str(value1) | |
2917 | value2 = parmObj2.getValue() |
|
2915 | value2 = parmObj2.getValue() | |
2918 | value2 = str(value2) |
|
2916 | value2 = str(value2) | |
2919 | value = value1 + "," + value2 |
|
2917 | value = value1 + "," + value2 | |
2920 | value2 = str(value2) |
|
2918 | value2 = str(value2) | |
2921 | self.volGraphHeightrange.setText(value) |
|
2919 | self.volGraphHeightrange.setText(value) | |
2922 |
|
2920 | |||
2923 | parmObj = opObj.getParameterObj(parameterName='save') |
|
2921 | parmObj = opObj.getParameterObj(parameterName='save') | |
2924 |
|
2922 | |||
2925 | if parmObj == None: |
|
2923 | if parmObj == None: | |
2926 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
2924 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) | |
2927 | else: |
|
2925 | else: | |
2928 | value = parmObj.getValue() |
|
2926 | value = parmObj.getValue() | |
2929 | if int(value): |
|
2927 | if int(value): | |
2930 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) |
|
2928 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) | |
2931 | else: |
|
2929 | else: | |
2932 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
2930 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) | |
2933 |
|
2931 | |||
2934 | parmObj = opObj.getParameterObj(parameterName='figpath') |
|
2932 | parmObj = opObj.getParameterObj(parameterName='figpath') | |
2935 | if parmObj == None: |
|
2933 | if parmObj == None: | |
2936 | self.volGraphPath.clear() |
|
2934 | self.volGraphPath.clear() | |
2937 | else: |
|
2935 | else: | |
2938 | value = parmObj.getValue() |
|
2936 | value = parmObj.getValue() | |
2939 | path = str(value) |
|
2937 | path = str(value) | |
2940 | self.volGraphPath.setText(path) |
|
2938 | self.volGraphPath.setText(path) | |
2941 |
|
2939 | |||
2942 | parmObj = opObj.getParameterObj(parameterName='figfile') |
|
2940 | parmObj = opObj.getParameterObj(parameterName='figfile') | |
2943 | if parmObj == None: |
|
2941 | if parmObj == None: | |
2944 | self.volGraphPrefix.clear() |
|
2942 | self.volGraphPrefix.clear() | |
2945 | else: |
|
2943 | else: | |
2946 | value = parmObj.getValue() |
|
2944 | value = parmObj.getValue() | |
2947 | figfile = str(value) |
|
2945 | figfile = str(value) | |
2948 | self.volGraphPrefix.setText(figfile) |
|
2946 | self.volGraphPrefix.setText(figfile) | |
2949 |
|
2947 | |||
2950 | # outputVoltageWrite |
|
2948 | # outputVoltageWrite | |
2951 | opObj = puObj.getOperationObj(name='VoltageWriter') |
|
2949 | opObj = puObj.getOperationObj(name='VoltageWriter') | |
2952 |
|
2950 | |||
2953 | if opObj == None: |
|
2951 | if opObj == None: | |
2954 | self.volOutputPath.clear() |
|
2952 | self.volOutputPath.clear() | |
2955 | self.volOutputblocksperfile.clear() |
|
2953 | self.volOutputblocksperfile.clear() | |
2956 | self.volOutputprofilesperblock.clear() |
|
2954 | self.volOutputprofilesperblock.clear() | |
2957 | else: |
|
2955 | else: | |
2958 | parmObj = opObj.getParameterObj(parameterName='path') |
|
2956 | parmObj = opObj.getParameterObj(parameterName='path') | |
2959 | if parmObj == None: |
|
2957 | if parmObj == None: | |
2960 | self.volOutputPath.clear() |
|
2958 | self.volOutputPath.clear() | |
2961 | else: |
|
2959 | else: | |
2962 | value = parmObj.getValue() |
|
2960 | value = parmObj.getValue() | |
2963 | path = str(value) |
|
2961 | path = str(value) | |
2964 | self.volOutputPath.setText(path) |
|
2962 | self.volOutputPath.setText(path) | |
2965 |
|
2963 | |||
2966 | parmObj = opObj.getParameterObj(parameterName='blocksPerFile') |
|
2964 | parmObj = opObj.getParameterObj(parameterName='blocksPerFile') | |
2967 | if parmObj == None: |
|
2965 | if parmObj == None: | |
2968 | self.volOutputblocksperfile.clear() |
|
2966 | self.volOutputblocksperfile.clear() | |
2969 | else: |
|
2967 | else: | |
2970 | value = parmObj.getValue() |
|
2968 | value = parmObj.getValue() | |
2971 | blocksperfile = str(value) |
|
2969 | blocksperfile = str(value) | |
2972 | self.volOutputblocksperfile.setText(blocksperfile) |
|
2970 | self.volOutputblocksperfile.setText(blocksperfile) | |
2973 |
|
2971 | |||
2974 | parmObj = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
2972 | parmObj = opObj.getParameterObj(parameterName='profilesPerBlock') | |
2975 | if parmObj == None: |
|
2973 | if parmObj == None: | |
2976 | self.volOutputprofilesperblock.clear() |
|
2974 | self.volOutputprofilesperblock.clear() | |
2977 | else: |
|
2975 | else: | |
2978 | value = parmObj.getValue() |
|
2976 | value = parmObj.getValue() | |
2979 | profilesPerBlock = str(value) |
|
2977 | profilesPerBlock = str(value) | |
2980 | self.volOutputprofilesperblock.setText(profilesPerBlock) |
|
2978 | self.volOutputprofilesperblock.setText(profilesPerBlock) | |
2981 |
|
2979 | |||
2982 | return |
|
2980 | return | |
2983 |
|
2981 | |||
2984 | def __refreshSpectraWindow(self, puObj): |
|
2982 | def __refreshSpectraWindow(self, puObj): | |
2985 |
|
2983 | |||
2986 | inputId = puObj.getInputId() |
|
2984 | inputId = puObj.getInputId() | |
2987 | inputPUObj = self.__puObjDict[inputId] |
|
2985 | inputPUObj = self.__puObjDict[inputId] | |
2988 |
|
2986 | |||
2989 | if inputPUObj.datatype == 'Voltage': |
|
2987 | if inputPUObj.datatype == 'Voltage': | |
2990 | self.specOpnFFTpoints.setEnabled(True) |
|
2988 | self.specOpnFFTpoints.setEnabled(True) | |
2991 | self.specOpProfiles.setEnabled(True) |
|
2989 | self.specOpProfiles.setEnabled(True) | |
2992 | self.specOpippFactor.setEnabled(True) |
|
2990 | self.specOpippFactor.setEnabled(True) | |
2993 | else: |
|
2991 | else: | |
2994 | self.specOpnFFTpoints.setEnabled(False) |
|
2992 | self.specOpnFFTpoints.setEnabled(False) | |
2995 | self.specOpProfiles.setEnabled(False) |
|
2993 | self.specOpProfiles.setEnabled(False) | |
2996 | self.specOpippFactor.setEnabled(False) |
|
2994 | self.specOpippFactor.setEnabled(False) | |
2997 |
|
2995 | |||
2998 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2996 | opObj = puObj.getOperationObj(name='setRadarFrequency') | |
2999 | if opObj == None: |
|
2997 | if opObj == None: | |
3000 | self.specOpRadarfrequency.clear() |
|
2998 | self.specOpRadarfrequency.clear() | |
3001 | self.specOpCebRadarfrequency.setCheckState(0) |
|
2999 | self.specOpCebRadarfrequency.setCheckState(0) | |
3002 | else: |
|
3000 | else: | |
3003 | value = opObj.getParameterValue(parameterName='frequency') |
|
3001 | value = opObj.getParameterValue(parameterName='frequency') | |
3004 | value = str(float(value)/1e6) |
|
3002 | value = str(float(value)/1e6) | |
3005 | self.specOpRadarfrequency.setText(value) |
|
3003 | self.specOpRadarfrequency.setText(value) | |
3006 | self.specOpRadarfrequency.setEnabled(True) |
|
3004 | self.specOpRadarfrequency.setEnabled(True) | |
3007 | self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
3005 | self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) | |
3008 |
|
3006 | |||
3009 | opObj = puObj.getOperationObj(name="run") |
|
3007 | opObj = puObj.getOperationObj(name="run") | |
3010 | if opObj == None: |
|
3008 | if opObj == None: | |
3011 | self.specOpnFFTpoints.clear() |
|
3009 | self.specOpnFFTpoints.clear() | |
3012 | self.specOpProfiles.clear() |
|
3010 | self.specOpProfiles.clear() | |
3013 | self.specOpippFactor.clear() |
|
3011 | self.specOpippFactor.clear() | |
3014 | else: |
|
3012 | else: | |
3015 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
3013 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') | |
3016 | if parmObj == None: |
|
3014 | if parmObj == None: | |
3017 | self.specOpnFFTpoints.clear() |
|
3015 | self.specOpnFFTpoints.clear() | |
3018 | else: |
|
3016 | else: | |
3019 | self.specOpnFFTpoints.setEnabled(True) |
|
3017 | self.specOpnFFTpoints.setEnabled(True) | |
3020 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
3018 | value = opObj.getParameterValue(parameterName='nFFTPoints') | |
3021 | self.specOpnFFTpoints.setText(str(value)) |
|
3019 | self.specOpnFFTpoints.setText(str(value)) | |
3022 |
|
3020 | |||
3023 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
3021 | parmObj = opObj.getParameterObj(parameterName='nProfiles') | |
3024 | if parmObj == None: |
|
3022 | if parmObj == None: | |
3025 | self.specOpProfiles.clear() |
|
3023 | self.specOpProfiles.clear() | |
3026 | else: |
|
3024 | else: | |
3027 | self.specOpProfiles.setEnabled(True) |
|
3025 | self.specOpProfiles.setEnabled(True) | |
3028 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
3026 | value = opObj.getParameterValue(parameterName='nProfiles') | |
3029 | self.specOpProfiles.setText(str(value)) |
|
3027 | self.specOpProfiles.setText(str(value)) | |
3030 |
|
3028 | |||
3031 | parmObj = opObj.getParameterObj(parameterName='ippFactor') |
|
3029 | parmObj = opObj.getParameterObj(parameterName='ippFactor') | |
3032 | if parmObj == None: |
|
3030 | if parmObj == None: | |
3033 | self.specOpippFactor.clear() |
|
3031 | self.specOpippFactor.clear() | |
3034 | else: |
|
3032 | else: | |
3035 | self.specOpippFactor.setEnabled(True) |
|
3033 | self.specOpippFactor.setEnabled(True) | |
3036 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
3034 | value = opObj.getParameterValue(parameterName='ippFactor') | |
3037 | self.specOpippFactor.setText(str(value)) |
|
3035 | self.specOpippFactor.setText(str(value)) | |
3038 |
|
3036 | |||
3039 | opObj = puObj.getOperationObj(name="run") |
|
3037 | opObj = puObj.getOperationObj(name="run") | |
3040 | if opObj == None: |
|
3038 | if opObj == None: | |
3041 | self.specOppairsList.clear() |
|
3039 | self.specOppairsList.clear() | |
3042 | self.specOpCebCrossSpectra.setCheckState(0) |
|
3040 | self.specOpCebCrossSpectra.setCheckState(0) | |
3043 | else: |
|
3041 | else: | |
3044 | parmObj = opObj.getParameterObj(parameterName='pairsList') |
|
3042 | parmObj = opObj.getParameterObj(parameterName='pairsList') | |
3045 | if parmObj == None: |
|
3043 | if parmObj == None: | |
3046 | self.specOppairsList.clear() |
|
3044 | self.specOppairsList.clear() | |
3047 | self.specOpCebCrossSpectra.setCheckState(0) |
|
3045 | self.specOpCebCrossSpectra.setCheckState(0) | |
3048 | else: |
|
3046 | else: | |
3049 | value = opObj.getParameterValue(parameterName='pairsList') |
|
3047 | value = opObj.getParameterValue(parameterName='pairsList') | |
3050 | value = str(value)[1:-1] |
|
3048 | value = str(value)[1:-1] | |
3051 | self.specOppairsList.setText(str(value)) |
|
3049 | self.specOppairsList.setText(str(value)) | |
3052 | self.specOppairsList.setEnabled(True) |
|
3050 | self.specOppairsList.setEnabled(True) | |
3053 | self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked) |
|
3051 | self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked) | |
3054 |
|
3052 | |||
3055 | opObj = puObj.getOperationObj(name="selectChannels") |
|
3053 | opObj = puObj.getOperationObj(name="selectChannels") | |
3056 |
|
3054 | |||
3057 | if opObj == None: |
|
3055 | if opObj == None: | |
3058 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") |
|
3056 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") | |
3059 |
|
3057 | |||
3060 | if opObj == None: |
|
3058 | if opObj == None: | |
3061 | self.specOpChannel.clear() |
|
3059 | self.specOpChannel.clear() | |
3062 | self.specOpCebChannel.setCheckState(0) |
|
3060 | self.specOpCebChannel.setCheckState(0) | |
3063 | else: |
|
3061 | else: | |
3064 | channelEnabled = False |
|
3062 | channelEnabled = False | |
3065 | try: |
|
3063 | try: | |
3066 | value = opObj.getParameterValue(parameterName='channelList') |
|
3064 | value = opObj.getParameterValue(parameterName='channelList') | |
3067 | value = str(value)[1:-1] |
|
3065 | value = str(value)[1:-1] | |
3068 | channelEnabled = True |
|
3066 | channelEnabled = True | |
3069 | channelMode = 0 |
|
3067 | channelMode = 0 | |
3070 | except: |
|
3068 | except: | |
3071 | pass |
|
3069 | pass | |
3072 | try: |
|
3070 | try: | |
3073 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
3071 | value = opObj.getParameterValue(parameterName='channelIndexList') | |
3074 | value = str(value)[1:-1] |
|
3072 | value = str(value)[1:-1] | |
3075 | channelEnabled = True |
|
3073 | channelEnabled = True | |
3076 | channelMode = 1 |
|
3074 | channelMode = 1 | |
3077 | except: |
|
3075 | except: | |
3078 | pass |
|
3076 | pass | |
3079 |
|
3077 | |||
3080 | if channelEnabled: |
|
3078 | if channelEnabled: | |
3081 | self.specOpChannel.setText(value) |
|
3079 | self.specOpChannel.setText(value) | |
3082 | self.specOpChannel.setEnabled(True) |
|
3080 | self.specOpChannel.setEnabled(True) | |
3083 | self.specOpCebChannel.setCheckState(QtCore.Qt.Checked) |
|
3081 | self.specOpCebChannel.setCheckState(QtCore.Qt.Checked) | |
3084 | self.specOpComChannel.setCurrentIndex(channelMode) |
|
3082 | self.specOpComChannel.setCurrentIndex(channelMode) | |
3085 |
|
3083 | |||
3086 | opObj = puObj.getOperationObj(name="selectHeights") |
|
3084 | opObj = puObj.getOperationObj(name="selectHeights") | |
3087 | if opObj == None: |
|
3085 | if opObj == None: | |
3088 | self.specOpHeights.clear() |
|
3086 | self.specOpHeights.clear() | |
3089 | self.specOpCebHeights.setCheckState(0) |
|
3087 | self.specOpCebHeights.setCheckState(0) | |
3090 | else: |
|
3088 | else: | |
3091 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
3089 | value1 = int(opObj.getParameterValue(parameterName='minHei')) | |
3092 | value1 = str(value1) |
|
3090 | value1 = str(value1) | |
3093 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
3091 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) | |
3094 | value2 = str(value2) |
|
3092 | value2 = str(value2) | |
3095 | value = value1 + "," + value2 |
|
3093 | value = value1 + "," + value2 | |
3096 | self.specOpHeights.setText(value) |
|
3094 | self.specOpHeights.setText(value) | |
3097 | self.specOpHeights.setEnabled(True) |
|
3095 | self.specOpHeights.setEnabled(True) | |
3098 | self.specOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
3096 | self.specOpCebHeights.setCheckState(QtCore.Qt.Checked) | |
3099 |
|
3097 | |||
3100 | opObj = puObj.getOperationObj(name="IncohInt") |
|
3098 | opObj = puObj.getOperationObj(name="IncohInt") | |
3101 | if opObj == None: |
|
3099 | if opObj == None: | |
3102 | self.specOpIncoherent.clear() |
|
3100 | self.specOpIncoherent.clear() | |
3103 | self.specOpCebIncoherent.setCheckState(0) |
|
3101 | self.specOpCebIncoherent.setCheckState(0) | |
3104 | else: |
|
3102 | else: | |
3105 | for parmObj in opObj.getParameterObjList(): |
|
3103 | for parmObj in opObj.getParameterObjList(): | |
3106 | if parmObj.name == 'timeInterval': |
|
3104 | if parmObj.name == 'timeInterval': | |
3107 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
3105 | value = opObj.getParameterValue(parameterName='timeInterval') | |
3108 | value = float(value) |
|
3106 | value = float(value) | |
3109 | self.specOpIncoherent.setText(str(value)) |
|
3107 | self.specOpIncoherent.setText(str(value)) | |
3110 | self.specOpIncoherent.setEnabled(True) |
|
3108 | self.specOpIncoherent.setEnabled(True) | |
3111 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3109 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) | |
3112 | self.specOpCobIncInt.setCurrentIndex(0) |
|
3110 | self.specOpCobIncInt.setCurrentIndex(0) | |
3113 |
|
3111 | |||
3114 | if parmObj.name == 'n': |
|
3112 | if parmObj.name == 'n': | |
3115 | value = opObj.getParameterValue(parameterName='n') |
|
3113 | value = opObj.getParameterValue(parameterName='n') | |
3116 | value = float(value) |
|
3114 | value = float(value) | |
3117 | self.specOpIncoherent.setText(str(value)) |
|
3115 | self.specOpIncoherent.setText(str(value)) | |
3118 | self.specOpIncoherent.setEnabled(True) |
|
3116 | self.specOpIncoherent.setEnabled(True) | |
3119 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3117 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) | |
3120 | self.specOpCobIncInt.setCurrentIndex(1) |
|
3118 | self.specOpCobIncInt.setCurrentIndex(1) | |
3121 |
|
3119 | |||
3122 | opObj = puObj.getOperationObj(name="removeDC") |
|
3120 | opObj = puObj.getOperationObj(name="removeDC") | |
3123 | if opObj == None: |
|
3121 | if opObj == None: | |
3124 | self.specOpCebRemoveDC.setCheckState(0) |
|
3122 | self.specOpCebRemoveDC.setCheckState(0) | |
3125 | else: |
|
3123 | else: | |
3126 | self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked) |
|
3124 | self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked) | |
3127 | value = opObj.getParameterValue(parameterName='mode') |
|
3125 | value = opObj.getParameterValue(parameterName='mode') | |
3128 | if value == 1: |
|
3126 | if value == 1: | |
3129 | self.specOpComRemoveDC.setCurrentIndex(0) |
|
3127 | self.specOpComRemoveDC.setCurrentIndex(0) | |
3130 | elif value == 2: |
|
3128 | elif value == 2: | |
3131 | self.specOpComRemoveDC.setCurrentIndex(1) |
|
3129 | self.specOpComRemoveDC.setCurrentIndex(1) | |
3132 |
|
3130 | |||
3133 | opObj = puObj.getOperationObj(name="removeInterference") |
|
3131 | opObj = puObj.getOperationObj(name="removeInterference") | |
3134 | if opObj == None: |
|
3132 | if opObj == None: | |
3135 | self.specOpCebRemoveInt.setCheckState(0) |
|
3133 | self.specOpCebRemoveInt.setCheckState(0) | |
3136 | else: |
|
3134 | else: | |
3137 | self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked) |
|
3135 | self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked) | |
3138 |
|
3136 | |||
3139 | opObj = puObj.getOperationObj(name='getNoise') |
|
3137 | opObj = puObj.getOperationObj(name='getNoise') | |
3140 | if opObj == None: |
|
3138 | if opObj == None: | |
3141 | self.specOpCebgetNoise.setCheckState(0) |
|
3139 | self.specOpCebgetNoise.setCheckState(0) | |
3142 | self.specOpgetNoise.clear() |
|
3140 | self.specOpgetNoise.clear() | |
3143 | else: |
|
3141 | else: | |
3144 | self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked) |
|
3142 | self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked) | |
3145 | parmObj = opObj.getParameterObj(parameterName='minHei') |
|
3143 | parmObj = opObj.getParameterObj(parameterName='minHei') | |
3146 | if parmObj == None: |
|
3144 | if parmObj == None: | |
3147 | self.specOpgetNoise.clear() |
|
3145 | self.specOpgetNoise.clear() | |
3148 | value1 = None |
|
3146 | value1 = None | |
3149 | else: |
|
3147 | else: | |
3150 | value1 = opObj.getParameterValue(parameterName='minHei') |
|
3148 | value1 = opObj.getParameterValue(parameterName='minHei') | |
3151 | value1 = str(value1) |
|
3149 | value1 = str(value1) | |
3152 | parmObj = opObj.getParameterObj(parameterName='maxHei') |
|
3150 | parmObj = opObj.getParameterObj(parameterName='maxHei') | |
3153 | if parmObj == None: |
|
3151 | if parmObj == None: | |
3154 | value2 = None |
|
3152 | value2 = None | |
3155 | value = value1 |
|
3153 | value = value1 | |
3156 | self.specOpgetNoise.setText(value) |
|
3154 | self.specOpgetNoise.setText(value) | |
3157 | self.specOpgetNoise.setEnabled(True) |
|
3155 | self.specOpgetNoise.setEnabled(True) | |
3158 | else: |
|
3156 | else: | |
3159 | value2 = opObj.getParameterValue(parameterName='maxHei') |
|
3157 | value2 = opObj.getParameterValue(parameterName='maxHei') | |
3160 | value2 = str(value2) |
|
3158 | value2 = str(value2) | |
3161 | parmObj = opObj.getParameterObj(parameterName='minVel') |
|
3159 | parmObj = opObj.getParameterObj(parameterName='minVel') | |
3162 | if parmObj == None: |
|
3160 | if parmObj == None: | |
3163 | value3 = None |
|
3161 | value3 = None | |
3164 | value = value1 + "," + value2 |
|
3162 | value = value1 + "," + value2 | |
3165 | self.specOpgetNoise.setText(value) |
|
3163 | self.specOpgetNoise.setText(value) | |
3166 | self.specOpgetNoise.setEnabled(True) |
|
3164 | self.specOpgetNoise.setEnabled(True) | |
3167 | else: |
|
3165 | else: | |
3168 | value3 = opObj.getParameterValue(parameterName='minVel') |
|
3166 | value3 = opObj.getParameterValue(parameterName='minVel') | |
3169 | value3 = str(value3) |
|
3167 | value3 = str(value3) | |
3170 | parmObj = opObj.getParameterObj(parameterName='maxVel') |
|
3168 | parmObj = opObj.getParameterObj(parameterName='maxVel') | |
3171 | if parmObj == None: |
|
3169 | if parmObj == None: | |
3172 | value4 = None |
|
3170 | value4 = None | |
3173 | value = value1 + "," + value2 + "," + value3 |
|
3171 | value = value1 + "," + value2 + "," + value3 | |
3174 | self.specOpgetNoise.setText(value) |
|
3172 | self.specOpgetNoise.setText(value) | |
3175 | self.specOpgetNoise.setEnabled(True) |
|
3173 | self.specOpgetNoise.setEnabled(True) | |
3176 | else: |
|
3174 | else: | |
3177 | value4 = opObj.getParameterValue(parameterName='maxVel') |
|
3175 | value4 = opObj.getParameterValue(parameterName='maxVel') | |
3178 | value4 = str(value4) |
|
3176 | value4 = str(value4) | |
3179 | value = value1 + "," + value2 + "," + value3 + ',' + value4 |
|
3177 | value = value1 + "," + value2 + "," + value3 + ',' + value4 | |
3180 | self.specOpgetNoise.setText(value) |
|
3178 | self.specOpgetNoise.setText(value) | |
3181 | self.specOpgetNoise.setEnabled(True) |
|
3179 | self.specOpgetNoise.setEnabled(True) | |
3182 |
|
3180 | |||
3183 | self.specGraphPath.clear() |
|
3181 | self.specGraphPath.clear() | |
3184 | self.specGraphPrefix.clear() |
|
3182 | self.specGraphPrefix.clear() | |
3185 | self.specGgraphFreq.clear() |
|
3183 | self.specGgraphFreq.clear() | |
3186 | self.specGgraphHeight.clear() |
|
3184 | self.specGgraphHeight.clear() | |
3187 | self.specGgraphDbsrange.clear() |
|
3185 | self.specGgraphDbsrange.clear() | |
3188 | self.specGgraphmagnitud.clear() |
|
3186 | self.specGgraphmagnitud.clear() | |
3189 | self.specGgraphPhase.clear() |
|
3187 | self.specGgraphPhase.clear() | |
3190 | self.specGgraphChannelList.clear() |
|
3188 | self.specGgraphChannelList.clear() | |
3191 | self.specGgraphTminTmax.clear() |
|
3189 | self.specGgraphTminTmax.clear() | |
3192 | self.specGgraphTimeRange.clear() |
|
3190 | self.specGgraphTimeRange.clear() | |
3193 | self.specGgraphftpratio.clear() |
|
3191 | self.specGgraphftpratio.clear() | |
3194 |
|
3192 | |||
3195 | opObj = puObj.getOperationObj(name='SpectraPlot') |
|
3193 | opObj = puObj.getOperationObj(name='SpectraPlot') | |
3196 |
|
3194 | |||
3197 | if opObj == None: |
|
3195 | if opObj == None: | |
3198 | self.specGraphCebSpectraplot.setCheckState(0) |
|
3196 | self.specGraphCebSpectraplot.setCheckState(0) | |
3199 | self.specGraphSaveSpectra.setCheckState(0) |
|
3197 | self.specGraphSaveSpectra.setCheckState(0) | |
3200 | self.specGraphftpSpectra.setCheckState(0) |
|
3198 | self.specGraphftpSpectra.setCheckState(0) | |
3201 | else: |
|
3199 | else: | |
3202 | operationSpectraPlot = "Enable" |
|
3200 | operationSpectraPlot = "Enable" | |
3203 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3201 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) | |
3204 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3202 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
3205 | if parmObj == None: |
|
3203 | if parmObj == None: | |
3206 | self.specGgraphChannelList.clear() |
|
3204 | self.specGgraphChannelList.clear() | |
3207 | else: |
|
3205 | else: | |
3208 | value = opObj.getParameterValue(parameterName='channelList') |
|
3206 | value = opObj.getParameterValue(parameterName='channelList') | |
3209 | channelListSpectraPlot = str(value)[1:-1] |
|
3207 | channelListSpectraPlot = str(value)[1:-1] | |
3210 | self.specGgraphChannelList.setText(channelListSpectraPlot) |
|
3208 | self.specGgraphChannelList.setText(channelListSpectraPlot) | |
3211 | self.specGgraphChannelList.setEnabled(True) |
|
3209 | self.specGgraphChannelList.setEnabled(True) | |
3212 |
|
3210 | |||
3213 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3211 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3214 | if parmObj == None: |
|
3212 | if parmObj == None: | |
3215 | self.specGgraphFreq.clear() |
|
3213 | self.specGgraphFreq.clear() | |
3216 | else: |
|
3214 | else: | |
3217 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3215 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3218 | value1 = str(value1) |
|
3216 | value1 = str(value1) | |
3219 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3217 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3220 | value2 = str(value2) |
|
3218 | value2 = str(value2) | |
3221 | value = value1 + "," + value2 |
|
3219 | value = value1 + "," + value2 | |
3222 | self.specGgraphFreq.setText(value) |
|
3220 | self.specGgraphFreq.setText(value) | |
3223 | self.specGgraphFreq.setEnabled(True) |
|
3221 | self.specGgraphFreq.setEnabled(True) | |
3224 |
|
3222 | |||
3225 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3223 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3226 | if parmObj == None: |
|
3224 | if parmObj == None: | |
3227 | self.specGgraphHeight.clear() |
|
3225 | self.specGgraphHeight.clear() | |
3228 | else: |
|
3226 | else: | |
3229 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3227 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3230 | value1 = str(value1) |
|
3228 | value1 = str(value1) | |
3231 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3229 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3232 | value2 = str(value2) |
|
3230 | value2 = str(value2) | |
3233 | value = value1 + "," + value2 |
|
3231 | value = value1 + "," + value2 | |
3234 | self.specGgraphHeight.setText(value) |
|
3232 | self.specGgraphHeight.setText(value) | |
3235 | self.specGgraphHeight.setEnabled(True) |
|
3233 | self.specGgraphHeight.setEnabled(True) | |
3236 |
|
3234 | |||
3237 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3235 | parmObj = opObj.getParameterObj(parameterName='zmin') | |
3238 | if parmObj == None: |
|
3236 | if parmObj == None: | |
3239 | self.specGgraphDbsrange.clear() |
|
3237 | self.specGgraphDbsrange.clear() | |
3240 | else: |
|
3238 | else: | |
3241 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3239 | value1 = opObj.getParameterValue(parameterName='zmin') | |
3242 | value1 = str(value1) |
|
3240 | value1 = str(value1) | |
3243 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3241 | value2 = opObj.getParameterValue(parameterName='zmax') | |
3244 | value2 = str(value2) |
|
3242 | value2 = str(value2) | |
3245 | value = value1 + "," + value2 |
|
3243 | value = value1 + "," + value2 | |
3246 | self.specGgraphDbsrange.setText(value) |
|
3244 | self.specGgraphDbsrange.setText(value) | |
3247 | self.specGgraphDbsrange.setEnabled(True) |
|
3245 | self.specGgraphDbsrange.setEnabled(True) | |
3248 |
|
3246 | |||
3249 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3247 | parmObj = opObj.getParameterObj(parameterName="save") | |
3250 | if parmObj == None: |
|
3248 | if parmObj == None: | |
3251 | self.specGraphSaveSpectra.setCheckState(0) |
|
3249 | self.specGraphSaveSpectra.setCheckState(0) | |
3252 | else: |
|
3250 | else: | |
3253 | self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
3251 | self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) | |
3254 |
|
3252 | |||
3255 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3253 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3256 | if parmObj == None: |
|
3254 | if parmObj == None: | |
3257 | self.specGraphftpSpectra.setCheckState(0) |
|
3255 | self.specGraphftpSpectra.setCheckState(0) | |
3258 | else: |
|
3256 | else: | |
3259 | self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
3257 | self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked) | |
3260 |
|
3258 | |||
3261 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3259 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3262 | if parmObj: |
|
3260 | if parmObj: | |
3263 | value = parmObj.getValue() |
|
3261 | value = parmObj.getValue() | |
3264 | self.specGraphPath.setText(value) |
|
3262 | self.specGraphPath.setText(value) | |
3265 |
|
3263 | |||
3266 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3264 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3267 | if parmObj: |
|
3265 | if parmObj: | |
3268 | value = parmObj.getValue() |
|
3266 | value = parmObj.getValue() | |
3269 | self.specGgraphftpratio.setText(str(value)) |
|
3267 | self.specGgraphftpratio.setText(str(value)) | |
3270 |
|
3268 | |||
3271 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') |
|
3269 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') | |
3272 |
|
3270 | |||
3273 | if opObj == None: |
|
3271 | if opObj == None: | |
3274 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
3272 | self.specGraphCebCrossSpectraplot.setCheckState(0) | |
3275 | self.specGraphSaveCross.setCheckState(0) |
|
3273 | self.specGraphSaveCross.setCheckState(0) | |
3276 | self.specGraphftpCross.setCheckState(0) |
|
3274 | self.specGraphftpCross.setCheckState(0) | |
3277 | else: |
|
3275 | else: | |
3278 | operationCrossSpectraPlot = "Enable" |
|
3276 | operationCrossSpectraPlot = "Enable" | |
3279 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3277 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) | |
3280 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3278 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3281 | if parmObj == None: |
|
3279 | if parmObj == None: | |
3282 | self.specGgraphFreq.clear() |
|
3280 | self.specGgraphFreq.clear() | |
3283 | else: |
|
3281 | else: | |
3284 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3282 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3285 | value1 = str(value1) |
|
3283 | value1 = str(value1) | |
3286 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3284 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3287 | value2 = str(value2) |
|
3285 | value2 = str(value2) | |
3288 | value = value1 + "," + value2 |
|
3286 | value = value1 + "," + value2 | |
3289 | self.specGgraphFreq.setText(value) |
|
3287 | self.specGgraphFreq.setText(value) | |
3290 | self.specGgraphFreq.setEnabled(True) |
|
3288 | self.specGgraphFreq.setEnabled(True) | |
3291 |
|
3289 | |||
3292 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3290 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3293 | if parmObj == None: |
|
3291 | if parmObj == None: | |
3294 | self.specGgraphHeight.clear() |
|
3292 | self.specGgraphHeight.clear() | |
3295 | else: |
|
3293 | else: | |
3296 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3294 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3297 | value1 = str(value1) |
|
3295 | value1 = str(value1) | |
3298 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3296 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3299 | value2 = str(value2) |
|
3297 | value2 = str(value2) | |
3300 | value = value1 + "," + value2 |
|
3298 | value = value1 + "," + value2 | |
3301 | self.specGgraphHeight.setText(value) |
|
3299 | self.specGgraphHeight.setText(value) | |
3302 | self.specGgraphHeight.setEnabled(True) |
|
3300 | self.specGgraphHeight.setEnabled(True) | |
3303 |
|
3301 | |||
3304 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3302 | parmObj = opObj.getParameterObj(parameterName='zmin') | |
3305 | if parmObj == None: |
|
3303 | if parmObj == None: | |
3306 | self.specGgraphDbsrange.clear() |
|
3304 | self.specGgraphDbsrange.clear() | |
3307 | else: |
|
3305 | else: | |
3308 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3306 | value1 = opObj.getParameterValue(parameterName='zmin') | |
3309 | value1 = str(value1) |
|
3307 | value1 = str(value1) | |
3310 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3308 | value2 = opObj.getParameterValue(parameterName='zmax') | |
3311 | value2 = str(value2) |
|
3309 | value2 = str(value2) | |
3312 | value = value1 + "," + value2 |
|
3310 | value = value1 + "," + value2 | |
3313 | self.specGgraphDbsrange.setText(value) |
|
3311 | self.specGgraphDbsrange.setText(value) | |
3314 | self.specGgraphDbsrange.setEnabled(True) |
|
3312 | self.specGgraphDbsrange.setEnabled(True) | |
3315 |
|
3313 | |||
3316 | parmObj = opObj.getParameterObj(parameterName='coh_min') |
|
3314 | parmObj = opObj.getParameterObj(parameterName='coh_min') | |
3317 | if parmObj == None: |
|
3315 | if parmObj == None: | |
3318 | self.specGgraphmagnitud.clear() |
|
3316 | self.specGgraphmagnitud.clear() | |
3319 | else: |
|
3317 | else: | |
3320 | value1 = opObj.getParameterValue(parameterName='coh_min') |
|
3318 | value1 = opObj.getParameterValue(parameterName='coh_min') | |
3321 | value1 = str(value1) |
|
3319 | value1 = str(value1) | |
3322 | value2 = opObj.getParameterValue(parameterName='coh_max') |
|
3320 | value2 = opObj.getParameterValue(parameterName='coh_max') | |
3323 | value2 = str(value2) |
|
3321 | value2 = str(value2) | |
3324 | value = value1 + "," + value2 |
|
3322 | value = value1 + "," + value2 | |
3325 | self.specGgraphmagnitud.setText(value) |
|
3323 | self.specGgraphmagnitud.setText(value) | |
3326 | self.specGgraphmagnitud.setEnabled(True) |
|
3324 | self.specGgraphmagnitud.setEnabled(True) | |
3327 |
|
3325 | |||
3328 | parmObj = opObj.getParameterObj(parameterName='phase_min') |
|
3326 | parmObj = opObj.getParameterObj(parameterName='phase_min') | |
3329 | if parmObj == None: |
|
3327 | if parmObj == None: | |
3330 | self.specGgraphPhase.clear() |
|
3328 | self.specGgraphPhase.clear() | |
3331 | else: |
|
3329 | else: | |
3332 | value1 = opObj.getParameterValue(parameterName='phase_min') |
|
3330 | value1 = opObj.getParameterValue(parameterName='phase_min') | |
3333 | value1 = str(value1) |
|
3331 | value1 = str(value1) | |
3334 | value2 = opObj.getParameterValue(parameterName='phase_max') |
|
3332 | value2 = opObj.getParameterValue(parameterName='phase_max') | |
3335 | value2 = str(value2) |
|
3333 | value2 = str(value2) | |
3336 | value = value1 + "," + value2 |
|
3334 | value = value1 + "," + value2 | |
3337 | self.specGgraphPhase.setText(value) |
|
3335 | self.specGgraphPhase.setText(value) | |
3338 | self.specGgraphPhase.setEnabled(True) |
|
3336 | self.specGgraphPhase.setEnabled(True) | |
3339 |
|
3337 | |||
3340 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3338 | parmObj = opObj.getParameterObj(parameterName="save") | |
3341 | if parmObj == None: |
|
3339 | if parmObj == None: | |
3342 | self.specGraphSaveCross.setCheckState(0) |
|
3340 | self.specGraphSaveCross.setCheckState(0) | |
3343 | else: |
|
3341 | else: | |
3344 | self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked) |
|
3342 | self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked) | |
3345 |
|
3343 | |||
3346 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3344 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3347 | if parmObj == None: |
|
3345 | if parmObj == None: | |
3348 | self.specGraphftpCross.setCheckState(0) |
|
3346 | self.specGraphftpCross.setCheckState(0) | |
3349 | else: |
|
3347 | else: | |
3350 | self.specGraphftpCross.setCheckState(QtCore.Qt.Checked) |
|
3348 | self.specGraphftpCross.setCheckState(QtCore.Qt.Checked) | |
3351 |
|
3349 | |||
3352 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3350 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3353 | if parmObj: |
|
3351 | if parmObj: | |
3354 | value = parmObj.getValue() |
|
3352 | value = parmObj.getValue() | |
3355 | self.specGraphPath.setText(value) |
|
3353 | self.specGraphPath.setText(value) | |
3356 |
|
3354 | |||
3357 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3355 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3358 | if parmObj: |
|
3356 | if parmObj: | |
3359 | value = parmObj.getValue() |
|
3357 | value = parmObj.getValue() | |
3360 | self.specGgraphftpratio.setText(str(value)) |
|
3358 | self.specGgraphftpratio.setText(str(value)) | |
3361 |
|
3359 | |||
3362 | opObj = puObj.getOperationObj(name='RTIPlot') |
|
3360 | opObj = puObj.getOperationObj(name='RTIPlot') | |
3363 |
|
3361 | |||
3364 | if opObj == None: |
|
3362 | if opObj == None: | |
3365 | self.specGraphCebRTIplot.setCheckState(0) |
|
3363 | self.specGraphCebRTIplot.setCheckState(0) | |
3366 | self.specGraphSaveRTIplot.setCheckState(0) |
|
3364 | self.specGraphSaveRTIplot.setCheckState(0) | |
3367 | self.specGraphftpRTIplot.setCheckState(0) |
|
3365 | self.specGraphftpRTIplot.setCheckState(0) | |
3368 | else: |
|
3366 | else: | |
3369 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3367 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) | |
3370 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3368 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
3371 | if parmObj == None: |
|
3369 | if parmObj == None: | |
3372 | self.specGgraphChannelList.clear() |
|
3370 | self.specGgraphChannelList.clear() | |
3373 | else: |
|
3371 | else: | |
3374 | value = opObj.getParameterValue(parameterName='channelList') |
|
3372 | value = opObj.getParameterValue(parameterName='channelList') | |
3375 | channelListRTIPlot = str(value)[1:-1] |
|
3373 | channelListRTIPlot = str(value)[1:-1] | |
3376 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
3374 | self.specGgraphChannelList.setText(channelListRTIPlot) | |
3377 | self.specGgraphChannelList.setEnabled(True) |
|
3375 | self.specGgraphChannelList.setEnabled(True) | |
3378 |
|
3376 | |||
3379 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3377 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3380 | if parmObj == None: |
|
3378 | if parmObj == None: | |
3381 | self.specGgraphTminTmax.clear() |
|
3379 | self.specGgraphTminTmax.clear() | |
3382 | else: |
|
3380 | else: | |
3383 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3381 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3384 | value1 = str(value1) |
|
3382 | value1 = str(value1) | |
3385 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3383 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3386 | value2 = str(value2) |
|
3384 | value2 = str(value2) | |
3387 | value = value1 + "," + value2 |
|
3385 | value = value1 + "," + value2 | |
3388 | self.specGgraphTminTmax.setText(value) |
|
3386 | self.specGgraphTminTmax.setText(value) | |
3389 | self.specGgraphTminTmax.setEnabled(True) |
|
3387 | self.specGgraphTminTmax.setEnabled(True) | |
3390 |
|
3388 | |||
3391 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3389 | parmObj = opObj.getParameterObj(parameterName='timerange') | |
3392 | if parmObj == None: |
|
3390 | if parmObj == None: | |
3393 | self.specGgraphTimeRange.clear() |
|
3391 | self.specGgraphTimeRange.clear() | |
3394 | else: |
|
3392 | else: | |
3395 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3393 | value1 = opObj.getParameterValue(parameterName='timerange') | |
3396 | value1 = str(value1) |
|
3394 | value1 = str(value1) | |
3397 | self.specGgraphTimeRange.setText(value1) |
|
3395 | self.specGgraphTimeRange.setText(value1) | |
3398 | self.specGgraphTimeRange.setEnabled(True) |
|
3396 | self.specGgraphTimeRange.setEnabled(True) | |
3399 |
|
3397 | |||
3400 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3398 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3401 | if parmObj == None: |
|
3399 | if parmObj == None: | |
3402 | self.specGgraphHeight.clear() |
|
3400 | self.specGgraphHeight.clear() | |
3403 | else: |
|
3401 | else: | |
3404 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3402 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3405 | value1 = str(value1) |
|
3403 | value1 = str(value1) | |
3406 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3404 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3407 | value2 = str(value2) |
|
3405 | value2 = str(value2) | |
3408 | value = value1 + "," + value2 |
|
3406 | value = value1 + "," + value2 | |
3409 | self.specGgraphHeight.setText(value) |
|
3407 | self.specGgraphHeight.setText(value) | |
3410 | self.specGgraphHeight.setEnabled(True) |
|
3408 | self.specGgraphHeight.setEnabled(True) | |
3411 |
|
3409 | |||
3412 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3410 | parmObj = opObj.getParameterObj(parameterName='zmin') | |
3413 | if parmObj == None: |
|
3411 | if parmObj == None: | |
3414 | self.specGgraphDbsrange.clear() |
|
3412 | self.specGgraphDbsrange.clear() | |
3415 | else: |
|
3413 | else: | |
3416 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3414 | value1 = opObj.getParameterValue(parameterName='zmin') | |
3417 | value1 = str(value1) |
|
3415 | value1 = str(value1) | |
3418 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3416 | value2 = opObj.getParameterValue(parameterName='zmax') | |
3419 | value2 = str(value2) |
|
3417 | value2 = str(value2) | |
3420 | value = value1 + "," + value2 |
|
3418 | value = value1 + "," + value2 | |
3421 | self.specGgraphDbsrange.setText(value) |
|
3419 | self.specGgraphDbsrange.setText(value) | |
3422 | self.specGgraphDbsrange.setEnabled(True) |
|
3420 | self.specGgraphDbsrange.setEnabled(True) | |
3423 |
|
3421 | |||
3424 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3422 | parmObj = opObj.getParameterObj(parameterName="save") | |
3425 | if parmObj == None: |
|
3423 | if parmObj == None: | |
3426 | self.specGraphSaveRTIplot.setCheckState(0) |
|
3424 | self.specGraphSaveRTIplot.setCheckState(0) | |
3427 | else: |
|
3425 | else: | |
3428 | self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3426 | self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) | |
3429 |
|
3427 | |||
3430 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3428 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3431 | if parmObj == None: |
|
3429 | if parmObj == None: | |
3432 | self.specGraphftpRTIplot.setCheckState(0) |
|
3430 | self.specGraphftpRTIplot.setCheckState(0) | |
3433 | else: |
|
3431 | else: | |
3434 | self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3432 | self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) | |
3435 |
|
3433 | |||
3436 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3434 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3437 | if parmObj: |
|
3435 | if parmObj: | |
3438 | value = parmObj.getValue() |
|
3436 | value = parmObj.getValue() | |
3439 | self.specGraphPath.setText(value) |
|
3437 | self.specGraphPath.setText(value) | |
3440 |
|
3438 | |||
3441 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3439 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3442 | if parmObj: |
|
3440 | if parmObj: | |
3443 | value = parmObj.getValue() |
|
3441 | value = parmObj.getValue() | |
3444 | self.specGgraphftpratio.setText(str(value)) |
|
3442 | self.specGgraphftpratio.setText(str(value)) | |
3445 |
|
3443 | |||
3446 | opObj = puObj.getOperationObj(name='CoherenceMap') |
|
3444 | opObj = puObj.getOperationObj(name='CoherenceMap') | |
3447 |
|
3445 | |||
3448 | if opObj == None: |
|
3446 | if opObj == None: | |
3449 | self.specGraphCebCoherencmap.setCheckState(0) |
|
3447 | self.specGraphCebCoherencmap.setCheckState(0) | |
3450 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3448 | self.specGraphSaveCoherencemap.setCheckState(0) | |
3451 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3449 | self.specGraphftpCoherencemap.setCheckState(0) | |
3452 | else: |
|
3450 | else: | |
3453 | operationCoherenceMap = "Enable" |
|
3451 | operationCoherenceMap = "Enable" | |
3454 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
3452 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) | |
3455 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3453 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3456 | if parmObj == None: |
|
3454 | if parmObj == None: | |
3457 | self.specGgraphTminTmax.clear() |
|
3455 | self.specGgraphTminTmax.clear() | |
3458 | else: |
|
3456 | else: | |
3459 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3457 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3460 | value1 = str(value1) |
|
3458 | value1 = str(value1) | |
3461 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3459 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3462 | value2 = str(value2) |
|
3460 | value2 = str(value2) | |
3463 | value = value1 + "," + value2 |
|
3461 | value = value1 + "," + value2 | |
3464 | self.specGgraphTminTmax.setText(value) |
|
3462 | self.specGgraphTminTmax.setText(value) | |
3465 | self.specGgraphTminTmax.setEnabled(True) |
|
3463 | self.specGgraphTminTmax.setEnabled(True) | |
3466 |
|
3464 | |||
3467 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3465 | parmObj = opObj.getParameterObj(parameterName='timerange') | |
3468 | if parmObj == None: |
|
3466 | if parmObj == None: | |
3469 | self.specGgraphTimeRange.clear() |
|
3467 | self.specGgraphTimeRange.clear() | |
3470 | else: |
|
3468 | else: | |
3471 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3469 | value1 = opObj.getParameterValue(parameterName='timerange') | |
3472 | value1 = str(value1) |
|
3470 | value1 = str(value1) | |
3473 | self.specGgraphTimeRange.setText(value1) |
|
3471 | self.specGgraphTimeRange.setText(value1) | |
3474 | self.specGgraphTimeRange.setEnabled(True) |
|
3472 | self.specGgraphTimeRange.setEnabled(True) | |
3475 |
|
3473 | |||
3476 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3474 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3477 | if parmObj == None: |
|
3475 | if parmObj == None: | |
3478 | self.specGgraphHeight.clear() |
|
3476 | self.specGgraphHeight.clear() | |
3479 | else: |
|
3477 | else: | |
3480 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3478 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3481 | value1 = str(value1) |
|
3479 | value1 = str(value1) | |
3482 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3480 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3483 | value2 = str(value2) |
|
3481 | value2 = str(value2) | |
3484 | value = value1 + "," + value2 |
|
3482 | value = value1 + "," + value2 | |
3485 | self.specGgraphHeight.setText(value) |
|
3483 | self.specGgraphHeight.setText(value) | |
3486 | self.specGgraphHeight.setEnabled(True) |
|
3484 | self.specGgraphHeight.setEnabled(True) | |
3487 |
|
3485 | |||
3488 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3486 | parmObj = opObj.getParameterObj(parameterName='zmin') | |
3489 | if parmObj == None: |
|
3487 | if parmObj == None: | |
3490 | self.specGgraphmagnitud.clear() |
|
3488 | self.specGgraphmagnitud.clear() | |
3491 | else: |
|
3489 | else: | |
3492 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3490 | value1 = opObj.getParameterValue(parameterName='zmin') | |
3493 | value1 = str(value1) |
|
3491 | value1 = str(value1) | |
3494 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3492 | value2 = opObj.getParameterValue(parameterName='zmax') | |
3495 | value2 = str(value2) |
|
3493 | value2 = str(value2) | |
3496 | value = value1 + "," + value2 |
|
3494 | value = value1 + "," + value2 | |
3497 | self.specGgraphmagnitud.setText(value) |
|
3495 | self.specGgraphmagnitud.setText(value) | |
3498 | self.specGgraphmagnitud.setEnabled(True) |
|
3496 | self.specGgraphmagnitud.setEnabled(True) | |
3499 |
|
3497 | |||
3500 | parmObj = opObj.getParameterObj(parameterName='coh_min') |
|
3498 | parmObj = opObj.getParameterObj(parameterName='coh_min') | |
3501 | if parmObj == None: |
|
3499 | if parmObj == None: | |
3502 | self.specGgraphmagnitud.clear() |
|
3500 | self.specGgraphmagnitud.clear() | |
3503 | else: |
|
3501 | else: | |
3504 | value1 = opObj.getParameterValue(parameterName='coh_min') |
|
3502 | value1 = opObj.getParameterValue(parameterName='coh_min') | |
3505 | value1 = str(value1) |
|
3503 | value1 = str(value1) | |
3506 | value2 = opObj.getParameterValue(parameterName='coh_max') |
|
3504 | value2 = opObj.getParameterValue(parameterName='coh_max') | |
3507 | value2 = str(value2) |
|
3505 | value2 = str(value2) | |
3508 | value = value1 + "," + value2 |
|
3506 | value = value1 + "," + value2 | |
3509 | self.specGgraphmagnitud.setText(value) |
|
3507 | self.specGgraphmagnitud.setText(value) | |
3510 | self.specGgraphmagnitud.setEnabled(True) |
|
3508 | self.specGgraphmagnitud.setEnabled(True) | |
3511 |
|
3509 | |||
3512 | parmObj = opObj.getParameterObj(parameterName='phase_min') |
|
3510 | parmObj = opObj.getParameterObj(parameterName='phase_min') | |
3513 | if parmObj == None: |
|
3511 | if parmObj == None: | |
3514 | self.specGgraphPhase.clear() |
|
3512 | self.specGgraphPhase.clear() | |
3515 | else: |
|
3513 | else: | |
3516 | value1 = opObj.getParameterValue(parameterName='phase_min') |
|
3514 | value1 = opObj.getParameterValue(parameterName='phase_min') | |
3517 | value1 = str(value1) |
|
3515 | value1 = str(value1) | |
3518 | value2 = opObj.getParameterValue(parameterName='phase_max') |
|
3516 | value2 = opObj.getParameterValue(parameterName='phase_max') | |
3519 | value2 = str(value2) |
|
3517 | value2 = str(value2) | |
3520 | value = value1 + "," + value2 |
|
3518 | value = value1 + "," + value2 | |
3521 | self.specGgraphPhase.setText(value) |
|
3519 | self.specGgraphPhase.setText(value) | |
3522 | self.specGgraphPhase.setEnabled(True) |
|
3520 | self.specGgraphPhase.setEnabled(True) | |
3523 |
|
3521 | |||
3524 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3522 | parmObj = opObj.getParameterObj(parameterName="save") | |
3525 | if parmObj == None: |
|
3523 | if parmObj == None: | |
3526 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3524 | self.specGraphSaveCoherencemap.setCheckState(0) | |
3527 | else: |
|
3525 | else: | |
3528 | self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3526 | self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked) | |
3529 |
|
3527 | |||
3530 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3528 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3531 | if parmObj == None: |
|
3529 | if parmObj == None: | |
3532 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3530 | self.specGraphftpCoherencemap.setCheckState(0) | |
3533 | else: |
|
3531 | else: | |
3534 | self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3532 | self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked) | |
3535 |
|
3533 | |||
3536 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3534 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3537 | if parmObj: |
|
3535 | if parmObj: | |
3538 | value = parmObj.getValue() |
|
3536 | value = parmObj.getValue() | |
3539 | self.specGraphPath.setText(value) |
|
3537 | self.specGraphPath.setText(value) | |
3540 |
|
3538 | |||
3541 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3539 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3542 | if parmObj: |
|
3540 | if parmObj: | |
3543 | value = parmObj.getValue() |
|
3541 | value = parmObj.getValue() | |
3544 | self.specGgraphftpratio.setText(str(value)) |
|
3542 | self.specGgraphftpratio.setText(str(value)) | |
3545 |
|
3543 | |||
3546 | opObj = puObj.getOperationObj(name='PowerProfilePlot') |
|
3544 | opObj = puObj.getOperationObj(name='PowerProfilePlot') | |
3547 |
|
3545 | |||
3548 | if opObj == None: |
|
3546 | if opObj == None: | |
3549 | self.specGraphPowerprofile.setCheckState(0) |
|
3547 | self.specGraphPowerprofile.setCheckState(0) | |
3550 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3548 | self.specGraphSavePowerprofile.setCheckState(0) | |
3551 | self.specGraphftpPowerprofile.setCheckState(0) |
|
3549 | self.specGraphftpPowerprofile.setCheckState(0) | |
3552 | operationPowerProfilePlot = "Disabled" |
|
3550 | operationPowerProfilePlot = "Disabled" | |
3553 | channelList = None |
|
3551 | channelList = None | |
3554 | freq_vel = None |
|
3552 | freq_vel = None | |
3555 | heightsrange = None |
|
3553 | heightsrange = None | |
3556 | else: |
|
3554 | else: | |
3557 | operationPowerProfilePlot = "Enable" |
|
3555 | operationPowerProfilePlot = "Enable" | |
3558 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3556 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) | |
3559 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3557 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3560 | if parmObj == None: |
|
3558 | if parmObj == None: | |
3561 | self.specGgraphDbsrange.clear() |
|
3559 | self.specGgraphDbsrange.clear() | |
3562 | else: |
|
3560 | else: | |
3563 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3561 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3564 | value1 = str(value1) |
|
3562 | value1 = str(value1) | |
3565 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3563 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3566 | value2 = str(value2) |
|
3564 | value2 = str(value2) | |
3567 | value = value1 + "," + value2 |
|
3565 | value = value1 + "," + value2 | |
3568 | self.specGgraphDbsrange.setText(value) |
|
3566 | self.specGgraphDbsrange.setText(value) | |
3569 | self.specGgraphDbsrange.setEnabled(True) |
|
3567 | self.specGgraphDbsrange.setEnabled(True) | |
3570 |
|
3568 | |||
3571 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3569 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3572 | if parmObj == None: |
|
3570 | if parmObj == None: | |
3573 | self.specGgraphHeight.clear() |
|
3571 | self.specGgraphHeight.clear() | |
3574 | else: |
|
3572 | else: | |
3575 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3573 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3576 | value1 = str(value1) |
|
3574 | value1 = str(value1) | |
3577 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3575 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3578 | value2 = str(value2) |
|
3576 | value2 = str(value2) | |
3579 | value = value1 + "," + value2 |
|
3577 | value = value1 + "," + value2 | |
3580 | self.specGgraphHeight.setText(value) |
|
3578 | self.specGgraphHeight.setText(value) | |
3581 | self.specGgraphHeight.setEnabled(True) |
|
3579 | self.specGgraphHeight.setEnabled(True) | |
3582 |
|
3580 | |||
3583 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3581 | parmObj = opObj.getParameterObj(parameterName="save") | |
3584 | if parmObj == None: |
|
3582 | if parmObj == None: | |
3585 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3583 | self.specGraphSavePowerprofile.setCheckState(0) | |
3586 | else: |
|
3584 | else: | |
3587 | self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3585 | self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked) | |
3588 |
|
3586 | |||
3589 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3587 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3590 | if parmObj == None: |
|
3588 | if parmObj == None: | |
3591 | self.specGraphftpPowerprofile.setCheckState(0) |
|
3589 | self.specGraphftpPowerprofile.setCheckState(0) | |
3592 | else: |
|
3590 | else: | |
3593 | self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3591 | self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked) | |
3594 |
|
3592 | |||
3595 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3593 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3596 | if parmObj: |
|
3594 | if parmObj: | |
3597 | value = parmObj.getValue() |
|
3595 | value = parmObj.getValue() | |
3598 | self.specGraphPath.setText(value) |
|
3596 | self.specGraphPath.setText(value) | |
3599 |
|
3597 | |||
3600 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3598 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3601 | if parmObj: |
|
3599 | if parmObj: | |
3602 | value = parmObj.getValue() |
|
3600 | value = parmObj.getValue() | |
3603 | self.specGgraphftpratio.setText(str(value)) |
|
3601 | self.specGgraphftpratio.setText(str(value)) | |
3604 |
|
3602 | |||
3605 | opObj = puObj.getOperationObj(name='Noise') |
|
3603 | opObj = puObj.getOperationObj(name='Noise') | |
3606 |
|
3604 | |||
3607 | if opObj == None: |
|
3605 | if opObj == None: | |
3608 | self.specGraphCebRTInoise.setCheckState(0) |
|
3606 | self.specGraphCebRTInoise.setCheckState(0) | |
3609 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3607 | self.specGraphSaveRTInoise.setCheckState(0) | |
3610 | self.specGraphftpRTInoise.setCheckState(0) |
|
3608 | self.specGraphftpRTInoise.setCheckState(0) | |
3611 | else: |
|
3609 | else: | |
3612 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3610 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) | |
3613 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3611 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
3614 | if parmObj == None: |
|
3612 | if parmObj == None: | |
3615 | self.specGgraphChannelList.clear() |
|
3613 | self.specGgraphChannelList.clear() | |
3616 | else: |
|
3614 | else: | |
3617 | value = opObj.getParameterValue(parameterName='channelList') |
|
3615 | value = opObj.getParameterValue(parameterName='channelList') | |
3618 | channelListRTINoise = str(value)[1:-1] |
|
3616 | channelListRTINoise = str(value)[1:-1] | |
3619 | self.specGgraphChannelList.setText(channelListRTINoise) |
|
3617 | self.specGgraphChannelList.setText(channelListRTINoise) | |
3620 | self.specGgraphChannelList.setEnabled(True) |
|
3618 | self.specGgraphChannelList.setEnabled(True) | |
3621 |
|
3619 | |||
3622 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3620 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3623 | if parmObj == None: |
|
3621 | if parmObj == None: | |
3624 | self.specGgraphTminTmax.clear() |
|
3622 | self.specGgraphTminTmax.clear() | |
3625 | else: |
|
3623 | else: | |
3626 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3624 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3627 | value1 = str(value1) |
|
3625 | value1 = str(value1) | |
3628 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3626 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3629 | value2 = str(value2) |
|
3627 | value2 = str(value2) | |
3630 | value = value1 + "," + value2 |
|
3628 | value = value1 + "," + value2 | |
3631 | self.specGgraphTminTmax.setText(value) |
|
3629 | self.specGgraphTminTmax.setText(value) | |
3632 | self.specGgraphTminTmax.setEnabled(True) |
|
3630 | self.specGgraphTminTmax.setEnabled(True) | |
3633 |
|
3631 | |||
3634 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3632 | parmObj = opObj.getParameterObj(parameterName='timerange') | |
3635 | if parmObj == None: |
|
3633 | if parmObj == None: | |
3636 | self.specGgraphTimeRange.clear() |
|
3634 | self.specGgraphTimeRange.clear() | |
3637 | else: |
|
3635 | else: | |
3638 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3636 | value1 = opObj.getParameterValue(parameterName='timerange') | |
3639 | value1 = str(value1) |
|
3637 | value1 = str(value1) | |
3640 | self.specGgraphTimeRange.setText(value1) |
|
3638 | self.specGgraphTimeRange.setText(value1) | |
3641 | self.specGgraphTimeRange.setEnabled(True) |
|
3639 | self.specGgraphTimeRange.setEnabled(True) | |
3642 |
|
3640 | |||
3643 |
|
3641 | |||
3644 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3642 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3645 | if parmObj == None: |
|
3643 | if parmObj == None: | |
3646 | self.specGgraphDbsrange.clear() |
|
3644 | self.specGgraphDbsrange.clear() | |
3647 | else: |
|
3645 | else: | |
3648 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3646 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3649 | value1 = str(value1) |
|
3647 | value1 = str(value1) | |
3650 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3648 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3651 | value2 = str(value2) |
|
3649 | value2 = str(value2) | |
3652 | value = value1 + "," + value2 |
|
3650 | value = value1 + "," + value2 | |
3653 | self.specGgraphDbsrange.setText(value) |
|
3651 | self.specGgraphDbsrange.setText(value) | |
3654 | self.specGgraphDbsrange.setEnabled(True) |
|
3652 | self.specGgraphDbsrange.setEnabled(True) | |
3655 |
|
3653 | |||
3656 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3654 | parmObj = opObj.getParameterObj(parameterName="save") | |
3657 | if parmObj == None: |
|
3655 | if parmObj == None: | |
3658 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3656 | self.specGraphSaveRTInoise.setCheckState(0) | |
3659 | else: |
|
3657 | else: | |
3660 | self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3658 | self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked) | |
3661 |
|
3659 | |||
3662 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3660 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3663 | if parmObj == None: |
|
3661 | if parmObj == None: | |
3664 | self.specGraphftpRTInoise.setCheckState(0) |
|
3662 | self.specGraphftpRTInoise.setCheckState(0) | |
3665 | else: |
|
3663 | else: | |
3666 | self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3664 | self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked) | |
3667 |
|
3665 | |||
3668 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3666 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3669 | if parmObj: |
|
3667 | if parmObj: | |
3670 | value = parmObj.getValue() |
|
3668 | value = parmObj.getValue() | |
3671 | self.specGraphPath.setText(value) |
|
3669 | self.specGraphPath.setText(value) | |
3672 |
|
3670 | |||
3673 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3671 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3674 | if parmObj: |
|
3672 | if parmObj: | |
3675 | value = parmObj.getValue() |
|
3673 | value = parmObj.getValue() | |
3676 | self.specGgraphftpratio.setText(str(value)) |
|
3674 | self.specGgraphftpratio.setText(str(value)) | |
3677 |
|
3675 | |||
3678 | opObj = puObj.getOperationObj(name='SpectraWriter') |
|
3676 | opObj = puObj.getOperationObj(name='SpectraWriter') | |
3679 | if opObj == None: |
|
3677 | if opObj == None: | |
3680 | self.specOutputPath.clear() |
|
3678 | self.specOutputPath.clear() | |
3681 | self.specOutputblocksperfile.clear() |
|
3679 | self.specOutputblocksperfile.clear() | |
3682 | else: |
|
3680 | else: | |
3683 | value = opObj.getParameterObj(parameterName='path') |
|
3681 | value = opObj.getParameterObj(parameterName='path') | |
3684 | if value == None: |
|
3682 | if value == None: | |
3685 | self.specOutputPath.clear() |
|
3683 | self.specOutputPath.clear() | |
3686 | else: |
|
3684 | else: | |
3687 | value = opObj.getParameterValue(parameterName='path') |
|
3685 | value = opObj.getParameterValue(parameterName='path') | |
3688 | path = str(value) |
|
3686 | path = str(value) | |
3689 | self.specOutputPath.setText(path) |
|
3687 | self.specOutputPath.setText(path) | |
3690 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
3688 | value = opObj.getParameterObj(parameterName='blocksPerFile') | |
3691 | if value == None: |
|
3689 | if value == None: | |
3692 | self.specOutputblocksperfile.clear() |
|
3690 | self.specOutputblocksperfile.clear() | |
3693 | else: |
|
3691 | else: | |
3694 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
3692 | value = opObj.getParameterValue(parameterName='blocksPerFile') | |
3695 | blocksperfile = str(value) |
|
3693 | blocksperfile = str(value) | |
3696 | self.specOutputblocksperfile.setText(blocksperfile) |
|
3694 | self.specOutputblocksperfile.setText(blocksperfile) | |
3697 |
|
3695 | |||
3698 | return |
|
3696 | return | |
3699 |
|
3697 | |||
3700 | def __refreshSpectraHeisWindow(self, puObj): |
|
3698 | def __refreshSpectraHeisWindow(self, puObj): | |
3701 |
|
3699 | |||
3702 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") |
|
3700 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") | |
3703 | if opObj == None: |
|
3701 | if opObj == None: | |
3704 | self.specHeisOpIncoherent.clear() |
|
3702 | self.specHeisOpIncoherent.clear() | |
3705 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
3703 | self.specHeisOpCebIncoherent.setCheckState(0) | |
3706 | else: |
|
3704 | else: | |
3707 | for parmObj in opObj.getParameterObjList(): |
|
3705 | for parmObj in opObj.getParameterObjList(): | |
3708 | if parmObj.name == 'timeInterval': |
|
3706 | if parmObj.name == 'timeInterval': | |
3709 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
3707 | value = opObj.getParameterValue(parameterName='timeInterval') | |
3710 | value = float(value) |
|
3708 | value = float(value) | |
3711 | self.specHeisOpIncoherent.setText(str(value)) |
|
3709 | self.specHeisOpIncoherent.setText(str(value)) | |
3712 | self.specHeisOpIncoherent.setEnabled(True) |
|
3710 | self.specHeisOpIncoherent.setEnabled(True) | |
3713 | self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3711 | self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked) | |
3714 | self.specHeisOpCobIncInt.setCurrentIndex(0) |
|
3712 | self.specHeisOpCobIncInt.setCurrentIndex(0) | |
3715 |
|
3713 | |||
3716 | # SpectraHeis Graph |
|
3714 | # SpectraHeis Graph | |
3717 |
|
3715 | |||
3718 | self.specHeisGgraphXminXmax.clear() |
|
3716 | self.specHeisGgraphXminXmax.clear() | |
3719 | self.specHeisGgraphYminYmax.clear() |
|
3717 | self.specHeisGgraphYminYmax.clear() | |
3720 |
|
3718 | |||
3721 | self.specHeisGgraphChannelList.clear() |
|
3719 | self.specHeisGgraphChannelList.clear() | |
3722 | self.specHeisGgraphTminTmax.clear() |
|
3720 | self.specHeisGgraphTminTmax.clear() | |
3723 | self.specHeisGgraphTimeRange.clear() |
|
3721 | self.specHeisGgraphTimeRange.clear() | |
3724 | self.specHeisGgraphftpratio.clear() |
|
3722 | self.specHeisGgraphftpratio.clear() | |
3725 |
|
3723 | |||
3726 | opObj = puObj.getOperationObj(name='SpectraHeisScope') |
|
3724 | opObj = puObj.getOperationObj(name='SpectraHeisScope') | |
3727 | if opObj == None: |
|
3725 | if opObj == None: | |
3728 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
3726 | self.specHeisGraphCebSpectraplot.setCheckState(0) | |
3729 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3727 | self.specHeisGraphSaveSpectra.setCheckState(0) | |
3730 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3728 | self.specHeisGraphftpSpectra.setCheckState(0) | |
3731 | else: |
|
3729 | else: | |
3732 | operationSpectraHeisScope = "Enable" |
|
3730 | operationSpectraHeisScope = "Enable" | |
3733 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3731 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) | |
3734 |
|
3732 | |||
3735 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3733 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
3736 | if parmObj == None: |
|
3734 | if parmObj == None: | |
3737 | self.specHeisGgraphChannelList.clear() |
|
3735 | self.specHeisGgraphChannelList.clear() | |
3738 | else: |
|
3736 | else: | |
3739 | value = opObj.getParameterValue(parameterName='channelList') |
|
3737 | value = opObj.getParameterValue(parameterName='channelList') | |
3740 | channelListSpectraHeisScope = str(value)[1:-1] |
|
3738 | channelListSpectraHeisScope = str(value)[1:-1] | |
3741 | self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope) |
|
3739 | self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope) | |
3742 | self.specHeisGgraphChannelList.setEnabled(True) |
|
3740 | self.specHeisGgraphChannelList.setEnabled(True) | |
3743 |
|
3741 | |||
3744 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3742 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3745 | if parmObj == None: |
|
3743 | if parmObj == None: | |
3746 | self.specHeisGgraphXminXmax.clear() |
|
3744 | self.specHeisGgraphXminXmax.clear() | |
3747 | else: |
|
3745 | else: | |
3748 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3746 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3749 | value1 = str(value1) |
|
3747 | value1 = str(value1) | |
3750 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3748 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3751 | value2 = str(value2) |
|
3749 | value2 = str(value2) | |
3752 | value = value1 + "," + value2 |
|
3750 | value = value1 + "," + value2 | |
3753 | self.specHeisGgraphXminXmax.setText(value) |
|
3751 | self.specHeisGgraphXminXmax.setText(value) | |
3754 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
3752 | self.specHeisGgraphXminXmax.setEnabled(True) | |
3755 |
|
3753 | |||
3756 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3754 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3757 | if parmObj == None: |
|
3755 | if parmObj == None: | |
3758 | self.specHeisGgraphYminYmax.clear() |
|
3756 | self.specHeisGgraphYminYmax.clear() | |
3759 | else: |
|
3757 | else: | |
3760 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3758 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3761 | value1 = str(value1) |
|
3759 | value1 = str(value1) | |
3762 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3760 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3763 | value2 = str(value2) |
|
3761 | value2 = str(value2) | |
3764 | value = value1 + "," + value2 |
|
3762 | value = value1 + "," + value2 | |
3765 | self.specHeisGgraphYminYmax.setText(value) |
|
3763 | self.specHeisGgraphYminYmax.setText(value) | |
3766 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3764 | self.specHeisGgraphYminYmax.setEnabled(True) | |
3767 |
|
3765 | |||
3768 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3766 | parmObj = opObj.getParameterObj(parameterName="save") | |
3769 | if parmObj == None: |
|
3767 | if parmObj == None: | |
3770 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3768 | self.specHeisGraphSaveSpectra.setCheckState(0) | |
3771 | else: |
|
3769 | else: | |
3772 | self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
3770 | self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) | |
3773 |
|
3771 | |||
3774 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3772 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3775 | if parmObj == None: |
|
3773 | if parmObj == None: | |
3776 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3774 | self.specHeisGraphftpSpectra.setCheckState(0) | |
3777 | else: |
|
3775 | else: | |
3778 | self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
3776 | self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked) | |
3779 |
|
3777 | |||
3780 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3778 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3781 | if parmObj: |
|
3779 | if parmObj: | |
3782 | value = parmObj.getValue() |
|
3780 | value = parmObj.getValue() | |
3783 | self.specHeisGraphPath.setText(value) |
|
3781 | self.specHeisGraphPath.setText(value) | |
3784 |
|
3782 | |||
3785 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3783 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3786 | if parmObj: |
|
3784 | if parmObj: | |
3787 | value = parmObj.getValue() |
|
3785 | value = parmObj.getValue() | |
3788 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3786 | self.specHeisGgraphftpratio.setText(str(value)) | |
3789 |
|
3787 | |||
3790 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') |
|
3788 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') | |
3791 |
|
3789 | |||
3792 | if opObj == None: |
|
3790 | if opObj == None: | |
3793 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
3791 | self.specHeisGraphCebRTIplot.setCheckState(0) | |
3794 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3792 | self.specHeisGraphSaveRTIplot.setCheckState(0) | |
3795 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3793 | self.specHeisGraphftpRTIplot.setCheckState(0) | |
3796 | else: |
|
3794 | else: | |
3797 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3795 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) | |
3798 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3796 | parmObj = opObj.getParameterObj(parameterName='channelList') | |
3799 | if parmObj == None: |
|
3797 | if parmObj == None: | |
3800 | self.specHeisGgraphChannelList.clear() |
|
3798 | self.specHeisGgraphChannelList.clear() | |
3801 | else: |
|
3799 | else: | |
3802 | value = opObj.getParameterValue(parameterName='channelList') |
|
3800 | value = opObj.getParameterValue(parameterName='channelList') | |
3803 | channelListRTIPlot = str(value)[1:-1] |
|
3801 | channelListRTIPlot = str(value)[1:-1] | |
3804 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
3802 | self.specGgraphChannelList.setText(channelListRTIPlot) | |
3805 | self.specGgraphChannelList.setEnabled(True) |
|
3803 | self.specGgraphChannelList.setEnabled(True) | |
3806 |
|
3804 | |||
3807 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3805 | parmObj = opObj.getParameterObj(parameterName='xmin') | |
3808 | if parmObj == None: |
|
3806 | if parmObj == None: | |
3809 | self.specHeisGgraphTminTmax.clear() |
|
3807 | self.specHeisGgraphTminTmax.clear() | |
3810 | else: |
|
3808 | else: | |
3811 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3809 | value1 = opObj.getParameterValue(parameterName='xmin') | |
3812 | value1 = str(value1) |
|
3810 | value1 = str(value1) | |
3813 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3811 | value2 = opObj.getParameterValue(parameterName='xmax') | |
3814 | value2 = str(value2) |
|
3812 | value2 = str(value2) | |
3815 | value = value1 + "," + value2 |
|
3813 | value = value1 + "," + value2 | |
3816 | self.specHeisGgraphTminTmax.setText(value) |
|
3814 | self.specHeisGgraphTminTmax.setText(value) | |
3817 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
3815 | self.specHeisGgraphTminTmax.setEnabled(True) | |
3818 |
|
3816 | |||
3819 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3817 | parmObj = opObj.getParameterObj(parameterName='timerange') | |
3820 | if parmObj == None: |
|
3818 | if parmObj == None: | |
3821 | self.specGgraphTimeRange.clear() |
|
3819 | self.specGgraphTimeRange.clear() | |
3822 | else: |
|
3820 | else: | |
3823 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3821 | value1 = opObj.getParameterValue(parameterName='timerange') | |
3824 | value1 = str(value1) |
|
3822 | value1 = str(value1) | |
3825 | self.specHeisGgraphTimeRange.setText(value1) |
|
3823 | self.specHeisGgraphTimeRange.setText(value1) | |
3826 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
3824 | self.specHeisGgraphTimeRange.setEnabled(True) | |
3827 |
|
3825 | |||
3828 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3826 | parmObj = opObj.getParameterObj(parameterName='ymin') | |
3829 | if parmObj == None: |
|
3827 | if parmObj == None: | |
3830 | self.specHeisGgraphYminYmax.clear() |
|
3828 | self.specHeisGgraphYminYmax.clear() | |
3831 | else: |
|
3829 | else: | |
3832 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3830 | value1 = opObj.getParameterValue(parameterName='ymin') | |
3833 | value1 = str(value1) |
|
3831 | value1 = str(value1) | |
3834 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3832 | value2 = opObj.getParameterValue(parameterName='ymax') | |
3835 | value2 = str(value2) |
|
3833 | value2 = str(value2) | |
3836 | value = value1 + "," + value2 |
|
3834 | value = value1 + "," + value2 | |
3837 | self.specHeisGgraphYminYmax.setText(value) |
|
3835 | self.specHeisGgraphYminYmax.setText(value) | |
3838 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3836 | self.specHeisGgraphYminYmax.setEnabled(True) | |
3839 |
|
3837 | |||
3840 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3838 | parmObj = opObj.getParameterObj(parameterName="save") | |
3841 | if parmObj == None: |
|
3839 | if parmObj == None: | |
3842 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3840 | self.specHeisGraphSaveRTIplot.setCheckState(0) | |
3843 | else: |
|
3841 | else: | |
3844 | self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3842 | self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) | |
3845 |
|
3843 | |||
3846 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3844 | parmObj = opObj.getParameterObj(parameterName="ftp") | |
3847 | if parmObj == None: |
|
3845 | if parmObj == None: | |
3848 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3846 | self.specHeisGraphftpRTIplot.setCheckState(0) | |
3849 | else: |
|
3847 | else: | |
3850 | self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3848 | self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) | |
3851 |
|
3849 | |||
3852 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3850 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3853 | if parmObj: |
|
3851 | if parmObj: | |
3854 | value = parmObj.getValue() |
|
3852 | value = parmObj.getValue() | |
3855 | self.specHeisGraphPath.setText(value) |
|
3853 | self.specHeisGraphPath.setText(value) | |
3856 |
|
3854 | |||
3857 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3855 | parmObj = opObj.getParameterObj(parameterName="wr_period") | |
3858 | if parmObj: |
|
3856 | if parmObj: | |
3859 | value = parmObj.getValue() |
|
3857 | value = parmObj.getValue() | |
3860 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3858 | self.specHeisGgraphftpratio.setText(str(value)) | |
3861 |
|
3859 | |||
3862 | # outputSpectraHeisWrite |
|
3860 | # outputSpectraHeisWrite | |
3863 | opObj = puObj.getOperationObj(name='FitsWriter') |
|
3861 | opObj = puObj.getOperationObj(name='FitsWriter') | |
3864 | if opObj == None: |
|
3862 | if opObj == None: | |
3865 | self.specHeisOutputPath.clear() |
|
3863 | self.specHeisOutputPath.clear() | |
3866 | self.specHeisOutputblocksperfile.clear() |
|
3864 | self.specHeisOutputblocksperfile.clear() | |
3867 | self.specHeisOutputMetada.clear() |
|
3865 | self.specHeisOutputMetada.clear() | |
3868 | else: |
|
3866 | else: | |
3869 | value = opObj.getParameterObj(parameterName='path') |
|
3867 | value = opObj.getParameterObj(parameterName='path') | |
3870 | if value == None: |
|
3868 | if value == None: | |
3871 | self.specHeisOutputPath.clear() |
|
3869 | self.specHeisOutputPath.clear() | |
3872 | else: |
|
3870 | else: | |
3873 | value = opObj.getParameterValue(parameterName='path') |
|
3871 | value = opObj.getParameterValue(parameterName='path') | |
3874 | path = str(value) |
|
3872 | path = str(value) | |
3875 | self.specHeisOutputPath.setText(path) |
|
3873 | self.specHeisOutputPath.setText(path) | |
3876 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') |
|
3874 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') | |
3877 | if value == None: |
|
3875 | if value == None: | |
3878 | self.specHeisOutputblocksperfile.clear() |
|
3876 | self.specHeisOutputblocksperfile.clear() | |
3879 | else: |
|
3877 | else: | |
3880 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') |
|
3878 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') | |
3881 | blocksperfile = str(value) |
|
3879 | blocksperfile = str(value) | |
3882 | self.specHeisOutputblocksperfile.setText(blocksperfile) |
|
3880 | self.specHeisOutputblocksperfile.setText(blocksperfile) | |
3883 | value = opObj.getParameterObj(parameterName='metadatafile') |
|
3881 | value = opObj.getParameterObj(parameterName='metadatafile') | |
3884 | if value == None: |
|
3882 | if value == None: | |
3885 | self.specHeisOutputMetada.clear() |
|
3883 | self.specHeisOutputMetada.clear() | |
3886 | else: |
|
3884 | else: | |
3887 | value = opObj.getParameterValue(parameterName='metadatafile') |
|
3885 | value = opObj.getParameterValue(parameterName='metadatafile') | |
3888 | metada = str(value) |
|
3886 | metada = str(value) | |
3889 | self.specHeisOutputMetada.setText(metada) |
|
3887 | self.specHeisOutputMetada.setText(metada) | |
3890 |
|
3888 | |||
3891 | return |
|
3889 | return | |
3892 |
|
3890 | |||
3893 | def __refreshCorrelationWindow(self, puObj): |
|
3891 | def __refreshCorrelationWindow(self, puObj): | |
3894 | pass |
|
3892 | pass | |
3895 |
|
3893 | |||
3896 | def refreshPUWindow(self, puObj): |
|
3894 | def refreshPUWindow(self, puObj): | |
3897 |
|
3895 | |||
3898 | if puObj.datatype == 'Voltage': |
|
3896 | if puObj.datatype == 'Voltage': | |
3899 | self.__refreshVoltageWindow(puObj) |
|
3897 | self.__refreshVoltageWindow(puObj) | |
3900 |
|
3898 | |||
3901 | if puObj.datatype == 'Spectra': |
|
3899 | if puObj.datatype == 'Spectra': | |
3902 | self.__refreshSpectraWindow(puObj) |
|
3900 | self.__refreshSpectraWindow(puObj) | |
3903 |
|
3901 | |||
3904 | if puObj.datatype == 'SpectraHeis': |
|
3902 | if puObj.datatype == 'SpectraHeis': | |
3905 | self.__refreshSpectraHeisWindow(puObj) |
|
3903 | self.__refreshSpectraHeisWindow(puObj) | |
3906 |
|
3904 | |||
3907 | def refreshProjectProperties(self, projectObjView): |
|
3905 | def refreshProjectProperties(self, projectObjView): | |
3908 |
|
3906 | |||
3909 | propertyBuffObj = PropertyBuffer() |
|
3907 | propertyBuffObj = PropertyBuffer() | |
3910 | name = projectObjView.name |
|
3908 | name = projectObjView.name | |
3911 |
|
3909 | |||
3912 | propertyBuffObj.append("Properties", "Name", projectObjView.name), |
|
3910 | propertyBuffObj.append("Properties", "Name", projectObjView.name), | |
3913 | propertyBuffObj.append("Properties", "Description", projectObjView.description) |
|
3911 | propertyBuffObj.append("Properties", "Description", projectObjView.description) | |
3914 | propertyBuffObj.append("Properties", "Workspace", self.pathWorkSpace) |
|
3912 | propertyBuffObj.append("Properties", "Workspace", self.pathWorkSpace) | |
3915 |
|
3913 | |||
3916 | readUnitObj = projectObjView.getReadUnitObj() |
|
3914 | readUnitObj = projectObjView.getReadUnitObj() | |
3917 | runOperationObj = readUnitObj.getOperationObj(name='run') |
|
3915 | runOperationObj = readUnitObj.getOperationObj(name='run') | |
3918 |
|
3916 | |||
3919 | for thisParmObj in runOperationObj.getParameterObjList(): |
|
3917 | for thisParmObj in runOperationObj.getParameterObjList(): | |
3920 | propertyBuffObj.append("Reading parms", thisParmObj.name, str(thisParmObj.getValue())) |
|
3918 | propertyBuffObj.append("Reading parms", thisParmObj.name, str(thisParmObj.getValue())) | |
3921 |
|
3919 | |||
3922 | propertiesModel = propertyBuffObj.getPropertyModel() |
|
3920 | propertiesModel = propertyBuffObj.getPropertyModel() | |
3923 |
|
3921 | |||
3924 | self.treeProjectProperties.setModel(propertiesModel) |
|
3922 | self.treeProjectProperties.setModel(propertiesModel) | |
3925 | self.treeProjectProperties.expandAll() |
|
3923 | self.treeProjectProperties.expandAll() | |
3926 | self.treeProjectProperties.resizeColumnToContents(0) |
|
3924 | self.treeProjectProperties.resizeColumnToContents(0) | |
3927 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3925 | self.treeProjectProperties.resizeColumnToContents(1) | |
3928 |
|
3926 | |||
3929 | def refreshPUProperties(self, puObjView): |
|
3927 | def refreshPUProperties(self, puObjView): | |
3930 |
|
3928 | |||
3931 | ############ FTP CONFIG ################################ |
|
3929 | ############ FTP CONFIG ################################ | |
3932 | #Deleting FTP Conf. This processing unit have not got any |
|
3930 | #Deleting FTP Conf. This processing unit have not got any | |
3933 | #FTP configuration by default |
|
3931 | #FTP configuration by default | |
3934 | if puObjView.id in self.__puLocalFolder2FTP.keys(): |
|
3932 | if puObjView.id in self.__puLocalFolder2FTP.keys(): | |
3935 | self.__puLocalFolder2FTP.pop(puObjView.id) |
|
3933 | self.__puLocalFolder2FTP.pop(puObjView.id) | |
3936 | ######################################################## |
|
3934 | ######################################################## | |
3937 |
|
3935 | |||
3938 | propertyBuffObj = PropertyBuffer() |
|
3936 | propertyBuffObj = PropertyBuffer() | |
3939 |
|
3937 | |||
3940 | for thisOp in puObjView.getOperationObjList(): |
|
3938 | for thisOp in puObjView.getOperationObjList(): | |
3941 |
|
3939 | |||
3942 | operationName = thisOp.name |
|
3940 | operationName = thisOp.name | |
3943 |
|
3941 | |||
3944 | if operationName == 'run': |
|
3942 | if operationName == 'run': | |
3945 | operationName = 'Properties' |
|
3943 | operationName = 'Properties' | |
3946 |
|
3944 | |||
3947 | else: |
|
3945 | else: | |
3948 | if not thisOp.getParameterObjList(): |
|
3946 | if not thisOp.getParameterObjList(): | |
3949 | propertyBuffObj.append(operationName, '--', '--') |
|
3947 | propertyBuffObj.append(operationName, '--', '--') | |
3950 | continue |
|
3948 | continue | |
3951 |
|
3949 | |||
3952 | for thisParmObj in thisOp.getParameterObjList(): |
|
3950 | for thisParmObj in thisOp.getParameterObjList(): | |
3953 | propertyBuffObj.append(operationName, thisParmObj.name, str(thisParmObj.getValue())) |
|
3951 | propertyBuffObj.append(operationName, thisParmObj.name, str(thisParmObj.getValue())) | |
3954 |
|
3952 | |||
3955 | ############ FTP CONFIG ################################ |
|
3953 | ############ FTP CONFIG ################################ | |
3956 | if thisParmObj.name == "ftp_wei" and thisParmObj.getValue(): |
|
3954 | if thisParmObj.name == "ftp_wei" and thisParmObj.getValue(): | |
3957 | value = thisParmObj.getValue() |
|
3955 | value = thisParmObj.getValue() | |
3958 | self.temporalFTP.ftp_wei = value |
|
3956 | self.temporalFTP.ftp_wei = value | |
3959 |
|
3957 | |||
3960 | if thisParmObj.name == "exp_code" and thisParmObj.getValue(): |
|
3958 | if thisParmObj.name == "exp_code" and thisParmObj.getValue(): | |
3961 | value = thisParmObj.getValue() |
|
3959 | value = thisParmObj.getValue() | |
3962 | self.temporalFTP.exp_code = value |
|
3960 | self.temporalFTP.exp_code = value | |
3963 |
|
3961 | |||
3964 | if thisParmObj.name == "sub_exp_code" and thisParmObj.getValue(): |
|
3962 | if thisParmObj.name == "sub_exp_code" and thisParmObj.getValue(): | |
3965 | value = thisParmObj.getValue() |
|
3963 | value = thisParmObj.getValue() | |
3966 | self.temporalFTP.sub_exp_code = value |
|
3964 | self.temporalFTP.sub_exp_code = value | |
3967 |
|
3965 | |||
3968 | if thisParmObj.name == "plot_pos" and thisParmObj.getValue(): |
|
3966 | if thisParmObj.name == "plot_pos" and thisParmObj.getValue(): | |
3969 | value = thisParmObj.getValue() |
|
3967 | value = thisParmObj.getValue() | |
3970 | self.temporalFTP.plot_pos = value |
|
3968 | self.temporalFTP.plot_pos = value | |
3971 |
|
3969 | |||
3972 | if thisParmObj.name == 'ftp' and thisParmObj.getValue(): |
|
3970 | if thisParmObj.name == 'ftp' and thisParmObj.getValue(): | |
3973 | figpathObj = thisOp.getParameterObj('figpath') |
|
3971 | figpathObj = thisOp.getParameterObj('figpath') | |
3974 | if figpathObj: |
|
3972 | if figpathObj: | |
3975 | self.__puLocalFolder2FTP[puObjView.id] = figpathObj.getValue() |
|
3973 | self.__puLocalFolder2FTP[puObjView.id] = figpathObj.getValue() | |
3976 |
|
3974 | |||
3977 | ######################################################## |
|
3975 | ######################################################## | |
3978 |
|
3976 | |||
3979 | propertiesModel = propertyBuffObj.getPropertyModel() |
|
3977 | propertiesModel = propertyBuffObj.getPropertyModel() | |
3980 |
|
3978 | |||
3981 | self.treeProjectProperties.setModel(propertiesModel) |
|
3979 | self.treeProjectProperties.setModel(propertiesModel) | |
3982 | self.treeProjectProperties.expandAll() |
|
3980 | self.treeProjectProperties.expandAll() | |
3983 | self.treeProjectProperties.resizeColumnToContents(0) |
|
3981 | self.treeProjectProperties.resizeColumnToContents(0) | |
3984 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3982 | self.treeProjectProperties.resizeColumnToContents(1) | |
3985 |
|
3983 | |||
3986 | def refreshGraphicsId(self): |
|
3984 | def refreshGraphicsId(self): | |
3987 |
|
3985 | |||
3988 | projectObj = self.getSelectedProjectObj() |
|
3986 | projectObj = self.getSelectedProjectObj() | |
3989 |
|
3987 | |||
3990 | if not projectObj: |
|
3988 | if not projectObj: | |
3991 | return |
|
3989 | return | |
3992 |
|
3990 | |||
3993 | for idPU, puObj in projectObj.procUnitConfObjDict.items(): |
|
3991 | for idPU, puObj in projectObj.procUnitConfObjDict.items(): | |
3994 |
|
3992 | |||
3995 | for opObj in puObj.getOperationObjList(): |
|
3993 | for opObj in puObj.getOperationObjList(): | |
3996 |
|
3994 | |||
3997 | if opObj.name not in ('Scope', 'SpectraPlot', 'CrossSpectraPlot', 'RTIPlot', 'CoherenceMap', 'PowerProfilePlot', 'Noise', 'SpectraHeisScope', 'RTIfromSpectraHeis'): |
|
3995 | if opObj.name not in ('Scope', 'SpectraPlot', 'CrossSpectraPlot', 'RTIPlot', 'CoherenceMap', 'PowerProfilePlot', 'Noise', 'SpectraHeisScope', 'RTIfromSpectraHeis'): | |
3998 | continue |
|
3996 | continue | |
3999 |
|
3997 | |||
4000 | opObj.changeParameter(name='id', value=opObj.id, format='int') |
|
3998 | opObj.changeParameter(name='id', value=opObj.id, format='int') | |
4001 |
|
3999 | |||
4002 | def on_click(self, index): |
|
4000 | def on_click(self, index): | |
4003 |
|
4001 | |||
4004 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) |
|
4002 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) | |
4005 |
|
4003 | |||
4006 | projectObjView = self.getSelectedProjectObj() |
|
4004 | projectObjView = self.getSelectedProjectObj() | |
4007 |
|
4005 | |||
4008 | if not projectObjView: |
|
4006 | if not projectObjView: | |
4009 | return |
|
4007 | return | |
4010 |
|
4008 | |||
4011 | self.create = False |
|
4009 | self.create = False | |
4012 | selectedObjView = self.getSelectedItemObj() |
|
4010 | selectedObjView = self.getSelectedItemObj() | |
4013 |
|
4011 | |||
4014 | #A project has been selected |
|
4012 | #A project has been selected | |
4015 | if projectObjView == selectedObjView: |
|
4013 | if projectObjView == selectedObjView: | |
4016 |
|
4014 | |||
4017 | self.refreshProjectWindow(projectObjView) |
|
4015 | self.refreshProjectWindow(projectObjView) | |
4018 | self.refreshProjectProperties(projectObjView) |
|
4016 | self.refreshProjectProperties(projectObjView) | |
4019 |
|
4017 | |||
4020 | self.tabProject.setEnabled(True) |
|
4018 | self.tabProject.setEnabled(True) | |
4021 | self.tabVoltage.setEnabled(False) |
|
4019 | self.tabVoltage.setEnabled(False) | |
4022 | self.tabSpectra.setEnabled(False) |
|
4020 | self.tabSpectra.setEnabled(False) | |
4023 | self.tabCorrelation.setEnabled(False) |
|
4021 | self.tabCorrelation.setEnabled(False) | |
4024 | self.tabSpectraHeis.setEnabled(False) |
|
4022 | self.tabSpectraHeis.setEnabled(False) | |
4025 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4023 | self.tabWidgetProject.setCurrentWidget(self.tabProject) | |
4026 |
|
4024 | |||
4027 | return |
|
4025 | return | |
4028 |
|
4026 | |||
4029 | #A processing unit has been selected |
|
4027 | #A processing unit has been selected | |
4030 | voltEnable = False |
|
4028 | voltEnable = False | |
4031 | specEnable = False |
|
4029 | specEnable = False | |
4032 | corrEnable = False |
|
4030 | corrEnable = False | |
4033 | specHeisEnable = False |
|
4031 | specHeisEnable = False | |
4034 | tabSelected = self.tabProject |
|
4032 | tabSelected = self.tabProject | |
4035 |
|
4033 | |||
4036 | puObj = selectedObjView |
|
4034 | puObj = selectedObjView | |
4037 |
|
4035 | |||
4038 | self.refreshPUWindow(puObj) |
|
4036 | self.refreshPUWindow(puObj) | |
4039 | self.refreshPUProperties(puObj) |
|
4037 | self.refreshPUProperties(puObj) | |
4040 | self.showtabPUCreated(puObj.datatype) |
|
4038 | self.showtabPUCreated(puObj.datatype) | |
4041 |
|
4039 | |||
4042 | def on_right_click(self, pos): |
|
4040 | def on_right_click(self, pos): | |
4043 |
|
4041 | |||
4044 | self.menu = QtGui.QMenu() |
|
4042 | self.menu = QtGui.QMenu() | |
4045 | quitAction0 = self.menu.addAction("Create a New Project") |
|
4043 | quitAction0 = self.menu.addAction("Create a New Project") | |
4046 | quitAction1 = self.menu.addAction("Create a New Processing Unit") |
|
4044 | quitAction1 = self.menu.addAction("Create a New Processing Unit") | |
4047 | quitAction2 = self.menu.addAction("Delete Item") |
|
4045 | quitAction2 = self.menu.addAction("Delete Item") | |
4048 | quitAction3 = self.menu.addAction("Quit") |
|
4046 | quitAction3 = self.menu.addAction("Quit") | |
4049 |
|
4047 | |||
4050 | if len(self.__itemTreeDict) == 0: |
|
4048 | if len(self.__itemTreeDict) == 0: | |
4051 | quitAction2.setEnabled(False) |
|
4049 | quitAction2.setEnabled(False) | |
4052 | else: |
|
4050 | else: | |
4053 | quitAction2.setEnabled(True) |
|
4051 | quitAction2.setEnabled(True) | |
4054 |
|
4052 | |||
4055 | action = self.menu.exec_(self.mapToGlobal(pos)) |
|
4053 | action = self.menu.exec_(self.mapToGlobal(pos)) | |
4056 |
|
4054 | |||
4057 | if action == quitAction0: |
|
4055 | if action == quitAction0: | |
4058 | self. setInputsProject_View() |
|
4056 | self. setInputsProject_View() | |
4059 | self.create = True |
|
4057 | self.create = True | |
4060 |
|
4058 | |||
4061 | if action == quitAction1: |
|
4059 | if action == quitAction1: | |
4062 | if len(self.__projectObjDict) == 0: |
|
4060 | if len(self.__projectObjDict) == 0: | |
4063 | outputstr = "You need to create a Project before adding a Processing Unit" |
|
4061 | outputstr = "You need to create a Project before adding a Processing Unit" | |
4064 | self.console.clear() |
|
4062 | self.console.clear() | |
4065 | self.console.append(outputstr) |
|
4063 | self.console.append(outputstr) | |
4066 | return 0 |
|
4064 | return 0 | |
4067 | else: |
|
4065 | else: | |
4068 | self.addPUWindow() |
|
4066 | self.addPUWindow() | |
4069 | self.console.clear() |
|
4067 | self.console.clear() | |
4070 | self.console.append("Please, Choose the type of Processing Unit") |
|
4068 | self.console.append("Please, Choose the type of Processing Unit") | |
4071 | # self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
4069 | # self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") | |
4072 | # self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
4070 | # self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") | |
4073 | # self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
4071 | # self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") | |
4074 |
|
4072 | |||
4075 | if action == quitAction2: |
|
4073 | if action == quitAction2: | |
4076 | index = self.selectedItemTree |
|
4074 | index = self.selectedItemTree | |
4077 | try: |
|
4075 | try: | |
4078 | index.parent() |
|
4076 | index.parent() | |
4079 | except: |
|
4077 | except: | |
4080 | self.console.append('Please first select a Project or Processing Unit') |
|
4078 | self.console.append('Please first select a Project or Processing Unit') | |
4081 | return 0 |
|
4079 | return 0 | |
4082 | # print index.parent(),index |
|
4080 | # print index.parent(),index | |
4083 | if index.parent() == None: |
|
4081 | if index.parent() == None: | |
4084 | self.projectExplorerModel.removeRow(index.row()) |
|
4082 | self.projectExplorerModel.removeRow(index.row()) | |
4085 | else: |
|
4083 | else: | |
4086 | index.parent().removeRow(index.row()) |
|
4084 | index.parent().removeRow(index.row()) | |
4087 | self.removeItemTreeFromProject() |
|
4085 | self.removeItemTreeFromProject() | |
4088 | self.console.clear() |
|
4086 | self.console.clear() | |
4089 | # for i in self.projectExplorerTree.selectionModel().selection().indexes(): |
|
4087 | # for i in self.projectExplorerTree.selectionModel().selection().indexes(): | |
4090 | # print i.row() |
|
4088 | # print i.row() | |
4091 |
|
4089 | |||
4092 | if action == quitAction3: |
|
4090 | if action == quitAction3: | |
4093 | self.close() |
|
4091 | self.close() | |
4094 | return 0 |
|
4092 | return 0 | |
4095 |
|
4093 | |||
4096 | def createProjectView(self, id): |
|
4094 | def createProjectView(self, id): | |
4097 |
|
4095 | |||
4098 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4096 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() | |
4099 | id = str(id) |
|
4097 | id = str(id) | |
4100 | projectParms = self.__getParmsFromProjectWindow() |
|
4098 | projectParms = self.__getParmsFromProjectWindow() | |
4101 |
|
4099 | |||
4102 | if not projectParms.isValid(): |
|
4100 | if not projectParms.isValid(): | |
4103 | return None |
|
4101 | return None | |
4104 |
|
4102 | |||
4105 | projectObjView = Project() |
|
4103 | projectObjView = Project() | |
4106 | projectObjView.setup(id=id, name=projectParms.name, description=projectParms.description) |
|
4104 | projectObjView.setup(id=id, name=projectParms.name, description=projectParms.description) | |
4107 |
|
4105 | |||
4108 | self.__projectObjDict[id] = projectObjView |
|
4106 | self.__projectObjDict[id] = projectObjView | |
4109 | self.addProject2ProjectExplorer(id=id, name=projectObjView.name) |
|
4107 | self.addProject2ProjectExplorer(id=id, name=projectObjView.name) | |
4110 |
|
4108 | |||
4111 | self.create = False |
|
4109 | self.create = False | |
4112 |
|
4110 | |||
4113 | return projectObjView |
|
4111 | return projectObjView | |
4114 |
|
4112 | |||
4115 | def updateProjectView(self): |
|
4113 | def updateProjectView(self): | |
4116 |
|
4114 | |||
4117 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4115 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() | |
4118 |
|
4116 | |||
4119 | projectParms = self.__getParmsFromProjectWindow() |
|
4117 | projectParms = self.__getParmsFromProjectWindow() | |
4120 |
|
4118 | |||
4121 | if not projectParms.isValid(): |
|
4119 | if not projectParms.isValid(): | |
4122 | return None |
|
4120 | return None | |
4123 |
|
4121 | |||
4124 | projectObjView = self.getSelectedProjectObj() |
|
4122 | projectObjView = self.getSelectedProjectObj() | |
4125 |
|
4123 | |||
4126 | if not projectObjView: |
|
4124 | if not projectObjView: | |
4127 | self.console.append("Please select a project before update it") |
|
4125 | self.console.append("Please select a project before update it") | |
4128 | return None |
|
4126 | return None | |
4129 |
|
4127 | |||
4130 | projectObjView.update(name=projectParms.name, description=projectParms.description) |
|
4128 | projectObjView.update(name=projectParms.name, description=projectParms.description) | |
4131 |
|
4129 | |||
4132 | return projectObjView |
|
4130 | return projectObjView | |
4133 |
|
4131 | |||
4134 | def createReadUnitView(self, projectObjView): |
|
4132 | def createReadUnitView(self, projectObjView): | |
4135 |
|
4133 | |||
4136 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4134 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() | |
4137 |
|
4135 | |||
4138 | projectParms = self.__getParmsFromProjectWindow() |
|
4136 | projectParms = self.__getParmsFromProjectWindow() | |
4139 |
|
4137 | |||
4140 | if not projectParms.isValid(): |
|
4138 | if not projectParms.isValid(): | |
4141 | return None |
|
4139 | return None | |
4142 |
|
4140 | |||
4143 | if projectParms.datatype in ("Voltage", "Spectra", "Fits"): |
|
4141 | if projectParms.datatype in ("Voltage", "Spectra", "Fits"): | |
4144 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, |
|
4142 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, | |
4145 | path=projectParms.dpath, |
|
4143 | path=projectParms.dpath, | |
4146 | startDate=projectParms.startDate, |
|
4144 | startDate=projectParms.startDate, | |
4147 | endDate=projectParms.endDate, |
|
4145 | endDate=projectParms.endDate, | |
4148 | startTime=projectParms.startTime, |
|
4146 | startTime=projectParms.startTime, | |
4149 | endTime=projectParms.endTime, |
|
4147 | endTime=projectParms.endTime, | |
4150 | online=projectParms.online, |
|
4148 | online=projectParms.online, | |
4151 | walk=projectParms.walk |
|
4149 | walk=projectParms.walk | |
4152 | ) |
|
4150 | ) | |
4153 |
|
4151 | |||
4154 | if projectParms.set: |
|
4152 | if projectParms.set: | |
4155 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") |
|
4153 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") | |
4156 |
|
4154 | |||
4157 | if projectParms.delay: |
|
4155 | if projectParms.delay: | |
4158 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4156 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") | |
4159 |
|
4157 | |||
4160 | if projectParms.expLabel: |
|
4158 | if projectParms.expLabel: | |
4161 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) |
|
4159 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) | |
4162 |
|
4160 | |||
4163 | if projectParms.datatype == "USRP": |
|
4161 | if projectParms.datatype == "USRP": | |
4164 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, |
|
4162 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, | |
4165 | path=projectParms.dpath, |
|
4163 | path=projectParms.dpath, | |
4166 | startDate=projectParms.startDate, |
|
4164 | startDate=projectParms.startDate, | |
4167 | endDate=projectParms.endDate, |
|
4165 | endDate=projectParms.endDate, | |
4168 | startTime=projectParms.startTime, |
|
4166 | startTime=projectParms.startTime, | |
4169 | endTime=projectParms.endTime, |
|
4167 | endTime=projectParms.endTime, | |
4170 | online=projectParms.online, |
|
4168 | online=projectParms.online, | |
4171 | ippKm=projectParms.ippKm |
|
4169 | ippKm=projectParms.ippKm | |
4172 | ) |
|
4170 | ) | |
4173 |
|
4171 | |||
4174 | if projectParms.delay: |
|
4172 | if projectParms.delay: | |
4175 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4173 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") | |
4176 |
|
4174 | |||
4177 | return readUnitConfObj |
|
4175 | return readUnitConfObj | |
4178 |
|
4176 | |||
4179 | def updateReadUnitView(self, projectObjView, idReadUnit): |
|
4177 | def updateReadUnitView(self, projectObjView, idReadUnit): | |
4180 |
|
4178 | |||
4181 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk , set = self.getParmsFromProjectWindow() |
|
4179 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk , set = self.getParmsFromProjectWindow() | |
4182 |
|
4180 | |||
4183 | readUnitConfObj = projectObjView.getProcUnitObj(idReadUnit) |
|
4181 | readUnitConfObj = projectObjView.getProcUnitObj(idReadUnit) | |
4184 |
|
4182 | |||
4185 | projectParms = self.__getParmsFromProjectWindow() |
|
4183 | projectParms = self.__getParmsFromProjectWindow() | |
4186 |
|
4184 | |||
4187 | if not projectParms.isValid(): |
|
4185 | if not projectParms.isValid(): | |
4188 | return None |
|
4186 | return None | |
4189 |
|
4187 | |||
4190 | if projectParms.datatype in ["Voltage", "Spectra", "Fits"]: |
|
4188 | if projectParms.datatype in ["Voltage", "Spectra", "Fits"]: | |
4191 | readUnitConfObj.update(datatype=projectParms.datatype, |
|
4189 | readUnitConfObj.update(datatype=projectParms.datatype, | |
4192 | path=projectParms.dpath, |
|
4190 | path=projectParms.dpath, | |
4193 | startDate=projectParms.startDate, |
|
4191 | startDate=projectParms.startDate, | |
4194 | endDate=projectParms.endDate, |
|
4192 | endDate=projectParms.endDate, | |
4195 | startTime=projectParms.startTime, |
|
4193 | startTime=projectParms.startTime, | |
4196 | endTime=projectParms.endTime, |
|
4194 | endTime=projectParms.endTime, | |
4197 | online=projectParms.online, |
|
4195 | online=projectParms.online, | |
4198 | walk=projectParms.walk |
|
4196 | walk=projectParms.walk | |
4199 | ) |
|
4197 | ) | |
4200 | if projectParms.set: |
|
4198 | if projectParms.set: | |
4201 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") |
|
4199 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") | |
4202 |
|
4200 | |||
4203 | if projectParms.delay: |
|
4201 | if projectParms.delay: | |
4204 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4202 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") | |
4205 |
|
4203 | |||
4206 | if projectParms.expLabel: |
|
4204 | if projectParms.expLabel: | |
4207 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) |
|
4205 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) | |
4208 |
|
4206 | |||
4209 | if projectParms.datatype == "USRP": |
|
4207 | if projectParms.datatype == "USRP": | |
4210 | readUnitConfObj.update(datatype=projectParms.datatype, |
|
4208 | readUnitConfObj.update(datatype=projectParms.datatype, | |
4211 | path=projectParms.dpath, |
|
4209 | path=projectParms.dpath, | |
4212 | startDate=projectParms.startDate, |
|
4210 | startDate=projectParms.startDate, | |
4213 | endDate=projectParms.endDate, |
|
4211 | endDate=projectParms.endDate, | |
4214 | startTime=projectParms.startTime, |
|
4212 | startTime=projectParms.startTime, | |
4215 | endTime=projectParms.endTime, |
|
4213 | endTime=projectParms.endTime, | |
4216 | online=projectParms.online, |
|
4214 | online=projectParms.online, | |
4217 | ippKm=projectParms.ippKm |
|
4215 | ippKm=projectParms.ippKm | |
4218 | ) |
|
4216 | ) | |
4219 |
|
4217 | |||
4220 | if projectParms.delay: |
|
4218 | if projectParms.delay: | |
4221 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4219 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") | |
4222 |
|
4220 | |||
4223 | return readUnitConfObj |
|
4221 | return readUnitConfObj | |
4224 |
|
4222 | |||
4225 | def createProcUnitView(self, projectObjView, datatype, inputId): |
|
4223 | def createProcUnitView(self, projectObjView, datatype, inputId): | |
4226 |
|
4224 | |||
4227 | procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId) |
|
4225 | procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId) | |
4228 |
|
4226 | |||
4229 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
4227 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj | |
4230 |
|
4228 | |||
4231 | return procUnitConfObj |
|
4229 | return procUnitConfObj | |
4232 |
|
4230 | |||
4233 | def updateProcUnitView(self, id): |
|
4231 | def updateProcUnitView(self, id): | |
4234 |
|
4232 | |||
4235 | procUnitConfObj = projectObjView.getProcUnitObj(id) |
|
4233 | procUnitConfObj = projectObjView.getProcUnitObj(id) | |
4236 | procUnitConfObj.removeOperations() |
|
4234 | procUnitConfObj.removeOperations() | |
4237 |
|
4235 | |||
4238 | return procUnitConfObj |
|
4236 | return procUnitConfObj | |
4239 |
|
4237 | |||
4240 | def addPUWindow(self): |
|
4238 | def addPUWindow(self): | |
4241 |
|
4239 | |||
4242 | self.configUPWindowObj = UnitProcessWindow(self) |
|
4240 | self.configUPWindowObj = UnitProcessWindow(self) | |
4243 | fatherObj = self.getSelectedItemObj() |
|
4241 | fatherObj = self.getSelectedItemObj() | |
4244 | try: |
|
4242 | try: | |
4245 | fatherObj.getElementName() |
|
4243 | fatherObj.getElementName() | |
4246 | except: |
|
4244 | except: | |
4247 | self.console.append("First left click on Project or Processing Unit") |
|
4245 | self.console.append("First left click on Project or Processing Unit") | |
4248 | return 0 |
|
4246 | return 0 | |
4249 |
|
4247 | |||
4250 | if fatherObj.getElementName() == 'Project': |
|
4248 | if fatherObj.getElementName() == 'Project': | |
4251 | readUnitConfObj = fatherObj.getReadUnitObj() |
|
4249 | readUnitConfObj = fatherObj.getReadUnitObj() | |
4252 | self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype) |
|
4250 | self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype) | |
4253 |
|
4251 | |||
4254 | self.configUPWindowObj.getfromWindowList.append(fatherObj) |
|
4252 | self.configUPWindowObj.getfromWindowList.append(fatherObj) | |
4255 | self.configUPWindowObj.loadTotalList() |
|
4253 | self.configUPWindowObj.loadTotalList() | |
4256 | self.configUPWindowObj.show() |
|
4254 | self.configUPWindowObj.show() | |
4257 | self.configUPWindowObj.closed.connect(self.createPUWindow) |
|
4255 | self.configUPWindowObj.closed.connect(self.createPUWindow) | |
4258 |
|
4256 | |||
4259 | def createPUWindow(self): |
|
4257 | def createPUWindow(self): | |
4260 |
|
4258 | |||
4261 | if not self.configUPWindowObj.create: |
|
4259 | if not self.configUPWindowObj.create: | |
4262 | return |
|
4260 | return | |
4263 |
|
4261 | |||
4264 | fatherObj = self.configUPWindowObj.getFromWindow |
|
4262 | fatherObj = self.configUPWindowObj.getFromWindow | |
4265 | datatype = self.configUPWindowObj.typeofUP |
|
4263 | datatype = self.configUPWindowObj.typeofUP | |
4266 |
|
4264 | |||
4267 | if fatherObj.getElementName() == 'Project': |
|
4265 | if fatherObj.getElementName() == 'Project': | |
4268 | inputId = fatherObj.getReadUnitId() |
|
4266 | inputId = fatherObj.getReadUnitId() | |
4269 | projectObjView = fatherObj |
|
4267 | projectObjView = fatherObj | |
4270 | else: |
|
4268 | else: | |
4271 | inputId = fatherObj.getId() |
|
4269 | inputId = fatherObj.getId() | |
4272 | projectObjView = self.getSelectedProjectObj() |
|
4270 | projectObjView = self.getSelectedProjectObj() | |
4273 |
|
4271 | |||
4274 | if not projectObjView: |
|
4272 | if not projectObjView: | |
4275 | return |
|
4273 | return | |
4276 |
|
4274 | |||
4277 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) |
|
4275 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) | |
4278 |
|
4276 | |||
4279 | self.addPU2ProjectExplorer(puObj) |
|
4277 | self.addPU2ProjectExplorer(puObj) | |
4280 |
|
4278 | |||
4281 | self.showtabPUCreated(datatype) |
|
4279 | self.showtabPUCreated(datatype) | |
4282 |
|
4280 | |||
4283 | self.clearPUWindow(datatype) |
|
4281 | self.clearPUWindow(datatype) | |
4284 |
|
4282 | |||
4285 | self.showPUinitView() |
|
4283 | self.showPUinitView() | |
4286 |
|
4284 | |||
4287 | def addFTPConf2Operation(self, puObj, opObj): |
|
4285 | def addFTPConf2Operation(self, puObj, opObj): | |
4288 |
|
4286 | |||
4289 | if not self.temporalFTP.create: |
|
4287 | if not self.temporalFTP.create: | |
4290 | self.temporalFTP.setwithoutconfiguration() |
|
4288 | self.temporalFTP.setwithoutconfiguration() | |
4291 |
|
4289 | |||
4292 | # opObj.addParameter(name='server', value=self.temporalFTP.server, format='str') |
|
4290 | # opObj.addParameter(name='server', value=self.temporalFTP.server, format='str') | |
4293 | # opObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') |
|
4291 | # opObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') | |
4294 | # opObj.addParameter(name='username', value=self.temporalFTP.username, format='str') |
|
4292 | # opObj.addParameter(name='username', value=self.temporalFTP.username, format='str') | |
4295 | # opObj.addParameter(name='password', value=self.temporalFTP.password, format='str') |
|
4293 | # opObj.addParameter(name='password', value=self.temporalFTP.password, format='str') | |
4296 |
|
4294 | |||
4297 | if self.temporalFTP.ftp_wei: |
|
4295 | if self.temporalFTP.ftp_wei: | |
4298 | opObj.addParameter(name='ftp_wei', value=int(self.temporalFTP.ftp_wei), format='int') |
|
4296 | opObj.addParameter(name='ftp_wei', value=int(self.temporalFTP.ftp_wei), format='int') | |
4299 | if self.temporalFTP.exp_code: |
|
4297 | if self.temporalFTP.exp_code: | |
4300 | opObj.addParameter(name='exp_code', value=int(self.temporalFTP.exp_code), format='int') |
|
4298 | opObj.addParameter(name='exp_code', value=int(self.temporalFTP.exp_code), format='int') | |
4301 | if self.temporalFTP.sub_exp_code: |
|
4299 | if self.temporalFTP.sub_exp_code: | |
4302 | opObj.addParameter(name='sub_exp_code', value=int(self.temporalFTP.sub_exp_code), format='int') |
|
4300 | opObj.addParameter(name='sub_exp_code', value=int(self.temporalFTP.sub_exp_code), format='int') | |
4303 | if self.temporalFTP.plot_pos: |
|
4301 | if self.temporalFTP.plot_pos: | |
4304 | opObj.addParameter(name='plot_pos', value=int(self.temporalFTP.plot_pos), format='int') |
|
4302 | opObj.addParameter(name='plot_pos', value=int(self.temporalFTP.plot_pos), format='int') | |
4305 |
|
4303 | |||
4306 | # def __checkFTPProcUnit(self, projectObj, localfolder): |
|
4304 | # def __checkFTPProcUnit(self, projectObj, localfolder): | |
4307 | # |
|
4305 | # | |
4308 | # puId = None |
|
4306 | # puId = None | |
4309 | # puObj = None |
|
4307 | # puObj = None | |
4310 | # |
|
4308 | # | |
4311 | # for thisPuId, thisPuObj in projectObj.procUnitItems(): |
|
4309 | # for thisPuId, thisPuObj in projectObj.procUnitItems(): | |
4312 | # |
|
4310 | # | |
4313 | # if not thisPuObj.name == "SendToServer": |
|
4311 | # if not thisPuObj.name == "SendToServer": | |
4314 | # continue |
|
4312 | # continue | |
4315 | # |
|
4313 | # | |
4316 | # opObj = thisPuObj.getOperationObj(name='run') |
|
4314 | # opObj = thisPuObj.getOperationObj(name='run') | |
4317 | # |
|
4315 | # | |
4318 | # parmObj = opObj.getParameterObj('localfolder') |
|
4316 | # parmObj = opObj.getParameterObj('localfolder') | |
4319 | # |
|
4317 | # | |
4320 | # #localfolder parameter should always be set, if it is not set then ProcUnit should be removed |
|
4318 | # #localfolder parameter should always be set, if it is not set then ProcUnit should be removed | |
4321 | # if not parmObj: |
|
4319 | # if not parmObj: | |
4322 | # projectObj.removeProcUnit(thisPuId) |
|
4320 | # projectObj.removeProcUnit(thisPuId) | |
4323 | # continue |
|
4321 | # continue | |
4324 | # |
|
4322 | # | |
4325 | # thisLocalfolder = parmObj.getValue() |
|
4323 | # thisLocalfolder = parmObj.getValue() | |
4326 | # |
|
4324 | # | |
4327 | # if localfolder != thisLocalfolder: |
|
4325 | # if localfolder != thisLocalfolder: | |
4328 | # continue |
|
4326 | # continue | |
4329 | # |
|
4327 | # | |
4330 | # puId = thisPuId |
|
4328 | # puId = thisPuId | |
4331 | # puObj = thisPuObj |
|
4329 | # puObj = thisPuObj | |
4332 | # break |
|
4330 | # break | |
4333 | # |
|
4331 | # | |
4334 | # return puObj |
|
4332 | # return puObj | |
4335 |
|
4333 | |||
4336 | def createFTPProcUnitView(self): |
|
4334 | def createFTPProcUnitView(self): | |
4337 |
|
4335 | |||
4338 | if not self.temporalFTP.create: |
|
4336 | if not self.temporalFTP.create: | |
4339 | self.temporalFTP.setwithoutconfiguration() |
|
4337 | self.temporalFTP.setwithoutconfiguration() | |
4340 |
|
4338 | |||
4341 | projectObj = self.getSelectedProjectObj() |
|
4339 | projectObj = self.getSelectedProjectObj() | |
4342 |
|
4340 | |||
4343 | if not projectObj: |
|
4341 | if not projectObj: | |
4344 | return |
|
4342 | return | |
4345 |
|
4343 | |||
4346 | self.removeAllFTPProcUnitView(projectObj) |
|
4344 | self.removeAllFTPProcUnitView(projectObj) | |
4347 |
|
4345 | |||
4348 | if not self.__puLocalFolder2FTP: |
|
4346 | if not self.__puLocalFolder2FTP: | |
4349 | return |
|
4347 | return | |
4350 |
|
4348 | |||
4351 | folderList = ",".join(self.__puLocalFolder2FTP.values()) |
|
4349 | folderList = ",".join(self.__puLocalFolder2FTP.values()) | |
4352 |
|
4350 | |||
4353 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") |
|
4351 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") | |
4354 |
|
4352 | |||
4355 | procUnitConfObj.addParameter(name='server', value=self.temporalFTP.server, format='str') |
|
4353 | procUnitConfObj.addParameter(name='server', value=self.temporalFTP.server, format='str') | |
4356 | procUnitConfObj.addParameter(name='username', value=self.temporalFTP.username, format='str') |
|
4354 | procUnitConfObj.addParameter(name='username', value=self.temporalFTP.username, format='str') | |
4357 | procUnitConfObj.addParameter(name='password', value=self.temporalFTP.password, format='str') |
|
4355 | procUnitConfObj.addParameter(name='password', value=self.temporalFTP.password, format='str') | |
4358 | procUnitConfObj.addParameter(name='localfolder', value=folderList, format='list') |
|
4356 | procUnitConfObj.addParameter(name='localfolder', value=folderList, format='list') | |
4359 | procUnitConfObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') |
|
4357 | procUnitConfObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') | |
4360 | procUnitConfObj.addParameter(name='ext', value=self.temporalFTP.extension, format='str') |
|
4358 | procUnitConfObj.addParameter(name='ext', value=self.temporalFTP.extension, format='str') | |
4361 | procUnitConfObj.addParameter(name='period', value=self.temporalFTP.period, format='int') |
|
4359 | procUnitConfObj.addParameter(name='period', value=self.temporalFTP.period, format='int') | |
4362 | procUnitConfObj.addParameter(name='protocol', value=self.temporalFTP.protocol, format='str') |
|
4360 | procUnitConfObj.addParameter(name='protocol', value=self.temporalFTP.protocol, format='str') | |
4363 |
|
4361 | |||
4364 | procUnitConfObj.addParameter(name='ftp_wei', value=self.temporalFTP.ftp_wei, format='int') |
|
4362 | procUnitConfObj.addParameter(name='ftp_wei', value=self.temporalFTP.ftp_wei, format='int') | |
4365 | procUnitConfObj.addParameter(name='exp_code', value=self.temporalFTP.exp_code, format='int') |
|
4363 | procUnitConfObj.addParameter(name='exp_code', value=self.temporalFTP.exp_code, format='int') | |
4366 | procUnitConfObj.addParameter(name='sub_exp_code', value=self.temporalFTP.sub_exp_code, format='int') |
|
4364 | procUnitConfObj.addParameter(name='sub_exp_code', value=self.temporalFTP.sub_exp_code, format='int') | |
4367 | procUnitConfObj.addParameter(name='plot_pos', value=self.temporalFTP.plot_pos, format='int') |
|
4365 | procUnitConfObj.addParameter(name='plot_pos', value=self.temporalFTP.plot_pos, format='int') | |
4368 |
|
4366 | |||
4369 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
4367 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj | |
4370 |
|
4368 | |||
4371 | def removeAllFTPProcUnitView(self, projectObj): |
|
4369 | def removeAllFTPProcUnitView(self, projectObj): | |
4372 |
|
4370 | |||
4373 | for thisPuId, thisPuObj in projectObj.procUnitItems(): |
|
4371 | for thisPuId, thisPuObj in projectObj.procUnitItems(): | |
4374 |
|
4372 | |||
4375 | if not thisPuObj.name == "SendToServer": |
|
4373 | if not thisPuObj.name == "SendToServer": | |
4376 | continue |
|
4374 | continue | |
4377 |
|
4375 | |||
4378 | projectObj.removeProcUnit(thisPuId) |
|
4376 | projectObj.removeProcUnit(thisPuId) | |
4379 |
|
4377 | |||
4380 | if thisPuId not in self.__puObjDict.keys(): |
|
4378 | if thisPuId not in self.__puObjDict.keys(): | |
4381 | continue |
|
4379 | continue | |
4382 |
|
4380 | |||
4383 | self.__puObjDict.pop(thisPuId) |
|
4381 | self.__puObjDict.pop(thisPuId) | |
4384 |
|
4382 | |||
4385 | def showPUinitView(self): |
|
4383 | def showPUinitView(self): | |
4386 |
|
4384 | |||
4387 | self.propertiesModel = TreeModel() |
|
4385 | self.propertiesModel = TreeModel() | |
4388 | self.propertiesModel.initPUVoltageView() |
|
4386 | self.propertiesModel.initPUVoltageView() | |
4389 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4387 | self.treeProjectProperties.setModel(self.propertiesModel) | |
4390 | self.treeProjectProperties.expandAll() |
|
4388 | self.treeProjectProperties.expandAll() | |
4391 | self.treeProjectProperties.allColumnsShowFocus() |
|
4389 | self.treeProjectProperties.allColumnsShowFocus() | |
4392 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4390 | self.treeProjectProperties.resizeColumnToContents(1) | |
4393 |
|
4391 | |||
4394 | def saveFTPFromOpObj(self, operationObj): |
|
4392 | def saveFTPFromOpObj(self, operationObj): | |
4395 |
|
4393 | |||
4396 | if operationObj.name != "SendByFTP": |
|
4394 | if operationObj.name != "SendByFTP": | |
4397 | return |
|
4395 | return | |
4398 |
|
4396 | |||
4399 | server = operationObj.getParameterValue("server") |
|
4397 | server = operationObj.getParameterValue("server") | |
4400 | username = operationObj.getParameterValue("username") |
|
4398 | username = operationObj.getParameterValue("username") | |
4401 | password = operationObj.getParameterValue("password") |
|
4399 | password = operationObj.getParameterValue("password") | |
4402 | localfolder = operationObj.getParameterValue("localfolder") |
|
4400 | localfolder = operationObj.getParameterValue("localfolder") | |
4403 | remotefolder = operationObj.getParameterValue("remotefolder") |
|
4401 | remotefolder = operationObj.getParameterValue("remotefolder") | |
4404 | ext = operationObj.getParameterValue("ext") |
|
4402 | ext = operationObj.getParameterValue("ext") | |
4405 | period = operationObj.getParameterValue("period") |
|
4403 | period = operationObj.getParameterValue("period") | |
4406 |
|
4404 | |||
4407 | self.temporalFTP.save(server=server, |
|
4405 | self.temporalFTP.save(server=server, | |
4408 | remotefolder=remotefolder, |
|
4406 | remotefolder=remotefolder, | |
4409 | username=username, |
|
4407 | username=username, | |
4410 | password=password, |
|
4408 | password=password, | |
4411 | localfolder=localfolder, |
|
4409 | localfolder=localfolder, | |
4412 | extension=ext) |
|
4410 | extension=ext) | |
4413 |
|
4411 | |||
4414 | return |
|
4412 | return | |
4415 |
|
4413 | |||
4416 | def saveFTPFromProcUnitObj(self, puObj): |
|
4414 | def saveFTPFromProcUnitObj(self, puObj): | |
4417 |
|
4415 | |||
4418 | opObj = puObj.getOperationObj(name="run") |
|
4416 | opObj = puObj.getOperationObj(name="run") | |
4419 |
|
4417 | |||
4420 | parmObj = opObj.getParameterObj(parameterName="server") |
|
4418 | parmObj = opObj.getParameterObj(parameterName="server") | |
4421 | if parmObj == None: |
|
4419 | if parmObj == None: | |
4422 | server = 'jro-app.igp.gob.pe' |
|
4420 | server = 'jro-app.igp.gob.pe' | |
4423 | else: |
|
4421 | else: | |
4424 | server = parmObj.getValue() |
|
4422 | server = parmObj.getValue() | |
4425 |
|
4423 | |||
4426 | parmObj = opObj.getParameterObj(parameterName="remotefolder") |
|
4424 | parmObj = opObj.getParameterObj(parameterName="remotefolder") | |
4427 | if parmObj == None: |
|
4425 | if parmObj == None: | |
4428 | remotefolder = '/home/wmaster/graficos' |
|
4426 | remotefolder = '/home/wmaster/graficos' | |
4429 | else: |
|
4427 | else: | |
4430 | remotefolder = parmObj.getValue() |
|
4428 | remotefolder = parmObj.getValue() | |
4431 |
|
4429 | |||
4432 | parmObj = opObj.getParameterObj(parameterName="username") |
|
4430 | parmObj = opObj.getParameterObj(parameterName="username") | |
4433 | if parmObj == None: |
|
4431 | if parmObj == None: | |
4434 | username = 'wmaster' |
|
4432 | username = 'wmaster' | |
4435 | else: |
|
4433 | else: | |
4436 | username = parmObj.getValue() |
|
4434 | username = parmObj.getValue() | |
4437 |
|
4435 | |||
4438 | parmObj = opObj.getParameterObj(parameterName="password") |
|
4436 | parmObj = opObj.getParameterObj(parameterName="password") | |
4439 | if parmObj == None: |
|
4437 | if parmObj == None: | |
4440 | password = 'mst2010vhf' |
|
4438 | password = 'mst2010vhf' | |
4441 | else: |
|
4439 | else: | |
4442 | password = parmObj.getValue() |
|
4440 | password = parmObj.getValue() | |
4443 |
|
4441 | |||
4444 | parmObj = opObj.getParameterObj(parameterName="ftp_wei") |
|
4442 | parmObj = opObj.getParameterObj(parameterName="ftp_wei") | |
4445 | if parmObj == None: |
|
4443 | if parmObj == None: | |
4446 | ftp_wei = 0 |
|
4444 | ftp_wei = 0 | |
4447 | else: |
|
4445 | else: | |
4448 | ftp_wei = parmObj.getValue() |
|
4446 | ftp_wei = parmObj.getValue() | |
4449 |
|
4447 | |||
4450 | parmObj = opObj.getParameterObj(parameterName="exp_code") |
|
4448 | parmObj = opObj.getParameterObj(parameterName="exp_code") | |
4451 | if parmObj == None: |
|
4449 | if parmObj == None: | |
4452 | exp_code = 0 |
|
4450 | exp_code = 0 | |
4453 | else: |
|
4451 | else: | |
4454 | exp_code = parmObj.getValue() |
|
4452 | exp_code = parmObj.getValue() | |
4455 |
|
4453 | |||
4456 | parmObj = opObj.getParameterObj(parameterName="sub_exp_code") |
|
4454 | parmObj = opObj.getParameterObj(parameterName="sub_exp_code") | |
4457 | if parmObj == None: |
|
4455 | if parmObj == None: | |
4458 | sub_exp_code = 0 |
|
4456 | sub_exp_code = 0 | |
4459 | else: |
|
4457 | else: | |
4460 | sub_exp_code = parmObj.getValue() |
|
4458 | sub_exp_code = parmObj.getValue() | |
4461 |
|
4459 | |||
4462 | parmObj = opObj.getParameterObj(parameterName="plot_pos") |
|
4460 | parmObj = opObj.getParameterObj(parameterName="plot_pos") | |
4463 | if parmObj == None: |
|
4461 | if parmObj == None: | |
4464 | plot_pos = 0 |
|
4462 | plot_pos = 0 | |
4465 | else: |
|
4463 | else: | |
4466 | plot_pos = parmObj.getValue() |
|
4464 | plot_pos = parmObj.getValue() | |
4467 |
|
4465 | |||
4468 | parmObj = opObj.getParameterObj(parameterName="localfolder") |
|
4466 | parmObj = opObj.getParameterObj(parameterName="localfolder") | |
4469 | if parmObj == None: |
|
4467 | if parmObj == None: | |
4470 | localfolder = None |
|
4468 | localfolder = None | |
4471 | else: |
|
4469 | else: | |
4472 | localfolder = parmObj.getValue() |
|
4470 | localfolder = parmObj.getValue() | |
4473 |
|
4471 | |||
4474 | parmObj = opObj.getParameterObj(parameterName="ext") |
|
4472 | parmObj = opObj.getParameterObj(parameterName="ext") | |
4475 | if parmObj == None: |
|
4473 | if parmObj == None: | |
4476 | extension = '.png' |
|
4474 | extension = '.png' | |
4477 | else: |
|
4475 | else: | |
4478 | extension = parmObj.getValue() |
|
4476 | extension = parmObj.getValue() | |
4479 |
|
4477 | |||
4480 | self.temporalFTP.save(server=server, |
|
4478 | self.temporalFTP.save(server=server, | |
4481 | remotefolder=remotefolder, |
|
4479 | remotefolder=remotefolder, | |
4482 | username=username, |
|
4480 | username=username, | |
4483 | password=password, |
|
4481 | password=password, | |
4484 | ftp_wei=ftp_wei, |
|
4482 | ftp_wei=ftp_wei, | |
4485 | exp_code=exp_code, |
|
4483 | exp_code=exp_code, | |
4486 | sub_exp_code=sub_exp_code, |
|
4484 | sub_exp_code=sub_exp_code, | |
4487 | plot_pos=plot_pos, |
|
4485 | plot_pos=plot_pos, | |
4488 | localfolder=localfolder, |
|
4486 | localfolder=localfolder, | |
4489 | extension=extension) |
|
4487 | extension=extension) | |
4490 |
|
4488 | |||
4491 | def addProject2ProjectExplorer(self, id, name): |
|
4489 | def addProject2ProjectExplorer(self, id, name): | |
4492 |
|
4490 | |||
4493 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4491 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) | |
4494 |
|
4492 | |||
4495 | parentItem = self.projectExplorerModel.invisibleRootItem() |
|
4493 | parentItem = self.projectExplorerModel.invisibleRootItem() | |
4496 | parentItem.appendRow(itemTree) |
|
4494 | parentItem.appendRow(itemTree) | |
4497 |
|
4495 | |||
4498 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) |
|
4496 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) | |
4499 |
|
4497 | |||
4500 | self.selectedItemTree = itemTree |
|
4498 | self.selectedItemTree = itemTree | |
4501 |
|
4499 | |||
4502 | self.__itemTreeDict[id] = itemTree |
|
4500 | self.__itemTreeDict[id] = itemTree | |
4503 |
|
4501 | |||
4504 | def addPU2ProjectExplorer(self, puObj): |
|
4502 | def addPU2ProjectExplorer(self, puObj): | |
4505 |
|
4503 | |||
4506 | id, name = puObj.id, puObj.datatype |
|
4504 | id, name = puObj.id, puObj.datatype | |
4507 |
|
4505 | |||
4508 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4506 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) | |
4509 |
|
4507 | |||
4510 | parentItem = self.selectedItemTree |
|
4508 | parentItem = self.selectedItemTree | |
4511 | parentItem.appendRow(itemTree) |
|
4509 | parentItem.appendRow(itemTree) | |
4512 | self.projectExplorerTree.expandAll() |
|
4510 | self.projectExplorerTree.expandAll() | |
4513 |
|
4511 | |||
4514 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) |
|
4512 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) | |
4515 |
|
4513 | |||
4516 | self.selectedItemTree = itemTree |
|
4514 | self.selectedItemTree = itemTree | |
4517 |
|
4515 | |||
4518 | self.__itemTreeDict[id] = itemTree |
|
4516 | self.__itemTreeDict[id] = itemTree | |
4519 |
|
4517 | |||
4520 | def addPU2PELoadXML(self, puObj): |
|
4518 | def addPU2PELoadXML(self, puObj): | |
4521 |
|
4519 | |||
4522 | id, name, inputId = puObj.id, puObj.datatype, puObj.inputId |
|
4520 | id, name, inputId = puObj.id, puObj.datatype, puObj.inputId | |
4523 |
|
4521 | |||
4524 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4522 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) | |
4525 |
|
4523 | |||
4526 | if self.__itemTreeDict.has_key(inputId): |
|
4524 | if self.__itemTreeDict.has_key(inputId): | |
4527 | parentItem = self.__itemTreeDict[inputId] |
|
4525 | parentItem = self.__itemTreeDict[inputId] | |
4528 | else: |
|
4526 | else: | |
4529 | #If parent is a Reader object |
|
4527 | #If parent is a Reader object | |
4530 | parentItem = self.__itemTreeDict[id[:-1]] |
|
4528 | parentItem = self.__itemTreeDict[id[:-1]] | |
4531 |
|
4529 | |||
4532 | parentItem.appendRow(itemTree) |
|
4530 | parentItem.appendRow(itemTree) | |
4533 | self.projectExplorerTree.expandAll() |
|
4531 | self.projectExplorerTree.expandAll() | |
4534 | parentItem = itemTree |
|
4532 | parentItem = itemTree | |
4535 | self.projectExplorerTree.setCurrentIndex(parentItem.index()) |
|
4533 | self.projectExplorerTree.setCurrentIndex(parentItem.index()) | |
4536 |
|
4534 | |||
4537 | self.__itemTreeDict[id] = itemTree |
|
4535 | self.__itemTreeDict[id] = itemTree | |
4538 | self.selectedItemTree = itemTree |
|
4536 | self.selectedItemTree = itemTree | |
4539 |
|
4537 | |||
4540 | def getSelectedProjectObj(self): |
|
4538 | def getSelectedProjectObj(self): | |
4541 | """ |
|
4539 | """ | |
4542 | Return the current project object selected. If a processing unit is |
|
4540 | Return the current project object selected. If a processing unit is | |
4543 | actually selected this function returns associated project. |
|
4541 | actually selected this function returns associated project. | |
4544 |
|
4542 | |||
4545 | None if any project or processing unit is selected |
|
4543 | None if any project or processing unit is selected | |
4546 | """ |
|
4544 | """ | |
4547 | for key in self.__itemTreeDict.keys(): |
|
4545 | for key in self.__itemTreeDict.keys(): | |
4548 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4546 | if self.__itemTreeDict[key] != self.selectedItemTree: | |
4549 | continue |
|
4547 | continue | |
4550 |
|
4548 | |||
4551 | if self.__projectObjDict.has_key(key): |
|
4549 | if self.__projectObjDict.has_key(key): | |
4552 | projectObj = self.__projectObjDict[key] |
|
4550 | projectObj = self.__projectObjDict[key] | |
4553 | return projectObj |
|
4551 | return projectObj | |
4554 |
|
4552 | |||
4555 | puObj = self.__puObjDict[key] |
|
4553 | puObj = self.__puObjDict[key] | |
4556 |
|
4554 | |||
4557 | if puObj.parentId == None: |
|
4555 | if puObj.parentId == None: | |
4558 | projectId = puObj.getId()[0] |
|
4556 | projectId = puObj.getId()[0] | |
4559 | else: |
|
4557 | else: | |
4560 | projectId = puObj.parentId |
|
4558 | projectId = puObj.parentId | |
4561 |
|
4559 | |||
4562 | projectObj = self.__projectObjDict[projectId] |
|
4560 | projectObj = self.__projectObjDict[projectId] | |
4563 | return projectObj |
|
4561 | return projectObj | |
4564 |
|
4562 | |||
4565 | return None |
|
4563 | return None | |
4566 |
|
4564 | |||
4567 | def getSelectedItemObj(self): |
|
4565 | def getSelectedItemObj(self): | |
4568 | """ |
|
4566 | """ | |
4569 | Return the current project or processing unit object selected |
|
4567 | Return the current project or processing unit object selected | |
4570 |
|
4568 | |||
4571 | None if any project or processing unit is selected |
|
4569 | None if any project or processing unit is selected | |
4572 | """ |
|
4570 | """ | |
4573 | for key in self.__itemTreeDict.keys(): |
|
4571 | for key in self.__itemTreeDict.keys(): | |
4574 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4572 | if self.__itemTreeDict[key] != self.selectedItemTree: | |
4575 | continue |
|
4573 | continue | |
4576 |
|
4574 | |||
4577 | if self.__projectObjDict.has_key(key) == True: |
|
4575 | if self.__projectObjDict.has_key(key) == True: | |
4578 | fatherObj = self.__projectObjDict[key] |
|
4576 | fatherObj = self.__projectObjDict[key] | |
4579 | else: |
|
4577 | else: | |
4580 | fatherObj = self.__puObjDict[key] |
|
4578 | fatherObj = self.__puObjDict[key] | |
4581 |
|
4579 | |||
4582 | return fatherObj |
|
4580 | return fatherObj | |
4583 |
|
4581 | |||
4584 | return None |
|
4582 | return None | |
4585 |
|
4583 | |||
4586 | def _WarningWindow(self, text, information): |
|
4584 | def _WarningWindow(self, text, information): | |
4587 |
|
4585 | |||
4588 | msgBox = QtGui.QMessageBox() |
|
4586 | msgBox = QtGui.QMessageBox() | |
4589 | msgBox.setText(text) |
|
4587 | msgBox.setText(text) | |
4590 | msgBox.setInformativeText(information) |
|
4588 | msgBox.setInformativeText(information) | |
4591 | msgBox.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel) |
|
4589 | msgBox.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel) | |
4592 | msgBox.setDefaultButton(QtGui.QMessageBox.Ok) |
|
4590 | msgBox.setDefaultButton(QtGui.QMessageBox.Ok) | |
4593 | ret = msgBox.exec_() |
|
4591 | ret = msgBox.exec_() | |
4594 |
|
4592 | |||
4595 | answer = False |
|
4593 | answer = False | |
4596 |
|
4594 | |||
4597 | if ret == QtGui.QMessageBox.Ok: |
|
4595 | if ret == QtGui.QMessageBox.Ok: | |
4598 | answer = True |
|
4596 | answer = True | |
4599 |
|
4597 | |||
4600 | return answer |
|
4598 | return answer | |
4601 |
|
4599 | |||
4602 | def __getNewProjectId(self): |
|
4600 | def __getNewProjectId(self): | |
4603 |
|
4601 | |||
4604 | loadProject = False |
|
4602 | loadProject = False | |
4605 |
|
4603 | |||
4606 | for thisId in range(1,10): |
|
4604 | for thisId in range(1,10): | |
4607 | newId = str(thisId) |
|
4605 | newId = str(thisId) | |
4608 | if newId in self.__projectObjDict.keys(): |
|
4606 | if newId in self.__projectObjDict.keys(): | |
4609 | continue |
|
4607 | continue | |
4610 |
|
4608 | |||
4611 | loadProject = True |
|
4609 | loadProject = True | |
4612 | projectId = newId |
|
4610 | projectId = newId | |
4613 | break |
|
4611 | break | |
4614 |
|
4612 | |||
4615 | if not loadProject: |
|
4613 | if not loadProject: | |
4616 | self.console.clear() |
|
4614 | self.console.clear() | |
4617 | self.console.append("The maximum number of projects has been loaded, a new project can not be loaded") |
|
4615 | self.console.append("The maximum number of projects has been loaded, a new project can not be loaded") | |
4618 | return None |
|
4616 | return None | |
4619 |
|
4617 | |||
4620 | return projectId |
|
4618 | return projectId | |
4621 |
|
4619 | |||
4622 | def openProject(self): |
|
4620 | def openProject(self): | |
4623 |
|
4621 | |||
4624 | self.actionStart.setEnabled(False) |
|
4622 | self.actionStart.setEnabled(False) | |
4625 | self.actionStarToolbar.setEnabled(False) |
|
4623 | self.actionStarToolbar.setEnabled(False) | |
4626 |
|
4624 | |||
4627 | self.create = False |
|
4625 | self.create = False | |
4628 | self.frame_2.setEnabled(True) |
|
4626 | self.frame_2.setEnabled(True) | |
4629 |
|
4627 | |||
4630 | # print self.dir |
|
4628 | # print self.dir | |
4631 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) |
|
4629 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) | |
4632 |
|
4630 | |||
4633 | projectObjLoad = Project() |
|
4631 | projectObjLoad = Project() | |
4634 |
|
4632 | |||
4635 | try: |
|
4633 | try: | |
4636 | projectObjLoad.readXml(filename) |
|
4634 | projectObjLoad.readXml(filename) | |
4637 | except: |
|
4635 | except: | |
4638 | self.console.clear() |
|
4636 | self.console.clear() | |
4639 | self.console.append("The selected xml file could not be loaded ...") |
|
4637 | self.console.append("The selected xml file could not be loaded ...") | |
4640 | return 0 |
|
4638 | return 0 | |
4641 |
|
4639 | |||
4642 | self.refreshProjectWindow(projectObjLoad) |
|
4640 | self.refreshProjectWindow(projectObjLoad) | |
4643 | self.refreshProjectProperties(projectObjLoad) |
|
4641 | self.refreshProjectProperties(projectObjLoad) | |
4644 |
|
4642 | |||
4645 | projectId = projectObjLoad.id |
|
4643 | projectId = projectObjLoad.id | |
4646 |
|
4644 | |||
4647 | if projectId in self.__projectObjDict.keys(): |
|
4645 | if projectId in self.__projectObjDict.keys(): | |
4648 |
|
4646 | |||
4649 | # answer = self._WarningWindow("You already have a project loaded with the same Id", |
|
4647 | # answer = self._WarningWindow("You already have a project loaded with the same Id", | |
4650 | # "Do you want to load the file anyway?") |
|
4648 | # "Do you want to load the file anyway?") | |
4651 | # if not answer: |
|
4649 | # if not answer: | |
4652 | # return |
|
4650 | # return | |
4653 |
|
4651 | |||
4654 | projectId = self.__getNewProjectId() |
|
4652 | projectId = self.__getNewProjectId() | |
4655 |
|
4653 | |||
4656 | if not projectId: |
|
4654 | if not projectId: | |
4657 | return |
|
4655 | return | |
4658 |
|
4656 | |||
4659 | projectObjLoad.updateId(projectId) |
|
4657 | projectObjLoad.updateId(projectId) | |
4660 |
|
4658 | |||
4661 | self.__projectObjDict[projectId] = projectObjLoad |
|
4659 | self.__projectObjDict[projectId] = projectObjLoad | |
4662 |
|
4660 | |||
4663 | self.addProject2ProjectExplorer(id=projectId, name=projectObjLoad.name) |
|
4661 | self.addProject2ProjectExplorer(id=projectId, name=projectObjLoad.name) | |
4664 |
|
4662 | |||
4665 | self.tabWidgetProject.setEnabled(True) |
|
4663 | self.tabWidgetProject.setEnabled(True) | |
4666 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4664 | self.tabWidgetProject.setCurrentWidget(self.tabProject) | |
4667 | # Disable tabProject after finish the creation |
|
4665 | # Disable tabProject after finish the creation | |
4668 | self.tabProject.setEnabled(True) |
|
4666 | self.tabProject.setEnabled(True) | |
4669 | puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0])) |
|
4667 | puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0])) | |
4670 |
|
4668 | |||
4671 | for puId, puObj in puObjorderList.items(): |
|
4669 | for puId, puObj in puObjorderList.items(): | |
4672 |
|
4670 | |||
4673 | self.__puObjDict[puId] = puObj |
|
4671 | self.__puObjDict[puId] = puObj | |
4674 |
|
4672 | |||
4675 | if puObj.name == "SendToServer": |
|
4673 | if puObj.name == "SendToServer": | |
4676 | self.saveFTPFromProcUnitObj(puObj) |
|
4674 | self.saveFTPFromProcUnitObj(puObj) | |
4677 |
|
4675 | |||
4678 | ############## COMPATIBLE WITH OLD VERSIONS ################ |
|
4676 | ############## COMPATIBLE WITH OLD VERSIONS ################ | |
4679 | operationObj = puObj.getOperationObj("SendByFTP") |
|
4677 | operationObj = puObj.getOperationObj("SendByFTP") | |
4680 |
|
4678 | |||
4681 | if operationObj: |
|
4679 | if operationObj: | |
4682 | self.saveFTPFromOpObj(operationObj) |
|
4680 | self.saveFTPFromOpObj(operationObj) | |
4683 | ############################################################ |
|
4681 | ############################################################ | |
4684 |
|
4682 | |||
4685 | if puObj.inputId == '0': |
|
4683 | if puObj.inputId == '0': | |
4686 | continue |
|
4684 | continue | |
4687 |
|
4685 | |||
4688 | self.addPU2PELoadXML(puObj) |
|
4686 | self.addPU2PELoadXML(puObj) | |
4689 |
|
4687 | |||
4690 | self.refreshPUWindow(puObj) |
|
4688 | self.refreshPUWindow(puObj) | |
4691 | self.refreshPUProperties(puObj) |
|
4689 | self.refreshPUProperties(puObj) | |
4692 | self.showtabPUCreated(datatype=puObj.datatype) |
|
4690 | self.showtabPUCreated(datatype=puObj.datatype) | |
4693 |
|
4691 | |||
4694 | self.console.clear() |
|
4692 | self.console.clear() | |
4695 | self.console.append("The selected xml file has been loaded successfully") |
|
4693 | self.console.append("The selected xml file has been loaded successfully") | |
4696 |
|
4694 | |||
4697 | self.actionStart.setEnabled(True) |
|
4695 | self.actionStart.setEnabled(True) | |
4698 | self.actionStarToolbar.setEnabled(True) |
|
4696 | self.actionStarToolbar.setEnabled(True) | |
4699 |
|
4697 | |||
4700 | def create_updating_timer(self): |
|
4698 | def create_updating_timer(self): | |
4701 | self.comm_data_timer = QtCore.QTimer(self) |
|
4699 | self.comm_data_timer = QtCore.QTimer(self) | |
4702 | self.comm_data_timer.timeout.connect(self.on_comm_updating_timer) |
|
4700 | self.comm_data_timer.timeout.connect(self.on_comm_updating_timer) | |
4703 | self.comm_data_timer.start(1000) |
|
4701 | self.comm_data_timer.start(1000) | |
4704 |
|
4702 | |||
4705 | def on_comm_updating_timer(self): |
|
4703 | def on_comm_updating_timer(self): | |
4706 | # Verifica si algun proceso ha sido inicializado y sigue ejecutandose |
|
4704 | # Verifica si algun proceso ha sido inicializado y sigue ejecutandose | |
4707 | # Si el proceso se ha parado actualizar el GUI (stopProject) |
|
4705 | # Si el proceso se ha parado actualizar el GUI (stopProject) | |
4708 | if not self.__enable: |
|
4706 | if not self.__enable: | |
4709 | return |
|
4707 | return | |
4710 |
|
4708 | |||
4711 | if self.controllerThread.isFinished(): |
|
4709 | if self.controllerThread.isFinished(): | |
4712 | self.stopProject() |
|
4710 | self.stopProject() | |
4713 |
|
4711 | |||
4714 | # def jobStartedFromThread(self, success): |
|
4712 | # def jobStartedFromThread(self, success): | |
4715 | # |
|
4713 | # | |
4716 | # self.console.clear() |
|
4714 | # self.console.clear() | |
4717 | # self.console.append("Job started") |
|
4715 | # self.console.append("Job started") | |
4718 | # |
|
4716 | # | |
4719 | # def jobFinishedFromThread(self, success): |
|
4717 | # def jobFinishedFromThread(self, success): | |
4720 | # |
|
4718 | # | |
4721 | # self.stopProject() |
|
4719 | # self.stopProject() | |
4722 |
|
4720 | |||
4723 | def playProject(self, ext=".xml", save=1): |
|
4721 | def playProject(self, ext=".xml", save=1): | |
4724 |
|
4722 | |||
4725 | projectObj = self.getSelectedProjectObj() |
|
4723 | projectObj = self.getSelectedProjectObj() | |
4726 |
|
4724 | |||
4727 | if not projectObj: |
|
4725 | if not projectObj: | |
4728 | self.console.append("Please select a project before pressing PLAY button") |
|
4726 | self.console.append("Please select a project before pressing PLAY button") | |
4729 | return |
|
4727 | return | |
4730 |
|
4728 | |||
4731 | if save: |
|
4729 | if save: | |
4732 | filename = self.saveProject() |
|
4730 | filename = self.saveProject() | |
4733 | if filename == None: |
|
4731 | if filename == None: | |
4734 | self.console.append("Process did not initialize.") |
|
4732 | self.console.append("Process did not initialize.") | |
4735 | return |
|
4733 | return | |
4736 | else: |
|
4734 | else: | |
4737 | filename = TEMPORAL_FILE |
|
4735 | filename = TEMPORAL_FILE | |
4738 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) |
|
4736 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) | |
4739 |
|
4737 | |||
4740 | self.actionStart.setEnabled(False) |
|
4738 | self.actionStart.setEnabled(False) | |
4741 | self.actionPause.setEnabled(True) |
|
4739 | self.actionPause.setEnabled(True) | |
4742 | self.actionStop.setEnabled(True) |
|
4740 | self.actionStop.setEnabled(True) | |
4743 |
|
4741 | |||
4744 | self.actionStarToolbar.setEnabled(False) |
|
4742 | self.actionStarToolbar.setEnabled(False) | |
4745 | self.actionPauseToolbar.setEnabled(True) |
|
4743 | self.actionPauseToolbar.setEnabled(True) | |
4746 | self.actionStopToolbar.setEnabled(True) |
|
4744 | self.actionStopToolbar.setEnabled(True) | |
4747 |
|
4745 | |||
4748 | self.console.append("Please Wait...") |
|
4746 | self.console.append("Please Wait...") | |
4749 |
|
4747 | |||
4750 | self.controllerThread = ControllerThread(filename) |
|
4748 | self.controllerThread = ControllerThread(filename) | |
4751 |
|
4749 | |||
4752 | # QObject.connect( self.controllerThread, SIGNAL( "jobFinished( PyQt_PyObject )" ), self.jobFinishedFromThread ) |
|
4750 | # QObject.connect( self.controllerThread, SIGNAL( "jobFinished( PyQt_PyObject )" ), self.jobFinishedFromThread ) | |
4753 | # QObject.connect( self.controllerThread, SIGNAL( "jobStarted( PyQt_PyObject )" ), self.jobStartedFromThread ) |
|
4751 | # QObject.connect( self.controllerThread, SIGNAL( "jobStarted( PyQt_PyObject )" ), self.jobStartedFromThread ) | |
4754 | self.console.clear() |
|
4752 | self.console.clear() | |
4755 | self.controllerThread.start() |
|
4753 | self.controllerThread.start() | |
4756 | sleep(0.5) |
|
4754 | sleep(0.5) | |
4757 | self.__enable = True |
|
4755 | self.__enable = True | |
4758 |
|
4756 | |||
4759 | def stopProject(self): |
|
4757 | def stopProject(self): | |
4760 |
|
4758 | |||
4761 | self.__enable = False |
|
4759 | self.__enable = False | |
4762 |
|
4760 | |||
4763 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.STOP, True)) |
|
4761 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.STOP, True)) | |
4764 | self.controllerThread.stop() |
|
4762 | self.controllerThread.stop() | |
4765 |
|
4763 | |||
4766 | while self.controllerThread.isRunning(): |
|
4764 | while self.controllerThread.isRunning(): | |
4767 | sleep(0.5) |
|
4765 | sleep(0.5) | |
4768 |
|
4766 | |||
4769 | self.actionStart.setEnabled(True) |
|
4767 | self.actionStart.setEnabled(True) | |
4770 | self.actionPause.setEnabled(False) |
|
4768 | self.actionPause.setEnabled(False) | |
4771 | self.actionStop.setEnabled(False) |
|
4769 | self.actionStop.setEnabled(False) | |
4772 |
|
4770 | |||
4773 | self.actionStarToolbar.setEnabled(True) |
|
4771 | self.actionStarToolbar.setEnabled(True) | |
4774 | self.actionPauseToolbar.setEnabled(False) |
|
4772 | self.actionPauseToolbar.setEnabled(False) | |
4775 | self.actionStopToolbar.setEnabled(False) |
|
4773 | self.actionStopToolbar.setEnabled(False) | |
4776 |
|
4774 | |||
4777 | self.restorePauseIcon() |
|
4775 | self.restorePauseIcon() | |
4778 |
|
4776 | |||
4779 | def pauseProject(self): |
|
4777 | def pauseProject(self): | |
4780 |
|
4778 | |||
4781 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) |
|
4779 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) | |
4782 | self.controllerThread.pause() |
|
4780 | self.controllerThread.pause() | |
4783 |
|
4781 | |||
4784 | self.actionStart.setEnabled(False) |
|
4782 | self.actionStart.setEnabled(False) | |
4785 | self.actionPause.setEnabled(True) |
|
4783 | self.actionPause.setEnabled(True) | |
4786 | self.actionStop.setEnabled(True) |
|
4784 | self.actionStop.setEnabled(True) | |
4787 |
|
4785 | |||
4788 | self.actionStarToolbar.setEnabled(False) |
|
4786 | self.actionStarToolbar.setEnabled(False) | |
4789 | self.actionPauseToolbar.setEnabled(True) |
|
4787 | self.actionPauseToolbar.setEnabled(True) | |
4790 | self.actionStopToolbar.setEnabled(True) |
|
4788 | self.actionStopToolbar.setEnabled(True) | |
4791 |
|
4789 | |||
4792 | def saveProject(self, filename=None): |
|
4790 | def saveProject(self, filename=None): | |
4793 |
|
4791 | |||
4794 | self.actionStart.setEnabled(False) |
|
4792 | self.actionStart.setEnabled(False) | |
4795 | self.actionStarToolbar.setEnabled(False) |
|
4793 | self.actionStarToolbar.setEnabled(False) | |
4796 |
|
4794 | |||
4797 | projectObj = self.getSelectedProjectObj() |
|
4795 | projectObj = self.getSelectedProjectObj() | |
4798 |
|
4796 | |||
4799 | if not projectObj: |
|
4797 | if not projectObj: | |
4800 | self.console.append("Please select a project before save it") |
|
4798 | self.console.append("Please select a project before save it") | |
4801 | return |
|
4799 | return | |
4802 |
|
4800 | |||
4803 | self.refreshGraphicsId() |
|
4801 | self.refreshGraphicsId() | |
4804 |
|
4802 | |||
4805 | sts = True |
|
4803 | sts = True | |
4806 | selectedItemObj = self.getSelectedItemObj() |
|
4804 | selectedItemObj = self.getSelectedItemObj() | |
4807 |
|
4805 | |||
4808 | #A Processing Unit has been selected |
|
4806 | #A Processing Unit has been selected | |
4809 | if projectObj == selectedItemObj: |
|
4807 | if projectObj == selectedItemObj: | |
4810 | if not self.on_proOk_clicked(): |
|
4808 | if not self.on_proOk_clicked(): | |
4811 | return None |
|
4809 | return None | |
4812 |
|
4810 | |||
4813 | #A Processing Unit has been selected |
|
4811 | #A Processing Unit has been selected | |
4814 | if projectObj != selectedItemObj: |
|
4812 | if projectObj != selectedItemObj: | |
4815 | puObj = selectedItemObj |
|
4813 | puObj = selectedItemObj | |
4816 |
|
4814 | |||
4817 | if puObj.name == 'VoltageProc': |
|
4815 | if puObj.name == 'VoltageProc': | |
4818 | sts = self.on_volOpOk_clicked() |
|
4816 | sts = self.on_volOpOk_clicked() | |
4819 | if puObj.name == 'SpectraProc': |
|
4817 | if puObj.name == 'SpectraProc': | |
4820 | sts = self.on_specOpOk_clicked() |
|
4818 | sts = self.on_specOpOk_clicked() | |
4821 | if puObj.name == 'SpectraHeisProc': |
|
4819 | if puObj.name == 'SpectraHeisProc': | |
4822 | sts = self.on_specHeisOpOk_clicked() |
|
4820 | sts = self.on_specHeisOpOk_clicked() | |
4823 |
|
4821 | |||
4824 | if not sts: |
|
4822 | if not sts: | |
4825 | return None |
|
4823 | return None | |
4826 |
|
4824 | |||
4827 | self.createFTPProcUnitView() |
|
4825 | self.createFTPProcUnitView() | |
4828 |
|
4826 | |||
4829 | if not filename: |
|
4827 | if not filename: | |
4830 | filename = os.path.join( str(self.pathWorkSpace), "%s%s" %(str(projectObj.name), '.xml') ) |
|
4828 | filename = os.path.join( str(self.pathWorkSpace), "%s%s" %(str(projectObj.name), '.xml') ) | |
4831 |
|
4829 | |||
4832 | projectObj.writeXml(filename) |
|
4830 | projectObj.writeXml(filename) | |
4833 | self.console.clear() |
|
4831 | self.console.clear() | |
4834 | self.console.append("Project saved") |
|
4832 | self.console.append("Project saved") | |
4835 | self.console.append("Press Play button to start data processing ...") |
|
4833 | self.console.append("Press Play button to start data processing ...") | |
4836 |
|
4834 | |||
4837 | self.actionStart.setEnabled(True) |
|
4835 | self.actionStart.setEnabled(True) | |
4838 | self.actionStarToolbar.setEnabled(True) |
|
4836 | self.actionStarToolbar.setEnabled(True) | |
4839 |
|
4837 | |||
4840 | return filename |
|
4838 | return filename | |
4841 |
|
4839 | |||
4842 | def removeItemTreeFromProject(self): |
|
4840 | def removeItemTreeFromProject(self): | |
4843 | """ |
|
4841 | """ | |
4844 | Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol |
|
4842 | Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol | |
4845 | """ |
|
4843 | """ | |
4846 | for key in self.__itemTreeDict.keys(): |
|
4844 | for key in self.__itemTreeDict.keys(): | |
4847 |
|
4845 | |||
4848 | #Check again because an item can delete multiple items (childs) |
|
4846 | #Check again because an item can delete multiple items (childs) | |
4849 | if key not in self.__itemTreeDict.keys(): |
|
4847 | if key not in self.__itemTreeDict.keys(): | |
4850 | continue |
|
4848 | continue | |
4851 |
|
4849 | |||
4852 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4850 | if self.__itemTreeDict[key] != self.selectedItemTree: | |
4853 | continue |
|
4851 | continue | |
4854 |
|
4852 | |||
4855 | if self.__projectObjDict.has_key(key) == True: |
|
4853 | if self.__projectObjDict.has_key(key) == True: | |
4856 |
|
4854 | |||
4857 | del self.__projectObjDict[key] |
|
4855 | del self.__projectObjDict[key] | |
4858 | del self.__itemTreeDict[key] |
|
4856 | del self.__itemTreeDict[key] | |
4859 |
|
4857 | |||
4860 | else: |
|
4858 | else: | |
4861 | puObj = self.__puObjDict[key] |
|
4859 | puObj = self.__puObjDict[key] | |
4862 | idProjectParent = puObj.parentId |
|
4860 | idProjectParent = puObj.parentId | |
4863 | projectObj = self.__projectObjDict[idProjectParent] |
|
4861 | projectObj = self.__projectObjDict[idProjectParent] | |
4864 |
|
4862 | |||
4865 | del self.__puObjDict[key] |
|
4863 | del self.__puObjDict[key] | |
4866 | del self.__itemTreeDict[key] |
|
4864 | del self.__itemTreeDict[key] | |
4867 | del projectObj.procUnitConfObjDict[key] |
|
4865 | del projectObj.procUnitConfObjDict[key] | |
4868 |
|
4866 | |||
4869 | for key in projectObj.procUnitConfObjDict.keys(): |
|
4867 | for key in projectObj.procUnitConfObjDict.keys(): | |
4870 | if projectObj.procUnitConfObjDict[key].inputId != puObj.getId(): |
|
4868 | if projectObj.procUnitConfObjDict[key].inputId != puObj.getId(): | |
4871 | continue |
|
4869 | continue | |
4872 | del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()] |
|
4870 | del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()] | |
4873 | del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()] |
|
4871 | del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()] | |
4874 | del projectObj.procUnitConfObjDict[key] |
|
4872 | del projectObj.procUnitConfObjDict[key] | |
4875 | # print projectObj.procUnitConfObjDict |
|
4873 | # print projectObj.procUnitConfObjDict | |
4876 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict |
|
4874 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict | |
4877 |
|
4875 | |||
4878 | def setInputsProject_View(self): |
|
4876 | def setInputsProject_View(self): | |
4879 |
|
4877 | |||
4880 | self.tabWidgetProject.setEnabled(True) |
|
4878 | self.tabWidgetProject.setEnabled(True) | |
4881 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4879 | self.tabWidgetProject.setCurrentWidget(self.tabProject) | |
4882 | self.tabProject.setEnabled(True) |
|
4880 | self.tabProject.setEnabled(True) | |
4883 | self.frame_2.setEnabled(False) |
|
4881 | self.frame_2.setEnabled(False) | |
4884 | self.proName.clear() |
|
4882 | self.proName.clear() | |
4885 | self.proName.setFocus() |
|
4883 | self.proName.setFocus() | |
4886 | self.proName.setSelection(0, 0) |
|
4884 | self.proName.setSelection(0, 0) | |
4887 | self.proName.setCursorPosition(0) |
|
4885 | self.proName.setCursorPosition(0) | |
4888 | self.proDataType.setText('.r') |
|
4886 | self.proDataType.setText('.r') | |
4889 | self.proDataPath.clear() |
|
4887 | self.proDataPath.clear() | |
4890 | self.proComDataType.clear() |
|
4888 | self.proComDataType.clear() | |
4891 | self.proComDataType.addItem("Voltage") |
|
4889 | self.proComDataType.addItem("Voltage") | |
4892 | self.proComDataType.addItem("Spectra") |
|
4890 | self.proComDataType.addItem("Spectra") | |
4893 | self.proComDataType.addItem("Fits") |
|
4891 | self.proComDataType.addItem("Fits") | |
4894 | self.proComDataType.addItem("USRP") |
|
4892 | self.proComDataType.addItem("USRP") | |
4895 |
|
4893 | |||
4896 | self.proComStartDate.clear() |
|
4894 | self.proComStartDate.clear() | |
4897 | self.proComEndDate.clear() |
|
4895 | self.proComEndDate.clear() | |
4898 |
|
4896 | |||
4899 | startTime = "00:00:00" |
|
4897 | startTime = "00:00:00" | |
4900 | endTime = "23:59:59" |
|
4898 | endTime = "23:59:59" | |
4901 | starlist = startTime.split(":") |
|
4899 | starlist = startTime.split(":") | |
4902 | endlist = endTime.split(":") |
|
4900 | endlist = endTime.split(":") | |
4903 | self.proDelay.setText("60") |
|
4901 | self.proDelay.setText("60") | |
4904 | self.proSet.setText("") |
|
4902 | self.proSet.setText("") | |
4905 |
|
4903 | |||
4906 | self.labelSet.show() |
|
4904 | self.labelSet.show() | |
4907 | self.proSet.show() |
|
4905 | self.proSet.show() | |
4908 |
|
4906 | |||
4909 | self.labelIPPKm.hide() |
|
4907 | self.labelIPPKm.hide() | |
4910 | self.proIPPKm.hide() |
|
4908 | self.proIPPKm.hide() | |
4911 |
|
4909 | |||
4912 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
4910 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) | |
4913 | self.proStartTime.setTime(self.time) |
|
4911 | self.proStartTime.setTime(self.time) | |
4914 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
4912 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) | |
4915 | self.proEndTime.setTime(self.time) |
|
4913 | self.proEndTime.setTime(self.time) | |
4916 | self.proDescription.clear() |
|
4914 | self.proDescription.clear() | |
4917 | self.proOk.setEnabled(False) |
|
4915 | self.proOk.setEnabled(False) | |
4918 | # self.console.append("Please, Write a name Project") |
|
4916 | # self.console.append("Please, Write a name Project") | |
4919 | # self.console.append("Introduce Project Parameters")DC |
|
4917 | # self.console.append("Introduce Project Parameters")DC | |
4920 | # self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)") |
|
4918 | # self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)") | |
4921 |
|
4919 | |||
4922 | def clearPUWindow(self, datatype): |
|
4920 | def clearPUWindow(self, datatype): | |
4923 |
|
4921 | |||
4924 | projectObjView = self.getSelectedProjectObj() |
|
4922 | projectObjView = self.getSelectedProjectObj() | |
4925 |
|
4923 | |||
4926 | if not projectObjView: |
|
4924 | if not projectObjView: | |
4927 | return |
|
4925 | return | |
4928 |
|
4926 | |||
4929 | puObj = self.getSelectedItemObj() |
|
4927 | puObj = self.getSelectedItemObj() | |
4930 | inputId = puObj.getInputId() |
|
4928 | inputId = puObj.getInputId() | |
4931 | inputPUObj = projectObjView.getProcUnitObj(inputId) |
|
4929 | inputPUObj = projectObjView.getProcUnitObj(inputId) | |
4932 |
|
4930 | |||
4933 | if datatype == 'Voltage': |
|
4931 | if datatype == 'Voltage': | |
4934 | self.volOpComChannels.setEnabled(False) |
|
4932 | self.volOpComChannels.setEnabled(False) | |
4935 | self.volOpComHeights.setEnabled(False) |
|
4933 | self.volOpComHeights.setEnabled(False) | |
4936 | self.volOpFilter.setEnabled(False) |
|
4934 | self.volOpFilter.setEnabled(False) | |
4937 | self.volOpComProfile.setEnabled(False) |
|
4935 | self.volOpComProfile.setEnabled(False) | |
4938 | self.volOpComCode.setEnabled(False) |
|
4936 | self.volOpComCode.setEnabled(False) | |
4939 | self.volOpCohInt.setEnabled(False) |
|
4937 | self.volOpCohInt.setEnabled(False) | |
4940 | self.volOpChannel.setEnabled(False) |
|
4938 | self.volOpChannel.setEnabled(False) | |
4941 | self.volOpHeights.setEnabled(False) |
|
4939 | self.volOpHeights.setEnabled(False) | |
4942 | self.volOpProfile.setEnabled(False) |
|
4940 | self.volOpProfile.setEnabled(False) | |
4943 | self.volOpRadarfrequency.setEnabled(False) |
|
4941 | self.volOpRadarfrequency.setEnabled(False) | |
4944 | self.volOpCebChannels.setCheckState(0) |
|
4942 | self.volOpCebChannels.setCheckState(0) | |
4945 | self.volOpCebRadarfrequency.setCheckState(0) |
|
4943 | self.volOpCebRadarfrequency.setCheckState(0) | |
4946 | self.volOpCebHeights.setCheckState(0) |
|
4944 | self.volOpCebHeights.setCheckState(0) | |
4947 | self.volOpCebFilter.setCheckState(0) |
|
4945 | self.volOpCebFilter.setCheckState(0) | |
4948 | self.volOpCebProfile.setCheckState(0) |
|
4946 | self.volOpCebProfile.setCheckState(0) | |
4949 | self.volOpCebDecodification.setCheckState(0) |
|
4947 | self.volOpCebDecodification.setCheckState(0) | |
4950 | self.volOpCebCohInt.setCheckState(0) |
|
4948 | self.volOpCebCohInt.setCheckState(0) | |
4951 |
|
4949 | |||
4952 | self.volOpChannel.clear() |
|
4950 | self.volOpChannel.clear() | |
4953 | self.volOpHeights.clear() |
|
4951 | self.volOpHeights.clear() | |
4954 | self.volOpProfile.clear() |
|
4952 | self.volOpProfile.clear() | |
4955 | self.volOpFilter.clear() |
|
4953 | self.volOpFilter.clear() | |
4956 | self.volOpCohInt.clear() |
|
4954 | self.volOpCohInt.clear() | |
4957 | self.volOpRadarfrequency.clear() |
|
4955 | self.volOpRadarfrequency.clear() | |
4958 |
|
4956 | |||
4959 | if datatype == 'Spectra': |
|
4957 | if datatype == 'Spectra': | |
4960 |
|
4958 | |||
4961 | if inputPUObj.datatype == 'Spectra': |
|
4959 | if inputPUObj.datatype == 'Spectra': | |
4962 | self.specOpnFFTpoints.setEnabled(False) |
|
4960 | self.specOpnFFTpoints.setEnabled(False) | |
4963 | self.specOpProfiles.setEnabled(False) |
|
4961 | self.specOpProfiles.setEnabled(False) | |
4964 | self.specOpippFactor.setEnabled(False) |
|
4962 | self.specOpippFactor.setEnabled(False) | |
4965 | else: |
|
4963 | else: | |
4966 | self.specOpnFFTpoints.setEnabled(True) |
|
4964 | self.specOpnFFTpoints.setEnabled(True) | |
4967 | self.specOpProfiles.setEnabled(True) |
|
4965 | self.specOpProfiles.setEnabled(True) | |
4968 | self.specOpippFactor.setEnabled(True) |
|
4966 | self.specOpippFactor.setEnabled(True) | |
4969 |
|
4967 | |||
4970 | self.specOpCebCrossSpectra.setCheckState(0) |
|
4968 | self.specOpCebCrossSpectra.setCheckState(0) | |
4971 | self.specOpCebChannel.setCheckState(0) |
|
4969 | self.specOpCebChannel.setCheckState(0) | |
4972 | self.specOpCebHeights.setCheckState(0) |
|
4970 | self.specOpCebHeights.setCheckState(0) | |
4973 | self.specOpCebIncoherent.setCheckState(0) |
|
4971 | self.specOpCebIncoherent.setCheckState(0) | |
4974 | self.specOpCebRemoveDC.setCheckState(0) |
|
4972 | self.specOpCebRemoveDC.setCheckState(0) | |
4975 | self.specOpCebRemoveInt.setCheckState(0) |
|
4973 | self.specOpCebRemoveInt.setCheckState(0) | |
4976 | self.specOpCebgetNoise.setCheckState(0) |
|
4974 | self.specOpCebgetNoise.setCheckState(0) | |
4977 | self.specOpCebRadarfrequency.setCheckState(0) |
|
4975 | self.specOpCebRadarfrequency.setCheckState(0) | |
4978 |
|
4976 | |||
4979 | self.specOpRadarfrequency.setEnabled(False) |
|
4977 | self.specOpRadarfrequency.setEnabled(False) | |
4980 | self.specOppairsList.setEnabled(False) |
|
4978 | self.specOppairsList.setEnabled(False) | |
4981 | self.specOpChannel.setEnabled(False) |
|
4979 | self.specOpChannel.setEnabled(False) | |
4982 | self.specOpHeights.setEnabled(False) |
|
4980 | self.specOpHeights.setEnabled(False) | |
4983 | self.specOpIncoherent.setEnabled(False) |
|
4981 | self.specOpIncoherent.setEnabled(False) | |
4984 | self.specOpgetNoise.setEnabled(False) |
|
4982 | self.specOpgetNoise.setEnabled(False) | |
4985 |
|
4983 | |||
4986 | self.specOpRadarfrequency.clear() |
|
4984 | self.specOpRadarfrequency.clear() | |
4987 | self.specOpnFFTpoints.clear() |
|
4985 | self.specOpnFFTpoints.clear() | |
4988 | self.specOpProfiles.clear() |
|
4986 | self.specOpProfiles.clear() | |
4989 | self.specOpippFactor.clear |
|
4987 | self.specOpippFactor.clear | |
4990 | self.specOppairsList.clear() |
|
4988 | self.specOppairsList.clear() | |
4991 | self.specOpChannel.clear() |
|
4989 | self.specOpChannel.clear() | |
4992 | self.specOpHeights.clear() |
|
4990 | self.specOpHeights.clear() | |
4993 | self.specOpIncoherent.clear() |
|
4991 | self.specOpIncoherent.clear() | |
4994 | self.specOpgetNoise.clear() |
|
4992 | self.specOpgetNoise.clear() | |
4995 |
|
4993 | |||
4996 | self.specGraphCebSpectraplot.setCheckState(0) |
|
4994 | self.specGraphCebSpectraplot.setCheckState(0) | |
4997 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
4995 | self.specGraphCebCrossSpectraplot.setCheckState(0) | |
4998 | self.specGraphCebRTIplot.setCheckState(0) |
|
4996 | self.specGraphCebRTIplot.setCheckState(0) | |
4999 | self.specGraphCebRTInoise.setCheckState(0) |
|
4997 | self.specGraphCebRTInoise.setCheckState(0) | |
5000 | self.specGraphCebCoherencmap.setCheckState(0) |
|
4998 | self.specGraphCebCoherencmap.setCheckState(0) | |
5001 | self.specGraphPowerprofile.setCheckState(0) |
|
4999 | self.specGraphPowerprofile.setCheckState(0) | |
5002 |
|
5000 | |||
5003 | self.specGraphSaveSpectra.setCheckState(0) |
|
5001 | self.specGraphSaveSpectra.setCheckState(0) | |
5004 | self.specGraphSaveCross.setCheckState(0) |
|
5002 | self.specGraphSaveCross.setCheckState(0) | |
5005 | self.specGraphSaveRTIplot.setCheckState(0) |
|
5003 | self.specGraphSaveRTIplot.setCheckState(0) | |
5006 | self.specGraphSaveRTInoise.setCheckState(0) |
|
5004 | self.specGraphSaveRTInoise.setCheckState(0) | |
5007 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
5005 | self.specGraphSaveCoherencemap.setCheckState(0) | |
5008 | self.specGraphSavePowerprofile.setCheckState(0) |
|
5006 | self.specGraphSavePowerprofile.setCheckState(0) | |
5009 |
|
5007 | |||
5010 | self.specGraphftpRTIplot.setCheckState(0) |
|
5008 | self.specGraphftpRTIplot.setCheckState(0) | |
5011 | self.specGraphftpRTInoise.setCheckState(0) |
|
5009 | self.specGraphftpRTInoise.setCheckState(0) | |
5012 | self.specGraphftpCoherencemap.setCheckState(0) |
|
5010 | self.specGraphftpCoherencemap.setCheckState(0) | |
5013 |
|
5011 | |||
5014 | self.specGraphPath.clear() |
|
5012 | self.specGraphPath.clear() | |
5015 | self.specGraphPrefix.clear() |
|
5013 | self.specGraphPrefix.clear() | |
5016 |
|
5014 | |||
5017 | self.specGgraphftpratio.clear() |
|
5015 | self.specGgraphftpratio.clear() | |
5018 |
|
5016 | |||
5019 | self.specGgraphChannelList.clear() |
|
5017 | self.specGgraphChannelList.clear() | |
5020 | self.specGgraphFreq.clear() |
|
5018 | self.specGgraphFreq.clear() | |
5021 | self.specGgraphHeight.clear() |
|
5019 | self.specGgraphHeight.clear() | |
5022 | self.specGgraphDbsrange.clear() |
|
5020 | self.specGgraphDbsrange.clear() | |
5023 | self.specGgraphmagnitud.clear() |
|
5021 | self.specGgraphmagnitud.clear() | |
5024 | self.specGgraphTminTmax.clear() |
|
5022 | self.specGgraphTminTmax.clear() | |
5025 | self.specGgraphTimeRange.clear() |
|
5023 | self.specGgraphTimeRange.clear() | |
5026 |
|
5024 | |||
5027 | if datatype == 'SpectraHeis': |
|
5025 | if datatype == 'SpectraHeis': | |
5028 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
5026 | self.specHeisOpCebIncoherent.setCheckState(0) | |
5029 | self.specHeisOpIncoherent.setEnabled(False) |
|
5027 | self.specHeisOpIncoherent.setEnabled(False) | |
5030 | self.specHeisOpIncoherent.clear() |
|
5028 | self.specHeisOpIncoherent.clear() | |
5031 |
|
5029 | |||
5032 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
5030 | self.specHeisGraphCebSpectraplot.setCheckState(0) | |
5033 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
5031 | self.specHeisGraphCebRTIplot.setCheckState(0) | |
5034 |
|
5032 | |||
5035 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
5033 | self.specHeisGraphSaveSpectra.setCheckState(0) | |
5036 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
5034 | self.specHeisGraphSaveRTIplot.setCheckState(0) | |
5037 |
|
5035 | |||
5038 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
5036 | self.specHeisGraphftpSpectra.setCheckState(0) | |
5039 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
5037 | self.specHeisGraphftpRTIplot.setCheckState(0) | |
5040 |
|
5038 | |||
5041 | self.specHeisGraphPath.clear() |
|
5039 | self.specHeisGraphPath.clear() | |
5042 | self.specHeisGraphPrefix.clear() |
|
5040 | self.specHeisGraphPrefix.clear() | |
5043 | self.specHeisGgraphChannelList.clear() |
|
5041 | self.specHeisGgraphChannelList.clear() | |
5044 | self.specHeisGgraphXminXmax.clear() |
|
5042 | self.specHeisGgraphXminXmax.clear() | |
5045 | self.specHeisGgraphYminYmax.clear() |
|
5043 | self.specHeisGgraphYminYmax.clear() | |
5046 | self.specHeisGgraphTminTmax.clear() |
|
5044 | self.specHeisGgraphTminTmax.clear() | |
5047 | self.specHeisGgraphTimeRange.clear() |
|
5045 | self.specHeisGgraphTimeRange.clear() | |
5048 | self.specHeisGgraphftpratio.clear() |
|
5046 | self.specHeisGgraphftpratio.clear() | |
5049 |
|
5047 | |||
5050 | def showtabPUCreated(self, datatype): |
|
5048 | def showtabPUCreated(self, datatype): | |
5051 |
|
5049 | |||
5052 | if datatype == "Voltage": |
|
5050 | if datatype == "Voltage": | |
5053 | self.tabVoltage.setEnabled(True) |
|
5051 | self.tabVoltage.setEnabled(True) | |
5054 | self.tabProject.setEnabled(False) |
|
5052 | self.tabProject.setEnabled(False) | |
5055 | self.tabSpectra.setEnabled(False) |
|
5053 | self.tabSpectra.setEnabled(False) | |
5056 | self.tabCorrelation.setEnabled(False) |
|
5054 | self.tabCorrelation.setEnabled(False) | |
5057 | self.tabSpectraHeis.setEnabled(False) |
|
5055 | self.tabSpectraHeis.setEnabled(False) | |
5058 | self.tabWidgetProject.setCurrentWidget(self.tabVoltage) |
|
5056 | self.tabWidgetProject.setCurrentWidget(self.tabVoltage) | |
5059 |
|
5057 | |||
5060 | if datatype == "Spectra": |
|
5058 | if datatype == "Spectra": | |
5061 | self.tabVoltage.setEnabled(False) |
|
5059 | self.tabVoltage.setEnabled(False) | |
5062 | self.tabProject.setEnabled(False) |
|
5060 | self.tabProject.setEnabled(False) | |
5063 | self.tabSpectra.setEnabled(True) |
|
5061 | self.tabSpectra.setEnabled(True) | |
5064 | self.tabCorrelation.setEnabled(False) |
|
5062 | self.tabCorrelation.setEnabled(False) | |
5065 | self.tabSpectraHeis.setEnabled(False) |
|
5063 | self.tabSpectraHeis.setEnabled(False) | |
5066 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) |
|
5064 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) | |
5067 |
|
5065 | |||
5068 | if datatype == "SpectraHeis": |
|
5066 | if datatype == "SpectraHeis": | |
5069 | self.tabVoltage.setEnabled(False) |
|
5067 | self.tabVoltage.setEnabled(False) | |
5070 | self.tabProject.setEnabled(False) |
|
5068 | self.tabProject.setEnabled(False) | |
5071 | self.tabSpectra.setEnabled(False) |
|
5069 | self.tabSpectra.setEnabled(False) | |
5072 | self.tabCorrelation.setEnabled(False) |
|
5070 | self.tabCorrelation.setEnabled(False) | |
5073 | self.tabSpectraHeis.setEnabled(True) |
|
5071 | self.tabSpectraHeis.setEnabled(True) | |
5074 | self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis) |
|
5072 | self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis) | |
5075 |
|
5073 | |||
5076 | def checkInputsProject(self): |
|
5074 | def checkInputsProject(self): | |
5077 | """ |
|
5075 | """ | |
5078 | Check Inputs Project: |
|
5076 | Check Inputs Project: | |
5079 | - project_name |
|
5077 | - project_name | |
5080 | - datatype |
|
5078 | - datatype | |
5081 | - ext |
|
5079 | - ext | |
5082 | - data_path |
|
5080 | - data_path | |
5083 | - readmode |
|
5081 | - readmode | |
5084 | - delay |
|
5082 | - delay | |
5085 | - set |
|
5083 | - set | |
5086 | - walk |
|
5084 | - walk | |
5087 | """ |
|
5085 | """ | |
5088 | parms_ok = True |
|
5086 | parms_ok = True | |
5089 | project_name = str(self.proName.text()) |
|
5087 | project_name = str(self.proName.text()) | |
5090 | if project_name == '' or project_name == None: |
|
5088 | if project_name == '' or project_name == None: | |
5091 | outputstr = "Enter the Project Name" |
|
5089 | outputstr = "Enter the Project Name" | |
5092 | self.console.append(outputstr) |
|
5090 | self.console.append(outputstr) | |
5093 | parms_ok = False |
|
5091 | parms_ok = False | |
5094 | project_name = None |
|
5092 | project_name = None | |
5095 |
|
5093 | |||
5096 | datatype = str(self.proComDataType.currentText()) |
|
5094 | datatype = str(self.proComDataType.currentText()) | |
5097 | if not(datatype in ['Voltage', 'Spectra', 'Fits', 'USRP']): |
|
5095 | if not(datatype in ['Voltage', 'Spectra', 'Fits', 'USRP']): | |
5098 | outputstr = 'datatype = %s, this must be either Voltage, Spectra, SpectraHeis or USRP' % datatype |
|
5096 | outputstr = 'datatype = %s, this must be either Voltage, Spectra, SpectraHeis or USRP' % datatype | |
5099 | self.console.append(outputstr) |
|
5097 | self.console.append(outputstr) | |
5100 | parms_ok = False |
|
5098 | parms_ok = False | |
5101 | datatype = None |
|
5099 | datatype = None | |
5102 |
|
5100 | |||
5103 | ext = str(self.proDataType.text()) |
|
5101 | ext = str(self.proDataType.text()) | |
5104 | if not(ext in ['.r', '.pdata', '.fits', '.hdf5']): |
|
5102 | if not(ext in ['.r', '.pdata', '.fits', '.hdf5']): | |
5105 | outputstr = "extension files must be .r , .pdata, .fits or .hdf5" |
|
5103 | outputstr = "extension files must be .r , .pdata, .fits or .hdf5" | |
5106 | self.console.append(outputstr) |
|
5104 | self.console.append(outputstr) | |
5107 | parms_ok = False |
|
5105 | parms_ok = False | |
5108 | ext = None |
|
5106 | ext = None | |
5109 |
|
5107 | |||
5110 | data_path = str(self.proDataPath.text()) |
|
5108 | data_path = str(self.proDataPath.text()) | |
5111 |
|
5109 | |||
5112 | if data_path == '': |
|
5110 | if data_path == '': | |
5113 | outputstr = 'Datapath is empty' |
|
5111 | outputstr = 'Datapath is empty' | |
5114 | self.console.append(outputstr) |
|
5112 | self.console.append(outputstr) | |
5115 | parms_ok = False |
|
5113 | parms_ok = False | |
5116 | data_path = None |
|
5114 | data_path = None | |
5117 |
|
5115 | |||
5118 | if data_path != None: |
|
5116 | if data_path != None: | |
5119 | if not os.path.isdir(data_path): |
|
5117 | if not os.path.isdir(data_path): | |
5120 | outputstr = 'Datapath:%s does not exists' % data_path |
|
5118 | outputstr = 'Datapath:%s does not exists' % data_path | |
5121 | self.console.append(outputstr) |
|
5119 | self.console.append(outputstr) | |
5122 | parms_ok = False |
|
5120 | parms_ok = False | |
5123 | data_path = None |
|
5121 | data_path = None | |
5124 |
|
5122 | |||
5125 | read_mode = str(self.proComReadMode.currentText()) |
|
5123 | read_mode = str(self.proComReadMode.currentText()) | |
5126 | if not(read_mode in ['Online', 'Offline']): |
|
5124 | if not(read_mode in ['Online', 'Offline']): | |
5127 | outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode |
|
5125 | outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode | |
5128 | self.console.append(outputstr) |
|
5126 | self.console.append(outputstr) | |
5129 | parms_ok = False |
|
5127 | parms_ok = False | |
5130 | read_mode = None |
|
5128 | read_mode = None | |
5131 |
|
5129 | |||
5132 | delay = None |
|
5130 | delay = None | |
5133 | if read_mode == "Online": |
|
5131 | if read_mode == "Online": | |
5134 | parms_ok = False |
|
5132 | parms_ok = False | |
5135 | try: |
|
5133 | try: | |
5136 | delay = int(str(self.proDelay.text())) |
|
5134 | delay = int(str(self.proDelay.text())) | |
5137 | parms_ok = True |
|
5135 | parms_ok = True | |
5138 | except: |
|
5136 | except: | |
5139 | outputstr = 'Delay: %s, this must be a integer number' % str(self.proDelay.text()) |
|
5137 | outputstr = 'Delay: %s, this must be a integer number' % str(self.proDelay.text()) | |
5140 | self.console.append(outputstr) |
|
5138 | self.console.append(outputstr) | |
5141 |
|
5139 | |||
5142 | try: |
|
5140 | try: | |
5143 | set = int(str(self.proSet.text())) |
|
5141 | set = int(str(self.proSet.text())) | |
5144 | except: |
|
5142 | except: | |
5145 | # outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text()) |
|
5143 | # outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text()) | |
5146 | # self.console.append(outputstr) |
|
5144 | # self.console.append(outputstr) | |
5147 | # parms_ok = False |
|
5145 | # parms_ok = False | |
5148 | set = None |
|
5146 | set = None | |
5149 |
|
5147 | |||
5150 | walk = int(self.proComWalk.currentIndex()) |
|
5148 | walk = int(self.proComWalk.currentIndex()) | |
5151 | expLabel = str(self.proExpLabel.text()) |
|
5149 | expLabel = str(self.proExpLabel.text()) | |
5152 |
|
5150 | |||
5153 | return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel |
|
5151 | return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel | |
5154 |
|
5152 | |||
5155 | def checkInputsPUSave(self, datatype): |
|
5153 | def checkInputsPUSave(self, datatype): | |
5156 | """ |
|
5154 | """ | |
5157 | Check Inputs Spectra Save: |
|
5155 | Check Inputs Spectra Save: | |
5158 | - path |
|
5156 | - path | |
5159 | - blocks Per File |
|
5157 | - blocks Per File | |
5160 | - sufix |
|
5158 | - sufix | |
5161 | - dataformat |
|
5159 | - dataformat | |
5162 | """ |
|
5160 | """ | |
5163 | parms_ok = True |
|
5161 | parms_ok = True | |
5164 |
|
5162 | |||
5165 | if datatype == "Voltage": |
|
5163 | if datatype == "Voltage": | |
5166 | output_path = str(self.volOutputPath.text()) |
|
5164 | output_path = str(self.volOutputPath.text()) | |
5167 | blocksperfile = str(self.volOutputblocksperfile.text()) |
|
5165 | blocksperfile = str(self.volOutputblocksperfile.text()) | |
5168 | profilesperblock = str(self.volOutputprofilesperblock.text()) |
|
5166 | profilesperblock = str(self.volOutputprofilesperblock.text()) | |
5169 |
|
5167 | |||
5170 | if datatype == "Spectra": |
|
5168 | if datatype == "Spectra": | |
5171 | output_path = str(self.specOutputPath.text()) |
|
5169 | output_path = str(self.specOutputPath.text()) | |
5172 | blocksperfile = str(self.specOutputblocksperfile.text()) |
|
5170 | blocksperfile = str(self.specOutputblocksperfile.text()) | |
5173 | profilesperblock = 0 |
|
5171 | profilesperblock = 0 | |
5174 |
|
5172 | |||
5175 | if datatype == "SpectraHeis": |
|
5173 | if datatype == "SpectraHeis": | |
5176 | output_path = str(self.specHeisOutputPath.text()) |
|
5174 | output_path = str(self.specHeisOutputPath.text()) | |
5177 | blocksperfile = str(self.specHeisOutputblocksperfile.text()) |
|
5175 | blocksperfile = str(self.specHeisOutputblocksperfile.text()) | |
5178 | metada = str(self.specHeisOutputMetada.text()) |
|
5176 | metada = str(self.specHeisOutputMetada.text()) | |
5179 |
|
5177 | |||
5180 | if output_path == '': |
|
5178 | if output_path == '': | |
5181 | outputstr = 'Outputpath is empty' |
|
5179 | outputstr = 'Outputpath is empty' | |
5182 | self.console.append(outputstr) |
|
5180 | self.console.append(outputstr) | |
5183 | parms_ok = False |
|
5181 | parms_ok = False | |
5184 | data_path = None |
|
5182 | data_path = None | |
5185 |
|
5183 | |||
5186 | if output_path != None: |
|
5184 | if output_path != None: | |
5187 | if not os.path.exists(output_path): |
|
5185 | if not os.path.exists(output_path): | |
5188 | outputstr = 'OutputPath:%s does not exists' % output_path |
|
5186 | outputstr = 'OutputPath:%s does not exists' % output_path | |
5189 | self.console.append(outputstr) |
|
5187 | self.console.append(outputstr) | |
5190 | parms_ok = False |
|
5188 | parms_ok = False | |
5191 | output_path = None |
|
5189 | output_path = None | |
5192 |
|
5190 | |||
5193 |
|
5191 | |||
5194 | try: |
|
5192 | try: | |
5195 | profilesperblock = int(profilesperblock) |
|
5193 | profilesperblock = int(profilesperblock) | |
5196 | except: |
|
5194 | except: | |
5197 | if datatype == "Voltage": |
|
5195 | if datatype == "Voltage": | |
5198 | outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.volOutputprofilesperblock.text()) |
|
5196 | outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.volOutputprofilesperblock.text()) | |
5199 | self.console.append(outputstr) |
|
5197 | self.console.append(outputstr) | |
5200 | parms_ok = False |
|
5198 | parms_ok = False | |
5201 | profilesperblock = None |
|
5199 | profilesperblock = None | |
5202 |
|
5200 | |||
5203 | try: |
|
5201 | try: | |
5204 | blocksperfile = int(blocksperfile) |
|
5202 | blocksperfile = int(blocksperfile) | |
5205 | except: |
|
5203 | except: | |
5206 | if datatype == "Voltage": |
|
5204 | if datatype == "Voltage": | |
5207 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.volOutputblocksperfile.text()) |
|
5205 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.volOutputblocksperfile.text()) | |
5208 | elif datatype == "Spectra": |
|
5206 | elif datatype == "Spectra": | |
5209 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specOutputblocksperfile.text()) |
|
5207 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specOutputblocksperfile.text()) | |
5210 | elif datatype == "SpectraHeis": |
|
5208 | elif datatype == "SpectraHeis": | |
5211 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specHeisOutputblocksperfile.text()) |
|
5209 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specHeisOutputblocksperfile.text()) | |
5212 |
|
5210 | |||
5213 | self.console.append(outputstr) |
|
5211 | self.console.append(outputstr) | |
5214 | parms_ok = False |
|
5212 | parms_ok = False | |
5215 | blocksperfile = None |
|
5213 | blocksperfile = None | |
5216 |
|
5214 | |||
5217 | if datatype == "SpectraHeis": |
|
5215 | if datatype == "SpectraHeis": | |
5218 | if metada == '': |
|
5216 | if metada == '': | |
5219 | outputstr = 'Choose metada file' |
|
5217 | outputstr = 'Choose metada file' | |
5220 | self.console.append(outputstr) |
|
5218 | self.console.append(outputstr) | |
5221 | parms_ok = False |
|
5219 | parms_ok = False | |
5222 | if metada != None: |
|
5220 | if metada != None: | |
5223 | if not os.path.isfile(metada): |
|
5221 | if not os.path.isfile(metada): | |
5224 | outputstr = 'Metadata:%s does not exists' % metada |
|
5222 | outputstr = 'Metadata:%s does not exists' % metada | |
5225 | self.console.append(outputstr) |
|
5223 | self.console.append(outputstr) | |
5226 | parms_ok = False |
|
5224 | parms_ok = False | |
5227 | output_path = None |
|
5225 | output_path = None | |
5228 |
|
5226 | |||
5229 | if datatype == "Voltage": |
|
5227 | if datatype == "Voltage": | |
5230 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5228 | return parms_ok, output_path, blocksperfile, profilesperblock | |
5231 |
|
5229 | |||
5232 |
|
5230 | |||
5233 | if datatype == "Spectra": |
|
5231 | if datatype == "Spectra": | |
5234 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5232 | return parms_ok, output_path, blocksperfile, profilesperblock | |
5235 |
|
5233 | |||
5236 |
|
5234 | |||
5237 | if datatype == "SpectraHeis": |
|
5235 | if datatype == "SpectraHeis": | |
5238 | return parms_ok, output_path, blocksperfile, metada |
|
5236 | return parms_ok, output_path, blocksperfile, metada | |
5239 |
|
5237 | |||
5240 | def findDatafiles(self, data_path, ext, walk, expLabel=''): |
|
5238 | def findDatafiles(self, data_path, ext, walk, expLabel=''): | |
5241 |
|
5239 | |||
5242 | dateList = [] |
|
5240 | dateList = [] | |
5243 | fileList = [] |
|
5241 | fileList = [] | |
5244 |
|
5242 | |||
5245 | if ext == ".r": |
|
5243 | if ext == ".r": | |
5246 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5244 | from schainpy.model.io.jroIO_base import JRODataReader | |
5247 |
|
5245 | |||
5248 | readerObj = JRODataReader() |
|
5246 | readerObj = JRODataReader() | |
5249 | dateList = readerObj.findDatafiles(path=data_path, |
|
5247 | dateList = readerObj.findDatafiles(path=data_path, | |
5250 | expLabel=expLabel, |
|
5248 | expLabel=expLabel, | |
5251 | ext=ext, |
|
5249 | ext=ext, | |
5252 | walk=walk) |
|
5250 | walk=walk) | |
5253 |
|
5251 | |||
5254 | if ext == ".pdata": |
|
5252 | if ext == ".pdata": | |
5255 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5253 | from schainpy.model.io.jroIO_base import JRODataReader | |
5256 |
|
5254 | |||
5257 | readerObj = JRODataReader() |
|
5255 | readerObj = JRODataReader() | |
5258 | dateList = readerObj.findDatafiles(path=data_path, |
|
5256 | dateList = readerObj.findDatafiles(path=data_path, | |
5259 | expLabel=expLabel, |
|
5257 | expLabel=expLabel, | |
5260 | ext=ext, |
|
5258 | ext=ext, | |
5261 | walk=walk) |
|
5259 | walk=walk) | |
5262 |
|
5260 | |||
5263 | if ext == ".fits": |
|
5261 | if ext == ".fits": | |
5264 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5262 | from schainpy.model.io.jroIO_base import JRODataReader | |
5265 |
|
5263 | |||
5266 | readerObj = JRODataReader() |
|
5264 | readerObj = JRODataReader() | |
5267 | dateList = readerObj.findDatafiles(path=data_path, |
|
5265 | dateList = readerObj.findDatafiles(path=data_path, | |
5268 | expLabel=expLabel, |
|
5266 | expLabel=expLabel, | |
5269 | ext=ext, |
|
5267 | ext=ext, | |
5270 | walk=walk) |
|
5268 | walk=walk) | |
5271 |
|
5269 | |||
5272 | if ext == ".hdf5": |
|
5270 | if ext == ".hdf5": | |
5273 | from schainpy.model.io.jroIO_usrp import USRPReader |
|
5271 | from schainpy.model.io.jroIO_usrp import USRPReader | |
5274 |
|
5272 | |||
5275 | readerObj = USRPReader() |
|
5273 | readerObj = USRPReader() | |
5276 | dateList = readerObj.findDatafiles(path=data_path) |
|
5274 | dateList = readerObj.findDatafiles(path=data_path) | |
5277 |
|
5275 | |||
5278 | return dateList |
|
5276 | return dateList | |
5279 |
|
5277 | |||
5280 | def loadDays(self, data_path, ext, walk, expLabel=''): |
|
5278 | def loadDays(self, data_path, ext, walk, expLabel=''): | |
5281 | """ |
|
5279 | """ | |
5282 | Method to loads day |
|
5280 | Method to loads day | |
5283 | """ |
|
5281 | """ | |
5284 | self.proOk.setEnabled(False) |
|
5282 | self.proOk.setEnabled(False) | |
5285 | self.proComStartDate.clear() |
|
5283 | self.proComStartDate.clear() | |
5286 | self.proComEndDate.clear() |
|
5284 | self.proComEndDate.clear() | |
5287 |
|
5285 | |||
5288 | self.dateList = [] |
|
5286 | self.dateList = [] | |
5289 |
|
5287 | |||
5290 | if not os.path.isdir(data_path): |
|
5288 | if not os.path.isdir(data_path): | |
5291 | return |
|
5289 | return | |
5292 |
|
5290 | |||
5293 | self.dataPath = data_path |
|
5291 | self.dataPath = data_path | |
5294 |
|
5292 | |||
5295 | dateList = self.findDatafiles(data_path, ext=ext, walk=walk, expLabel=expLabel) |
|
5293 | dateList = self.findDatafiles(data_path, ext=ext, walk=walk, expLabel=expLabel) | |
5296 |
|
5294 | |||
5297 | if not dateList: |
|
5295 | if not dateList: | |
5298 | # self.console.clear() |
|
5296 | # self.console.clear() | |
5299 | if walk: |
|
5297 | if walk: | |
5300 | if expLabel: |
|
5298 | if expLabel: | |
5301 | outputstr = "No files (*%s) were found on %s/DOYPATH/%s" % (ext, data_path, expLabel) |
|
5299 | outputstr = "No files (*%s) were found on %s/DOYPATH/%s" % (ext, data_path, expLabel) | |
5302 | else: |
|
5300 | else: | |
5303 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) |
|
5301 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) | |
5304 | else: |
|
5302 | else: | |
5305 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) |
|
5303 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) | |
5306 |
|
5304 | |||
5307 | self.console.append(outputstr) |
|
5305 | self.console.append(outputstr) | |
5308 | return |
|
5306 | return | |
5309 |
|
5307 | |||
5310 | dateStrList = [] |
|
5308 | dateStrList = [] | |
5311 | for thisDate in dateList: |
|
5309 | for thisDate in dateList: | |
5312 | dateStr = thisDate.strftime("%Y/%m/%d") |
|
5310 | dateStr = thisDate.strftime("%Y/%m/%d") | |
5313 |
|
5311 | |||
5314 | self.proComStartDate.addItem(dateStr) |
|
5312 | self.proComStartDate.addItem(dateStr) | |
5315 | self.proComEndDate.addItem(dateStr) |
|
5313 | self.proComEndDate.addItem(dateStr) | |
5316 | dateStrList.append(dateStr) |
|
5314 | dateStrList.append(dateStr) | |
5317 |
|
5315 | |||
5318 | self.proComStartDate.setCurrentIndex(0) |
|
5316 | self.proComStartDate.setCurrentIndex(0) | |
5319 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) |
|
5317 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) | |
5320 |
|
5318 | |||
5321 | self.dateList = dateStrList |
|
5319 | self.dateList = dateStrList | |
5322 | self.proOk.setEnabled(True) |
|
5320 | self.proOk.setEnabled(True) | |
5323 |
|
5321 | |||
5324 | self.console.clear() |
|
5322 | self.console.clear() | |
5325 | self.console.append("Successful load") |
|
5323 | self.console.append("Successful load") | |
5326 |
|
5324 | |||
5327 | return self.dateList |
|
5325 | return self.dateList | |
5328 |
|
5326 | |||
5329 | def setWorkSpaceGUI(self, pathWorkSpace=None): |
|
5327 | def setWorkSpaceGUI(self, pathWorkSpace=None): | |
5330 |
|
5328 | |||
5331 | if pathWorkSpace == None: |
|
5329 | if pathWorkSpace == None: | |
5332 | home = os.path.expanduser("~") |
|
5330 | home = os.path.expanduser("~") | |
5333 | pathWorkSpace = os.path.join(home,'schain_workspace') |
|
5331 | pathWorkSpace = os.path.join(home,'schain_workspace') | |
5334 |
|
5332 | |||
5335 | self.pathWorkSpace = pathWorkSpace |
|
5333 | self.pathWorkSpace = pathWorkSpace | |
5336 |
|
5334 | |||
5337 | """ |
|
5335 | """ | |
5338 | Comandos Usados en Console |
|
5336 | Comandos Usados en Console | |
5339 | """ |
|
5337 | """ | |
5340 | def __del__(self): |
|
5338 | def __del__(self): | |
5341 | sys.stdout = sys.__stdout__ |
|
5339 | sys.stdout = sys.__stdout__ | |
5342 | sys.stderr = sys.__stderr__ |
|
5340 | sys.stderr = sys.__stderr__ | |
5343 |
|
5341 | |||
5344 | def normalOutputWritten(self, text): |
|
5342 | def normalOutputWritten(self, text): | |
5345 | color_black = QtGui.QColor(0,0,0) |
|
5343 | color_black = QtGui.QColor(0,0,0) | |
5346 | self.console.setTextColor(color_black) |
|
5344 | self.console.setTextColor(color_black) | |
5347 | self.console.append(text) |
|
5345 | self.console.append(text) | |
5348 |
|
5346 | |||
5349 | def errorOutputWritten(self, text): |
|
5347 | def errorOutputWritten(self, text): | |
5350 | color_red = QtGui.QColor(255,0,0) |
|
5348 | color_red = QtGui.QColor(255,0,0) | |
5351 | color_black = QtGui.QColor(0,0,0) |
|
5349 | color_black = QtGui.QColor(0,0,0) | |
5352 |
|
5350 | |||
5353 | self.console.setTextColor(color_red) |
|
5351 | self.console.setTextColor(color_red) | |
5354 | self.console.append(text) |
|
5352 | self.console.append(text) | |
5355 | self.console.setTextColor(color_black) |
|
5353 | self.console.setTextColor(color_black) | |
5356 |
|
5354 | |||
5357 | def setGUIStatus(self): |
|
5355 | def setGUIStatus(self): | |
5358 |
|
5356 | |||
5359 | self.setWindowTitle("ROJ-Signal Chain") |
|
5357 | self.setWindowTitle("ROJ-Signal Chain") | |
5360 | self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"adn.jpg") )) |
|
5358 | self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"adn.jpg") )) | |
5361 |
|
5359 | |||
5362 | self.tabWidgetProject.setEnabled(False) |
|
5360 | self.tabWidgetProject.setEnabled(False) | |
5363 | self.tabVoltage.setEnabled(False) |
|
5361 | self.tabVoltage.setEnabled(False) | |
5364 | self.tabSpectra.setEnabled(False) |
|
5362 | self.tabSpectra.setEnabled(False) | |
5365 | self.tabCorrelation.setEnabled(False) |
|
5363 | self.tabCorrelation.setEnabled(False) | |
5366 | self.frame_2.setEnabled(False) |
|
5364 | self.frame_2.setEnabled(False) | |
5367 |
|
5365 | |||
5368 | self.actionCreate.setShortcut('Ctrl+N') |
|
5366 | self.actionCreate.setShortcut('Ctrl+N') | |
5369 | self.actionOpen.setShortcut('Ctrl+O') |
|
5367 | self.actionOpen.setShortcut('Ctrl+O') | |
5370 | self.actionSave.setShortcut('Ctrl+S') |
|
5368 | self.actionSave.setShortcut('Ctrl+S') | |
5371 | self.actionClose.setShortcut('Ctrl+X') |
|
5369 | self.actionClose.setShortcut('Ctrl+X') | |
5372 |
|
5370 | |||
5373 | self.actionStart.setShortcut('Ctrl+1') |
|
5371 | self.actionStart.setShortcut('Ctrl+1') | |
5374 | self.actionPause.setShortcut('Ctrl+2') |
|
5372 | self.actionPause.setShortcut('Ctrl+2') | |
5375 | self.actionStop.setShortcut('Ctrl+3') |
|
5373 | self.actionStop.setShortcut('Ctrl+3') | |
5376 |
|
5374 | |||
5377 | self.actionFTP.setShortcut('Ctrl+F') |
|
5375 | self.actionFTP.setShortcut('Ctrl+F') | |
5378 |
|
5376 | |||
5379 | self.actionStart.setEnabled(False) |
|
5377 | self.actionStart.setEnabled(False) | |
5380 | self.actionPause.setEnabled(False) |
|
5378 | self.actionPause.setEnabled(False) | |
5381 | self.actionStop.setEnabled(False) |
|
5379 | self.actionStop.setEnabled(False) | |
5382 |
|
5380 | |||
5383 | self.actionStarToolbar.setEnabled(False) |
|
5381 | self.actionStarToolbar.setEnabled(False) | |
5384 | self.actionPauseToolbar.setEnabled(False) |
|
5382 | self.actionPauseToolbar.setEnabled(False) | |
5385 | self.actionStopToolbar.setEnabled(False) |
|
5383 | self.actionStopToolbar.setEnabled(False) | |
5386 |
|
5384 | |||
5387 | self.proName.clear() |
|
5385 | self.proName.clear() | |
5388 | self.proDataPath.setText('') |
|
5386 | self.proDataPath.setText('') | |
5389 | self.console.setReadOnly(True) |
|
5387 | self.console.setReadOnly(True) | |
5390 | self.console.append("Welcome to Signal Chain\nOpen a project or Create a new one") |
|
5388 | self.console.append("Welcome to Signal Chain\nOpen a project or Create a new one") | |
5391 | self.proStartTime.setDisplayFormat("hh:mm:ss") |
|
5389 | self.proStartTime.setDisplayFormat("hh:mm:ss") | |
5392 | self.proDataType.setEnabled(False) |
|
5390 | self.proDataType.setEnabled(False) | |
5393 | self.time = QtCore.QTime() |
|
5391 | self.time = QtCore.QTime() | |
5394 | self.hour = 0 |
|
5392 | self.hour = 0 | |
5395 | self.min = 0 |
|
5393 | self.min = 0 | |
5396 | self.sec = 0 |
|
5394 | self.sec = 0 | |
5397 | self.proEndTime.setDisplayFormat("hh:mm:ss") |
|
5395 | self.proEndTime.setDisplayFormat("hh:mm:ss") | |
5398 | startTime = "00:00:00" |
|
5396 | startTime = "00:00:00" | |
5399 | endTime = "23:59:59" |
|
5397 | endTime = "23:59:59" | |
5400 | starlist = startTime.split(":") |
|
5398 | starlist = startTime.split(":") | |
5401 | endlist = endTime.split(":") |
|
5399 | endlist = endTime.split(":") | |
5402 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
5400 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) | |
5403 | self.proStartTime.setTime(self.time) |
|
5401 | self.proStartTime.setTime(self.time) | |
5404 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
5402 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) | |
5405 | self.proEndTime.setTime(self.time) |
|
5403 | self.proEndTime.setTime(self.time) | |
5406 | self.proOk.setEnabled(False) |
|
5404 | self.proOk.setEnabled(False) | |
5407 | # set model Project Explorer |
|
5405 | # set model Project Explorer | |
5408 | self.projectExplorerModel = QtGui.QStandardItemModel() |
|
5406 | self.projectExplorerModel = QtGui.QStandardItemModel() | |
5409 | self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",)) |
|
5407 | self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",)) | |
5410 | layout = QtGui.QVBoxLayout() |
|
5408 | layout = QtGui.QVBoxLayout() | |
5411 | layout.addWidget(self.projectExplorerTree) |
|
5409 | layout.addWidget(self.projectExplorerTree) | |
5412 | self.projectExplorerTree.setModel(self.projectExplorerModel) |
|
5410 | self.projectExplorerTree.setModel(self.projectExplorerModel) | |
5413 | self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
|
5411 | self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) | |
5414 | self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click) |
|
5412 | self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click) | |
5415 | self.projectExplorerTree.clicked.connect(self.on_click) |
|
5413 | self.projectExplorerTree.clicked.connect(self.on_click) | |
5416 | self.projectExplorerTree.expandAll() |
|
5414 | self.projectExplorerTree.expandAll() | |
5417 | # set model Project Properties |
|
5415 | # set model Project Properties | |
5418 |
|
5416 | |||
5419 | self.propertiesModel = TreeModel() |
|
5417 | self.propertiesModel = TreeModel() | |
5420 | self.propertiesModel.initProjectView() |
|
5418 | self.propertiesModel.initProjectView() | |
5421 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
5419 | self.treeProjectProperties.setModel(self.propertiesModel) | |
5422 | self.treeProjectProperties.expandAll() |
|
5420 | self.treeProjectProperties.expandAll() | |
5423 | self.treeProjectProperties.allColumnsShowFocus() |
|
5421 | self.treeProjectProperties.allColumnsShowFocus() | |
5424 | self.treeProjectProperties.resizeColumnToContents(1) |
|
5422 | self.treeProjectProperties.resizeColumnToContents(1) | |
5425 |
|
5423 | |||
5426 | # set Project |
|
5424 | # set Project | |
5427 | self.proExpLabel.setEnabled(True) |
|
5425 | self.proExpLabel.setEnabled(True) | |
5428 | self.proDelay.setEnabled(False) |
|
5426 | self.proDelay.setEnabled(False) | |
5429 | self.proSet.setEnabled(True) |
|
5427 | self.proSet.setEnabled(True) | |
5430 | self.proDataType.setReadOnly(True) |
|
5428 | self.proDataType.setReadOnly(True) | |
5431 |
|
5429 | |||
5432 | # set Operation Voltage |
|
5430 | # set Operation Voltage | |
5433 | self.volOpComChannels.setEnabled(False) |
|
5431 | self.volOpComChannels.setEnabled(False) | |
5434 | self.volOpComHeights.setEnabled(False) |
|
5432 | self.volOpComHeights.setEnabled(False) | |
5435 | self.volOpFilter.setEnabled(False) |
|
5433 | self.volOpFilter.setEnabled(False) | |
5436 | self.volOpComProfile.setEnabled(False) |
|
5434 | self.volOpComProfile.setEnabled(False) | |
5437 | self.volOpComCode.setEnabled(False) |
|
5435 | self.volOpComCode.setEnabled(False) | |
5438 | self.volOpFlip.setEnabled(False) |
|
5436 | self.volOpFlip.setEnabled(False) | |
5439 | self.volOpCohInt.setEnabled(False) |
|
5437 | self.volOpCohInt.setEnabled(False) | |
5440 | self.volOpRadarfrequency.setEnabled(False) |
|
5438 | self.volOpRadarfrequency.setEnabled(False) | |
5441 |
|
5439 | |||
5442 | self.volOpChannel.setEnabled(False) |
|
5440 | self.volOpChannel.setEnabled(False) | |
5443 | self.volOpHeights.setEnabled(False) |
|
5441 | self.volOpHeights.setEnabled(False) | |
5444 | self.volOpProfile.setEnabled(False) |
|
5442 | self.volOpProfile.setEnabled(False) | |
5445 | self.volOpComMode.setEnabled(False) |
|
5443 | self.volOpComMode.setEnabled(False) | |
5446 |
|
5444 | |||
5447 | self.volGraphPath.setEnabled(False) |
|
5445 | self.volGraphPath.setEnabled(False) | |
5448 | self.volGraphPrefix.setEnabled(False) |
|
5446 | self.volGraphPrefix.setEnabled(False) | |
5449 | self.volGraphToolPath.setEnabled(False) |
|
5447 | self.volGraphToolPath.setEnabled(False) | |
5450 |
|
5448 | |||
5451 | # set Graph Voltage |
|
5449 | # set Graph Voltage | |
5452 | self.volGraphChannelList.setEnabled(False) |
|
5450 | self.volGraphChannelList.setEnabled(False) | |
5453 | self.volGraphfreqrange.setEnabled(False) |
|
5451 | self.volGraphfreqrange.setEnabled(False) | |
5454 | self.volGraphHeightrange.setEnabled(False) |
|
5452 | self.volGraphHeightrange.setEnabled(False) | |
5455 |
|
5453 | |||
5456 | # set Operation Spectra |
|
5454 | # set Operation Spectra | |
5457 | self.specOpnFFTpoints.setEnabled(False) |
|
5455 | self.specOpnFFTpoints.setEnabled(False) | |
5458 | self.specOpProfiles.setEnabled(False) |
|
5456 | self.specOpProfiles.setEnabled(False) | |
5459 | self.specOpippFactor.setEnabled(False) |
|
5457 | self.specOpippFactor.setEnabled(False) | |
5460 | self.specOppairsList.setEnabled(False) |
|
5458 | self.specOppairsList.setEnabled(False) | |
5461 | self.specOpComChannel.setEnabled(False) |
|
5459 | self.specOpComChannel.setEnabled(False) | |
5462 | self.specOpComHeights.setEnabled(False) |
|
5460 | self.specOpComHeights.setEnabled(False) | |
5463 | self.specOpIncoherent.setEnabled(False) |
|
5461 | self.specOpIncoherent.setEnabled(False) | |
5464 | self.specOpgetNoise.setEnabled(False) |
|
5462 | self.specOpgetNoise.setEnabled(False) | |
5465 | self.specOpRadarfrequency.setEnabled(False) |
|
5463 | self.specOpRadarfrequency.setEnabled(False) | |
5466 |
|
5464 | |||
5467 |
|
5465 | |||
5468 | self.specOpChannel.setEnabled(False) |
|
5466 | self.specOpChannel.setEnabled(False) | |
5469 | self.specOpHeights.setEnabled(False) |
|
5467 | self.specOpHeights.setEnabled(False) | |
5470 | # set Graph Spectra |
|
5468 | # set Graph Spectra | |
5471 | self.specGgraphChannelList.setEnabled(False) |
|
5469 | self.specGgraphChannelList.setEnabled(False) | |
5472 | self.specGgraphFreq.setEnabled(False) |
|
5470 | self.specGgraphFreq.setEnabled(False) | |
5473 | self.specGgraphHeight.setEnabled(False) |
|
5471 | self.specGgraphHeight.setEnabled(False) | |
5474 | self.specGgraphDbsrange.setEnabled(False) |
|
5472 | self.specGgraphDbsrange.setEnabled(False) | |
5475 | self.specGgraphmagnitud.setEnabled(False) |
|
5473 | self.specGgraphmagnitud.setEnabled(False) | |
5476 | self.specGgraphTminTmax.setEnabled(False) |
|
5474 | self.specGgraphTminTmax.setEnabled(False) | |
5477 | self.specGgraphTimeRange.setEnabled(False) |
|
5475 | self.specGgraphTimeRange.setEnabled(False) | |
5478 | self.specGraphPath.setEnabled(False) |
|
5476 | self.specGraphPath.setEnabled(False) | |
5479 | self.specGraphToolPath.setEnabled(False) |
|
5477 | self.specGraphToolPath.setEnabled(False) | |
5480 | self.specGraphPrefix.setEnabled(False) |
|
5478 | self.specGraphPrefix.setEnabled(False) | |
5481 |
|
5479 | |||
5482 | self.specGgraphftpratio.setEnabled(False) |
|
5480 | self.specGgraphftpratio.setEnabled(False) | |
5483 | # set Operation SpectraHeis |
|
5481 | # set Operation SpectraHeis | |
5484 | self.specHeisOpIncoherent.setEnabled(False) |
|
5482 | self.specHeisOpIncoherent.setEnabled(False) | |
5485 | self.specHeisOpCobIncInt.setEnabled(False) |
|
5483 | self.specHeisOpCobIncInt.setEnabled(False) | |
5486 | # set Graph SpectraHeis |
|
5484 | # set Graph SpectraHeis | |
5487 | self.specHeisGgraphChannelList.setEnabled(False) |
|
5485 | self.specHeisGgraphChannelList.setEnabled(False) | |
5488 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
5486 | self.specHeisGgraphXminXmax.setEnabled(False) | |
5489 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
5487 | self.specHeisGgraphYminYmax.setEnabled(False) | |
5490 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
5488 | self.specHeisGgraphTminTmax.setEnabled(False) | |
5491 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
5489 | self.specHeisGgraphTimeRange.setEnabled(False) | |
5492 | self.specHeisGgraphftpratio.setEnabled(False) |
|
5490 | self.specHeisGgraphftpratio.setEnabled(False) | |
5493 | self.specHeisGraphPath.setEnabled(False) |
|
5491 | self.specHeisGraphPath.setEnabled(False) | |
5494 | self.specHeisGraphPrefix.setEnabled(False) |
|
5492 | self.specHeisGraphPrefix.setEnabled(False) | |
5495 | self.specHeisGraphToolPath.setEnabled(False) |
|
5493 | self.specHeisGraphToolPath.setEnabled(False) | |
5496 |
|
5494 | |||
5497 |
|
5495 | |||
5498 | # tool tip gui |
|
5496 | # tool tip gui | |
5499 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
5497 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) | |
5500 | self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process') |
|
5498 | self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process') | |
5501 | # tool tip gui project |
|
5499 | # tool tip gui project | |
5502 | 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>') |
|
5500 | 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>') | |
5503 | self.proComWalk.setCurrentIndex(0) |
|
5501 | self.proComWalk.setCurrentIndex(0) | |
5504 | # tool tip gui volOp |
|
5502 | # tool tip gui volOp | |
5505 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
|
5503 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') | |
5506 | self.volOpHeights.setToolTip('Example: 90,180') |
|
5504 | self.volOpHeights.setToolTip('Example: 90,180') | |
5507 | self.volOpFilter.setToolTip('Example: 2') |
|
5505 | self.volOpFilter.setToolTip('Example: 2') | |
5508 | self.volOpProfile.setToolTip('Example:0,127') |
|
5506 | self.volOpProfile.setToolTip('Example:0,127') | |
5509 | self.volOpCohInt.setToolTip('Example: 128') |
|
5507 | self.volOpCohInt.setToolTip('Example: 128') | |
5510 | self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3') |
|
5508 | self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3') | |
5511 | self.volOpOk.setToolTip('If you have finished, please Ok ') |
|
5509 | self.volOpOk.setToolTip('If you have finished, please Ok ') | |
5512 | # tool tip gui volGraph |
|
5510 | # tool tip gui volGraph | |
5513 | self.volGraphfreqrange.setToolTip('Height range. Example: 50,100') |
|
5511 | self.volGraphfreqrange.setToolTip('Height range. Example: 50,100') | |
5514 | self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000') |
|
5512 | self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000') | |
5515 | # tool tip gui specOp |
|
5513 | # tool tip gui specOp | |
5516 | self.specOpnFFTpoints.setToolTip('Example: 128') |
|
5514 | self.specOpnFFTpoints.setToolTip('Example: 128') | |
5517 | self.specOpProfiles.setToolTip('Example: 128') |
|
5515 | self.specOpProfiles.setToolTip('Example: 128') | |
5518 | self.specOpippFactor.setToolTip('Example:1.0') |
|
5516 | self.specOpippFactor.setToolTip('Example:1.0') | |
5519 | self.specOpIncoherent.setToolTip('Example: 10') |
|
5517 | self.specOpIncoherent.setToolTip('Example: 10') | |
5520 | self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)') |
|
5518 | self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)') | |
5521 |
|
5519 | |||
5522 | self.specOpChannel.setToolTip('Example: 0,1,2,3') |
|
5520 | self.specOpChannel.setToolTip('Example: 0,1,2,3') | |
5523 | self.specOpHeights.setToolTip('Example: 90,180') |
|
5521 | self.specOpHeights.setToolTip('Example: 90,180') | |
5524 | self.specOppairsList.setToolTip('Example: (0,1),(2,3)') |
|
5522 | self.specOppairsList.setToolTip('Example: (0,1),(2,3)') | |
5525 | # tool tip gui specGraph |
|
5523 | # tool tip gui specGraph | |
5526 |
|
5524 | |||
5527 | self.specGgraphChannelList.setToolTip('Example: 0,3,4') |
|
5525 | self.specGgraphChannelList.setToolTip('Example: 0,3,4') | |
5528 | self.specGgraphFreq.setToolTip('Example: -20,20') |
|
5526 | self.specGgraphFreq.setToolTip('Example: -20,20') | |
5529 | self.specGgraphHeight.setToolTip('Example: 100,400') |
|
5527 | self.specGgraphHeight.setToolTip('Example: 100,400') | |
5530 | self.specGgraphDbsrange.setToolTip('Example: 30,170') |
|
5528 | self.specGgraphDbsrange.setToolTip('Example: 30,170') | |
5531 |
|
5529 | |||
5532 | self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME') |
|
5530 | self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME') | |
5533 |
|
5531 | |||
|
5532 | ||||
|
5533 | self.specHeisOpIncoherent.setToolTip('Example: 10') | |||
|
5534 | ||||
|
5535 | self.specHeisGgraphChannelList.setToolTip('Example: 0,2,3') | |||
|
5536 | self.specHeisGgraphXminXmax.setToolTip('Example (Hz): -1000, 1000') | |||
|
5537 | self.specHeisGgraphYminYmax.setToolTip('Example (dB): 5, 35') | |||
|
5538 | self.specHeisGgraphTminTmax.setToolTip('Example (hours): 0, 24') | |||
|
5539 | self.specHeisGgraphTimeRange.setToolTip('Example (hours): 8') | |||
|
5540 | ||||
5534 | self.labelSet.show() |
|
5541 | self.labelSet.show() | |
5535 | self.proSet.show() |
|
5542 | self.proSet.show() | |
5536 |
|
5543 | |||
5537 | self.labelIPPKm.hide() |
|
5544 | self.labelIPPKm.hide() | |
5538 | self.proIPPKm.hide() |
|
5545 | self.proIPPKm.hide() | |
5539 |
|
5546 | |||
5540 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) |
|
5547 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) | |
5541 | # sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten) |
|
5548 | # sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten) | |
5542 |
|
5549 | |||
5543 |
|
5550 | |||
5544 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): |
|
5551 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): | |
5545 | """ |
|
5552 | """ | |
5546 | Class documentation goes here. |
|
5553 | Class documentation goes here. | |
5547 | """ |
|
5554 | """ | |
5548 | closed = pyqtSignal() |
|
5555 | closed = pyqtSignal() | |
5549 | create = False |
|
5556 | create = False | |
5550 |
|
5557 | |||
5551 | def __init__(self, parent=None): |
|
5558 | def __init__(self, parent=None): | |
5552 | """ |
|
5559 | """ | |
5553 | Constructor |
|
5560 | Constructor | |
5554 | """ |
|
5561 | """ | |
5555 | QMainWindow.__init__(self, parent) |
|
5562 | QMainWindow.__init__(self, parent) | |
5556 | self.setupUi(self) |
|
5563 | self.setupUi(self) | |
5557 | self.getFromWindow = None |
|
5564 | self.getFromWindow = None | |
5558 | self.getfromWindowList = [] |
|
5565 | self.getfromWindowList = [] | |
5559 | self.dataTypeProject = None |
|
5566 | self.dataTypeProject = None | |
5560 |
|
5567 | |||
5561 | self.listUP = None |
|
5568 | self.listUP = None | |
5562 |
|
5569 | |||
5563 | @pyqtSignature("") |
|
5570 | @pyqtSignature("") | |
5564 | def on_unitPokbut_clicked(self): |
|
5571 | def on_unitPokbut_clicked(self): | |
5565 | """ |
|
5572 | """ | |
5566 | Slot documentation goes here. |
|
5573 | Slot documentation goes here. | |
5567 | """ |
|
5574 | """ | |
5568 | self.create = True |
|
5575 | self.create = True | |
5569 | self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())] |
|
5576 | self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())] | |
5570 | # self.nameofUP= str(self.nameUptxt.text()) |
|
5577 | # self.nameofUP= str(self.nameUptxt.text()) | |
5571 | self.typeofUP = str(self.comboTypeBox.currentText()) |
|
5578 | self.typeofUP = str(self.comboTypeBox.currentText()) | |
5572 | self.close() |
|
5579 | self.close() | |
5573 |
|
5580 | |||
5574 |
|
5581 | |||
5575 | @pyqtSignature("") |
|
5582 | @pyqtSignature("") | |
5576 | def on_unitPcancelbut_clicked(self): |
|
5583 | def on_unitPcancelbut_clicked(self): | |
5577 | """ |
|
5584 | """ | |
5578 | Slot documentation goes here. |
|
5585 | Slot documentation goes here. | |
5579 | """ |
|
5586 | """ | |
5580 | self.create = False |
|
5587 | self.create = False | |
5581 | self.close() |
|
5588 | self.close() | |
5582 |
|
5589 | |||
5583 | def loadTotalList(self): |
|
5590 | def loadTotalList(self): | |
5584 | self.comboInputBox.clear() |
|
5591 | self.comboInputBox.clear() | |
5585 | for i in self.getfromWindowList: |
|
5592 | for i in self.getfromWindowList: | |
5586 |
|
5593 | |||
5587 | name = i.getElementName() |
|
5594 | name = i.getElementName() | |
5588 | if name == 'Project': |
|
5595 | if name == 'Project': | |
5589 | id = i.id |
|
5596 | id = i.id | |
5590 | name = i.name |
|
5597 | name = i.name | |
5591 | if self.dataTypeProject == 'Voltage': |
|
5598 | if self.dataTypeProject == 'Voltage': | |
5592 | self.comboTypeBox.clear() |
|
5599 | self.comboTypeBox.clear() | |
5593 | self.comboTypeBox.addItem("Voltage") |
|
5600 | self.comboTypeBox.addItem("Voltage") | |
5594 |
|
5601 | |||
5595 | if self.dataTypeProject == 'Spectra': |
|
5602 | if self.dataTypeProject == 'Spectra': | |
5596 | self.comboTypeBox.clear() |
|
5603 | self.comboTypeBox.clear() | |
5597 | self.comboTypeBox.addItem("Spectra") |
|
5604 | self.comboTypeBox.addItem("Spectra") | |
5598 | self.comboTypeBox.addItem("Correlation") |
|
5605 | self.comboTypeBox.addItem("Correlation") | |
5599 | if self.dataTypeProject == 'Fits': |
|
5606 | if self.dataTypeProject == 'Fits': | |
5600 | self.comboTypeBox.clear() |
|
5607 | self.comboTypeBox.clear() | |
5601 | self.comboTypeBox.addItem("SpectraHeis") |
|
5608 | self.comboTypeBox.addItem("SpectraHeis") | |
5602 |
|
5609 | |||
5603 |
|
5610 | |||
5604 | if name == 'ProcUnit': |
|
5611 | if name == 'ProcUnit': | |
5605 | id = int(i.id) - 1 |
|
5612 | id = int(i.id) - 1 | |
5606 | name = i.datatype |
|
5613 | name = i.datatype | |
5607 | if name == 'Voltage': |
|
5614 | if name == 'Voltage': | |
5608 | self.comboTypeBox.clear() |
|
5615 | self.comboTypeBox.clear() | |
5609 | self.comboTypeBox.addItem("Spectra") |
|
5616 | self.comboTypeBox.addItem("Spectra") | |
5610 | self.comboTypeBox.addItem("SpectraHeis") |
|
5617 | self.comboTypeBox.addItem("SpectraHeis") | |
5611 | self.comboTypeBox.addItem("Correlation") |
|
5618 | self.comboTypeBox.addItem("Correlation") | |
5612 | if name == 'Spectra': |
|
5619 | if name == 'Spectra': | |
5613 | self.comboTypeBox.clear() |
|
5620 | self.comboTypeBox.clear() | |
5614 | self.comboTypeBox.addItem("Spectra") |
|
5621 | self.comboTypeBox.addItem("Spectra") | |
5615 | self.comboTypeBox.addItem("SpectraHeis") |
|
5622 | self.comboTypeBox.addItem("SpectraHeis") | |
5616 | self.comboTypeBox.addItem("Correlation") |
|
5623 | self.comboTypeBox.addItem("Correlation") | |
5617 | if name == 'SpectraHeis': |
|
5624 | if name == 'SpectraHeis': | |
5618 | self.comboTypeBox.clear() |
|
5625 | self.comboTypeBox.clear() | |
5619 | self.comboTypeBox.addItem("SpectraHeis") |
|
5626 | self.comboTypeBox.addItem("SpectraHeis") | |
5620 |
|
5627 | |||
5621 | self.comboInputBox.addItem(str(name)) |
|
5628 | self.comboInputBox.addItem(str(name)) | |
5622 | # self.comboInputBox.addItem(str(name)+str(id)) |
|
5629 | # self.comboInputBox.addItem(str(name)+str(id)) | |
5623 |
|
5630 | |||
5624 | def closeEvent(self, event): |
|
5631 | def closeEvent(self, event): | |
5625 | self.closed.emit() |
|
5632 | self.closed.emit() | |
5626 | event.accept() |
|
5633 | event.accept() | |
5627 |
|
5634 | |||
5628 | class Ftp(QMainWindow, Ui_Ftp): |
|
5635 | class Ftp(QMainWindow, Ui_Ftp): | |
5629 | """ |
|
5636 | """ | |
5630 | Class documentation goes here. |
|
5637 | Class documentation goes here. | |
5631 | """ |
|
5638 | """ | |
5632 | create = False |
|
5639 | create = False | |
5633 | closed = pyqtSignal() |
|
5640 | closed = pyqtSignal() | |
5634 | server = None |
|
5641 | server = None | |
5635 | remotefolder = None |
|
5642 | remotefolder = None | |
5636 | username = None |
|
5643 | username = None | |
5637 | password = None |
|
5644 | password = None | |
5638 | ftp_wei = None |
|
5645 | ftp_wei = None | |
5639 | exp_code = None |
|
5646 | exp_code = None | |
5640 | sub_exp_code = None |
|
5647 | sub_exp_code = None | |
5641 | plot_pos = None |
|
5648 | plot_pos = None | |
5642 |
|
5649 | |||
5643 | def __init__(self, parent=None): |
|
5650 | def __init__(self, parent=None): | |
5644 | """ |
|
5651 | """ | |
5645 | Constructor |
|
5652 | Constructor | |
5646 | """ |
|
5653 | """ | |
5647 | QMainWindow.__init__(self, parent) |
|
5654 | QMainWindow.__init__(self, parent) | |
5648 | self.setupUi(self) |
|
5655 | self.setupUi(self) | |
5649 | self.setGUIStatus() |
|
5656 | self.setGUIStatus() | |
5650 |
|
5657 | |||
5651 | def setGUIStatus(self): |
|
5658 | def setGUIStatus(self): | |
5652 | self.setWindowTitle("ROJ-Signal Chain") |
|
5659 | self.setWindowTitle("ROJ-Signal Chain") | |
5653 | self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe') |
|
5660 | self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe') | |
5654 | self.folderFTP.setToolTip('Example: /home/wmaster/graficos') |
|
5661 | self.folderFTP.setToolTip('Example: /home/wmaster/graficos') | |
5655 | self.usernameFTP.setToolTip('Example: myusername') |
|
5662 | self.usernameFTP.setToolTip('Example: myusername') | |
5656 | self.passwordFTP.setToolTip('Example: mypass ') |
|
5663 | self.passwordFTP.setToolTip('Example: mypass ') | |
5657 | self.weightFTP.setToolTip('Example: 0') |
|
5664 | self.weightFTP.setToolTip('Example: 0') | |
5658 | self.expcodeFTP.setToolTip('Example: 0') |
|
5665 | self.expcodeFTP.setToolTip('Example: 0') | |
5659 | self.subexpFTP.setToolTip('Example: 0') |
|
5666 | self.subexpFTP.setToolTip('Example: 0') | |
5660 | self.plotposFTP.setToolTip('Example: 0') |
|
5667 | self.plotposFTP.setToolTip('Example: 0') | |
5661 |
|
5668 | |||
5662 | def setParmsfromTemporal(self, server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): |
|
5669 | def setParmsfromTemporal(self, server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): | |
5663 | self.serverFTP.setText(str(server)) |
|
5670 | self.serverFTP.setText(str(server)) | |
5664 | self.folderFTP.setText(str(remotefolder)) |
|
5671 | self.folderFTP.setText(str(remotefolder)) | |
5665 | self.usernameFTP.setText(str(username)) |
|
5672 | self.usernameFTP.setText(str(username)) | |
5666 | self.passwordFTP.setText(str(password)) |
|
5673 | self.passwordFTP.setText(str(password)) | |
5667 | self.weightFTP.setText(str(ftp_wei)) |
|
5674 | self.weightFTP.setText(str(ftp_wei)) | |
5668 | self.expcodeFTP.setText(str(exp_code)) |
|
5675 | self.expcodeFTP.setText(str(exp_code)) | |
5669 | self.subexpFTP.setText(str(sub_exp_code)) |
|
5676 | self.subexpFTP.setText(str(sub_exp_code)) | |
5670 | self.plotposFTP.setText(str(plot_pos)) |
|
5677 | self.plotposFTP.setText(str(plot_pos)) | |
5671 |
|
5678 | |||
5672 | def getParmsFromFtpWindow(self): |
|
5679 | def getParmsFromFtpWindow(self): | |
5673 | """ |
|
5680 | """ | |
5674 | Return Inputs Project: |
|
5681 | Return Inputs Project: | |
5675 | - server |
|
5682 | - server | |
5676 | - remotefolder |
|
5683 | - remotefolder | |
5677 | - username |
|
5684 | - username | |
5678 | - password |
|
5685 | - password | |
5679 | - ftp_wei |
|
5686 | - ftp_wei | |
5680 | - exp_code |
|
5687 | - exp_code | |
5681 | - sub_exp_code |
|
5688 | - sub_exp_code | |
5682 | - plot_pos |
|
5689 | - plot_pos | |
5683 | """ |
|
5690 | """ | |
5684 | name_server_ftp = str(self.serverFTP.text()) |
|
5691 | name_server_ftp = str(self.serverFTP.text()) | |
5685 | if not name_server_ftp: |
|
5692 | if not name_server_ftp: | |
5686 | self.console.clear() |
|
5693 | self.console.clear() | |
5687 | self.console.append("Please Write a FTP Server") |
|
5694 | self.console.append("Please Write a FTP Server") | |
5688 | return 0 |
|
5695 | return 0 | |
5689 |
|
5696 | |||
5690 | folder_server_ftp = str(self.folderFTP.text()) |
|
5697 | folder_server_ftp = str(self.folderFTP.text()) | |
5691 | if not folder_server_ftp: |
|
5698 | if not folder_server_ftp: | |
5692 | self.console.clear() |
|
5699 | self.console.clear() | |
5693 | self.console.append("Please Write a Folder") |
|
5700 | self.console.append("Please Write a Folder") | |
5694 | return 0 |
|
5701 | return 0 | |
5695 |
|
5702 | |||
5696 | username_ftp = str(self.usernameFTP.text()) |
|
5703 | username_ftp = str(self.usernameFTP.text()) | |
5697 | if not username_ftp: |
|
5704 | if not username_ftp: | |
5698 | self.console.clear() |
|
5705 | self.console.clear() | |
5699 | self.console.append("Please Write a User Name") |
|
5706 | self.console.append("Please Write a User Name") | |
5700 | return 0 |
|
5707 | return 0 | |
5701 |
|
5708 | |||
5702 | password_ftp = str(self.passwordFTP.text()) |
|
5709 | password_ftp = str(self.passwordFTP.text()) | |
5703 | if not password_ftp: |
|
5710 | if not password_ftp: | |
5704 | self.console.clear() |
|
5711 | self.console.clear() | |
5705 | self.console.append("Please Write a passwordFTP") |
|
5712 | self.console.append("Please Write a passwordFTP") | |
5706 | return 0 |
|
5713 | return 0 | |
5707 |
|
5714 | |||
5708 | ftp_wei = str(self.weightFTP.text()) |
|
5715 | ftp_wei = str(self.weightFTP.text()) | |
5709 | if not ftp_wei == "": |
|
5716 | if not ftp_wei == "": | |
5710 | try: |
|
5717 | try: | |
5711 | ftp_wei = int(self.weightFTP.text()) |
|
5718 | ftp_wei = int(self.weightFTP.text()) | |
5712 | except: |
|
5719 | except: | |
5713 | self.console.clear() |
|
5720 | self.console.clear() | |
5714 | self.console.append("Please Write a ftp_wei number") |
|
5721 | self.console.append("Please Write a ftp_wei number") | |
5715 | return 0 |
|
5722 | return 0 | |
5716 |
|
5723 | |||
5717 | exp_code = str(self.expcodeFTP.text()) |
|
5724 | exp_code = str(self.expcodeFTP.text()) | |
5718 | if not exp_code == "": |
|
5725 | if not exp_code == "": | |
5719 | try: |
|
5726 | try: | |
5720 | exp_code = int(self.expcodeFTP.text()) |
|
5727 | exp_code = int(self.expcodeFTP.text()) | |
5721 | except: |
|
5728 | except: | |
5722 | self.console.clear() |
|
5729 | self.console.clear() | |
5723 | self.console.append("Please Write a exp_code number") |
|
5730 | self.console.append("Please Write a exp_code number") | |
5724 | return 0 |
|
5731 | return 0 | |
5725 |
|
5732 | |||
5726 |
|
5733 | |||
5727 | sub_exp_code = str(self.subexpFTP.text()) |
|
5734 | sub_exp_code = str(self.subexpFTP.text()) | |
5728 | if not sub_exp_code == "": |
|
5735 | if not sub_exp_code == "": | |
5729 | try: |
|
5736 | try: | |
5730 | sub_exp_code = int(self.subexpFTP.text()) |
|
5737 | sub_exp_code = int(self.subexpFTP.text()) | |
5731 | except: |
|
5738 | except: | |
5732 | self.console.clear() |
|
5739 | self.console.clear() | |
5733 | self.console.append("Please Write a sub_exp_code number") |
|
5740 | self.console.append("Please Write a sub_exp_code number") | |
5734 | return 0 |
|
5741 | return 0 | |
5735 |
|
5742 | |||
5736 | plot_pos = str(self.plotposFTP.text()) |
|
5743 | plot_pos = str(self.plotposFTP.text()) | |
5737 | if not plot_pos == "": |
|
5744 | if not plot_pos == "": | |
5738 | try: |
|
5745 | try: | |
5739 | plot_pos = int(self.plotposFTP.text()) |
|
5746 | plot_pos = int(self.plotposFTP.text()) | |
5740 | except: |
|
5747 | except: | |
5741 | self.console.clear() |
|
5748 | self.console.clear() | |
5742 | self.console.append("Please Write a plot_pos number") |
|
5749 | self.console.append("Please Write a plot_pos number") | |
5743 | return 0 |
|
5750 | return 0 | |
5744 |
|
5751 | |||
5745 | return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos |
|
5752 | return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos | |
5746 |
|
5753 | |||
5747 | @pyqtSignature("") |
|
5754 | @pyqtSignature("") | |
5748 | def on_ftpOkButton_clicked(self): |
|
5755 | def on_ftpOkButton_clicked(self): | |
5749 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow() |
|
5756 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow() | |
5750 | self.create = True |
|
5757 | self.create = True | |
5751 | self.close() |
|
5758 | self.close() | |
5752 |
|
5759 | |||
5753 | @pyqtSignature("") |
|
5760 | @pyqtSignature("") | |
5754 | def on_ftpCancelButton_clicked(self): |
|
5761 | def on_ftpCancelButton_clicked(self): | |
5755 | self.create = False |
|
5762 | self.create = False | |
5756 | self.close() |
|
5763 | self.close() | |
5757 |
|
5764 | |||
5758 | def closeEvent(self, event): |
|
5765 | def closeEvent(self, event): | |
5759 | self.closed.emit() |
|
5766 | self.closed.emit() | |
5760 | event.accept() |
|
5767 | event.accept() | |
5761 |
|
5768 | |||
5762 | class ftpBuffer(): |
|
5769 | class ftpBuffer(): | |
5763 |
|
5770 | |||
5764 | server = None |
|
5771 | server = None | |
5765 | remotefolder = None |
|
5772 | remotefolder = None | |
5766 | username = None |
|
5773 | username = None | |
5767 | password = None |
|
5774 | password = None | |
5768 | ftp_wei = None |
|
5775 | ftp_wei = None | |
5769 | exp_code = None |
|
5776 | exp_code = None | |
5770 | sub_exp_code = None |
|
5777 | sub_exp_code = None | |
5771 | plot_pos = None |
|
5778 | plot_pos = None | |
5772 | create = False |
|
5779 | create = False | |
5773 | withoutconfig = False |
|
5780 | withoutconfig = False | |
5774 | createforView = False |
|
5781 | createforView = False | |
5775 | localfolder = None |
|
5782 | localfolder = None | |
5776 | extension = None |
|
5783 | extension = None | |
5777 | period = None |
|
5784 | period = None | |
5778 | protocol = None |
|
5785 | protocol = None | |
5779 |
|
5786 | |||
5780 | def __init__(self): |
|
5787 | def __init__(self): | |
5781 |
|
5788 | |||
5782 | self.create = False |
|
5789 | self.create = False | |
5783 | self.server = None |
|
5790 | self.server = None | |
5784 | self.remotefolder = None |
|
5791 | self.remotefolder = None | |
5785 | self.username = None |
|
5792 | self.username = None | |
5786 | self.password = None |
|
5793 | self.password = None | |
5787 | self.ftp_wei = None |
|
5794 | self.ftp_wei = None | |
5788 | self.exp_code = None |
|
5795 | self.exp_code = None | |
5789 | self.sub_exp_code = None |
|
5796 | self.sub_exp_code = None | |
5790 | self.plot_pos = None |
|
5797 | self.plot_pos = None | |
5791 | # self.create = False |
|
5798 | # self.create = False | |
5792 | self.localfolder = None |
|
5799 | self.localfolder = None | |
5793 | self.extension = None |
|
5800 | self.extension = None | |
5794 | self.period = None |
|
5801 | self.period = None | |
5795 | self.protocol = None |
|
5802 | self.protocol = None | |
5796 |
|
5803 | |||
5797 | def setwithoutconfiguration(self): |
|
5804 | def setwithoutconfiguration(self): | |
5798 |
|
5805 | |||
5799 | self.create = False |
|
5806 | self.create = False | |
5800 | self.server = "jro-app.igp.gob.pe" |
|
5807 | self.server = "jro-app.igp.gob.pe" | |
5801 | self.remotefolder = "/home/wmaster/graficos" |
|
5808 | self.remotefolder = "/home/wmaster/graficos" | |
5802 | self.username = "wmaster" |
|
5809 | self.username = "wmaster" | |
5803 | self.password = "mst2010vhf" |
|
5810 | self.password = "mst2010vhf" | |
5804 | self.withoutconfig = True |
|
5811 | self.withoutconfig = True | |
5805 | self.localfolder = './' |
|
5812 | self.localfolder = './' | |
5806 | self.extension = '.png' |
|
5813 | self.extension = '.png' | |
5807 | self.period = 60 |
|
5814 | self.period = 60 | |
5808 | self.protocol = 'ftp' |
|
5815 | self.protocol = 'ftp' | |
5809 | self.createforView = True |
|
5816 | self.createforView = True | |
5810 |
|
5817 | |||
5811 | if not self.ftp_wei: |
|
5818 | if not self.ftp_wei: | |
5812 | self.ftp_wei = 0 |
|
5819 | self.ftp_wei = 0 | |
5813 |
|
5820 | |||
5814 | if not self.exp_code: |
|
5821 | if not self.exp_code: | |
5815 | self.exp_code = 0 |
|
5822 | self.exp_code = 0 | |
5816 |
|
5823 | |||
5817 | if not self.sub_exp_code: |
|
5824 | if not self.sub_exp_code: | |
5818 | self.sub_exp_code = 0 |
|
5825 | self.sub_exp_code = 0 | |
5819 |
|
5826 | |||
5820 | if not self.plot_pos: |
|
5827 | if not self.plot_pos: | |
5821 | self.plot_pos = 0 |
|
5828 | self.plot_pos = 0 | |
5822 |
|
5829 | |||
5823 | def save(self, server, remotefolder, username, password, ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, localfolder='./', extension='.png', period=60, protocol='ftp'): |
|
5830 | def save(self, server, remotefolder, username, password, ftp_wei=0, exp_code=0, sub_exp_code=0, plot_pos=0, localfolder='./', extension='.png', period=60, protocol='ftp'): | |
5824 |
|
5831 | |||
5825 | self.server = server |
|
5832 | self.server = server | |
5826 | self.remotefolder = remotefolder |
|
5833 | self.remotefolder = remotefolder | |
5827 | self.username = username |
|
5834 | self.username = username | |
5828 | self.password = password |
|
5835 | self.password = password | |
5829 | self.ftp_wei = ftp_wei |
|
5836 | self.ftp_wei = ftp_wei | |
5830 | self.exp_code = exp_code |
|
5837 | self.exp_code = exp_code | |
5831 | self.sub_exp_code = sub_exp_code |
|
5838 | self.sub_exp_code = sub_exp_code | |
5832 | self.plot_pos = plot_pos |
|
5839 | self.plot_pos = plot_pos | |
5833 | self.create = True |
|
5840 | self.create = True | |
5834 | self.withoutconfig = False |
|
5841 | self.withoutconfig = False | |
5835 | self.createforView = True |
|
5842 | self.createforView = True | |
5836 | self.localfolder = localfolder |
|
5843 | self.localfolder = localfolder | |
5837 | self.extension = extension |
|
5844 | self.extension = extension | |
5838 | self.period = period |
|
5845 | self.period = period | |
5839 | self.protocol = protocol |
|
5846 | self.protocol = protocol | |
5840 |
|
5847 | |||
5841 | def recover(self): |
|
5848 | def recover(self): | |
5842 |
|
5849 | |||
5843 | return self.server, self.remotefolder, self.username, self.password, self.ftp_wei, self.exp_code, self.sub_exp_code, self.plot_pos, self.extension, self.period, self.protocol |
|
5850 | return self.server, self.remotefolder, self.username, self.password, self.ftp_wei, self.exp_code, self.sub_exp_code, self.plot_pos, self.extension, self.period, self.protocol | |
5844 |
|
5851 | |||
5845 | class ShowMeConsole(QtCore.QObject): |
|
5852 | class ShowMeConsole(QtCore.QObject): | |
5846 |
|
5853 | |||
5847 | textWritten = QtCore.pyqtSignal(str) |
|
5854 | textWritten = QtCore.pyqtSignal(str) | |
5848 |
|
5855 | |||
5849 | def write(self, text): |
|
5856 | def write(self, text): | |
5850 |
|
5857 | |||
5851 | if text[-1] == "\n": |
|
5858 | if text[-1] == "\n": | |
5852 | text = text[:-1] |
|
5859 | text = text[:-1] | |
5853 |
|
5860 | |||
5854 | self.textWritten.emit(str(text)) |
|
5861 | self.textWritten.emit(str(text)) |
@@ -1,240 +1,240 | |||||
1 | from PyQt4 import QtCore, QtGui |
|
1 | from PyQt4 import QtCore, QtGui | |
2 |
|
2 | |||
3 | try: |
|
3 | try: | |
4 | _fromUtf8 = QtCore.QString.fromUtf8 |
|
4 | _fromUtf8 = QtCore.QString.fromUtf8 | |
5 | except AttributeError: |
|
5 | except AttributeError: | |
6 | def _fromUtf8(s): |
|
6 | def _fromUtf8(s): | |
7 | return s |
|
7 | return s | |
8 |
|
8 | |||
9 | try: |
|
9 | try: | |
10 | _encoding = QtGui.QApplication.UnicodeUTF8 |
|
10 | _encoding = QtGui.QApplication.UnicodeUTF8 | |
11 | def _translate(context, text, disambig): |
|
11 | def _translate(context, text, disambig): | |
12 | return QtGui.QApplication.translate(context, text, disambig, _encoding) |
|
12 | return QtGui.QApplication.translate(context, text, disambig, _encoding) | |
13 | except AttributeError: |
|
13 | except AttributeError: | |
14 | def _translate(context, text, disambig): |
|
14 | def _translate(context, text, disambig): | |
15 | return QtGui.QApplication.translate(context, text, disambig) |
|
15 | return QtGui.QApplication.translate(context, text, disambig) | |
16 |
|
16 | |||
17 | class Ui_SpectraHeisTab(object): |
|
17 | class Ui_SpectraHeisTab(object): | |
18 |
|
18 | |||
19 | def setupUi(self): |
|
19 | def setupUi(self): | |
20 |
|
20 | |||
21 | self.tabSpectraHeis = QtGui.QWidget() |
|
21 | self.tabSpectraHeis = QtGui.QWidget() | |
22 | self.tabSpectraHeis.setObjectName(_fromUtf8("tabSpectraHeis")) |
|
22 | self.tabSpectraHeis.setObjectName(_fromUtf8("tabSpectraHeis")) | |
23 | self.gridLayout_23 = QtGui.QGridLayout(self.tabSpectraHeis) |
|
23 | self.gridLayout_23 = QtGui.QGridLayout(self.tabSpectraHeis) | |
24 | self.gridLayout_23.setObjectName(_fromUtf8("gridLayout_23")) |
|
24 | self.gridLayout_23.setObjectName(_fromUtf8("gridLayout_23")) | |
25 | self.frame_6 = QtGui.QFrame(self.tabSpectraHeis) |
|
25 | self.frame_6 = QtGui.QFrame(self.tabSpectraHeis) | |
26 | self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) |
|
26 | self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) | |
27 | self.frame_6.setFrameShadow(QtGui.QFrame.Raised) |
|
27 | self.frame_6.setFrameShadow(QtGui.QFrame.Raised) | |
28 | self.frame_6.setObjectName(_fromUtf8("frame_6")) |
|
28 | self.frame_6.setObjectName(_fromUtf8("frame_6")) | |
29 | self.gridLayout_22 = QtGui.QGridLayout(self.frame_6) |
|
29 | self.gridLayout_22 = QtGui.QGridLayout(self.frame_6) | |
30 | self.gridLayout_22.setObjectName(_fromUtf8("gridLayout_22")) |
|
30 | self.gridLayout_22.setObjectName(_fromUtf8("gridLayout_22")) | |
31 | self.specHeisGraphClear = QtGui.QPushButton(self.frame_6) |
|
31 | self.specHeisGraphClear = QtGui.QPushButton(self.frame_6) | |
32 | self.specHeisGraphClear.setObjectName(_fromUtf8("specHeisGraphClear")) |
|
32 | self.specHeisGraphClear.setObjectName(_fromUtf8("specHeisGraphClear")) | |
33 | self.gridLayout_22.addWidget(self.specHeisGraphClear, 0, 1, 1, 1) |
|
33 | self.gridLayout_22.addWidget(self.specHeisGraphClear, 0, 1, 1, 1) | |
34 | self.specHeisOpOk = QtGui.QPushButton(self.frame_6) |
|
34 | self.specHeisOpOk = QtGui.QPushButton(self.frame_6) | |
35 | self.specHeisOpOk.setObjectName(_fromUtf8("specHeisOpOk")) |
|
35 | self.specHeisOpOk.setObjectName(_fromUtf8("specHeisOpOk")) | |
36 | self.gridLayout_22.addWidget(self.specHeisOpOk, 0, 0, 1, 1) |
|
36 | self.gridLayout_22.addWidget(self.specHeisOpOk, 0, 0, 1, 1) | |
37 | self.gridLayout_23.addWidget(self.frame_6, 1, 0, 1, 1) |
|
37 | self.gridLayout_23.addWidget(self.frame_6, 1, 0, 1, 1) | |
38 | self.tabWidgetSpectraHeis = QtGui.QTabWidget(self.tabSpectraHeis) |
|
38 | self.tabWidgetSpectraHeis = QtGui.QTabWidget(self.tabSpectraHeis) | |
39 | self.tabWidgetSpectraHeis.setObjectName(_fromUtf8("tabWidgetSpectraHeis")) |
|
39 | self.tabWidgetSpectraHeis.setObjectName(_fromUtf8("tabWidgetSpectraHeis")) | |
40 | self.tabopSpectraHeis = QtGui.QWidget() |
|
40 | self.tabopSpectraHeis = QtGui.QWidget() | |
41 | self.tabopSpectraHeis.setObjectName(_fromUtf8("tabopSpectraHeis")) |
|
41 | self.tabopSpectraHeis.setObjectName(_fromUtf8("tabopSpectraHeis")) | |
42 | self.gridLayout_21 = QtGui.QGridLayout(self.tabopSpectraHeis) |
|
42 | self.gridLayout_21 = QtGui.QGridLayout(self.tabopSpectraHeis) | |
43 | self.gridLayout_21.setObjectName(_fromUtf8("gridLayout_21")) |
|
43 | self.gridLayout_21.setObjectName(_fromUtf8("gridLayout_21")) | |
44 | spacerItem21 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
44 | spacerItem21 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
45 | self.gridLayout_21.addItem(spacerItem21, 0, 1, 1, 1) |
|
45 | self.gridLayout_21.addItem(spacerItem21, 0, 1, 1, 1) | |
46 | self.specHeisOpCobIncInt = QtGui.QComboBox(self.tabopSpectraHeis) |
|
46 | self.specHeisOpCobIncInt = QtGui.QComboBox(self.tabopSpectraHeis) | |
47 | self.specHeisOpCobIncInt.setObjectName(_fromUtf8("specHeisOpCobIncInt")) |
|
47 | self.specHeisOpCobIncInt.setObjectName(_fromUtf8("specHeisOpCobIncInt")) | |
48 | self.specHeisOpCobIncInt.addItem(_fromUtf8("")) |
|
48 | self.specHeisOpCobIncInt.addItem(_fromUtf8("")) | |
49 | self.gridLayout_21.addWidget(self.specHeisOpCobIncInt, 1, 0, 1, 1) |
|
49 | self.gridLayout_21.addWidget(self.specHeisOpCobIncInt, 1, 0, 1, 1) | |
50 | self.specHeisOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectraHeis) |
|
50 | self.specHeisOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectraHeis) | |
51 | self.specHeisOpCebIncoherent.setObjectName(_fromUtf8("specHeisOpCebIncoherent")) |
|
51 | self.specHeisOpCebIncoherent.setObjectName(_fromUtf8("specHeisOpCebIncoherent")) | |
52 | self.gridLayout_21.addWidget(self.specHeisOpCebIncoherent, 0, 0, 1, 1) |
|
52 | self.gridLayout_21.addWidget(self.specHeisOpCebIncoherent, 0, 0, 1, 1) | |
53 | self.specHeisOpIncoherent = QtGui.QLineEdit(self.tabopSpectraHeis) |
|
53 | self.specHeisOpIncoherent = QtGui.QLineEdit(self.tabopSpectraHeis) | |
54 | self.specHeisOpIncoherent.setObjectName(_fromUtf8("specHeisOpIncoherent")) |
|
54 | self.specHeisOpIncoherent.setObjectName(_fromUtf8("specHeisOpIncoherent")) | |
55 | self.gridLayout_21.addWidget(self.specHeisOpIncoherent, 1, 1, 1, 1) |
|
55 | self.gridLayout_21.addWidget(self.specHeisOpIncoherent, 1, 1, 1, 1) | |
56 | spacerItem22 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
56 | spacerItem22 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
57 | self.gridLayout_21.addItem(spacerItem22, 2, 0, 1, 1) |
|
57 | self.gridLayout_21.addItem(spacerItem22, 2, 0, 1, 1) | |
58 | self.tabWidgetSpectraHeis.addTab(self.tabopSpectraHeis, _fromUtf8("")) |
|
58 | self.tabWidgetSpectraHeis.addTab(self.tabopSpectraHeis, _fromUtf8("")) | |
59 | self.tabgraphSpectraHeis = QtGui.QWidget() |
|
59 | self.tabgraphSpectraHeis = QtGui.QWidget() | |
60 | self.tabgraphSpectraHeis.setObjectName(_fromUtf8("tabgraphSpectraHeis")) |
|
60 | self.tabgraphSpectraHeis.setObjectName(_fromUtf8("tabgraphSpectraHeis")) | |
61 | self.gridLayout_20 = QtGui.QGridLayout(self.tabgraphSpectraHeis) |
|
61 | self.gridLayout_20 = QtGui.QGridLayout(self.tabgraphSpectraHeis) | |
62 | self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20")) |
|
62 | self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20")) | |
63 | self.label_54 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
63 | self.label_54 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
64 | self.label_54.setObjectName(_fromUtf8("label_54")) |
|
64 | self.label_54.setObjectName(_fromUtf8("label_54")) | |
65 | self.gridLayout_20.addWidget(self.label_54, 1, 0, 1, 1) |
|
65 | self.gridLayout_20.addWidget(self.label_54, 1, 0, 1, 1) | |
66 | self.specHeisGraphToolPath = QtGui.QToolButton(self.tabgraphSpectraHeis) |
|
66 | self.specHeisGraphToolPath = QtGui.QToolButton(self.tabgraphSpectraHeis) | |
67 | self.specHeisGraphToolPath.setObjectName(_fromUtf8("specHeisGraphToolPath")) |
|
67 | self.specHeisGraphToolPath.setObjectName(_fromUtf8("specHeisGraphToolPath")) | |
68 | self.gridLayout_20.addWidget(self.specHeisGraphToolPath, 0, 6, 1, 1) |
|
68 | self.gridLayout_20.addWidget(self.specHeisGraphToolPath, 0, 6, 1, 1) | |
69 | self.specHeisGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
69 | self.specHeisGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
70 | self.specHeisGraphCebRTIplot.setText(_fromUtf8("")) |
|
70 | self.specHeisGraphCebRTIplot.setText(_fromUtf8("")) | |
71 | self.specHeisGraphCebRTIplot.setObjectName(_fromUtf8("specHeisGraphCebRTIplot")) |
|
71 | self.specHeisGraphCebRTIplot.setObjectName(_fromUtf8("specHeisGraphCebRTIplot")) | |
72 | self.gridLayout_20.addWidget(self.specHeisGraphCebRTIplot, 4, 2, 1, 1) |
|
72 | self.gridLayout_20.addWidget(self.specHeisGraphCebRTIplot, 4, 2, 1, 1) | |
73 | self.label_62 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
73 | self.label_62 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
74 | self.label_62.setObjectName(_fromUtf8("label_62")) |
|
74 | self.label_62.setObjectName(_fromUtf8("label_62")) | |
75 | self.gridLayout_20.addWidget(self.label_62, 7, 0, 1, 1) |
|
75 | self.gridLayout_20.addWidget(self.label_62, 7, 0, 1, 1) | |
76 | self.label_63 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
76 | self.label_63 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
77 | self.label_63.setObjectName(_fromUtf8("label_63")) |
|
77 | self.label_63.setObjectName(_fromUtf8("label_63")) | |
78 | self.gridLayout_20.addWidget(self.label_63, 8, 0, 1, 1) |
|
78 | self.gridLayout_20.addWidget(self.label_63, 8, 0, 1, 1) | |
79 | self.label_64 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
79 | self.label_64 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
80 | self.label_64.setObjectName(_fromUtf8("label_64")) |
|
80 | self.label_64.setObjectName(_fromUtf8("label_64")) | |
81 | self.gridLayout_20.addWidget(self.label_64, 9, 0, 1, 1) |
|
81 | self.gridLayout_20.addWidget(self.label_64, 9, 0, 1, 1) | |
82 | self.label_65 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
82 | self.label_65 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
83 | self.label_65.setObjectName(_fromUtf8("label_65")) |
|
83 | self.label_65.setObjectName(_fromUtf8("label_65")) | |
84 | self.gridLayout_20.addWidget(self.label_65, 10, 0, 1, 1) |
|
84 | self.gridLayout_20.addWidget(self.label_65, 10, 0, 1, 1) | |
85 | spacerItem23 = QtGui.QSpacerItem(134, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
85 | spacerItem23 = QtGui.QSpacerItem(134, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
86 | self.gridLayout_20.addItem(spacerItem23, 11, 0, 1, 2) |
|
86 | self.gridLayout_20.addItem(spacerItem23, 11, 0, 1, 2) | |
87 | self.specHeisGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
87 | self.specHeisGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
88 | self.specHeisGgraphftpratio.setObjectName(_fromUtf8("specHeisGgraphftpratio")) |
|
88 | self.specHeisGgraphftpratio.setObjectName(_fromUtf8("specHeisGgraphftpratio")) | |
89 | self.gridLayout_20.addWidget(self.specHeisGgraphftpratio, 10, 1, 1, 6) |
|
89 | self.gridLayout_20.addWidget(self.specHeisGgraphftpratio, 10, 1, 1, 6) | |
90 | self.specHeisGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
90 | self.specHeisGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
91 | self.specHeisGraphftpRTIplot.setText(_fromUtf8("")) |
|
91 | self.specHeisGraphftpRTIplot.setText(_fromUtf8("")) | |
92 | self.specHeisGraphftpRTIplot.setObjectName(_fromUtf8("specHeisGraphftpRTIplot")) |
|
92 | self.specHeisGraphftpRTIplot.setObjectName(_fromUtf8("specHeisGraphftpRTIplot")) | |
93 | self.gridLayout_20.addWidget(self.specHeisGraphftpRTIplot, 4, 6, 1, 1) |
|
93 | self.gridLayout_20.addWidget(self.specHeisGraphftpRTIplot, 4, 6, 1, 1) | |
94 | self.specHeisGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
94 | self.specHeisGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
95 | self.specHeisGgraphTminTmax.setObjectName(_fromUtf8("specHeisGgraphTminTmax")) |
|
95 | self.specHeisGgraphTminTmax.setObjectName(_fromUtf8("specHeisGgraphTminTmax")) | |
96 | self.gridLayout_20.addWidget(self.specHeisGgraphTminTmax, 8, 1, 1, 6) |
|
96 | self.gridLayout_20.addWidget(self.specHeisGgraphTminTmax, 8, 1, 1, 6) | |
97 | self.label_60 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
97 | self.label_60 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
98 | self.label_60.setObjectName(_fromUtf8("label_60")) |
|
98 | self.label_60.setObjectName(_fromUtf8("label_60")) | |
99 | self.gridLayout_20.addWidget(self.label_60, 5, 0, 1, 1) |
|
99 | self.gridLayout_20.addWidget(self.label_60, 5, 0, 1, 1) | |
100 | self.label_61 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
100 | self.label_61 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
101 | self.label_61.setObjectName(_fromUtf8("label_61")) |
|
101 | self.label_61.setObjectName(_fromUtf8("label_61")) | |
102 | self.gridLayout_20.addWidget(self.label_61, 6, 0, 1, 1) |
|
102 | self.gridLayout_20.addWidget(self.label_61, 6, 0, 1, 1) | |
103 | self.specHeisGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
103 | self.specHeisGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
104 | self.specHeisGraphPrefix.setObjectName(_fromUtf8("specHeisGraphPrefix")) |
|
104 | self.specHeisGraphPrefix.setObjectName(_fromUtf8("specHeisGraphPrefix")) | |
105 | self.gridLayout_20.addWidget(self.specHeisGraphPrefix, 1, 1, 1, 6) |
|
105 | self.gridLayout_20.addWidget(self.specHeisGraphPrefix, 1, 1, 1, 6) | |
106 | self.label_56 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
106 | self.label_56 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
107 | self.label_56.setObjectName(_fromUtf8("label_56")) |
|
107 | self.label_56.setObjectName(_fromUtf8("label_56")) | |
108 | self.gridLayout_20.addWidget(self.label_56, 2, 4, 1, 1) |
|
108 | self.gridLayout_20.addWidget(self.label_56, 2, 4, 1, 1) | |
109 | self.label_57 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
109 | self.label_57 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
110 | self.label_57.setObjectName(_fromUtf8("label_57")) |
|
110 | self.label_57.setObjectName(_fromUtf8("label_57")) | |
111 | self.gridLayout_20.addWidget(self.label_57, 2, 6, 1, 1) |
|
111 | self.gridLayout_20.addWidget(self.label_57, 2, 6, 1, 1) | |
112 | self.label_58 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
112 | self.label_58 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
113 | self.label_58.setObjectName(_fromUtf8("label_58")) |
|
113 | self.label_58.setObjectName(_fromUtf8("label_58")) | |
114 | self.gridLayout_20.addWidget(self.label_58, 3, 0, 1, 1) |
|
114 | self.gridLayout_20.addWidget(self.label_58, 3, 0, 1, 1) | |
115 | self.specHeisGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
115 | self.specHeisGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
116 | self.specHeisGraphCebSpectraplot.setText(_fromUtf8("")) |
|
116 | self.specHeisGraphCebSpectraplot.setText(_fromUtf8("")) | |
117 | self.specHeisGraphCebSpectraplot.setObjectName(_fromUtf8("specHeisGraphCebSpectraplot")) |
|
117 | self.specHeisGraphCebSpectraplot.setObjectName(_fromUtf8("specHeisGraphCebSpectraplot")) | |
118 | self.gridLayout_20.addWidget(self.specHeisGraphCebSpectraplot, 3, 2, 1, 1) |
|
118 | self.gridLayout_20.addWidget(self.specHeisGraphCebSpectraplot, 3, 2, 1, 1) | |
119 | self.specHeisGgraphYminYmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
119 | self.specHeisGgraphYminYmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
120 | self.specHeisGgraphYminYmax.setObjectName(_fromUtf8("specHeisGgraphYminYmax")) |
|
120 | self.specHeisGgraphYminYmax.setObjectName(_fromUtf8("specHeisGgraphYminYmax")) | |
121 | self.gridLayout_20.addWidget(self.specHeisGgraphYminYmax, 7, 1, 1, 6) |
|
121 | self.gridLayout_20.addWidget(self.specHeisGgraphYminYmax, 7, 1, 1, 6) | |
122 | self.label_53 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
122 | self.label_53 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
123 | self.label_53.setObjectName(_fromUtf8("label_53")) |
|
123 | self.label_53.setObjectName(_fromUtf8("label_53")) | |
124 | self.gridLayout_20.addWidget(self.label_53, 0, 0, 1, 1) |
|
124 | self.gridLayout_20.addWidget(self.label_53, 0, 0, 1, 1) | |
125 | self.label_55 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
125 | self.label_55 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
126 | self.label_55.setObjectName(_fromUtf8("label_55")) |
|
126 | self.label_55.setObjectName(_fromUtf8("label_55")) | |
127 | self.gridLayout_20.addWidget(self.label_55, 2, 2, 1, 1) |
|
127 | self.gridLayout_20.addWidget(self.label_55, 2, 2, 1, 1) | |
128 | self.specHeisGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
128 | self.specHeisGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
129 | self.specHeisGraphSaveRTIplot.setText(_fromUtf8("")) |
|
129 | self.specHeisGraphSaveRTIplot.setText(_fromUtf8("")) | |
130 | self.specHeisGraphSaveRTIplot.setObjectName(_fromUtf8("specHeisGraphSaveRTIplot")) |
|
130 | self.specHeisGraphSaveRTIplot.setObjectName(_fromUtf8("specHeisGraphSaveRTIplot")) | |
131 | self.gridLayout_20.addWidget(self.specHeisGraphSaveRTIplot, 4, 4, 1, 1) |
|
131 | self.gridLayout_20.addWidget(self.specHeisGraphSaveRTIplot, 4, 4, 1, 1) | |
132 | spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
132 | spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
133 | self.gridLayout_20.addItem(spacerItem24, 2, 3, 1, 1) |
|
133 | self.gridLayout_20.addItem(spacerItem24, 2, 3, 1, 1) | |
134 | self.specHeisGgraphXminXmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
134 | self.specHeisGgraphXminXmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
135 | self.specHeisGgraphXminXmax.setObjectName(_fromUtf8("specHeisGgraphXminXmax")) |
|
135 | self.specHeisGgraphXminXmax.setObjectName(_fromUtf8("specHeisGgraphXminXmax")) | |
136 | self.gridLayout_20.addWidget(self.specHeisGgraphXminXmax, 6, 1, 1, 6) |
|
136 | self.gridLayout_20.addWidget(self.specHeisGgraphXminXmax, 6, 1, 1, 6) | |
137 | self.specHeisGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
137 | self.specHeisGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
138 | self.specHeisGgraphChannelList.setObjectName(_fromUtf8("specHeisGgraphChannelList")) |
|
138 | self.specHeisGgraphChannelList.setObjectName(_fromUtf8("specHeisGgraphChannelList")) | |
139 | self.gridLayout_20.addWidget(self.specHeisGgraphChannelList, 5, 1, 1, 6) |
|
139 | self.gridLayout_20.addWidget(self.specHeisGgraphChannelList, 5, 1, 1, 6) | |
140 | self.specHeisGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
140 | self.specHeisGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
141 | self.specHeisGgraphTimeRange.setObjectName(_fromUtf8("specHeisGgraphTimeRange")) |
|
141 | self.specHeisGgraphTimeRange.setObjectName(_fromUtf8("specHeisGgraphTimeRange")) | |
142 | self.gridLayout_20.addWidget(self.specHeisGgraphTimeRange, 9, 1, 1, 6) |
|
142 | self.gridLayout_20.addWidget(self.specHeisGgraphTimeRange, 9, 1, 1, 6) | |
143 | spacerItem25 = QtGui.QSpacerItem(106, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
143 | spacerItem25 = QtGui.QSpacerItem(106, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
144 | self.gridLayout_20.addItem(spacerItem25, 11, 3, 1, 3) |
|
144 | self.gridLayout_20.addItem(spacerItem25, 11, 3, 1, 3) | |
145 | self.specHeisGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
145 | self.specHeisGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
146 | self.specHeisGraphSaveSpectra.setText(_fromUtf8("")) |
|
146 | self.specHeisGraphSaveSpectra.setText(_fromUtf8("")) | |
147 | self.specHeisGraphSaveSpectra.setObjectName(_fromUtf8("specHeisGraphSaveSpectra")) |
|
147 | self.specHeisGraphSaveSpectra.setObjectName(_fromUtf8("specHeisGraphSaveSpectra")) | |
148 | self.gridLayout_20.addWidget(self.specHeisGraphSaveSpectra, 3, 4, 1, 1) |
|
148 | self.gridLayout_20.addWidget(self.specHeisGraphSaveSpectra, 3, 4, 1, 1) | |
149 | self.specHeisGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
149 | self.specHeisGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) | |
150 | self.specHeisGraphftpSpectra.setText(_fromUtf8("")) |
|
150 | self.specHeisGraphftpSpectra.setText(_fromUtf8("")) | |
151 | self.specHeisGraphftpSpectra.setObjectName(_fromUtf8("specHeisGraphftpSpectra")) |
|
151 | self.specHeisGraphftpSpectra.setObjectName(_fromUtf8("specHeisGraphftpSpectra")) | |
152 | self.gridLayout_20.addWidget(self.specHeisGraphftpSpectra, 3, 6, 1, 1) |
|
152 | self.gridLayout_20.addWidget(self.specHeisGraphftpSpectra, 3, 6, 1, 1) | |
153 | self.label_59 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
153 | self.label_59 = QtGui.QLabel(self.tabgraphSpectraHeis) | |
154 | self.label_59.setObjectName(_fromUtf8("label_59")) |
|
154 | self.label_59.setObjectName(_fromUtf8("label_59")) | |
155 | self.gridLayout_20.addWidget(self.label_59, 4, 0, 1, 1) |
|
155 | self.gridLayout_20.addWidget(self.label_59, 4, 0, 1, 1) | |
156 | spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
156 | spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
157 | self.gridLayout_20.addItem(spacerItem26, 2, 5, 1, 1) |
|
157 | self.gridLayout_20.addItem(spacerItem26, 2, 5, 1, 1) | |
158 | self.specHeisGraphPath = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
158 | self.specHeisGraphPath = QtGui.QLineEdit(self.tabgraphSpectraHeis) | |
159 | self.specHeisGraphPath.setObjectName(_fromUtf8("specHeisGraphPath")) |
|
159 | self.specHeisGraphPath.setObjectName(_fromUtf8("specHeisGraphPath")) | |
160 | self.gridLayout_20.addWidget(self.specHeisGraphPath, 0, 1, 1, 5) |
|
160 | self.gridLayout_20.addWidget(self.specHeisGraphPath, 0, 1, 1, 5) | |
161 | self.tabWidgetSpectraHeis.addTab(self.tabgraphSpectraHeis, _fromUtf8("")) |
|
161 | self.tabWidgetSpectraHeis.addTab(self.tabgraphSpectraHeis, _fromUtf8("")) | |
162 | self.taboutputSpectraHeis = QtGui.QWidget() |
|
162 | self.taboutputSpectraHeis = QtGui.QWidget() | |
163 | self.taboutputSpectraHeis.setObjectName(_fromUtf8("taboutputSpectraHeis")) |
|
163 | self.taboutputSpectraHeis.setObjectName(_fromUtf8("taboutputSpectraHeis")) | |
164 | self.gridLayout_19 = QtGui.QGridLayout(self.taboutputSpectraHeis) |
|
164 | self.gridLayout_19 = QtGui.QGridLayout(self.taboutputSpectraHeis) | |
165 | self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19")) |
|
165 | self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19")) | |
166 | self.label_67 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
166 | self.label_67 = QtGui.QLabel(self.taboutputSpectraHeis) | |
167 | self.label_67.setObjectName(_fromUtf8("label_67")) |
|
167 | self.label_67.setObjectName(_fromUtf8("label_67")) | |
168 | self.gridLayout_19.addWidget(self.label_67, 1, 0, 1, 1) |
|
168 | self.gridLayout_19.addWidget(self.label_67, 1, 0, 1, 1) | |
169 | self.label_68 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
169 | self.label_68 = QtGui.QLabel(self.taboutputSpectraHeis) | |
170 | self.label_68.setObjectName(_fromUtf8("label_68")) |
|
170 | self.label_68.setObjectName(_fromUtf8("label_68")) | |
171 | self.gridLayout_19.addWidget(self.label_68, 2, 0, 1, 2) |
|
171 | self.gridLayout_19.addWidget(self.label_68, 2, 0, 1, 2) | |
172 | self.label_66 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
172 | self.label_66 = QtGui.QLabel(self.taboutputSpectraHeis) | |
173 | self.label_66.setObjectName(_fromUtf8("label_66")) |
|
173 | self.label_66.setObjectName(_fromUtf8("label_66")) | |
174 | self.gridLayout_19.addWidget(self.label_66, 0, 0, 1, 1) |
|
174 | self.gridLayout_19.addWidget(self.label_66, 0, 0, 1, 1) | |
175 | spacerItem27 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
175 | spacerItem27 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
176 | self.gridLayout_19.addItem(spacerItem27, 4, 0, 1, 1) |
|
176 | self.gridLayout_19.addItem(spacerItem27, 4, 0, 1, 1) | |
177 | self.specHeisOutputToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
177 | self.specHeisOutputToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) | |
178 | self.specHeisOutputToolPath.setObjectName(_fromUtf8("specHeisOutputToolPath")) |
|
178 | self.specHeisOutputToolPath.setObjectName(_fromUtf8("specHeisOutputToolPath")) | |
179 | self.gridLayout_19.addWidget(self.specHeisOutputToolPath, 1, 4, 1, 1) |
|
179 | self.gridLayout_19.addWidget(self.specHeisOutputToolPath, 1, 4, 1, 1) | |
180 | self.specHeisOutputPath = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
180 | self.specHeisOutputPath = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
181 | self.specHeisOutputPath.setObjectName(_fromUtf8("specHeisOutputPath")) |
|
181 | self.specHeisOutputPath.setObjectName(_fromUtf8("specHeisOutputPath")) | |
182 | self.gridLayout_19.addWidget(self.specHeisOutputPath, 1, 3, 1, 1) |
|
182 | self.gridLayout_19.addWidget(self.specHeisOutputPath, 1, 3, 1, 1) | |
183 | self.specHeisOutputComdata = QtGui.QComboBox(self.taboutputSpectraHeis) |
|
183 | self.specHeisOutputComdata = QtGui.QComboBox(self.taboutputSpectraHeis) | |
184 | self.specHeisOutputComdata.setObjectName(_fromUtf8("specHeisOutputComdata")) |
|
184 | self.specHeisOutputComdata.setObjectName(_fromUtf8("specHeisOutputComdata")) | |
185 | self.specHeisOutputComdata.addItem(_fromUtf8("")) |
|
185 | self.specHeisOutputComdata.addItem(_fromUtf8("")) | |
186 | self.gridLayout_19.addWidget(self.specHeisOutputComdata, 0, 3, 1, 2) |
|
186 | self.gridLayout_19.addWidget(self.specHeisOutputComdata, 0, 3, 1, 2) | |
187 | self.label_69 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
187 | self.label_69 = QtGui.QLabel(self.taboutputSpectraHeis) | |
188 | self.label_69.setObjectName(_fromUtf8("label_69")) |
|
188 | self.label_69.setObjectName(_fromUtf8("label_69")) | |
189 | self.gridLayout_19.addWidget(self.label_69, 3, 0, 1, 2) |
|
189 | self.gridLayout_19.addWidget(self.label_69, 3, 0, 1, 2) | |
190 | self.specHeisOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
190 | self.specHeisOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
191 | self.specHeisOutputblocksperfile.setObjectName(_fromUtf8("specHeisOutputblocksperfile")) |
|
191 | self.specHeisOutputblocksperfile.setObjectName(_fromUtf8("specHeisOutputblocksperfile")) | |
192 | self.gridLayout_19.addWidget(self.specHeisOutputblocksperfile, 2, 3, 1, 1) |
|
192 | self.gridLayout_19.addWidget(self.specHeisOutputblocksperfile, 2, 3, 1, 1) | |
193 | self.specHeisOutputMetada = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
193 | self.specHeisOutputMetada = QtGui.QLineEdit(self.taboutputSpectraHeis) | |
194 | self.specHeisOutputMetada.setObjectName(_fromUtf8("specHeisOutputMetada")) |
|
194 | self.specHeisOutputMetada.setObjectName(_fromUtf8("specHeisOutputMetada")) | |
195 | self.gridLayout_19.addWidget(self.specHeisOutputMetada, 3, 3, 1, 1) |
|
195 | self.gridLayout_19.addWidget(self.specHeisOutputMetada, 3, 3, 1, 1) | |
196 | self.specHeisOutputMetadaToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
196 | self.specHeisOutputMetadaToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) | |
197 | self.specHeisOutputMetadaToolPath.setObjectName(_fromUtf8("specHeisOutputMetadaToolPath")) |
|
197 | self.specHeisOutputMetadaToolPath.setObjectName(_fromUtf8("specHeisOutputMetadaToolPath")) | |
198 | self.gridLayout_19.addWidget(self.specHeisOutputMetadaToolPath, 3, 4, 1, 1) |
|
198 | self.gridLayout_19.addWidget(self.specHeisOutputMetadaToolPath, 3, 4, 1, 1) | |
199 | self.tabWidgetSpectraHeis.addTab(self.taboutputSpectraHeis, _fromUtf8("")) |
|
199 | self.tabWidgetSpectraHeis.addTab(self.taboutputSpectraHeis, _fromUtf8("")) | |
200 | self.gridLayout_23.addWidget(self.tabWidgetSpectraHeis, 0, 0, 1, 1) |
|
200 | self.gridLayout_23.addWidget(self.tabWidgetSpectraHeis, 0, 0, 1, 1) | |
201 |
|
201 | |||
202 | self.tabWidgetProject.addTab(self.tabSpectraHeis, _fromUtf8("")) |
|
202 | self.tabWidgetProject.addTab(self.tabSpectraHeis, _fromUtf8("")) | |
203 |
|
203 | |||
204 | self.tabWidgetSpectraHeis.setCurrentIndex(0) |
|
204 | self.tabWidgetSpectraHeis.setCurrentIndex(0) | |
205 |
|
205 | |||
206 | def retranslateUi(self): |
|
206 | def retranslateUi(self): | |
207 |
|
207 | |||
208 | self.specHeisGraphClear.setText(_translate("MainWindow", "Clear", None)) |
|
208 | self.specHeisGraphClear.setText(_translate("MainWindow", "Clear", None)) | |
209 | self.specHeisOpOk.setText(_translate("MainWindow", "Ok", None)) |
|
209 | self.specHeisOpOk.setText(_translate("MainWindow", "Ok", None)) | |
210 | self.specHeisOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) |
|
210 | self.specHeisOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) | |
211 | self.specHeisOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Intergration", None)) |
|
211 | self.specHeisOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Intergration", None)) | |
212 |
|
212 | |||
213 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabopSpectraHeis), _translate("MainWindow", "Operation", None)) |
|
213 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabopSpectraHeis), _translate("MainWindow", "Operation", None)) | |
214 | self.label_54.setText(_translate("MainWindow", "Prefix", None)) |
|
214 | self.label_54.setText(_translate("MainWindow", "Prefix", None)) | |
215 | self.specHeisGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
215 | self.specHeisGraphToolPath.setText(_translate("MainWindow", "...", None)) | |
216 |
self.label_62.setText(_translate("MainWindow", " |
|
216 | self.label_62.setText(_translate("MainWindow", "Intensity range (dB)", None)) | |
217 |
self.label_63.setText(_translate("MainWindow", "T |
|
217 | self.label_63.setText(_translate("MainWindow", "Time range (hours):", None)) | |
218 |
self.label_64.setText(_translate("MainWindow", "Time |
|
218 | self.label_64.setText(_translate("MainWindow", "Time interval:", None)) | |
219 | self.label_65.setText(_translate("MainWindow", "Wr Period", None)) |
|
219 | self.label_65.setText(_translate("MainWindow", "Wr Period", None)) | |
220 | self.label_60.setText(_translate("MainWindow", "Channel List:", None)) |
|
220 | self.label_60.setText(_translate("MainWindow", "Channel List:", None)) | |
221 |
self.label_61.setText(_translate("MainWindow", " |
|
221 | self.label_61.setText(_translate("MainWindow", "Frequency range", None)) | |
222 | self.label_56.setText(_translate("MainWindow", "Save", None)) |
|
222 | self.label_56.setText(_translate("MainWindow", "Save", None)) | |
223 | self.label_57.setText(_translate("MainWindow", "ftp", None)) |
|
223 | self.label_57.setText(_translate("MainWindow", "ftp", None)) | |
224 | self.label_58.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
224 | self.label_58.setText(_translate("MainWindow", "Spectra Plot", None)) | |
225 | self.label_53.setText(_translate("MainWindow", "Path", None)) |
|
225 | self.label_53.setText(_translate("MainWindow", "Path", None)) | |
226 | self.label_55.setText(_translate("MainWindow", "Show", None)) |
|
226 | self.label_55.setText(_translate("MainWindow", "Show", None)) | |
227 |
self.label_59.setText(_translate("MainWindow", "RTI P |
|
227 | self.label_59.setText(_translate("MainWindow", "RTI Plot", None)) | |
228 |
|
228 | |||
229 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabgraphSpectraHeis), _translate("MainWindow", "Graphics", None)) |
|
229 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabgraphSpectraHeis), _translate("MainWindow", "Graphics", None)) | |
230 | self.label_67.setText(_translate("MainWindow", "Path:", None)) |
|
230 | self.label_67.setText(_translate("MainWindow", "Path:", None)) | |
231 | self.label_68.setText(_translate("MainWindow", "Blocks per File:", None)) |
|
231 | self.label_68.setText(_translate("MainWindow", "Blocks per File:", None)) | |
232 | self.label_66.setText(_translate("MainWindow", "Type:", None)) |
|
232 | self.label_66.setText(_translate("MainWindow", "Type:", None)) | |
233 |
|
233 | |||
234 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.taboutputSpectraHeis), _translate("MainWindow", "Output", None)) |
|
234 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.taboutputSpectraHeis), _translate("MainWindow", "Output", None)) | |
235 | self.specHeisOutputToolPath.setText(_translate("MainWindow", "...", None)) |
|
235 | self.specHeisOutputToolPath.setText(_translate("MainWindow", "...", None)) | |
236 | self.specHeisOutputComdata.setItemText(0, _translate("MainWindow", ".fits", None)) |
|
236 | self.specHeisOutputComdata.setItemText(0, _translate("MainWindow", ".fits", None)) | |
237 | self.label_69.setText(_translate("MainWindow", "Metada", None)) |
|
237 | self.label_69.setText(_translate("MainWindow", "Metada", None)) | |
238 | self.specHeisOutputMetadaToolPath.setText(_translate("MainWindow", "...", None)) |
|
238 | self.specHeisOutputMetadaToolPath.setText(_translate("MainWindow", "...", None)) | |
239 |
|
239 | |||
240 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectraHeis), _translate("MainWindow", "SpectraHeis", None)) |
|
240 | self.tabWidgetProject.setTabText(self.tabWidgetProject.indexOf(self.tabSpectraHeis), _translate("MainWindow", "SpectraHeis", None)) |
General Comments 0
You need to be logged in to leave comments.
Login now