@@ -1,5854 +1,5861 | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """ |
|
3 | 3 | Module implementing MainWindow. |
|
4 | 4 | #+++++++++++++GUI V1++++++++++++++# |
|
5 | 5 | @author: AlexanderValdezPortocarrero ñ_ñ |
|
6 | 6 | """ |
|
7 | 7 | import os, sys, time |
|
8 | 8 | import datetime |
|
9 | 9 | import numpy |
|
10 | 10 | import Queue |
|
11 | 11 | |
|
12 | 12 | from collections import OrderedDict |
|
13 | 13 | from os.path import expanduser |
|
14 | 14 | from time import sleep |
|
15 | 15 | # from gevent import sleep |
|
16 | 16 | |
|
17 | 17 | import ast |
|
18 | 18 | |
|
19 | 19 | from PyQt4.QtGui import QMainWindow |
|
20 | 20 | from PyQt4.QtCore import pyqtSignature |
|
21 | 21 | from PyQt4.QtCore import pyqtSignal |
|
22 | 22 | from PyQt4 import QtCore |
|
23 | 23 | from PyQt4 import QtGui |
|
24 | 24 | # from PyQt4.QtCore import QThread |
|
25 | 25 | # from PyQt4.QtCore import QObject, SIGNAL |
|
26 | 26 | |
|
27 | 27 | from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess |
|
28 | 28 | from schainpy.gui.viewer.ui_ftp import Ui_Ftp |
|
29 | 29 | from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow |
|
30 | 30 | from schainpy.controller_api import ControllerThread |
|
31 | 31 | from schainpy.controller import Project |
|
32 | 32 | |
|
33 | 33 | from propertiesViewModel import TreeModel, PropertyBuffer |
|
34 | 34 | from parametersModel import ProjectParms |
|
35 | 35 | |
|
36 | 36 | from schainpy.gui.figures import tools |
|
37 | 37 | |
|
38 | 38 | FIGURES_PATH = tools.get_path() |
|
39 | 39 | TEMPORAL_FILE = ".temp.xml" |
|
40 | 40 | |
|
41 | 41 | def isRadarFile(file): |
|
42 | 42 | try: |
|
43 | 43 | year = int(file[1:5]) |
|
44 | 44 | doy = int(file[5:8]) |
|
45 | 45 | set = int(file[8:11]) |
|
46 | 46 | except: |
|
47 | 47 | return 0 |
|
48 | 48 | |
|
49 | 49 | return 1 |
|
50 | 50 | |
|
51 | 51 | def isRadarPath(path): |
|
52 | 52 | try: |
|
53 | 53 | year = int(path[1:5]) |
|
54 | 54 | doy = int(path[5:8]) |
|
55 | 55 | except: |
|
56 | 56 | return 0 |
|
57 | 57 | |
|
58 | 58 | return 1 |
|
59 | 59 | |
|
60 | 60 | def isInt(value): |
|
61 | 61 | |
|
62 | 62 | try: |
|
63 | 63 | int(value) |
|
64 | 64 | except: |
|
65 | 65 | return 0 |
|
66 | 66 | |
|
67 | 67 | return 1 |
|
68 | 68 | |
|
69 | 69 | def isFloat(value): |
|
70 | 70 | |
|
71 | 71 | try: |
|
72 | 72 | float(value) |
|
73 | 73 | except: |
|
74 | 74 | return 0 |
|
75 | 75 | |
|
76 | 76 | return 1 |
|
77 | 77 | |
|
78 | 78 | def isList(value): |
|
79 | 79 | |
|
80 | 80 | x = ast.literal_eval(value) |
|
81 | 81 | |
|
82 | 82 | if type(x) in (tuple, list): |
|
83 | 83 | return 1 |
|
84 | 84 | |
|
85 | 85 | return 0 |
|
86 | 86 | |
|
87 | 87 | class BasicWindow(QMainWindow, Ui_BasicWindow): |
|
88 | 88 | """ |
|
89 | 89 | """ |
|
90 | 90 | def __init__(self, parent=None): |
|
91 | 91 | """ |
|
92 | 92 | |
|
93 | 93 | """ |
|
94 | 94 | QMainWindow.__init__(self, parent) |
|
95 | 95 | self.setupUi(self) |
|
96 | 96 | self.__puObjDict = {} |
|
97 | 97 | self.__itemTreeDict = {} |
|
98 | 98 | self.readUnitConfObjList = [] |
|
99 | 99 | self.operObjList = [] |
|
100 | 100 | self.projecObjView = None |
|
101 | 101 | self.idProject = 0 |
|
102 | 102 | # self.idImag = 0 |
|
103 | 103 | |
|
104 | 104 | self.idImagscope = 0 |
|
105 | 105 | self.idImagspectra = 0 |
|
106 | 106 | self.idImagcross = 0 |
|
107 | 107 | self.idImagrti = 0 |
|
108 | 108 | self.idImagcoherence = 0 |
|
109 | 109 | self.idImagpower = 0 |
|
110 | 110 | self.idImagrtinoise = 0 |
|
111 | 111 | self.idImagspectraHeis = 0 |
|
112 | 112 | self.idImagrtiHeis = 0 |
|
113 | 113 | |
|
114 | 114 | self.dataPath = None |
|
115 | 115 | self.online = 0 |
|
116 | 116 | self.walk = 0 |
|
117 | 117 | self.create = False |
|
118 | 118 | self.selectedItemTree = None |
|
119 | 119 | self.controllerThread = None |
|
120 | 120 | # self.commCtrlPThread = None |
|
121 | 121 | # self.create_figure() |
|
122 | 122 | self.temporalFTP = ftpBuffer() |
|
123 | 123 | self.projectProperCaracteristica = [] |
|
124 | 124 | self.projectProperPrincipal = [] |
|
125 | 125 | self.projectProperDescripcion = [] |
|
126 | 126 | self.volProperCaracteristica = [] |
|
127 | 127 | self.volProperPrincipal = [] |
|
128 | 128 | self.volProperDescripcion = [] |
|
129 | 129 | self.specProperCaracteristica = [] |
|
130 | 130 | self.specProperPrincipal = [] |
|
131 | 131 | self.specProperDescripcion = [] |
|
132 | 132 | |
|
133 | 133 | self.specHeisProperCaracteristica = [] |
|
134 | 134 | self.specHeisProperPrincipal = [] |
|
135 | 135 | self.specHeisProperDescripcion = [] |
|
136 | 136 | |
|
137 | 137 | # self.pathWorkSpace = './' |
|
138 | 138 | |
|
139 | 139 | self.__projectObjDict = {} |
|
140 | 140 | self.__operationObjDict = {} |
|
141 | 141 | |
|
142 | 142 | self.__puLocalFolder2FTP = {} |
|
143 | 143 | self.__enable = False |
|
144 | 144 | |
|
145 | 145 | # self.create_comm() |
|
146 | 146 | self.create_updating_timer() |
|
147 | 147 | self.setGUIStatus() |
|
148 | 148 | |
|
149 | 149 | @pyqtSignature("") |
|
150 | 150 | def on_actionOpen_triggered(self): |
|
151 | 151 | """ |
|
152 | 152 | Slot documentation goes here. |
|
153 | 153 | """ |
|
154 | 154 | self.openProject() |
|
155 | 155 | |
|
156 | 156 | @pyqtSignature("") |
|
157 | 157 | def on_actionCreate_triggered(self): |
|
158 | 158 | """ |
|
159 | 159 | Slot documentation goes here. |
|
160 | 160 | """ |
|
161 | 161 | self.setInputsProject_View() |
|
162 | 162 | self.create = True |
|
163 | 163 | |
|
164 | 164 | @pyqtSignature("") |
|
165 | 165 | def on_actionSave_triggered(self): |
|
166 | 166 | """ |
|
167 | 167 | Slot documentation goes here. |
|
168 | 168 | """ |
|
169 | 169 | self.saveProject() |
|
170 | 170 | |
|
171 | 171 | @pyqtSignature("") |
|
172 | 172 | def on_actionClose_triggered(self): |
|
173 | 173 | """ |
|
174 | 174 | Slot documentation goes here. |
|
175 | 175 | """ |
|
176 | 176 | self.close() |
|
177 | 177 | |
|
178 | 178 | @pyqtSignature("") |
|
179 | 179 | def on_actionStart_triggered(self): |
|
180 | 180 | """ |
|
181 | 181 | """ |
|
182 | 182 | self.playProject() |
|
183 | 183 | |
|
184 | 184 | @pyqtSignature("") |
|
185 | 185 | def on_actionPause_triggered(self): |
|
186 | 186 | """ |
|
187 | 187 | """ |
|
188 | 188 | self.pauseProject() |
|
189 | 189 | |
|
190 | 190 | @pyqtSignature("") |
|
191 | 191 | def on_actionStop_triggered(self): |
|
192 | 192 | """ |
|
193 | 193 | """ |
|
194 | 194 | self.stopProject() |
|
195 | 195 | |
|
196 | 196 | @pyqtSignature("") |
|
197 | 197 | def on_actionAbout_triggered(self): |
|
198 | 198 | """ |
|
199 | 199 | """ |
|
200 | 200 | self.aboutEvent() |
|
201 | 201 | |
|
202 | 202 | @pyqtSignature("") |
|
203 | 203 | def on_actionFTP_triggered(self): |
|
204 | 204 | """ |
|
205 | 205 | """ |
|
206 | 206 | self.configFTPWindowObj = Ftp(self) |
|
207 | 207 | |
|
208 | 208 | if not self.temporalFTP.create: |
|
209 | 209 | self.temporalFTP.setwithoutconfiguration() |
|
210 | 210 | |
|
211 | 211 | self.configFTPWindowObj.setParmsfromTemporal(self.temporalFTP.server, |
|
212 | 212 | self.temporalFTP.remotefolder, |
|
213 | 213 | self.temporalFTP.username, |
|
214 | 214 | self.temporalFTP.password, |
|
215 | 215 | self.temporalFTP.ftp_wei, |
|
216 | 216 | self.temporalFTP.exp_code, |
|
217 | 217 | self.temporalFTP.sub_exp_code, |
|
218 | 218 | self.temporalFTP.plot_pos) |
|
219 | 219 | |
|
220 | 220 | self.configFTPWindowObj.show() |
|
221 | 221 | self.configFTPWindowObj.closed.connect(self.createFTPConfig) |
|
222 | 222 | |
|
223 | 223 | def createFTPConfig(self): |
|
224 | 224 | |
|
225 | 225 | if not self.configFTPWindowObj.create: |
|
226 | 226 | self.console.clear() |
|
227 | 227 | self.console.append("There is no FTP configuration") |
|
228 | 228 | return |
|
229 | 229 | |
|
230 | 230 | self.console.append("Push Ok in Spectra view to Add FTP Configuration") |
|
231 | 231 | |
|
232 | 232 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow() |
|
233 | 233 | self.temporalFTP.save(server=server, |
|
234 | 234 | remotefolder=remotefolder, |
|
235 | 235 | username=username, |
|
236 | 236 | password=password, |
|
237 | 237 | ftp_wei=ftp_wei, |
|
238 | 238 | exp_code=exp_code, |
|
239 | 239 | sub_exp_code=sub_exp_code, |
|
240 | 240 | plot_pos=plot_pos) |
|
241 | 241 | |
|
242 | 242 | @pyqtSignature("") |
|
243 | 243 | def on_actionOpenToolbar_triggered(self): |
|
244 | 244 | """ |
|
245 | 245 | Slot documentation goes here. |
|
246 | 246 | """ |
|
247 | 247 | self.openProject() |
|
248 | 248 | |
|
249 | 249 | @pyqtSignature("") |
|
250 | 250 | def on_actionCreateToolbar_triggered(self): |
|
251 | 251 | """ |
|
252 | 252 | Slot documentation goes here. |
|
253 | 253 | """ |
|
254 | 254 | self.setInputsProject_View() |
|
255 | 255 | self.create = True |
|
256 | 256 | |
|
257 | 257 | @pyqtSignature("") |
|
258 | 258 | def on_actionAddPU_triggered(self): |
|
259 | 259 | if len(self.__projectObjDict) == 0: |
|
260 | 260 | outputstr = "First Create a Project then add Processing Unit" |
|
261 | 261 | self.console.clear() |
|
262 | 262 | self.console.append(outputstr) |
|
263 | 263 | return 0 |
|
264 | 264 | else: |
|
265 | 265 | self.addPUWindow() |
|
266 | 266 | self.console.clear() |
|
267 | 267 | self.console.append("Please, Choose the type of Processing Unit") |
|
268 | 268 | self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
269 | 269 | self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
270 | 270 | self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
271 | 271 | |
|
272 | 272 | |
|
273 | 273 | @pyqtSignature("") |
|
274 | 274 | def on_actionSaveToolbar_triggered(self): |
|
275 | 275 | """ |
|
276 | 276 | Slot documentation goes here. |
|
277 | 277 | """ |
|
278 | 278 | self.saveProject() |
|
279 | 279 | |
|
280 | 280 | @pyqtSignature("") |
|
281 | 281 | def on_actionStarToolbar_triggered(self): |
|
282 | 282 | """ |
|
283 | 283 | Slot documentation goes here. |
|
284 | 284 | """ |
|
285 | 285 | self.playProject() |
|
286 | 286 | |
|
287 | 287 | @pyqtSignature("") |
|
288 | 288 | def on_actionPauseToolbar_triggered(self): |
|
289 | 289 | |
|
290 | 290 | self.pauseProject() |
|
291 | 291 | |
|
292 | 292 | @pyqtSignature("") |
|
293 | 293 | def on_actionStopToolbar_triggered(self): |
|
294 | 294 | """ |
|
295 | 295 | Slot documentation goes here. |
|
296 | 296 | """ |
|
297 | 297 | self.stopProject() |
|
298 | 298 | |
|
299 | 299 | @pyqtSignature("int") |
|
300 | 300 | def on_proComReadMode_activated(self, index): |
|
301 | 301 | """ |
|
302 | 302 | SELECCION DEL MODO DE LECTURA ON=1, OFF=0 |
|
303 | 303 | """ |
|
304 | 304 | if index == 0: |
|
305 | 305 | self.online = 0 |
|
306 | 306 | self.proDelay.setText("0") |
|
307 | 307 | self.proSet.setText("") |
|
308 | 308 | self.proSet.setEnabled(False) |
|
309 | 309 | self.proDelay.setEnabled(False) |
|
310 | 310 | elif index == 1: |
|
311 | 311 | self.online = 1 |
|
312 | 312 | self.proSet.setText("") |
|
313 | 313 | self.proDelay.setText("5") |
|
314 | 314 | self.proSet.setEnabled(True) |
|
315 | 315 | self.proDelay.setEnabled(True) |
|
316 | 316 | |
|
317 | 317 | @pyqtSignature("int") |
|
318 | 318 | def on_proComDataType_activated(self, index): |
|
319 | 319 | """ |
|
320 | 320 | Voltage or Spectra |
|
321 | 321 | """ |
|
322 | 322 | self.labelSet.show() |
|
323 | 323 | self.proSet.show() |
|
324 | 324 | |
|
325 | 325 | self.labExpLabel.show() |
|
326 | 326 | self.proExpLabel.show() |
|
327 | 327 | |
|
328 | 328 | self.labelIPPKm.hide() |
|
329 | 329 | self.proIPPKm.hide() |
|
330 | 330 | |
|
331 | 331 | if index == 0: |
|
332 | 332 | extension = '.r' |
|
333 | 333 | elif index == 1: |
|
334 | 334 | extension = '.pdata' |
|
335 | 335 | elif index == 2: |
|
336 | 336 | extension = '.fits' |
|
337 | 337 | elif index == 3: |
|
338 | 338 | extension = '.hdf5' |
|
339 | 339 | |
|
340 | 340 | self.labelIPPKm.show() |
|
341 | 341 | self.proIPPKm.show() |
|
342 | 342 | |
|
343 | 343 | self.labelSet.hide() |
|
344 | 344 | self.proSet.hide() |
|
345 | 345 | |
|
346 | 346 | self.labExpLabel.hide() |
|
347 | 347 | self.proExpLabel.hide() |
|
348 | 348 | |
|
349 | 349 | self.proDataType.setText(extension) |
|
350 | 350 | |
|
351 | 351 | @pyqtSignature("int") |
|
352 | 352 | def on_proComWalk_activated(self, index): |
|
353 | 353 | """ |
|
354 | 354 | |
|
355 | 355 | """ |
|
356 | 356 | if index == 0: |
|
357 | 357 | self.walk = 0 |
|
358 | 358 | elif index == 1: |
|
359 | 359 | self.walk = 1 |
|
360 | 360 | |
|
361 | 361 | @pyqtSignature("") |
|
362 | 362 | def on_proToolPath_clicked(self): |
|
363 | 363 | """ |
|
364 | 364 | Choose your path |
|
365 | 365 | """ |
|
366 | 366 | |
|
367 | 367 | current_dpath = './' |
|
368 | 368 | if self.dataPath: |
|
369 | 369 | current_dpath = self.dataPath |
|
370 | 370 | |
|
371 | 371 | datapath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', current_dpath, QtGui.QFileDialog.ShowDirsOnly)) |
|
372 | 372 | |
|
373 | 373 | #If it was canceled |
|
374 | 374 | if not datapath: |
|
375 | 375 | return |
|
376 | 376 | |
|
377 | 377 | #If any change was done |
|
378 | 378 | if datapath == self.dataPath: |
|
379 | 379 | return |
|
380 | 380 | |
|
381 | 381 | self.proDataPath.setText(datapath) |
|
382 | 382 | |
|
383 | 383 | self.actionStart.setEnabled(False) |
|
384 | 384 | self.actionStarToolbar.setEnabled(False) |
|
385 | 385 | self.proOk.setEnabled(False) |
|
386 | 386 | |
|
387 | 387 | self.proComStartDate.clear() |
|
388 | 388 | self.proComEndDate.clear() |
|
389 | 389 | |
|
390 | 390 | if not os.path.exists(datapath): |
|
391 | 391 | |
|
392 | 392 | self.console.clear() |
|
393 | 393 | self.console.append("Write a valid path") |
|
394 | 394 | return |
|
395 | 395 | |
|
396 | 396 | self.dataPath = datapath |
|
397 | 397 | |
|
398 | 398 | self.console.clear() |
|
399 | 399 | self.console.append("Select the read mode and press 'load button'") |
|
400 | 400 | |
|
401 | 401 | |
|
402 | 402 | @pyqtSignature("") |
|
403 | 403 | def on_proLoadButton_clicked(self): |
|
404 | 404 | |
|
405 | 405 | self.console.clear() |
|
406 | 406 | |
|
407 | 407 | if not self.getSelectedProjectObj(): |
|
408 | 408 | self.console.append("Please select a Project before Load files") |
|
409 | 409 | return |
|
410 | 410 | |
|
411 | 411 | parameter_list = self.checkInputsProject() |
|
412 | 412 | |
|
413 | 413 | if not parameter_list[0]: |
|
414 | 414 | return |
|
415 | 415 | |
|
416 | 416 | parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel = parameter_list |
|
417 | 417 | |
|
418 | 418 | if read_mode == "Offline": |
|
419 | 419 | self.proComStartDate.clear() |
|
420 | 420 | self.proComEndDate.clear() |
|
421 | 421 | self.proComStartDate.setEnabled(True) |
|
422 | 422 | self.proComEndDate.setEnabled(True) |
|
423 | 423 | self.proStartTime.setEnabled(True) |
|
424 | 424 | self.proEndTime.setEnabled(True) |
|
425 | 425 | self.frame_2.setEnabled(True) |
|
426 | 426 | |
|
427 | 427 | if read_mode == "Online": |
|
428 | 428 | self.proComStartDate.addItem("1960/01/30") |
|
429 | 429 | self.proComEndDate.addItem("2018/12/31") |
|
430 | 430 | self.proComStartDate.setEnabled(False) |
|
431 | 431 | self.proComEndDate.setEnabled(False) |
|
432 | 432 | self.proStartTime.setEnabled(False) |
|
433 | 433 | self.proEndTime.setEnabled(False) |
|
434 | 434 | self.frame_2.setEnabled(True) |
|
435 | 435 | |
|
436 | 436 | self.loadDays(data_path, ext, walk, expLabel) |
|
437 | 437 | |
|
438 | 438 | @pyqtSignature("int") |
|
439 | 439 | def on_proComStartDate_activated(self, index): |
|
440 | 440 | """ |
|
441 | 441 | SELECCION DEL RANGO DE FECHAS -START DATE |
|
442 | 442 | """ |
|
443 | 443 | stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() - 1 |
|
444 | 444 | |
|
445 | 445 | self.proComEndDate.clear() |
|
446 | 446 | for i in self.dateList[index:]: |
|
447 | 447 | self.proComEndDate.addItem(i) |
|
448 | 448 | |
|
449 | 449 | if self.proComEndDate.count() - stopIndex - 1 >= 0: |
|
450 | 450 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex - 1) |
|
451 | 451 | else: |
|
452 | 452 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) |
|
453 | 453 | |
|
454 | 454 | @pyqtSignature("int") |
|
455 | 455 | def on_proComEndDate_activated(self, index): |
|
456 | 456 | """ |
|
457 | 457 | SELECCION DEL RANGO DE FECHAS-END DATE |
|
458 | 458 | """ |
|
459 | 459 | pass |
|
460 | 460 | |
|
461 | 461 | @pyqtSignature("") |
|
462 | 462 | def on_proOk_clicked(self): |
|
463 | 463 | """ |
|
464 | 464 | Añade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml. |
|
465 | 465 | Prepara la configuración del diágrama del Arbol del treeView numero 2 |
|
466 | 466 | """ |
|
467 | 467 | |
|
468 | 468 | self.actionStart.setEnabled(False) |
|
469 | 469 | self.actionStarToolbar.setEnabled(False) |
|
470 | 470 | |
|
471 | 471 | self.console.clear() |
|
472 | 472 | |
|
473 | 473 | if self.create: |
|
474 | 474 | |
|
475 | 475 | projectId = self.__getNewProjectId() |
|
476 | 476 | |
|
477 | 477 | if not projectId: |
|
478 | 478 | return 0 |
|
479 | 479 | |
|
480 | 480 | projectObjView = self.createProjectView(projectId) |
|
481 | 481 | |
|
482 | 482 | if not projectObjView: |
|
483 | 483 | return 0 |
|
484 | 484 | |
|
485 | 485 | readUnitObj = self.createReadUnitView(projectObjView) |
|
486 | 486 | |
|
487 | 487 | if not readUnitObj: |
|
488 | 488 | return 0 |
|
489 | 489 | |
|
490 | 490 | else: |
|
491 | 491 | projectObjView = self.updateProjectView() |
|
492 | 492 | |
|
493 | 493 | if not projectObjView: |
|
494 | 494 | return 0 |
|
495 | 495 | |
|
496 | 496 | projectId = projectObjView.getId() |
|
497 | 497 | idReadUnit = projectObjView.getReadUnitId() |
|
498 | 498 | readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit) |
|
499 | 499 | |
|
500 | 500 | if not readUnitObj: |
|
501 | 501 | return 0 |
|
502 | 502 | |
|
503 | 503 | self.__itemTreeDict[projectId].setText(projectObjView.name) |
|
504 | 504 | # Project Properties |
|
505 | 505 | self.refreshProjectProperties(projectObjView) |
|
506 | 506 | # Disable tabProject after finish the creation |
|
507 | 507 | |
|
508 | 508 | self.actionStart.setEnabled(True) |
|
509 | 509 | self.actionStarToolbar.setEnabled(True) |
|
510 | 510 | self.console.clear() |
|
511 | 511 | self.console.append("The project parameters were validated") |
|
512 | 512 | |
|
513 | 513 | return 1 |
|
514 | 514 | |
|
515 | 515 | @pyqtSignature("") |
|
516 | 516 | def on_proClear_clicked(self): |
|
517 | 517 | |
|
518 | 518 | self.console.clear() |
|
519 | 519 | |
|
520 | 520 | @pyqtSignature("int") |
|
521 | 521 | def on_volOpCebChannels_stateChanged(self, p0): |
|
522 | 522 | """ |
|
523 | 523 | Check Box habilita operaciones de Selecci�n de Canales |
|
524 | 524 | """ |
|
525 | 525 | if p0 == 2: |
|
526 | 526 | self.volOpComChannels.setEnabled(True) |
|
527 | 527 | self.volOpChannel.setEnabled(True) |
|
528 | 528 | |
|
529 | 529 | if p0 == 0: |
|
530 | 530 | self.volOpComChannels.setEnabled(False) |
|
531 | 531 | self.volOpChannel.setEnabled(False) |
|
532 | 532 | self.volOpChannel.clear() |
|
533 | 533 | |
|
534 | 534 | @pyqtSignature("int") |
|
535 | 535 | def on_volOpCebHeights_stateChanged(self, p0): |
|
536 | 536 | """ |
|
537 | 537 | Check Box habilita operaciones de Selecci�n de Alturas |
|
538 | 538 | """ |
|
539 | 539 | if p0 == 2: |
|
540 | 540 | self.volOpHeights.setEnabled(True) |
|
541 | 541 | self.volOpComHeights.setEnabled(True) |
|
542 | 542 | |
|
543 | 543 | if p0 == 0: |
|
544 | 544 | self.volOpHeights.setEnabled(False) |
|
545 | 545 | self.volOpHeights.clear() |
|
546 | 546 | self.volOpComHeights.setEnabled(False) |
|
547 | 547 | |
|
548 | 548 | @pyqtSignature("int") |
|
549 | 549 | def on_volOpCebFilter_stateChanged(self, p0): |
|
550 | 550 | """ |
|
551 | 551 | Name='Decoder', optype='other' |
|
552 | 552 | """ |
|
553 | 553 | if p0 == 2: |
|
554 | 554 | self.volOpFilter.setEnabled(True) |
|
555 | 555 | |
|
556 | 556 | if p0 == 0: |
|
557 | 557 | self.volOpFilter.setEnabled(False) |
|
558 | 558 | self.volOpFilter.clear() |
|
559 | 559 | |
|
560 | 560 | @pyqtSignature("int") |
|
561 | 561 | def on_volOpCebProfile_stateChanged(self, p0): |
|
562 | 562 | """ |
|
563 | 563 | Check Box habilita ingreso del rango de Perfiles |
|
564 | 564 | """ |
|
565 | 565 | if p0 == 2: |
|
566 | 566 | self.volOpComProfile.setEnabled(True) |
|
567 | 567 | self.volOpProfile.setEnabled(True) |
|
568 | 568 | |
|
569 | 569 | if p0 == 0: |
|
570 | 570 | self.volOpComProfile.setEnabled(False) |
|
571 | 571 | self.volOpProfile.setEnabled(False) |
|
572 | 572 | self.volOpProfile.clear() |
|
573 | 573 | |
|
574 | 574 | @pyqtSignature("int") |
|
575 | 575 | def on_volOpComProfile_activated(self, index): |
|
576 | 576 | """ |
|
577 | 577 | Check Box habilita ingreso del rango de Perfiles |
|
578 | 578 | """ |
|
579 | 579 | #Profile List |
|
580 | 580 | if index == 0: |
|
581 | 581 | self.volOpProfile.setToolTip('List of selected profiles. Example: 0, 1, 2, 3, 4, 5, 6, 7') |
|
582 | 582 | |
|
583 | 583 | #Profile Range |
|
584 | 584 | if index == 1: |
|
585 | 585 | self.volOpProfile.setToolTip('Minimum and maximum profile index. Example: 0, 7') |
|
586 | 586 | |
|
587 | 587 | #Profile Range List |
|
588 | 588 | if index == 2: |
|
589 | 589 | self.volOpProfile.setToolTip('List of profile ranges. Example: (0, 7), (12, 19), (100, 200)') |
|
590 | 590 | |
|
591 | 591 | @pyqtSignature("int") |
|
592 | 592 | def on_volOpCebDecodification_stateChanged(self, p0): |
|
593 | 593 | """ |
|
594 | 594 | Check Box habilita |
|
595 | 595 | """ |
|
596 | 596 | if p0 == 2: |
|
597 | 597 | self.volOpComCode.setEnabled(True) |
|
598 | 598 | self.volOpComMode.setEnabled(True) |
|
599 | 599 | if p0 == 0: |
|
600 | 600 | self.volOpComCode.setEnabled(False) |
|
601 | 601 | self.volOpComMode.setEnabled(False) |
|
602 | 602 | |
|
603 | 603 | @pyqtSignature("int") |
|
604 | 604 | def on_volOpComCode_activated(self, index): |
|
605 | 605 | """ |
|
606 | 606 | Check Box habilita ingreso |
|
607 | 607 | """ |
|
608 | 608 | if index == 13: |
|
609 | 609 | self.volOpCode.setEnabled(True) |
|
610 | 610 | else: |
|
611 | 611 | self.volOpCode.setEnabled(False) |
|
612 | 612 | |
|
613 | 613 | if index == 0: |
|
614 | 614 | code = '' |
|
615 | 615 | self.volOpCode.setText(str(code)) |
|
616 | 616 | return |
|
617 | 617 | |
|
618 | 618 | if index == 1: |
|
619 | 619 | code = '(1,1,-1)' |
|
620 | 620 | nCode = '1' |
|
621 | 621 | nBaud = '3' |
|
622 | 622 | if index == 2: |
|
623 | 623 | code = '(1,1,-1,1)' |
|
624 | 624 | nCode = '1' |
|
625 | 625 | nBaud = '4' |
|
626 | 626 | if index == 3: |
|
627 | 627 | code = '(1,1,1,-1,1)' |
|
628 | 628 | nCode = '1' |
|
629 | 629 | nBaud = '5' |
|
630 | 630 | if index == 4: |
|
631 | 631 | code = '(1,1,1,-1,-1,1,-1)' |
|
632 | 632 | nCode = '1' |
|
633 | 633 | nBaud = '7' |
|
634 | 634 | if index == 5: |
|
635 | 635 | code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1)' |
|
636 | 636 | nCode = '1' |
|
637 | 637 | nBaud = '11' |
|
638 | 638 | if index == 6: |
|
639 | 639 | code = '(1,1,1,1,1,-1,-1,1,1,-1,1,-1,1)' |
|
640 | 640 | nCode = '1' |
|
641 | 641 | nBaud = '13' |
|
642 | 642 | if index == 7: |
|
643 | 643 | code = '(1,1,-1,-1,-1,1)' |
|
644 | 644 | nCode = '2' |
|
645 | 645 | nBaud = '3' |
|
646 | 646 | if index == 8: |
|
647 | 647 | code = '(1,1,-1,1,-1,-1,1,-1)' |
|
648 | 648 | nCode = '2' |
|
649 | 649 | nBaud = '4' |
|
650 | 650 | if index == 9: |
|
651 | 651 | code = '(1,1,1,-1,1,-1,-1,-1,1,-1)' |
|
652 | 652 | nCode = '2' |
|
653 | 653 | nBaud = '5' |
|
654 | 654 | if index == 10: |
|
655 | 655 | code = '(1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1)' |
|
656 | 656 | nCode = '2' |
|
657 | 657 | nBaud = '7' |
|
658 | 658 | if index == 11: |
|
659 | 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 | 660 | nCode = '2' |
|
661 | 661 | nBaud = '11' |
|
662 | 662 | if index == 12: |
|
663 | 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 | 664 | nCode = '2' |
|
665 | 665 | nBaud = '13' |
|
666 | 666 | |
|
667 | 667 | code = ast.literal_eval(code) |
|
668 | 668 | nCode = int(nCode) |
|
669 | 669 | nBaud = int(nBaud) |
|
670 | 670 | |
|
671 | 671 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() |
|
672 | 672 | |
|
673 | 673 | self.volOpCode.setText(str(code)) |
|
674 | 674 | |
|
675 | 675 | @pyqtSignature("int") |
|
676 | 676 | def on_volOpCebFlip_stateChanged(self, p0): |
|
677 | 677 | """ |
|
678 | 678 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
679 | 679 | """ |
|
680 | 680 | if p0 == 2: |
|
681 | 681 | self.volOpFlip.setEnabled(True) |
|
682 | 682 | if p0 == 0: |
|
683 | 683 | self.volOpFlip.setEnabled(False) |
|
684 | 684 | self.volOpFlip.clear() |
|
685 | 685 | |
|
686 | 686 | @pyqtSignature("int") |
|
687 | 687 | def on_volOpCebCohInt_stateChanged(self, p0): |
|
688 | 688 | """ |
|
689 | 689 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
690 | 690 | """ |
|
691 | 691 | if p0 == 2: |
|
692 | 692 | self.volOpCohInt.setEnabled(True) |
|
693 | 693 | if p0 == 0: |
|
694 | 694 | self.volOpCohInt.setEnabled(False) |
|
695 | 695 | self.volOpCohInt.clear() |
|
696 | 696 | |
|
697 | 697 | @pyqtSignature("int") |
|
698 | 698 | def on_volOpCebRadarfrequency_stateChanged(self, p0): |
|
699 | 699 | """ |
|
700 | 700 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
701 | 701 | """ |
|
702 | 702 | if p0 == 2: |
|
703 | 703 | self.volOpRadarfrequency.setEnabled(True) |
|
704 | 704 | if p0 == 0: |
|
705 | 705 | self.volOpRadarfrequency.clear() |
|
706 | 706 | self.volOpRadarfrequency.setEnabled(False) |
|
707 | 707 | |
|
708 | 708 | @pyqtSignature("") |
|
709 | 709 | def on_volOutputToolPath_clicked(self): |
|
710 | 710 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
711 | 711 | self.volOutputPath.setText(dirOutPath) |
|
712 | 712 | |
|
713 | 713 | @pyqtSignature("") |
|
714 | 714 | def on_specOutputToolPath_clicked(self): |
|
715 | 715 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
716 | 716 | self.specOutputPath.setText(dirOutPath) |
|
717 | 717 | |
|
718 | 718 | @pyqtSignature("") |
|
719 | 719 | def on_specHeisOutputToolPath_clicked(self): |
|
720 | 720 | dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
721 | 721 | self.specHeisOutputPath.setText(dirOutPath) |
|
722 | 722 | |
|
723 | 723 | @pyqtSignature("") |
|
724 | 724 | def on_specHeisOutputMetadaToolPath_clicked(self): |
|
725 | 725 | |
|
726 | 726 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) |
|
727 | 727 | self.specHeisOutputMetada.setText(filename) |
|
728 | 728 | |
|
729 | 729 | @pyqtSignature("") |
|
730 | 730 | def on_volOpOk_clicked(self): |
|
731 | 731 | """ |
|
732 | 732 | BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES A�ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO |
|
733 | 733 | PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML |
|
734 | 734 | """ |
|
735 | 735 | |
|
736 | 736 | checkPath = False |
|
737 | 737 | |
|
738 | 738 | self.actionSaveToolbar.setEnabled(False) |
|
739 | 739 | self.actionStarToolbar.setEnabled(False) |
|
740 | 740 | |
|
741 | 741 | self.console.clear() |
|
742 | 742 | self.console.append("Checking input parameters ...") |
|
743 | 743 | |
|
744 | 744 | puObj = self.getSelectedItemObj() |
|
745 | 745 | puObj.removeOperations() |
|
746 | 746 | |
|
747 | 747 | if self.volOpCebRadarfrequency.isChecked(): |
|
748 | 748 | value = str(self.volOpRadarfrequency.text()) |
|
749 | 749 | format = 'float' |
|
750 | 750 | name_operation = 'setRadarFrequency' |
|
751 | 751 | name_parameter = 'frequency' |
|
752 | 752 | if not value == "": |
|
753 | 753 | try: |
|
754 | 754 | radarfreq = float(self.volOpRadarfrequency.text())*1e6 |
|
755 | 755 | except: |
|
756 | 756 | self.console.clear() |
|
757 | 757 | self.console.append("Invalid value '%s' for Radar Frequency" %value) |
|
758 | 758 | return 0 |
|
759 | 759 | |
|
760 | 760 | opObj = puObj.addOperation(name=name_operation) |
|
761 | 761 | if not opObj.addParameter(name=name_parameter, value=radarfreq, format=format): |
|
762 | 762 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
763 | 763 | return 0 |
|
764 | 764 | |
|
765 | 765 | if self.volOpCebChannels.isChecked(): |
|
766 | 766 | value = str(self.volOpChannel.text()) |
|
767 | 767 | |
|
768 | 768 | if value == "": |
|
769 | 769 | print "Please fill channel list" |
|
770 | 770 | return 0 |
|
771 | 771 | |
|
772 | 772 | format = 'intlist' |
|
773 | 773 | if self.volOpComChannels.currentIndex() == 0: |
|
774 | 774 | name_operation = "selectChannels" |
|
775 | 775 | name_parameter = 'channelList' |
|
776 | 776 | else: |
|
777 | 777 | name_operation = "selectChannelsByIndex" |
|
778 | 778 | name_parameter = 'channelIndexList' |
|
779 | 779 | |
|
780 | 780 | opObj = puObj.addOperation(name=name_operation) |
|
781 | 781 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
782 | 782 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
783 | 783 | return 0 |
|
784 | 784 | |
|
785 | 785 | if self.volOpCebHeights.isChecked(): |
|
786 | 786 | value = str(self.volOpHeights.text()) |
|
787 | 787 | |
|
788 | 788 | if value == "": |
|
789 | 789 | print "Please fill height range" |
|
790 | 790 | return 0 |
|
791 | 791 | |
|
792 | 792 | valueList = value.split(',') |
|
793 | 793 | format = 'float' |
|
794 | 794 | if self.volOpComHeights.currentIndex() == 0: |
|
795 | 795 | name_operation = 'selectHeights' |
|
796 | 796 | name_parameter1 = 'minHei' |
|
797 | 797 | name_parameter2 = 'maxHei' |
|
798 | 798 | else: |
|
799 | 799 | name_operation = 'selectHeightsByIndex' |
|
800 | 800 | name_parameter1 = 'minIndex' |
|
801 | 801 | name_parameter2 = 'maxIndex' |
|
802 | 802 | |
|
803 | 803 | opObj = puObj.addOperation(name=name_operation) |
|
804 | 804 | opObj.addParameter(name=name_parameter1, value=valueList[0], format=format) |
|
805 | 805 | opObj.addParameter(name=name_parameter2, value=valueList[1], format=format) |
|
806 | 806 | |
|
807 | 807 | if self.volOpCebFilter.isChecked(): |
|
808 | 808 | value = str(self.volOpFilter.text()) |
|
809 | 809 | if value == "": |
|
810 | 810 | print "Please fill filter value" |
|
811 | 811 | return 0 |
|
812 | 812 | |
|
813 | 813 | format = 'int' |
|
814 | 814 | name_operation = 'filterByHeights' |
|
815 | 815 | name_parameter = 'window' |
|
816 | 816 | opObj = puObj.addOperation(name=name_operation) |
|
817 | 817 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
818 | 818 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
819 | 819 | return 0 |
|
820 | 820 | |
|
821 | 821 | if self.volOpCebProfile.isChecked(): |
|
822 | 822 | value = str(self.volOpProfile.text()) |
|
823 | 823 | |
|
824 | 824 | if value == "": |
|
825 | 825 | print "Please fill profile value" |
|
826 | 826 | return 0 |
|
827 | 827 | |
|
828 | 828 | format = 'intlist' |
|
829 | 829 | optype = 'other' |
|
830 | 830 | name_operation = 'ProfileSelector' |
|
831 | 831 | if self.volOpComProfile.currentIndex() == 0: |
|
832 | 832 | name_parameter = 'profileList' |
|
833 | 833 | if self.volOpComProfile.currentIndex() == 1: |
|
834 | 834 | name_parameter = 'profileRangeList' |
|
835 | 835 | if self.volOpComProfile.currentIndex() == 2: |
|
836 | 836 | name_parameter = 'rangeList' |
|
837 | 837 | |
|
838 | 838 | opObj = puObj.addOperation(name='ProfileSelector', optype='other') |
|
839 | 839 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
840 | 840 | self.console.append("Invalid value '%s' for %s" %(value,name_parameter)) |
|
841 | 841 | return 0 |
|
842 | 842 | |
|
843 | 843 | if self.volOpCebDecodification.isChecked(): |
|
844 | 844 | name_operation = 'Decoder' |
|
845 | 845 | |
|
846 | 846 | #User defined |
|
847 | 847 | nBaud = None |
|
848 | 848 | nCode = None |
|
849 | 849 | |
|
850 | 850 | code = str(self.volOpCode.text()) |
|
851 | 851 | try: |
|
852 | 852 | code_tmp = ast.literal_eval(code) |
|
853 | 853 | except: |
|
854 | 854 | code_tmp = [] |
|
855 | 855 | |
|
856 | 856 | if len(code_tmp) < 1: |
|
857 | 857 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
858 | 858 | return 0 |
|
859 | 859 | |
|
860 | 860 | if type(code_tmp) not in (tuple, list): |
|
861 | 861 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
862 | 862 | return 0 |
|
863 | 863 | |
|
864 | 864 | if len(code_tmp) > 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1], [1,1,-1] ] |
|
865 | 865 | nBaud = len(code_tmp[0]) |
|
866 | 866 | nCode = len(code_tmp) |
|
867 | 867 | elif len(code_tmp) == 1 and type(code_tmp[0]) in (tuple, list): #[ [1,-1,1] ] |
|
868 | 868 | nBaud = len(code_tmp[0]) |
|
869 | 869 | nCode = 1 |
|
870 | 870 | elif type(code_tmp[0]) in (int, float): #[1,-1,1] or (1,-1,1) |
|
871 | 871 | nBaud = len(code_tmp) |
|
872 | 872 | nCode = 1 |
|
873 | 873 | else: |
|
874 | 874 | self.console.append("Please write a right value for Code (Exmaple: [1,1,-1], [1,-1,1])") |
|
875 | 875 | return 0 |
|
876 | 876 | |
|
877 | 877 | if not nBaud or not nCode: |
|
878 | 878 | self.console.append("Please write a right value for Code") |
|
879 | 879 | return 0 |
|
880 | 880 | |
|
881 | 881 | opObj = puObj.addOperation(name='Decoder', optype='other') |
|
882 | 882 | |
|
883 | 883 | code = code.replace("(", "") |
|
884 | 884 | code = code.replace(")", "") |
|
885 | 885 | code = code.replace("[", "") |
|
886 | 886 | code = code.replace("]", "") |
|
887 | 887 | |
|
888 | 888 | if not opObj.addParameter(name='code', value=code, format='intlist'): |
|
889 | 889 | self.console.append("Please write a right value for Code") |
|
890 | 890 | return 0 |
|
891 | 891 | if not opObj.addParameter(name='nCode', value=nCode, format='int'): |
|
892 | 892 | self.console.append("Please write a right value for Code") |
|
893 | 893 | return 0 |
|
894 | 894 | if not opObj.addParameter(name='nBaud', value=nBaud, format='int'): |
|
895 | 895 | self.console.append("Please write a right value for Code") |
|
896 | 896 | return 0 |
|
897 | 897 | |
|
898 | 898 | name_parameter = 'mode' |
|
899 | 899 | format = 'int' |
|
900 | 900 | |
|
901 | 901 | value = str(self.volOpComMode.currentIndex()) |
|
902 | 902 | |
|
903 | 903 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
904 | 904 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
905 | 905 | return 0 |
|
906 | 906 | |
|
907 | 907 | |
|
908 | 908 | if self.volOpCebFlip.isChecked(): |
|
909 | 909 | name_operation = 'deFlip' |
|
910 | 910 | optype = 'self' |
|
911 | 911 | |
|
912 | 912 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
913 | 913 | |
|
914 | 914 | name_parameter = 'channelList' |
|
915 | 915 | format = 'intlist' |
|
916 | 916 | value = str(self.volOpFlip.text()) |
|
917 | 917 | |
|
918 | 918 | if value != "": |
|
919 | 919 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
920 | 920 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
921 | 921 | return 0 |
|
922 | 922 | |
|
923 | 923 | if self.volOpCebCohInt.isChecked(): |
|
924 | 924 | name_operation = 'CohInt' |
|
925 | 925 | optype = 'other' |
|
926 | 926 | value = str(self.volOpCohInt.text()) |
|
927 | 927 | |
|
928 | 928 | if value == "": |
|
929 | 929 | print "Please fill number of coherent integrations" |
|
930 | 930 | return 0 |
|
931 | 931 | |
|
932 | 932 | name_parameter = 'n' |
|
933 | 933 | format = 'float' |
|
934 | 934 | |
|
935 | 935 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
936 | 936 | |
|
937 | 937 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
938 | 938 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
939 | 939 | return 0 |
|
940 | 940 | |
|
941 | 941 | if self.volGraphCebshow.isChecked(): |
|
942 | 942 | name_operation = 'Scope' |
|
943 | 943 | optype = 'other' |
|
944 | 944 | name_parameter = 'type' |
|
945 | 945 | value = 'Scope' |
|
946 | 946 | if self.idImagscope == 0: |
|
947 | 947 | self.idImagscope = 100 |
|
948 | 948 | else: |
|
949 | 949 | self.idImagscope = self.idImagscope + 1 |
|
950 | 950 | |
|
951 | 951 | name_parameter1 = 'id' |
|
952 | 952 | value1 = int(self.idImagscope) |
|
953 | 953 | format1 = 'int' |
|
954 | 954 | format = 'str' |
|
955 | 955 | |
|
956 | 956 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
957 | 957 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
958 | 958 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) |
|
959 | 959 | |
|
960 | 960 | channelList = str(self.volGraphChannelList.text()).replace(" ","") |
|
961 | 961 | xvalue = str(self.volGraphfreqrange.text()).replace(" ","") |
|
962 | 962 | yvalue = str(self.volGraphHeightrange.text()).replace(" ","") |
|
963 | 963 | |
|
964 | 964 | if channelList: |
|
965 | 965 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
966 | 966 | |
|
967 | 967 | if xvalue: |
|
968 | 968 | xvalueList = xvalue.split(',') |
|
969 | 969 | try: |
|
970 | 970 | value0 = float(xvalueList[0]) |
|
971 | 971 | value1 = float(xvalueList[1]) |
|
972 | 972 | except: |
|
973 | 973 | return 0 |
|
974 | 974 | opObj.addParameter(name='xmin', value=value0, format='float') |
|
975 | 975 | opObj.addParameter(name='xmax', value=value1, format='float') |
|
976 | 976 | |
|
977 | 977 | |
|
978 | 978 | if not yvalue == "": |
|
979 | 979 | yvalueList = yvalue.split(",") |
|
980 | 980 | try: |
|
981 | 981 | value0 = int(yvalueList[0]) |
|
982 | 982 | value1 = int(yvalueList[1]) |
|
983 | 983 | except: |
|
984 | 984 | return 0 |
|
985 | 985 | |
|
986 | 986 | opObj.addParameter(name='ymin', value=value0, format='int') |
|
987 | 987 | opObj.addParameter(name='ymax', value=value1, format='int') |
|
988 | 988 | |
|
989 | 989 | if self.volGraphCebSave.isChecked(): |
|
990 | 990 | checkPath = True |
|
991 | 991 | opObj.addParameter(name='save', value='1', format='int') |
|
992 | 992 | opObj.addParameter(name='figpath', value=str(self.volGraphPath.text()), format='str') |
|
993 | 993 | value = str(self.volGraphPrefix.text()).replace(" ","") |
|
994 | 994 | if value: |
|
995 | 995 | opObj.addParameter(name='figfile', value=value, format='str') |
|
996 | 996 | |
|
997 | 997 | localfolder = None |
|
998 | 998 | if checkPath: |
|
999 | 999 | localfolder = str(self.volGraphPath.text()) |
|
1000 | 1000 | if localfolder == '': |
|
1001 | 1001 | self.console.clear() |
|
1002 | 1002 | self.console.append("Graphic path should be defined") |
|
1003 | 1003 | return 0 |
|
1004 | 1004 | |
|
1005 | 1005 | # if something happend |
|
1006 | 1006 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage') |
|
1007 | 1007 | if parms_ok: |
|
1008 | 1008 | name_operation = 'VoltageWriter' |
|
1009 | 1009 | optype = 'other' |
|
1010 | 1010 | name_parameter1 = 'path' |
|
1011 | 1011 | name_parameter2 = 'blocksPerFile' |
|
1012 | 1012 | name_parameter3 = 'profilesPerBlock' |
|
1013 | 1013 | value1 = output_path |
|
1014 | 1014 | value2 = blocksperfile |
|
1015 | 1015 | value3 = profilesperblock |
|
1016 | 1016 | format = "int" |
|
1017 | 1017 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1018 | 1018 | opObj.addParameter(name=name_parameter1, value=value1) |
|
1019 | 1019 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
1020 | 1020 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
1021 | 1021 | |
|
1022 | 1022 | self.console.clear() |
|
1023 | 1023 | try: |
|
1024 | 1024 | self.refreshPUProperties(puObj) |
|
1025 | 1025 | except: |
|
1026 | 1026 | self.console.append("An error reading input parameters was found ...Check them!") |
|
1027 | 1027 | return 0 |
|
1028 | 1028 | |
|
1029 | 1029 | self.console.append("Save your project and press Play button to start signal processing") |
|
1030 | 1030 | |
|
1031 | 1031 | self.actionSaveToolbar.setEnabled(True) |
|
1032 | 1032 | self.actionStarToolbar.setEnabled(True) |
|
1033 | 1033 | |
|
1034 | 1034 | return 1 |
|
1035 | 1035 | |
|
1036 | 1036 | """ |
|
1037 | 1037 | Voltage Graph |
|
1038 | 1038 | """ |
|
1039 | 1039 | @pyqtSignature("int") |
|
1040 | 1040 | def on_volGraphCebSave_stateChanged(self, p0): |
|
1041 | 1041 | """ |
|
1042 | 1042 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1043 | 1043 | """ |
|
1044 | 1044 | if p0 == 2: |
|
1045 | 1045 | self.volGraphPath.setEnabled(True) |
|
1046 | 1046 | self.volGraphPrefix.setEnabled(True) |
|
1047 | 1047 | self.volGraphToolPath.setEnabled(True) |
|
1048 | 1048 | |
|
1049 | 1049 | if p0 == 0: |
|
1050 | 1050 | self.volGraphPath.setEnabled(False) |
|
1051 | 1051 | self.volGraphPrefix.setEnabled(False) |
|
1052 | 1052 | self.volGraphToolPath.setEnabled(False) |
|
1053 | 1053 | |
|
1054 | 1054 | @pyqtSignature("") |
|
1055 | 1055 | def on_volGraphToolPath_clicked(self): |
|
1056 | 1056 | """ |
|
1057 | 1057 | Donde se guardan los DATOS |
|
1058 | 1058 | """ |
|
1059 | 1059 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1060 | 1060 | self.volGraphPath.setText(save_path) |
|
1061 | 1061 | |
|
1062 | 1062 | if not os.path.exists(save_path): |
|
1063 | 1063 | self.console.clear() |
|
1064 | 1064 | self.console.append("Set a valid path") |
|
1065 | 1065 | self.volGraphOk.setEnabled(False) |
|
1066 | 1066 | return |
|
1067 | 1067 | |
|
1068 | 1068 | @pyqtSignature("int") |
|
1069 | 1069 | def on_volGraphCebshow_stateChanged(self, p0): |
|
1070 | 1070 | """ |
|
1071 | 1071 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1072 | 1072 | """ |
|
1073 | 1073 | if p0 == 0: |
|
1074 | 1074 | |
|
1075 | 1075 | self.volGraphChannelList.setEnabled(False) |
|
1076 | 1076 | self.volGraphfreqrange.setEnabled(False) |
|
1077 | 1077 | self.volGraphHeightrange.setEnabled(False) |
|
1078 | 1078 | if p0 == 2: |
|
1079 | 1079 | |
|
1080 | 1080 | self.volGraphChannelList.setEnabled(True) |
|
1081 | 1081 | self.volGraphfreqrange.setEnabled(True) |
|
1082 | 1082 | self.volGraphHeightrange.setEnabled(True) |
|
1083 | 1083 | |
|
1084 | 1084 | """ |
|
1085 | 1085 | Spectra operation |
|
1086 | 1086 | """ |
|
1087 | 1087 | @pyqtSignature("int") |
|
1088 | 1088 | def on_specOpCebRadarfrequency_stateChanged(self, p0): |
|
1089 | 1089 | """ |
|
1090 | 1090 | Check Box habilita ingresode del numero de Integraciones a realizar |
|
1091 | 1091 | """ |
|
1092 | 1092 | if p0 == 2: |
|
1093 | 1093 | self.specOpRadarfrequency.setEnabled(True) |
|
1094 | 1094 | if p0 == 0: |
|
1095 | 1095 | self.specOpRadarfrequency.clear() |
|
1096 | 1096 | self.specOpRadarfrequency.setEnabled(False) |
|
1097 | 1097 | |
|
1098 | 1098 | |
|
1099 | 1099 | @pyqtSignature("int") |
|
1100 | 1100 | def on_specOpCebCrossSpectra_stateChanged(self, p0): |
|
1101 | 1101 | """ |
|
1102 | 1102 | Habilita la opcion de a�adir el par�metro CrossSpectra a la Unidad de Procesamiento . |
|
1103 | 1103 | """ |
|
1104 | 1104 | if p0 == 2: |
|
1105 | 1105 | # self.specOpnFFTpoints.setEnabled(True) |
|
1106 | 1106 | self.specOppairsList.setEnabled(True) |
|
1107 | 1107 | if p0 == 0: |
|
1108 | 1108 | # self.specOpnFFTpoints.setEnabled(False) |
|
1109 | 1109 | self.specOppairsList.setEnabled(False) |
|
1110 | 1110 | |
|
1111 | 1111 | @pyqtSignature("int") |
|
1112 | 1112 | def on_specOpCebChannel_stateChanged(self, p0): |
|
1113 | 1113 | """ |
|
1114 | 1114 | Habilita la opcion de a�adir el par�metro numero de Canales a la Unidad de Procesamiento . |
|
1115 | 1115 | """ |
|
1116 | 1116 | if p0 == 2: |
|
1117 | 1117 | self.specOpChannel.setEnabled(True) |
|
1118 | 1118 | self.specOpComChannel.setEnabled(True) |
|
1119 | 1119 | if p0 == 0: |
|
1120 | 1120 | self.specOpChannel.setEnabled(False) |
|
1121 | 1121 | self.specOpComChannel.setEnabled(False) |
|
1122 | 1122 | |
|
1123 | 1123 | @pyqtSignature("int") |
|
1124 | 1124 | def on_specOpCebHeights_stateChanged(self, p0): |
|
1125 | 1125 | """ |
|
1126 | 1126 | Habilita la opcion de a�adir el par�metro de alturas a la Unidad de Procesamiento . |
|
1127 | 1127 | """ |
|
1128 | 1128 | if p0 == 2: |
|
1129 | 1129 | self.specOpComHeights.setEnabled(True) |
|
1130 | 1130 | self.specOpHeights.setEnabled(True) |
|
1131 | 1131 | if p0 == 0: |
|
1132 | 1132 | self.specOpComHeights.setEnabled(False) |
|
1133 | 1133 | self.specOpHeights.setEnabled(False) |
|
1134 | 1134 | |
|
1135 | 1135 | |
|
1136 | 1136 | @pyqtSignature("int") |
|
1137 | 1137 | def on_specOpCebIncoherent_stateChanged(self, p0): |
|
1138 | 1138 | """ |
|
1139 | 1139 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . |
|
1140 | 1140 | """ |
|
1141 | 1141 | if p0 == 2: |
|
1142 | 1142 | self.specOpIncoherent.setEnabled(True) |
|
1143 | 1143 | if p0 == 0: |
|
1144 | 1144 | self.specOpIncoherent.setEnabled(False) |
|
1145 | 1145 | |
|
1146 | 1146 | @pyqtSignature("int") |
|
1147 | 1147 | def on_specOpCebRemoveDC_stateChanged(self, p0): |
|
1148 | 1148 | """ |
|
1149 | 1149 | Habilita la opcion de a�adir el par�metro remover DC a la Unidad de Procesamiento . |
|
1150 | 1150 | """ |
|
1151 | 1151 | if p0 == 2: |
|
1152 | 1152 | self.specOpComRemoveDC.setEnabled(True) |
|
1153 | 1153 | if p0 == 0: |
|
1154 | 1154 | self.specOpComRemoveDC.setEnabled(False) |
|
1155 | 1155 | |
|
1156 | 1156 | @pyqtSignature("int") |
|
1157 | 1157 | def on_specOpCebgetNoise_stateChanged(self, p0): |
|
1158 | 1158 | """ |
|
1159 | 1159 | Habilita la opcion de a�adir la estimacion de ruido a la Unidad de Procesamiento . |
|
1160 | 1160 | """ |
|
1161 | 1161 | if p0 == 2: |
|
1162 | 1162 | self.specOpgetNoise.setEnabled(True) |
|
1163 | 1163 | |
|
1164 | 1164 | if p0 == 0: |
|
1165 | 1165 | self.specOpgetNoise.setEnabled(False) |
|
1166 | 1166 | |
|
1167 | 1167 | @pyqtSignature("") |
|
1168 | 1168 | def on_specOpOk_clicked(self): |
|
1169 | 1169 | """ |
|
1170 | 1170 | AÑADE OPERACION SPECTRA |
|
1171 | 1171 | """ |
|
1172 | 1172 | |
|
1173 | 1173 | addFTP = False |
|
1174 | 1174 | checkPath = False |
|
1175 | 1175 | |
|
1176 | 1176 | self.actionSaveToolbar.setEnabled(False) |
|
1177 | 1177 | self.actionStarToolbar.setEnabled(False) |
|
1178 | 1178 | |
|
1179 | 1179 | self.console.clear() |
|
1180 | 1180 | self.console.append("Checking input parameters ...") |
|
1181 | 1181 | |
|
1182 | 1182 | projectObj = self.getSelectedProjectObj() |
|
1183 | 1183 | |
|
1184 | 1184 | if not projectObj: |
|
1185 | 1185 | self.console.append("Please select a project before update it") |
|
1186 | 1186 | return |
|
1187 | 1187 | |
|
1188 | 1188 | puObj = self.getSelectedItemObj() |
|
1189 | 1189 | |
|
1190 | 1190 | puObj.removeOperations() |
|
1191 | 1191 | |
|
1192 | 1192 | if self.specOpCebRadarfrequency.isChecked(): |
|
1193 | 1193 | value = str(self.specOpRadarfrequency.text()) |
|
1194 | 1194 | format = 'float' |
|
1195 | 1195 | name_operation = 'setRadarFrequency' |
|
1196 | 1196 | name_parameter = 'frequency' |
|
1197 | 1197 | |
|
1198 | 1198 | if not isFloat(value): |
|
1199 | 1199 | self.console.clear() |
|
1200 | 1200 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1201 | 1201 | return 0 |
|
1202 | 1202 | |
|
1203 | 1203 | radarfreq = float(value)*1e6 |
|
1204 | 1204 | opObj = puObj.addOperation(name=name_operation) |
|
1205 | 1205 | opObj.addParameter(name=name_parameter, value=radarfreq, format=format) |
|
1206 | 1206 | |
|
1207 | 1207 | inputId = puObj.getInputId() |
|
1208 | 1208 | inputPuObj = projectObj.getProcUnitObj(inputId) |
|
1209 | 1209 | |
|
1210 | 1210 | if inputPuObj.datatype == 'Voltage' or inputPuObj.datatype == 'USRP': |
|
1211 | 1211 | |
|
1212 | 1212 | value = str(self.specOpnFFTpoints.text()) |
|
1213 | 1213 | |
|
1214 | 1214 | if not isInt(value): |
|
1215 | 1215 | self.console.append("Invalid value '%s' for '%s'" %(value, 'nFFTPoints')) |
|
1216 | 1216 | return 0 |
|
1217 | 1217 | |
|
1218 | 1218 | puObj.addParameter(name='nFFTPoints', value=value, format='int') |
|
1219 | 1219 | |
|
1220 | 1220 | value = str(self.specOpProfiles.text()) |
|
1221 | 1221 | if not isInt(value): |
|
1222 | 1222 | self.console.append("Please write a value on Profiles field") |
|
1223 | 1223 | else: |
|
1224 | 1224 | puObj.addParameter(name='nProfiles', value=value, format='int') |
|
1225 | 1225 | |
|
1226 | 1226 | value = str(self.specOpippFactor.text()) |
|
1227 | 1227 | if not isInt(value): |
|
1228 | 1228 | self.console.append("Please write a value on IppFactor field") |
|
1229 | 1229 | else: |
|
1230 | 1230 | puObj.addParameter(name='ippFactor' , value=value , format='int') |
|
1231 | 1231 | |
|
1232 | 1232 | if self.specOpCebCrossSpectra.isChecked(): |
|
1233 | 1233 | name_parameter = 'pairsList' |
|
1234 | 1234 | format = 'pairslist' |
|
1235 | 1235 | value = str(self.specOppairsList.text()) |
|
1236 | 1236 | |
|
1237 | 1237 | if value == "": |
|
1238 | 1238 | print "Please fill the pairs list field" |
|
1239 | 1239 | return 0 |
|
1240 | 1240 | |
|
1241 | 1241 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
1242 | 1242 | self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter)) |
|
1243 | 1243 | return 0 |
|
1244 | 1244 | |
|
1245 | 1245 | if self.specOpCebHeights.isChecked(): |
|
1246 | 1246 | value = str(self.specOpHeights.text()) |
|
1247 | 1247 | |
|
1248 | 1248 | if value == "": |
|
1249 | 1249 | self.console.append("Empty value for '%s'" %(value, "Height range")) |
|
1250 | 1250 | return 0 |
|
1251 | 1251 | |
|
1252 | 1252 | valueList = value.split(',') |
|
1253 | 1253 | format = 'float' |
|
1254 | 1254 | value0 = valueList[0] |
|
1255 | 1255 | value1 = valueList[1] |
|
1256 | 1256 | |
|
1257 | 1257 | if not isFloat(value0) or not isFloat(value1): |
|
1258 | 1258 | self.console.append("Invalid value '%s' for '%s'" %(value, "Height range")) |
|
1259 | 1259 | return 0 |
|
1260 | 1260 | |
|
1261 | 1261 | if self.specOpComHeights.currentIndex() == 0: |
|
1262 | 1262 | name_operation = 'selectHeights' |
|
1263 | 1263 | name_parameter1 = 'minHei' |
|
1264 | 1264 | name_parameter2 = 'maxHei' |
|
1265 | 1265 | else: |
|
1266 | 1266 | name_operation = 'selectHeightsByIndex' |
|
1267 | 1267 | name_parameter1 = 'minIndex' |
|
1268 | 1268 | name_parameter2 = 'maxIndex' |
|
1269 | 1269 | |
|
1270 | 1270 | opObj = puObj.addOperation(name=name_operation) |
|
1271 | 1271 | opObj.addParameter(name=name_parameter1, value=value0, format=format) |
|
1272 | 1272 | opObj.addParameter(name=name_parameter2, value=value1, format=format) |
|
1273 | 1273 | |
|
1274 | 1274 | if self.specOpCebChannel.isChecked(): |
|
1275 | 1275 | |
|
1276 | 1276 | if self.specOpComChannel.currentIndex() == 0: |
|
1277 | 1277 | name_operation = "selectChannels" |
|
1278 | 1278 | name_parameter = 'channelList' |
|
1279 | 1279 | else: |
|
1280 | 1280 | name_operation = "selectChannelsByIndex" |
|
1281 | 1281 | name_parameter = 'channelIndexList' |
|
1282 | 1282 | |
|
1283 | 1283 | format = 'intlist' |
|
1284 | 1284 | value = str(self.specOpChannel.text()) |
|
1285 | 1285 | |
|
1286 | 1286 | if value == "": |
|
1287 | 1287 | print "Please fill channel list" |
|
1288 | 1288 | return 0 |
|
1289 | 1289 | |
|
1290 | 1290 | if not isList(value): |
|
1291 | 1291 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1292 | 1292 | return 0 |
|
1293 | 1293 | |
|
1294 | 1294 | opObj = puObj.addOperation(name=name_operation) |
|
1295 | 1295 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1296 | 1296 | |
|
1297 | 1297 | if self.specOpCebIncoherent.isChecked(): |
|
1298 | 1298 | |
|
1299 | 1299 | name_operation = 'IncohInt' |
|
1300 | 1300 | optype = 'other' |
|
1301 | 1301 | |
|
1302 | 1302 | if self.specOpCobIncInt.currentIndex() == 0: |
|
1303 | 1303 | name_parameter = 'timeInterval' |
|
1304 | 1304 | format = 'float' |
|
1305 | 1305 | else: |
|
1306 | 1306 | name_parameter = 'n' |
|
1307 | 1307 | format = 'float' |
|
1308 | 1308 | |
|
1309 | 1309 | value = str(self.specOpIncoherent.text()) |
|
1310 | 1310 | |
|
1311 | 1311 | if value == "": |
|
1312 | 1312 | print "Please fill Incoherent integration value" |
|
1313 | 1313 | return 0 |
|
1314 | 1314 | |
|
1315 | 1315 | if not isFloat(value): |
|
1316 | 1316 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
1317 | 1317 | return 0 |
|
1318 | 1318 | |
|
1319 | 1319 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
1320 | 1320 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1321 | 1321 | |
|
1322 | 1322 | if self.specOpCebRemoveDC.isChecked(): |
|
1323 | 1323 | name_operation = 'removeDC' |
|
1324 | 1324 | name_parameter = 'mode' |
|
1325 | 1325 | format = 'int' |
|
1326 | 1326 | if self.specOpComRemoveDC.currentIndex() == 0: |
|
1327 | 1327 | value = 1 |
|
1328 | 1328 | else: |
|
1329 | 1329 | value = 2 |
|
1330 | 1330 | opObj = puObj.addOperation(name=name_operation) |
|
1331 | 1331 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1332 | 1332 | |
|
1333 | 1333 | if self.specOpCebRemoveInt.isChecked(): |
|
1334 | 1334 | name_operation = 'removeInterference' |
|
1335 | 1335 | opObj = puObj.addOperation(name=name_operation) |
|
1336 | 1336 | |
|
1337 | 1337 | |
|
1338 | 1338 | if self.specOpCebgetNoise.isChecked(): |
|
1339 | 1339 | value = str(self.specOpgetNoise.text()) |
|
1340 | 1340 | valueList = value.split(',') |
|
1341 | 1341 | format = 'float' |
|
1342 | 1342 | name_operation = "getNoise" |
|
1343 | 1343 | opObj = puObj.addOperation(name=name_operation) |
|
1344 | 1344 | |
|
1345 | 1345 | if not value == '': |
|
1346 | 1346 | valueList = value.split(',') |
|
1347 | 1347 | length = len(valueList) |
|
1348 | 1348 | if length == 1: |
|
1349 | 1349 | try: |
|
1350 | 1350 | value1 = float(valueList[0]) |
|
1351 | 1351 | except: |
|
1352 | 1352 | self.console.clear() |
|
1353 | 1353 | self.console.append("Please Write correct parameter Get Noise") |
|
1354 | 1354 | return 0 |
|
1355 | 1355 | name1 = 'minHei' |
|
1356 | 1356 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1357 | 1357 | elif length == 2: |
|
1358 | 1358 | try: |
|
1359 | 1359 | value1 = float(valueList[0]) |
|
1360 | 1360 | value2 = float(valueList[1]) |
|
1361 | 1361 | except: |
|
1362 | 1362 | self.console.clear() |
|
1363 | 1363 | self.console.append("Please Write corrects parameter Get Noise") |
|
1364 | 1364 | return 0 |
|
1365 | 1365 | name1 = 'minHei' |
|
1366 | 1366 | name2 = 'maxHei' |
|
1367 | 1367 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1368 | 1368 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1369 | 1369 | |
|
1370 | 1370 | elif length == 3: |
|
1371 | 1371 | try: |
|
1372 | 1372 | value1 = float(valueList[0]) |
|
1373 | 1373 | value2 = float(valueList[1]) |
|
1374 | 1374 | value3 = float(valueList[2]) |
|
1375 | 1375 | except: |
|
1376 | 1376 | self.console.clear() |
|
1377 | 1377 | self.console.append("Please Write corrects parameter Get Noise") |
|
1378 | 1378 | return 0 |
|
1379 | 1379 | name1 = 'minHei' |
|
1380 | 1380 | name2 = 'maxHei' |
|
1381 | 1381 | name3 = 'minVel' |
|
1382 | 1382 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1383 | 1383 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1384 | 1384 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1385 | 1385 | |
|
1386 | 1386 | elif length == 4: |
|
1387 | 1387 | try: |
|
1388 | 1388 | value1 = float(valueList[0]) |
|
1389 | 1389 | value2 = float(valueList[1]) |
|
1390 | 1390 | value3 = float(valueList[2]) |
|
1391 | 1391 | value4 = float(valueList[3]) |
|
1392 | 1392 | except: |
|
1393 | 1393 | self.console.clear() |
|
1394 | 1394 | self.console.append("Please Write corrects parameter Get Noise") |
|
1395 | 1395 | return 0 |
|
1396 | 1396 | name1 = 'minHei' |
|
1397 | 1397 | name2 = 'maxHei' |
|
1398 | 1398 | name3 = 'minVel' |
|
1399 | 1399 | name4 = 'maxVel' |
|
1400 | 1400 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1401 | 1401 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1402 | 1402 | opObj.addParameter(name=name3, value=value3, format=format) |
|
1403 | 1403 | opObj.addParameter(name=name4, value=value4, format=format) |
|
1404 | 1404 | |
|
1405 | 1405 | elif length > 4: |
|
1406 | 1406 | self.console.clear() |
|
1407 | 1407 | self.console.append("Get Noise Operation only accepts 4 parameters") |
|
1408 | 1408 | return 0 |
|
1409 | 1409 | |
|
1410 | 1410 | channelList = str(self.specGgraphChannelList.text()).replace(" ","") |
|
1411 | 1411 | vel_range = str(self.specGgraphFreq.text()).replace(" ","") |
|
1412 | 1412 | hei_range = str(self.specGgraphHeight.text()).replace(" ","") |
|
1413 | 1413 | db_range = str(self.specGgraphDbsrange.text()).replace(" ","") |
|
1414 | 1414 | |
|
1415 | 1415 | trange = str(self.specGgraphTminTmax.text()).replace(" ","") |
|
1416 | 1416 | magrange = str(self.specGgraphmagnitud.text()).replace(" ","") |
|
1417 | 1417 | phaserange = str(self.specGgraphPhase.text()).replace(" ","") |
|
1418 | 1418 | # timerange = str(self.specGgraphTimeRange.text()).replace(" ","") |
|
1419 | 1419 | |
|
1420 | 1420 | figpath = str(self.specGraphPath.text()) |
|
1421 | 1421 | figfile = str(self.specGraphPrefix.text()).replace(" ","") |
|
1422 | 1422 | try: |
|
1423 | 1423 | wrperiod = int(str(self.specGgraphftpratio.text()).replace(" ","")) |
|
1424 | 1424 | except: |
|
1425 | 1425 | wrperiod = None |
|
1426 | 1426 | |
|
1427 | 1427 | #-----Spectra Plot----- |
|
1428 | 1428 | if self.specGraphCebSpectraplot.isChecked(): |
|
1429 | 1429 | |
|
1430 | 1430 | opObj = puObj.addOperation(name='SpectraPlot', optype='other') |
|
1431 | 1431 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1432 | 1432 | |
|
1433 | 1433 | if not channelList == '': |
|
1434 | 1434 | |
|
1435 | 1435 | if not isList(channelList): |
|
1436 | 1436 | self.console.append("Invalid channelList") |
|
1437 | 1437 | return 0 |
|
1438 | 1438 | |
|
1439 | 1439 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1440 | 1440 | |
|
1441 | 1441 | if not vel_range == '': |
|
1442 | 1442 | xvalueList = vel_range.split(',') |
|
1443 | 1443 | try: |
|
1444 | 1444 | value1 = float(xvalueList[0]) |
|
1445 | 1445 | value2 = float(xvalueList[1]) |
|
1446 | 1446 | except: |
|
1447 | 1447 | self.console.clear() |
|
1448 | 1448 | self.console.append("Invalid velocity/frequency range") |
|
1449 | 1449 | return 0 |
|
1450 | 1450 | |
|
1451 | 1451 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1452 | 1452 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1453 | 1453 | |
|
1454 | 1454 | if not hei_range == '': |
|
1455 | 1455 | yvalueList = hei_range.split(",") |
|
1456 | 1456 | try: |
|
1457 | 1457 | value1 = float(yvalueList[0]) |
|
1458 | 1458 | value2 = float(yvalueList[1]) |
|
1459 | 1459 | except: |
|
1460 | 1460 | self.console.clear() |
|
1461 | 1461 | self.console.append("Invalid height range") |
|
1462 | 1462 | return 0 |
|
1463 | 1463 | |
|
1464 | 1464 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1465 | 1465 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1466 | 1466 | |
|
1467 | 1467 | if not db_range == '': |
|
1468 | 1468 | zvalueList = db_range.split(",") |
|
1469 | 1469 | try: |
|
1470 | 1470 | value1 = float(zvalueList[0]) |
|
1471 | 1471 | value2 = float(zvalueList[1]) |
|
1472 | 1472 | except: |
|
1473 | 1473 | self.console.clear() |
|
1474 | 1474 | self.console.append("Invalid db range") |
|
1475 | 1475 | return 0 |
|
1476 | 1476 | |
|
1477 | 1477 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1478 | 1478 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1479 | 1479 | |
|
1480 | 1480 | if self.specGraphSaveSpectra.isChecked(): |
|
1481 | 1481 | checkPath = True |
|
1482 | 1482 | opObj.addParameter(name='save', value=1 , format='bool') |
|
1483 | 1483 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1484 | 1484 | if figfile: |
|
1485 | 1485 | opObj.addParameter(name='figfile', value=figfile, format='str') |
|
1486 | 1486 | if wrperiod: |
|
1487 | 1487 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1488 | 1488 | |
|
1489 | 1489 | if self.specGraphftpSpectra.isChecked(): |
|
1490 | 1490 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1491 | 1491 | self.addFTPConf2Operation(puObj, opObj) |
|
1492 | 1492 | addFTP = True |
|
1493 | 1493 | |
|
1494 | 1494 | if self.specGraphCebCrossSpectraplot.isChecked(): |
|
1495 | 1495 | |
|
1496 | 1496 | opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other') |
|
1497 | 1497 | # opObj.addParameter(name='power_cmap', value='jet', format='str') |
|
1498 | 1498 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1499 | 1499 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1500 | 1500 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1501 | 1501 | |
|
1502 | 1502 | if not vel_range == '': |
|
1503 | 1503 | xvalueList = vel_range.split(',') |
|
1504 | 1504 | try: |
|
1505 | 1505 | value1 = float(xvalueList[0]) |
|
1506 | 1506 | value2 = float(xvalueList[1]) |
|
1507 | 1507 | except: |
|
1508 | 1508 | self.console.clear() |
|
1509 | 1509 | self.console.append("Invalid velocity/frequency range") |
|
1510 | 1510 | return 0 |
|
1511 | 1511 | |
|
1512 | 1512 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1513 | 1513 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1514 | 1514 | |
|
1515 | 1515 | if not hei_range == '': |
|
1516 | 1516 | yvalueList = hei_range.split(",") |
|
1517 | 1517 | try: |
|
1518 | 1518 | value1 = float(yvalueList[0]) |
|
1519 | 1519 | value2 = float(yvalueList[1]) |
|
1520 | 1520 | except: |
|
1521 | 1521 | self.console.clear() |
|
1522 | 1522 | self.console.append("Invalid height range") |
|
1523 | 1523 | return 0 |
|
1524 | 1524 | |
|
1525 | 1525 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1526 | 1526 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1527 | 1527 | |
|
1528 | 1528 | if not db_range == '': |
|
1529 | 1529 | zvalueList = db_range.split(",") |
|
1530 | 1530 | try: |
|
1531 | 1531 | value1 = float(zvalueList[0]) |
|
1532 | 1532 | value2 = float(zvalueList[1]) |
|
1533 | 1533 | except: |
|
1534 | 1534 | self.console.clear() |
|
1535 | 1535 | self.console.append("Invalid db range") |
|
1536 | 1536 | return 0 |
|
1537 | 1537 | |
|
1538 | 1538 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1539 | 1539 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1540 | 1540 | |
|
1541 | 1541 | if not magrange == '': |
|
1542 | 1542 | zvalueList = magrange.split(",") |
|
1543 | 1543 | try: |
|
1544 | 1544 | value1 = float(zvalueList[0]) |
|
1545 | 1545 | value2 = float(zvalueList[1]) |
|
1546 | 1546 | except: |
|
1547 | 1547 | self.console.clear() |
|
1548 | 1548 | self.console.append("Invalid magnitude range") |
|
1549 | 1549 | return 0 |
|
1550 | 1550 | |
|
1551 | 1551 | opObj.addParameter(name='coh_min', value=value1, format='float') |
|
1552 | 1552 | opObj.addParameter(name='coh_max', value=value2, format='float') |
|
1553 | 1553 | |
|
1554 | 1554 | if not phaserange == '': |
|
1555 | 1555 | zvalueList = phaserange.split(",") |
|
1556 | 1556 | try: |
|
1557 | 1557 | value1 = float(zvalueList[0]) |
|
1558 | 1558 | value2 = float(zvalueList[1]) |
|
1559 | 1559 | except: |
|
1560 | 1560 | self.console.clear() |
|
1561 | 1561 | self.console.append("Invalid phase range") |
|
1562 | 1562 | return 0 |
|
1563 | 1563 | |
|
1564 | 1564 | opObj.addParameter(name='phase_min', value=value1, format='float') |
|
1565 | 1565 | opObj.addParameter(name='phase_max', value=value2, format='float') |
|
1566 | 1566 | |
|
1567 | 1567 | if self.specGraphSaveCross.isChecked(): |
|
1568 | 1568 | checkPath = True |
|
1569 | 1569 | opObj.addParameter(name='save', value='1', format='bool') |
|
1570 | 1570 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1571 | 1571 | if figfile: |
|
1572 | 1572 | opObj.addParameter(name='figfile', value=figfile, format='str') |
|
1573 | 1573 | if wrperiod: |
|
1574 | 1574 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1575 | 1575 | |
|
1576 | 1576 | if self.specGraphftpCross.isChecked(): |
|
1577 | 1577 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1578 | 1578 | self.addFTPConf2Operation(puObj, opObj) |
|
1579 | 1579 | addFTP = True |
|
1580 | 1580 | |
|
1581 | 1581 | if self.specGraphCebRTIplot.isChecked(): |
|
1582 | 1582 | |
|
1583 | 1583 | opObj = puObj.addOperation(name='RTIPlot', optype='other') |
|
1584 | 1584 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1585 | 1585 | |
|
1586 | 1586 | if not channelList == '': |
|
1587 | 1587 | if not isList(channelList): |
|
1588 | 1588 | self.console.append("Invalid channelList") |
|
1589 | 1589 | return 0 |
|
1590 | 1590 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1591 | 1591 | |
|
1592 | 1592 | if not trange == '': |
|
1593 | 1593 | xvalueList = trange.split(',') |
|
1594 | 1594 | try: |
|
1595 | 1595 | value1 = float(xvalueList[0]) |
|
1596 | 1596 | value2 = float(xvalueList[1]) |
|
1597 | 1597 | except: |
|
1598 | 1598 | self.console.clear() |
|
1599 | 1599 | self.console.append("Invalid time range") |
|
1600 | 1600 | return 0 |
|
1601 | 1601 | |
|
1602 | 1602 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1603 | 1603 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1604 | 1604 | |
|
1605 | 1605 | # if not timerange == '': |
|
1606 | 1606 | # try: |
|
1607 | 1607 | # timerange = float(timerange) |
|
1608 | 1608 | # except: |
|
1609 | 1609 | # self.console.clear() |
|
1610 | 1610 | # self.console.append("Invalid time range") |
|
1611 | 1611 | # return 0 |
|
1612 | 1612 | # |
|
1613 | 1613 | # opObj.addParameter(name='timerange', value=timerange, format='float') |
|
1614 | 1614 | |
|
1615 | 1615 | if not hei_range == '': |
|
1616 | 1616 | yvalueList = hei_range.split(",") |
|
1617 | 1617 | try: |
|
1618 | 1618 | value1 = float(yvalueList[0]) |
|
1619 | 1619 | value2 = float(yvalueList[1]) |
|
1620 | 1620 | except: |
|
1621 | 1621 | self.console.clear() |
|
1622 | 1622 | self.console.append("Invalid height range") |
|
1623 | 1623 | return 0 |
|
1624 | 1624 | |
|
1625 | 1625 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1626 | 1626 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1627 | 1627 | |
|
1628 | 1628 | if not db_range == '': |
|
1629 | 1629 | zvalueList = db_range.split(",") |
|
1630 | 1630 | try: |
|
1631 | 1631 | value1 = float(zvalueList[0]) |
|
1632 | 1632 | value2 = float(zvalueList[1]) |
|
1633 | 1633 | except: |
|
1634 | 1634 | self.console.clear() |
|
1635 | 1635 | self.console.append("Invalid db range") |
|
1636 | 1636 | return 0 |
|
1637 | 1637 | |
|
1638 | 1638 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1639 | 1639 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1640 | 1640 | |
|
1641 | 1641 | if self.specGraphSaveRTIplot.isChecked(): |
|
1642 | 1642 | checkPath = True |
|
1643 | 1643 | opObj.addParameter(name='save', value='1', format='bool') |
|
1644 | 1644 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1645 | 1645 | if figfile: |
|
1646 | 1646 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1647 | 1647 | if wrperiod: |
|
1648 | 1648 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1649 | 1649 | |
|
1650 | 1650 | if self.specGraphftpRTIplot.isChecked(): |
|
1651 | 1651 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1652 | 1652 | self.addFTPConf2Operation(puObj, opObj) |
|
1653 | 1653 | addFTP = True |
|
1654 | 1654 | |
|
1655 | 1655 | if self.specGraphCebCoherencmap.isChecked(): |
|
1656 | 1656 | |
|
1657 | 1657 | opObj = puObj.addOperation(name='CoherenceMap', optype='other') |
|
1658 | 1658 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1659 | 1659 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1660 | 1660 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1661 | 1661 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1662 | 1662 | |
|
1663 | 1663 | # if not timerange == '': |
|
1664 | 1664 | # try: |
|
1665 | 1665 | # timerange = int(timerange) |
|
1666 | 1666 | # except: |
|
1667 | 1667 | # self.console.clear() |
|
1668 | 1668 | # self.console.append("Invalid time range") |
|
1669 | 1669 | # return 0 |
|
1670 | 1670 | # |
|
1671 | 1671 | # opObj.addParameter(name='timerange', value=timerange, format='int') |
|
1672 | 1672 | |
|
1673 | 1673 | if not trange == '': |
|
1674 | 1674 | xvalueList = trange.split(',') |
|
1675 | 1675 | try: |
|
1676 | 1676 | value1 = float(xvalueList[0]) |
|
1677 | 1677 | value2 = float(xvalueList[1]) |
|
1678 | 1678 | except: |
|
1679 | 1679 | self.console.clear() |
|
1680 | 1680 | self.console.append("Invalid time range") |
|
1681 | 1681 | return 0 |
|
1682 | 1682 | |
|
1683 | 1683 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1684 | 1684 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1685 | 1685 | |
|
1686 | 1686 | if not hei_range == '': |
|
1687 | 1687 | yvalueList = hei_range.split(",") |
|
1688 | 1688 | try: |
|
1689 | 1689 | value1 = float(yvalueList[0]) |
|
1690 | 1690 | value2 = float(yvalueList[1]) |
|
1691 | 1691 | except: |
|
1692 | 1692 | self.console.clear() |
|
1693 | 1693 | self.console.append("Invalid height range") |
|
1694 | 1694 | return 0 |
|
1695 | 1695 | |
|
1696 | 1696 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1697 | 1697 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1698 | 1698 | |
|
1699 | 1699 | if not magrange == '': |
|
1700 | 1700 | zvalueList = magrange.split(",") |
|
1701 | 1701 | try: |
|
1702 | 1702 | value1 = float(zvalueList[0]) |
|
1703 | 1703 | value2 = float(zvalueList[1]) |
|
1704 | 1704 | except: |
|
1705 | 1705 | self.console.clear() |
|
1706 | 1706 | self.console.append("Invalid magnitude range") |
|
1707 | 1707 | return 0 |
|
1708 | 1708 | |
|
1709 | 1709 | opObj.addParameter(name='zmin', value=value1, format='float') |
|
1710 | 1710 | opObj.addParameter(name='zmax', value=value2, format='float') |
|
1711 | 1711 | |
|
1712 | 1712 | if not phaserange == '': |
|
1713 | 1713 | zvalueList = phaserange.split(",") |
|
1714 | 1714 | try: |
|
1715 | 1715 | value1 = float(zvalueList[0]) |
|
1716 | 1716 | value2 = float(zvalueList[1]) |
|
1717 | 1717 | except: |
|
1718 | 1718 | self.console.clear() |
|
1719 | 1719 | self.console.append("Invalid phase range") |
|
1720 | 1720 | return 0 |
|
1721 | 1721 | |
|
1722 | 1722 | opObj.addParameter(name='phase_min', value=value1, format='float') |
|
1723 | 1723 | opObj.addParameter(name='phase_max', value=value2, format='float') |
|
1724 | 1724 | |
|
1725 | 1725 | if self.specGraphSaveCoherencemap.isChecked(): |
|
1726 | 1726 | checkPath = True |
|
1727 | 1727 | opObj.addParameter(name='save', value='1', format='bool') |
|
1728 | 1728 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1729 | 1729 | if figfile: |
|
1730 | 1730 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1731 | 1731 | if wrperiod: |
|
1732 | 1732 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1733 | 1733 | |
|
1734 | 1734 | if self.specGraphftpCoherencemap.isChecked(): |
|
1735 | 1735 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1736 | 1736 | self.addFTPConf2Operation(puObj, opObj) |
|
1737 | 1737 | addFTP = True |
|
1738 | 1738 | |
|
1739 | 1739 | if self.specGraphPowerprofile.isChecked(): |
|
1740 | 1740 | |
|
1741 | 1741 | opObj = puObj.addOperation(name='PowerProfilePlot', optype='other') |
|
1742 | 1742 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1743 | 1743 | |
|
1744 | 1744 | if not channelList == '': |
|
1745 | 1745 | if not isList(channelList): |
|
1746 | 1746 | self.console.append("Invalid channelList") |
|
1747 | 1747 | return 0 |
|
1748 | 1748 | |
|
1749 | 1749 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1750 | 1750 | |
|
1751 | 1751 | if not db_range == '': |
|
1752 | 1752 | xvalueList = db_range.split(',') |
|
1753 | 1753 | try: |
|
1754 | 1754 | value1 = float(xvalueList[0]) |
|
1755 | 1755 | value2 = float(xvalueList[1]) |
|
1756 | 1756 | except: |
|
1757 | 1757 | self.console.clear() |
|
1758 | 1758 | self.console.append("Invalid db range") |
|
1759 | 1759 | return 0 |
|
1760 | 1760 | |
|
1761 | 1761 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1762 | 1762 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1763 | 1763 | |
|
1764 | 1764 | if not hei_range == '': |
|
1765 | 1765 | yvalueList = hei_range.split(",") |
|
1766 | 1766 | try: |
|
1767 | 1767 | value1 = float(yvalueList[0]) |
|
1768 | 1768 | value2 = float(yvalueList[1]) |
|
1769 | 1769 | except: |
|
1770 | 1770 | self.console.clear() |
|
1771 | 1771 | self.console.append("Invalid height range") |
|
1772 | 1772 | return 0 |
|
1773 | 1773 | |
|
1774 | 1774 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1775 | 1775 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1776 | 1776 | |
|
1777 | 1777 | if self.specGraphSavePowerprofile.isChecked(): |
|
1778 | 1778 | checkPath = True |
|
1779 | 1779 | opObj.addParameter(name='save', value='1', format='bool') |
|
1780 | 1780 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1781 | 1781 | if figfile: |
|
1782 | 1782 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1783 | 1783 | if wrperiod: |
|
1784 | 1784 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1785 | 1785 | |
|
1786 | 1786 | if self.specGraphftpPowerprofile.isChecked(): |
|
1787 | 1787 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1788 | 1788 | self.addFTPConf2Operation(puObj, opObj) |
|
1789 | 1789 | addFTP = True |
|
1790 | 1790 | # rti noise |
|
1791 | 1791 | |
|
1792 | 1792 | if self.specGraphCebRTInoise.isChecked(): |
|
1793 | 1793 | |
|
1794 | 1794 | opObj = puObj.addOperation(name='Noise', optype='other') |
|
1795 | 1795 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1796 | 1796 | |
|
1797 | 1797 | if not channelList == '': |
|
1798 | 1798 | if not isList(channelList): |
|
1799 | 1799 | self.console.append("Invalid channelList") |
|
1800 | 1800 | return 0 |
|
1801 | 1801 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1802 | 1802 | |
|
1803 | 1803 | # if not timerange == '': |
|
1804 | 1804 | # try: |
|
1805 | 1805 | # timerange = float(timerange) |
|
1806 | 1806 | # except: |
|
1807 | 1807 | # self.console.clear() |
|
1808 | 1808 | # self.console.append("Invalid time range") |
|
1809 | 1809 | # return 0 |
|
1810 | 1810 | # |
|
1811 | 1811 | # opObj.addParameter(name='timerange', value=timerange, format='float') |
|
1812 | 1812 | |
|
1813 | 1813 | if not trange == '': |
|
1814 | 1814 | xvalueList = trange.split(',') |
|
1815 | 1815 | try: |
|
1816 | 1816 | value1 = float(xvalueList[0]) |
|
1817 | 1817 | value2 = float(xvalueList[1]) |
|
1818 | 1818 | except: |
|
1819 | 1819 | self.console.clear() |
|
1820 | 1820 | self.console.append("Invalid time range") |
|
1821 | 1821 | return 0 |
|
1822 | 1822 | |
|
1823 | 1823 | opObj.addParameter(name='xmin', value=value1, format='float') |
|
1824 | 1824 | opObj.addParameter(name='xmax', value=value2, format='float') |
|
1825 | 1825 | |
|
1826 | 1826 | if not db_range == '': |
|
1827 | 1827 | yvalueList = db_range.split(",") |
|
1828 | 1828 | try: |
|
1829 | 1829 | value1 = float(yvalueList[0]) |
|
1830 | 1830 | value2 = float(yvalueList[1]) |
|
1831 | 1831 | except: |
|
1832 | 1832 | self.console.clear() |
|
1833 | 1833 | self.console.append("Invalid db range") |
|
1834 | 1834 | return 0 |
|
1835 | 1835 | |
|
1836 | 1836 | opObj.addParameter(name='ymin', value=value1, format='float') |
|
1837 | 1837 | opObj.addParameter(name='ymax', value=value2, format='float') |
|
1838 | 1838 | |
|
1839 | 1839 | if self.specGraphSaveRTInoise.isChecked(): |
|
1840 | 1840 | checkPath = True |
|
1841 | 1841 | opObj.addParameter(name='save', value='1', format='bool') |
|
1842 | 1842 | opObj.addParameter(name='figpath', value=figpath, format='str') |
|
1843 | 1843 | if figfile: |
|
1844 | 1844 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1845 | 1845 | if wrperiod: |
|
1846 | 1846 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') |
|
1847 | 1847 | |
|
1848 | 1848 | # test_ftp |
|
1849 | 1849 | if self.specGraphftpRTInoise.isChecked(): |
|
1850 | 1850 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1851 | 1851 | self.addFTPConf2Operation(puObj, opObj) |
|
1852 | 1852 | addFTP = True |
|
1853 | 1853 | |
|
1854 | 1854 | if checkPath: |
|
1855 | 1855 | if not figpath: |
|
1856 | 1856 | self.console.clear() |
|
1857 | 1857 | self.console.append("Graphic path should be defined") |
|
1858 | 1858 | return 0 |
|
1859 | 1859 | |
|
1860 | 1860 | if addFTP and not figpath: |
|
1861 | 1861 | self.console.clear() |
|
1862 | 1862 | self.console.append("You have to save the plots before sending them to FTP Server") |
|
1863 | 1863 | return 0 |
|
1864 | 1864 | |
|
1865 | 1865 | # if something happend |
|
1866 | 1866 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') |
|
1867 | 1867 | if parms_ok: |
|
1868 | 1868 | opObj = puObj.addOperation(name='SpectraWriter', optype='other') |
|
1869 | 1869 | opObj.addParameter(name='path', value=output_path) |
|
1870 | 1870 | opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int') |
|
1871 | 1871 | |
|
1872 | 1872 | self.console.clear() |
|
1873 | 1873 | try: |
|
1874 | 1874 | self.refreshPUProperties(puObj) |
|
1875 | 1875 | except: |
|
1876 | 1876 | self.console.append("An error reading input parameters was found ... Check them!") |
|
1877 | 1877 | return 0 |
|
1878 | 1878 | |
|
1879 | 1879 | self.console.append("Save your project and press Play button to start signal processing") |
|
1880 | 1880 | |
|
1881 | 1881 | self.actionSaveToolbar.setEnabled(True) |
|
1882 | 1882 | self.actionStarToolbar.setEnabled(True) |
|
1883 | 1883 | |
|
1884 | 1884 | return 1 |
|
1885 | 1885 | |
|
1886 | 1886 | """ |
|
1887 | 1887 | Spectra Graph |
|
1888 | 1888 | """ |
|
1889 | 1889 | @pyqtSignature("int") |
|
1890 | 1890 | def on_specGraphCebSpectraplot_stateChanged(self, p0): |
|
1891 | 1891 | |
|
1892 | 1892 | self.__checkSpecGraphFilters() |
|
1893 | 1893 | |
|
1894 | 1894 | |
|
1895 | 1895 | @pyqtSignature("int") |
|
1896 | 1896 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): |
|
1897 | 1897 | |
|
1898 | 1898 | self.__checkSpecGraphFilters() |
|
1899 | 1899 | |
|
1900 | 1900 | @pyqtSignature("int") |
|
1901 | 1901 | def on_specGraphCebRTIplot_stateChanged(self, p0): |
|
1902 | 1902 | |
|
1903 | 1903 | self.__checkSpecGraphFilters() |
|
1904 | 1904 | |
|
1905 | 1905 | |
|
1906 | 1906 | @pyqtSignature("int") |
|
1907 | 1907 | def on_specGraphCebRTInoise_stateChanged(self, p0): |
|
1908 | 1908 | |
|
1909 | 1909 | self.__checkSpecGraphFilters() |
|
1910 | 1910 | |
|
1911 | 1911 | |
|
1912 | 1912 | @pyqtSignature("int") |
|
1913 | 1913 | def on_specGraphCebCoherencmap_stateChanged(self, p0): |
|
1914 | 1914 | |
|
1915 | 1915 | self.__checkSpecGraphFilters() |
|
1916 | 1916 | |
|
1917 | 1917 | @pyqtSignature("int") |
|
1918 | 1918 | def on_specGraphPowerprofile_stateChanged(self, p0): |
|
1919 | 1919 | |
|
1920 | 1920 | self.__checkSpecGraphFilters() |
|
1921 | 1921 | |
|
1922 | 1922 | @pyqtSignature("int") |
|
1923 | 1923 | def on_specGraphPhase_stateChanged(self, p0): |
|
1924 | 1924 | |
|
1925 | 1925 | self.__checkSpecGraphFilters() |
|
1926 | 1926 | |
|
1927 | 1927 | @pyqtSignature("int") |
|
1928 | 1928 | def on_specGraphSaveSpectra_stateChanged(self, p0): |
|
1929 | 1929 | """ |
|
1930 | 1930 | """ |
|
1931 | 1931 | self.__checkSpecGraphSaving() |
|
1932 | 1932 | |
|
1933 | 1933 | @pyqtSignature("int") |
|
1934 | 1934 | def on_specGraphSaveCross_stateChanged(self, p0): |
|
1935 | 1935 | |
|
1936 | 1936 | self.__checkSpecGraphSaving() |
|
1937 | 1937 | |
|
1938 | 1938 | @pyqtSignature("int") |
|
1939 | 1939 | def on_specGraphSaveRTIplot_stateChanged(self, p0): |
|
1940 | 1940 | |
|
1941 | 1941 | self.__checkSpecGraphSaving() |
|
1942 | 1942 | |
|
1943 | 1943 | @pyqtSignature("int") |
|
1944 | 1944 | def on_specGraphSaveRTInoise_stateChanged(self, p0): |
|
1945 | 1945 | |
|
1946 | 1946 | self.__checkSpecGraphSaving() |
|
1947 | 1947 | |
|
1948 | 1948 | @pyqtSignature("int") |
|
1949 | 1949 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): |
|
1950 | 1950 | |
|
1951 | 1951 | self.__checkSpecGraphSaving() |
|
1952 | 1952 | |
|
1953 | 1953 | @pyqtSignature("int") |
|
1954 | 1954 | def on_specGraphSavePowerprofile_stateChanged(self, p0): |
|
1955 | 1955 | |
|
1956 | 1956 | self.__checkSpecGraphSaving() |
|
1957 | 1957 | |
|
1958 | 1958 | @pyqtSignature("int") |
|
1959 | 1959 | def on_specGraphftpSpectra_stateChanged(self, p0): |
|
1960 | 1960 | """ |
|
1961 | 1961 | """ |
|
1962 | 1962 | self.__checkSpecGraphFTP() |
|
1963 | 1963 | |
|
1964 | 1964 | |
|
1965 | 1965 | @pyqtSignature("int") |
|
1966 | 1966 | def on_specGraphftpCross_stateChanged(self, p0): |
|
1967 | 1967 | |
|
1968 | 1968 | self.__checkSpecGraphFTP() |
|
1969 | 1969 | |
|
1970 | 1970 | @pyqtSignature("int") |
|
1971 | 1971 | def on_specGraphftpRTIplot_stateChanged(self, p0): |
|
1972 | 1972 | |
|
1973 | 1973 | self.__checkSpecGraphFTP() |
|
1974 | 1974 | |
|
1975 | 1975 | @pyqtSignature("int") |
|
1976 | 1976 | def on_specGraphftpRTInoise_stateChanged(self, p0): |
|
1977 | 1977 | |
|
1978 | 1978 | self.__checkSpecGraphFTP() |
|
1979 | 1979 | |
|
1980 | 1980 | @pyqtSignature("int") |
|
1981 | 1981 | def on_specGraphftpCoherencemap_stateChanged(self, p0): |
|
1982 | 1982 | |
|
1983 | 1983 | self.__checkSpecGraphFTP() |
|
1984 | 1984 | |
|
1985 | 1985 | @pyqtSignature("int") |
|
1986 | 1986 | def on_specGraphftpPowerprofile_stateChanged(self, p0): |
|
1987 | 1987 | |
|
1988 | 1988 | self.__checkSpecGraphFTP() |
|
1989 | 1989 | |
|
1990 | 1990 | @pyqtSignature("") |
|
1991 | 1991 | def on_specGraphToolPath_clicked(self): |
|
1992 | 1992 | """ |
|
1993 | 1993 | """ |
|
1994 | 1994 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
1995 | 1995 | self.specGraphPath.setText(save_path) |
|
1996 | 1996 | if not os.path.exists(save_path): |
|
1997 | 1997 | self.console.clear() |
|
1998 | 1998 | self.console.append("Write a valid path") |
|
1999 | 1999 | return |
|
2000 | 2000 | |
|
2001 | 2001 | @pyqtSignature("") |
|
2002 | 2002 | def on_specGraphClear_clicked(self): |
|
2003 | 2003 | return |
|
2004 | 2004 | |
|
2005 | 2005 | @pyqtSignature("") |
|
2006 | 2006 | def on_specHeisGraphToolPath_clicked(self): |
|
2007 | 2007 | """ |
|
2008 | 2008 | """ |
|
2009 | 2009 | save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) |
|
2010 | 2010 | self.specHeisGraphPath.setText(save_path) |
|
2011 | 2011 | if not os.path.exists(save_path): |
|
2012 | 2012 | self.console.clear() |
|
2013 | 2013 | self.console.append("Write a valid path") |
|
2014 | 2014 | return |
|
2015 | 2015 | |
|
2016 | 2016 | @pyqtSignature("int") |
|
2017 | 2017 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): |
|
2018 | 2018 | """ |
|
2019 | 2019 | Habilita la opcion de a�adir el par�metro integraciones incoherentes a la Unidad de Procesamiento . |
|
2020 | 2020 | """ |
|
2021 | 2021 | if p0 == 2: |
|
2022 | 2022 | self.specHeisOpIncoherent.setEnabled(True) |
|
2023 | 2023 | self.specHeisOpCobIncInt.setEnabled(True) |
|
2024 | 2024 | if p0 == 0: |
|
2025 | 2025 | self.specHeisOpIncoherent.setEnabled(False) |
|
2026 | 2026 | self.specHeisOpCobIncInt.setEnabled(False) |
|
2027 | 2027 | |
|
2028 | 2028 | @pyqtSignature("") |
|
2029 | 2029 | def on_specHeisOpOk_clicked(self): |
|
2030 | 2030 | """ |
|
2031 | 2031 | AÑADE OPERACION SPECTRAHEIS |
|
2032 | 2032 | """ |
|
2033 | 2033 | addFTP = False |
|
2034 | 2034 | checkPath = False |
|
2035 | 2035 | |
|
2036 | 2036 | self.actionSaveToolbar.setEnabled(False) |
|
2037 | 2037 | self.actionStarToolbar.setEnabled(False) |
|
2038 | 2038 | |
|
2039 | 2039 | self.console.clear() |
|
2040 | 2040 | self.console.append("Checking input parameters ...") |
|
2041 | 2041 | |
|
2042 | 2042 | puObj = self.getSelectedItemObj() |
|
2043 | 2043 | puObj.removeOperations() |
|
2044 | 2044 | |
|
2045 | 2045 | if self.specHeisOpCebIncoherent.isChecked(): |
|
2046 | 2046 | value = str(self.specHeisOpIncoherent.text()) |
|
2047 | 2047 | name_operation = 'IncohInt4SpectraHeis' |
|
2048 | 2048 | optype = 'other' |
|
2049 | 2049 | |
|
2050 | 2050 | name_parameter = 'timeInterval' |
|
2051 | 2051 | format = 'float' |
|
2052 | 2052 | |
|
2053 | 2053 | if self.specOpCobIncInt.currentIndex() == 0: |
|
2054 | 2054 | name_parameter = 'timeInterval' |
|
2055 | 2055 | format = 'float' |
|
2056 | 2056 | |
|
2057 | 2057 | if not isFloat(value): |
|
2058 | 2058 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2059 | 2059 | return 0 |
|
2060 | 2060 | |
|
2061 | 2061 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2062 | 2062 | |
|
2063 | 2063 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
2064 | 2064 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2065 | 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 | 2073 | # ---- Spectra Plot----- |
|
2068 |
if self.specHeisGraphCebSpectraplot.isChecked(): |
|
|
2074 | if self.specHeisGraphCebSpectraplot.isChecked(): | |
|
2075 | ||
|
2069 | 2076 | name_operation = 'SpectraHeisScope' |
|
2070 | 2077 | optype = 'other' |
|
2078 | opObj = puObj.addOperation(name=name_operation, optype=optype) | |
|
2071 | 2079 | |
|
2072 | 2080 | name_parameter = 'id' |
|
2073 | 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 | 2082 | value = opObj.id |
|
2081 | 2083 | |
|
2082 | 2084 | if not opObj.addParameter(name=name_parameter, value=value, format=format): |
|
2083 | 2085 | self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter)) |
|
2084 | 2086 | return 0 |
|
2085 | 2087 | |
|
2086 | if not channelList == '': | |
|
2088 | if not (channelList == ''): | |
|
2087 | 2089 | name_parameter = 'channelList' |
|
2088 | 2090 | format = 'intlist' |
|
2089 | 2091 | |
|
2090 | 2092 | if not isList(channelList): |
|
2091 | 2093 | self.console.append("Invalid value '%s' for '%s'" %(channelList, name_parameter)) |
|
2092 | 2094 | return 0 |
|
2093 | 2095 | |
|
2094 | 2096 | opObj.addParameter(name=name_parameter, value=channelList, format=format) |
|
2095 | 2097 | |
|
2096 |
if not |
|
|
2097 |
xvalueList = |
|
|
2098 | if not freq_range == '': | |
|
2099 | xvalueList = freq_range.split(',') | |
|
2098 | 2100 | |
|
2099 | 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 | 2103 | return 0 |
|
2102 | 2104 | |
|
2103 | 2105 | value1 = xvalueList[0] |
|
2104 | 2106 | value2 = xvalueList[1] |
|
2105 | 2107 | |
|
2106 | 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 | 2110 | return 0 |
|
2109 | 2111 | |
|
2110 | 2112 | name1 = 'xmin' |
|
2111 | 2113 | name2 = 'xmax' |
|
2112 | 2114 | format = 'float' |
|
2113 | 2115 | |
|
2114 | 2116 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2115 | 2117 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2116 | 2118 | |
|
2117 | 2119 | #------specHeisGgraphYmin-Ymax--- |
|
2118 |
if not |
|
|
2119 |
yvalueList = |
|
|
2120 | if not power_range == '': | |
|
2121 | yvalueList = power_range.split(",") | |
|
2120 | 2122 | |
|
2121 | 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 | 2125 | return 0 |
|
2124 | 2126 | |
|
2125 | 2127 | value1 = yvalueList[0] |
|
2126 | 2128 | value2 = yvalueList[1] |
|
2127 | 2129 | |
|
2128 | 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 | 2132 | return 0 |
|
2131 | 2133 | |
|
2132 | 2134 | name1 = 'ymin' |
|
2133 | 2135 | name2 = 'ymax' |
|
2134 | 2136 | format = 'float' |
|
2135 | 2137 | opObj.addParameter(name=name1, value=value1, format=format) |
|
2136 | 2138 | opObj.addParameter(name=name2, value=value2, format=format) |
|
2137 | 2139 | |
|
2138 | 2140 | if self.specHeisGraphSaveSpectra.isChecked(): |
|
2139 | 2141 | checkPath = True |
|
2140 | 2142 | name_parameter1 = 'save' |
|
2141 | 2143 | name_parameter2 = 'figpath' |
|
2142 | 2144 | name_parameter3 = 'figfile' |
|
2143 | 2145 | value1 = '1' |
|
2144 | 2146 | value2 = str(self.specHeisGraphPath.text()) |
|
2145 | 2147 | value3 = str(self.specHeisGraphPrefix.text()) |
|
2146 | 2148 | format1 = 'bool' |
|
2147 | 2149 | format2 = 'str' |
|
2148 | 2150 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) |
|
2149 | 2151 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2150 | 2152 | if not value3 == "": |
|
2151 | 2153 | try: |
|
2152 | 2154 | value3 = str(self.specHeisGraphPrefix.text()) |
|
2153 | 2155 | except: |
|
2154 | 2156 | self.console.clear() |
|
2155 | 2157 | self.console.append("Please Write prefix") |
|
2156 | 2158 | return 0 |
|
2157 | 2159 | opObj.addParameter(name='figfile', value=str(self.specHeisGraphPrefix.text()), format='str') |
|
2158 | 2160 | |
|
2159 | 2161 | # opObj.addParameter(name=name_parameter3, value=value3, format=format2) |
|
2160 | 2162 | # opObj.addParameter(name='wr_period', value='5',format='int') |
|
2161 | 2163 | |
|
2162 | 2164 | if self.specHeisGraphftpSpectra.isChecked(): |
|
2163 | 2165 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2164 | 2166 | self.addFTPConf2Operation(puObj, opObj) |
|
2165 | 2167 | addFTP = True |
|
2166 | 2168 | |
|
2167 | 2169 | if self.specHeisGraphCebRTIplot.isChecked(): |
|
2168 | 2170 | name_operation = 'RTIfromSpectraHeis' |
|
2169 | 2171 | optype = 'other' |
|
2170 | 2172 | |
|
2171 | 2173 | name_parameter = 'id' |
|
2172 | 2174 | format = 'int' |
|
2173 | 2175 | |
|
2174 | 2176 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2175 | 2177 | value = opObj.id |
|
2176 | 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 | 2180 | if not channelList == '': |
|
2184 | 2181 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
2185 | 2182 | |
|
2186 |
if not |
|
|
2187 |
xvalueList = |
|
|
2183 | if not time_range == '': | |
|
2184 | xvalueList = time_range.split(',') | |
|
2188 | 2185 | try: |
|
2189 | 2186 | value = float(xvalueList[0]) |
|
2190 | 2187 | value = float(xvalueList[1]) |
|
2191 | 2188 | except: |
|
2192 | 2189 | return 0 |
|
2193 | 2190 | format = 'float' |
|
2194 | 2191 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
2195 | 2192 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
2196 | 2193 | |
|
2197 | 2194 | if not timerange == '': |
|
2198 | 2195 | format = 'int' |
|
2199 | 2196 | try: |
|
2200 | 2197 | timerange = int(timerange) |
|
2201 | 2198 | except: |
|
2202 | 2199 | return 0 |
|
2203 | 2200 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
2204 | 2201 | |
|
2205 | 2202 | |
|
2206 |
if not |
|
|
2207 |
yvalueList = |
|
|
2203 | if not power_range == '': | |
|
2204 | yvalueList = power_range.split(",") | |
|
2208 | 2205 | try: |
|
2209 | 2206 | value = float(yvalueList[0]) |
|
2210 | 2207 | value = float(yvalueList[1]) |
|
2211 | 2208 | except: |
|
2212 |
|
|
|
2209 | return 0 | |
|
2210 | ||
|
2213 | 2211 | format = 'float' |
|
2214 | 2212 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
2215 | 2213 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
2216 | 2214 | |
|
2217 | 2215 | if self.specHeisGraphSaveRTIplot.isChecked(): |
|
2218 | 2216 | checkPath = True |
|
2219 | 2217 | opObj.addParameter(name='save', value='1', format='bool') |
|
2220 | 2218 | opObj.addParameter(name='figpath', value=str(self.specHeisGraphPath.text()), format='str') |
|
2221 | 2219 | value = str(self.specHeisGraphPrefix.text()) |
|
2222 | 2220 | if not value == "": |
|
2223 | 2221 | try: |
|
2224 | 2222 | value = str(self.specHeisGraphPrefix.text()) |
|
2225 | 2223 | except: |
|
2226 | 2224 | self.console.clear() |
|
2227 | 2225 | self.console.append("Please Write prefix") |
|
2228 | 2226 | return 0 |
|
2229 | 2227 | opObj.addParameter(name='figfile', value=value, format='str') |
|
2230 | 2228 | |
|
2231 | 2229 | # test_ftp |
|
2232 | 2230 | if self.specHeisGraphftpRTIplot.isChecked(): |
|
2233 | 2231 | opObj.addParameter(name='ftp', value='1', format='int') |
|
2234 | 2232 | self.addFTPConf2Operation(puObj, opObj) |
|
2235 | 2233 | addFTP = True |
|
2236 | 2234 | |
|
2237 | 2235 | localfolder = None |
|
2238 | 2236 | if checkPath: |
|
2239 | 2237 | localfolder = str(self.specHeisGraphPath.text()) |
|
2240 | 2238 | if localfolder == '': |
|
2241 | 2239 | self.console.clear() |
|
2242 | 2240 | self.console.append("Graphic path should be defined") |
|
2243 | 2241 | return 0 |
|
2244 | 2242 | |
|
2245 | 2243 | if addFTP and not localfolder: |
|
2246 | 2244 | self.console.clear() |
|
2247 | 2245 | self.console.append("You should save plots before send them to FTP Server") |
|
2248 | 2246 | return 0 |
|
2249 | 2247 | |
|
2250 | 2248 | # if something happened |
|
2251 | 2249 | parms_ok, output_path, blocksperfile, metada = self.checkInputsPUSave(datatype='SpectraHeis') |
|
2252 | 2250 | if parms_ok: |
|
2253 | 2251 | name_operation = 'FitsWriter' |
|
2254 | 2252 | optype = 'other' |
|
2255 | 2253 | name_parameter1 = 'path' |
|
2256 | 2254 | name_parameter2 = 'dataBlocksPerFile' |
|
2257 | 2255 | name_parameter3 = 'metadatafile' |
|
2258 | 2256 | value1 = output_path |
|
2259 | 2257 | value2 = blocksperfile |
|
2260 | 2258 | value3 = metada |
|
2261 | 2259 | format2 = "int" |
|
2262 | 2260 | format3 = "str" |
|
2263 | 2261 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
2264 | 2262 | opObj.addParameter(name=name_parameter1, value=value1) |
|
2265 | 2263 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2266 | 2264 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) |
|
2267 | 2265 | |
|
2268 | 2266 | self.console.clear() |
|
2269 | 2267 | try: |
|
2270 | 2268 | self.refreshPUProperties(puObj) |
|
2271 | 2269 | except: |
|
2272 | 2270 | self.console.append("An error reading input parameters was found ... Check them!") |
|
2273 | 2271 | return 0 |
|
2274 | 2272 | |
|
2275 | 2273 | self.console.append("Save your project and press Play button to start signal processing") |
|
2276 | 2274 | |
|
2277 | 2275 | self.actionSaveToolbar.setEnabled(True) |
|
2278 | 2276 | self.actionStarToolbar.setEnabled(True) |
|
2279 | 2277 | |
|
2280 | 2278 | return 1 |
|
2281 | 2279 | @pyqtSignature("int") |
|
2282 | 2280 | def on_specHeisGraphCebSpectraplot_stateChanged(self, p0): |
|
2283 | 2281 | |
|
2284 | 2282 | if p0 == 2: |
|
2285 | 2283 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2286 | 2284 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
2287 | 2285 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2288 | 2286 | if p0 == 0: |
|
2289 | 2287 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
2290 | 2288 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2291 | 2289 | |
|
2292 | 2290 | @pyqtSignature("int") |
|
2293 | 2291 | def on_specHeisGraphCebRTIplot_stateChanged(self, p0): |
|
2294 | 2292 | |
|
2295 | 2293 | if p0 == 2: |
|
2296 | 2294 | self.specHeisGgraphChannelList.setEnabled(True) |
|
2297 | 2295 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
2298 | 2296 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
2299 | 2297 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
2300 | 2298 | |
|
2301 | 2299 | if p0 == 0: |
|
2302 | 2300 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
2303 | 2301 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
2304 | 2302 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
2305 | 2303 | |
|
2306 | 2304 | @pyqtSignature("int") |
|
2307 | 2305 | def on_specHeisGraphSaveSpectra_stateChanged(self, p0): |
|
2308 | 2306 | """ |
|
2309 | 2307 | """ |
|
2310 | 2308 | if p0 == 2: |
|
2311 | 2309 | self.specHeisGraphPath.setEnabled(True) |
|
2312 | 2310 | self.specHeisGraphPrefix.setEnabled(True) |
|
2313 | 2311 | self.specHeisGraphToolPath.setEnabled(True) |
|
2314 | 2312 | if p0 == 0: |
|
2315 | 2313 | self.specHeisGraphPath.setEnabled(False) |
|
2316 | 2314 | self.specHeisGraphPrefix.setEnabled(False) |
|
2317 | 2315 | self.specHeisGraphToolPath.setEnabled(False) |
|
2318 | 2316 | |
|
2319 | 2317 | @pyqtSignature("int") |
|
2320 | 2318 | def on_specHeisGraphSaveRTIplot_stateChanged(self, p0): |
|
2321 | 2319 | if p0 == 2: |
|
2322 | 2320 | self.specHeisGraphPath.setEnabled(True) |
|
2323 | 2321 | self.specHeisGraphPrefix.setEnabled(True) |
|
2324 | 2322 | self.specHeisGraphToolPath.setEnabled(True) |
|
2325 | 2323 | |
|
2326 | 2324 | @pyqtSignature("int") |
|
2327 | 2325 | def on_specHeisGraphftpSpectra_stateChanged(self, p0): |
|
2328 | 2326 | """ |
|
2329 | 2327 | """ |
|
2330 | 2328 | if p0 == 2: |
|
2331 | 2329 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2332 | 2330 | |
|
2333 | 2331 | if p0 == 0: |
|
2334 | 2332 | self.specHeisGgraphftpratio.setEnabled(False) |
|
2335 | 2333 | |
|
2336 | 2334 | @pyqtSignature("int") |
|
2337 | 2335 | def on_specHeisGraphftpRTIplot_stateChanged(self, p0): |
|
2338 | 2336 | if p0 == 2: |
|
2339 | 2337 | self.specHeisGgraphftpratio.setEnabled(True) |
|
2340 | 2338 | |
|
2341 | 2339 | @pyqtSignature("") |
|
2342 | 2340 | def on_specHeisGraphClear_clicked(self): |
|
2343 | 2341 | pass |
|
2344 | 2342 | |
|
2345 | 2343 | def __checkSpecGraphSaving(self): |
|
2346 | 2344 | |
|
2347 | 2345 | enable = False |
|
2348 | 2346 | |
|
2349 | 2347 | if self.specGraphSaveSpectra.checkState(): |
|
2350 | 2348 | enable = True |
|
2351 | 2349 | |
|
2352 | 2350 | if self.specGraphSaveCross.checkState(): |
|
2353 | 2351 | enable = True |
|
2354 | 2352 | |
|
2355 | 2353 | if self.specGraphSaveRTIplot.checkState(): |
|
2356 | 2354 | enable = True |
|
2357 | 2355 | |
|
2358 | 2356 | if self.specGraphSaveCoherencemap.checkState(): |
|
2359 | 2357 | enable = True |
|
2360 | 2358 | |
|
2361 | 2359 | if self.specGraphSavePowerprofile.checkState(): |
|
2362 | 2360 | enable = True |
|
2363 | 2361 | |
|
2364 | 2362 | if self.specGraphSaveRTInoise.checkState(): |
|
2365 | 2363 | enable = True |
|
2366 | 2364 | |
|
2367 | 2365 | self.specGraphPath.setEnabled(enable) |
|
2368 | 2366 | self.specGraphPrefix.setEnabled(enable) |
|
2369 | 2367 | self.specGraphToolPath.setEnabled(enable) |
|
2370 | 2368 | |
|
2371 | 2369 | self.specGgraphftpratio.setEnabled(enable) |
|
2372 | 2370 | |
|
2373 | 2371 | def __checkSpecGraphFTP(self): |
|
2374 | 2372 | |
|
2375 | 2373 | enable = False |
|
2376 | 2374 | |
|
2377 | 2375 | if self.specGraphftpSpectra.checkState(): |
|
2378 | 2376 | enable = True |
|
2379 | 2377 | |
|
2380 | 2378 | if self.specGraphftpCross.checkState(): |
|
2381 | 2379 | enable = True |
|
2382 | 2380 | |
|
2383 | 2381 | if self.specGraphftpRTIplot.checkState(): |
|
2384 | 2382 | enable = True |
|
2385 | 2383 | |
|
2386 | 2384 | if self.specGraphftpCoherencemap.checkState(): |
|
2387 | 2385 | enable = True |
|
2388 | 2386 | |
|
2389 | 2387 | if self.specGraphftpPowerprofile.checkState(): |
|
2390 | 2388 | enable = True |
|
2391 | 2389 | |
|
2392 | 2390 | if self.specGraphftpRTInoise.checkState(): |
|
2393 | 2391 | enable = True |
|
2394 | 2392 | |
|
2395 | 2393 | # self.specGgraphftpratio.setEnabled(enable) |
|
2396 | 2394 | |
|
2397 | 2395 | def __checkSpecGraphFilters(self): |
|
2398 | 2396 | |
|
2399 | 2397 | freq = False |
|
2400 | 2398 | height = False |
|
2401 | 2399 | db = False |
|
2402 | 2400 | time = False |
|
2403 | 2401 | magnitud = False |
|
2404 | 2402 | phase = False |
|
2405 | 2403 | channelList = False |
|
2406 | 2404 | |
|
2407 | 2405 | if self.specGraphCebSpectraplot.checkState(): |
|
2408 | 2406 | freq = True |
|
2409 | 2407 | height = True |
|
2410 | 2408 | db = True |
|
2411 | 2409 | channelList = True |
|
2412 | 2410 | |
|
2413 | 2411 | if self.specGraphCebCrossSpectraplot.checkState(): |
|
2414 | 2412 | freq = True |
|
2415 | 2413 | height = True |
|
2416 | 2414 | db = True |
|
2417 | 2415 | magnitud = True |
|
2418 | 2416 | phase = True |
|
2419 | 2417 | |
|
2420 | 2418 | if self.specGraphCebRTIplot.checkState(): |
|
2421 | 2419 | height = True |
|
2422 | 2420 | db = True |
|
2423 | 2421 | time = True |
|
2424 | 2422 | channelList = True |
|
2425 | 2423 | |
|
2426 | 2424 | if self.specGraphCebCoherencmap.checkState(): |
|
2427 | 2425 | height = True |
|
2428 | 2426 | time = True |
|
2429 | 2427 | magnitud = True |
|
2430 | 2428 | phase = True |
|
2431 | 2429 | |
|
2432 | 2430 | if self.specGraphPowerprofile.checkState(): |
|
2433 | 2431 | height = True |
|
2434 | 2432 | db = True |
|
2435 | 2433 | channelList = True |
|
2436 | 2434 | |
|
2437 | 2435 | if self.specGraphCebRTInoise.checkState(): |
|
2438 | 2436 | db = True |
|
2439 | 2437 | time = True |
|
2440 | 2438 | channelList = True |
|
2441 | 2439 | |
|
2442 | 2440 | |
|
2443 | 2441 | self.specGgraphFreq.setEnabled(freq) |
|
2444 | 2442 | self.specGgraphHeight.setEnabled(height) |
|
2445 | 2443 | self.specGgraphDbsrange.setEnabled(db) |
|
2446 | 2444 | self.specGgraphTminTmax.setEnabled(time) |
|
2447 | 2445 | |
|
2448 | 2446 | self.specGgraphmagnitud.setEnabled(magnitud) |
|
2449 | 2447 | self.specGgraphPhase.setEnabled(phase) |
|
2450 | 2448 | self.specGgraphChannelList.setEnabled(channelList) |
|
2451 | 2449 | |
|
2452 | 2450 | def __getParmsFromProjectWindow(self): |
|
2453 | 2451 | """ |
|
2454 | 2452 | Check Inputs Project: |
|
2455 | 2453 | - project_name |
|
2456 | 2454 | - datatype |
|
2457 | 2455 | - ext |
|
2458 | 2456 | - data_path |
|
2459 | 2457 | - readmode |
|
2460 | 2458 | - delay |
|
2461 | 2459 | - set |
|
2462 | 2460 | - walk |
|
2463 | 2461 | """ |
|
2464 | 2462 | parms_ok = True |
|
2465 | 2463 | |
|
2466 | 2464 | project_name = str(self.proName.text()) |
|
2467 | 2465 | |
|
2468 | 2466 | if project_name == '' or project_name == None: |
|
2469 | 2467 | outputstr = "Enter a project Name" |
|
2470 | 2468 | self.console.append(outputstr) |
|
2471 | 2469 | parms_ok = False |
|
2472 | 2470 | project_name = None |
|
2473 | 2471 | |
|
2474 | 2472 | description = str(self.proDescription.toPlainText()) |
|
2475 | 2473 | |
|
2476 | 2474 | datatype = str(self.proComDataType.currentText()) |
|
2477 | 2475 | |
|
2478 | 2476 | ext = str(self.proDataType.text()) |
|
2479 | 2477 | |
|
2480 | 2478 | dpath = str(self.proDataPath.text()) |
|
2481 | 2479 | |
|
2482 | 2480 | if dpath == '': |
|
2483 | 2481 | outputstr = 'Datapath is empty' |
|
2484 | 2482 | self.console.append(outputstr) |
|
2485 | 2483 | parms_ok = False |
|
2486 | 2484 | dpath = None |
|
2487 | 2485 | |
|
2488 | 2486 | if dpath != None: |
|
2489 | 2487 | if not os.path.isdir(dpath): |
|
2490 | 2488 | outputstr = 'Datapath (%s) does not exist' % dpath |
|
2491 | 2489 | self.console.append(outputstr) |
|
2492 | 2490 | parms_ok = False |
|
2493 | 2491 | dpath = None |
|
2494 | 2492 | |
|
2495 | 2493 | online = int(self.proComReadMode.currentIndex()) |
|
2496 | 2494 | |
|
2497 | 2495 | delay = None |
|
2498 | 2496 | if online==1: |
|
2499 | 2497 | try: |
|
2500 | 2498 | delay = int(str(self.proDelay.text())) |
|
2501 | 2499 | except: |
|
2502 | 2500 | outputstr = 'Delay value (%s) must be a integer number' %str(self.proDelay.text()) |
|
2503 | 2501 | self.console.append(outputstr) |
|
2504 | 2502 | parms_ok = False |
|
2505 | 2503 | |
|
2506 | 2504 | |
|
2507 | 2505 | set = None |
|
2508 | 2506 | value = str(self.proSet.text()) |
|
2509 | 2507 | try: |
|
2510 | 2508 | set = int(value) |
|
2511 | 2509 | except: |
|
2512 | 2510 | pass |
|
2513 | 2511 | |
|
2514 | 2512 | ippKm = None |
|
2515 | 2513 | |
|
2516 | 2514 | value = str(self.proIPPKm.text()) |
|
2517 | 2515 | |
|
2518 | 2516 | try: |
|
2519 | 2517 | ippKm = float(value) |
|
2520 | 2518 | except: |
|
2521 | 2519 | if datatype=="USRP": |
|
2522 | 2520 | outputstr = 'IPP value "%s" must be a float number' % str(self.proIPPKm.text()) |
|
2523 | 2521 | self.console.append(outputstr) |
|
2524 | 2522 | parms_ok = False |
|
2525 | 2523 | |
|
2526 | 2524 | walk = int(self.proComWalk.currentIndex()) |
|
2527 | 2525 | expLabel = str(self.proExpLabel.text()) |
|
2528 | 2526 | |
|
2529 | 2527 | startDate = str(self.proComStartDate.currentText()) |
|
2530 | 2528 | endDate = str(self.proComEndDate.currentText()) |
|
2531 | 2529 | |
|
2532 | 2530 | # startDateList = startDate.split("/") |
|
2533 | 2531 | # endDateList = endDate.split("/") |
|
2534 | 2532 | # |
|
2535 | 2533 | # startDate = datetime.date(int(startDateList[0]), int(startDateList[1]), int(startDateList[2])) |
|
2536 | 2534 | # endDate = datetime.date(int(endDateList[0]), int(endDateList[1]), int(endDateList[2])) |
|
2537 | 2535 | |
|
2538 | 2536 | startTime = self.proStartTime.time() |
|
2539 | 2537 | endTime = self.proEndTime.time() |
|
2540 | 2538 | |
|
2541 | 2539 | startTime = str(startTime.toString("H:m:s")) |
|
2542 | 2540 | endTime = str(endTime.toString("H:m:s")) |
|
2543 | 2541 | |
|
2544 | 2542 | projectParms = ProjectParms() |
|
2545 | 2543 | |
|
2546 | 2544 | projectParms.name = project_name |
|
2547 | 2545 | projectParms.description = description |
|
2548 | 2546 | projectParms.datatype = datatype |
|
2549 | 2547 | projectParms.ext = ext |
|
2550 | 2548 | projectParms.dpath = dpath |
|
2551 | 2549 | projectParms.online = online |
|
2552 | 2550 | projectParms.startDate = startDate |
|
2553 | 2551 | projectParms.endDate = endDate |
|
2554 | 2552 | projectParms.startTime = startTime |
|
2555 | 2553 | projectParms.endTime = endTime |
|
2556 | 2554 | projectParms.delay = delay |
|
2557 | 2555 | projectParms.walk = walk |
|
2558 | 2556 | projectParms.expLabel = expLabel |
|
2559 | 2557 | projectParms.set = set |
|
2560 | 2558 | projectParms.ippKm = ippKm |
|
2561 | 2559 | projectParms.parmsOk = parms_ok |
|
2562 | 2560 | |
|
2563 | 2561 | return projectParms |
|
2564 | 2562 | |
|
2565 | 2563 | |
|
2566 | 2564 | def __getParmsFromProjectObj(self, projectObjView): |
|
2567 | 2565 | |
|
2568 | 2566 | parms_ok = True |
|
2569 | 2567 | |
|
2570 | 2568 | project_name, description = projectObjView.name, projectObjView.description |
|
2571 | 2569 | |
|
2572 | 2570 | readUnitObj = projectObjView.getReadUnitObj() |
|
2573 | 2571 | datatype = readUnitObj.datatype |
|
2574 | 2572 | |
|
2575 | 2573 | operationObj = readUnitObj.getOperationObj(name='run') |
|
2576 | 2574 | |
|
2577 | 2575 | dpath = operationObj.getParameterValue(parameterName='path') |
|
2578 | 2576 | startDate = operationObj.getParameterValue(parameterName='startDate') |
|
2579 | 2577 | endDate = operationObj.getParameterValue(parameterName='endDate') |
|
2580 | 2578 | |
|
2581 | 2579 | startDate = startDate.strftime("%Y/%m/%d") |
|
2582 | 2580 | endDate = endDate.strftime("%Y/%m/%d") |
|
2583 | 2581 | |
|
2584 | 2582 | startTime = operationObj.getParameterValue(parameterName='startTime') |
|
2585 | 2583 | endTime = operationObj.getParameterValue(parameterName='endTime') |
|
2586 | 2584 | |
|
2587 | 2585 | startTime = startTime.strftime("%H:%M:%S") |
|
2588 | 2586 | endTime = endTime.strftime("%H:%M:%S") |
|
2589 | 2587 | |
|
2590 | 2588 | online = 0 |
|
2591 | 2589 | try: |
|
2592 | 2590 | online = operationObj.getParameterValue(parameterName='online') |
|
2593 | 2591 | except: |
|
2594 | 2592 | pass |
|
2595 | 2593 | |
|
2596 | 2594 | delay = '' |
|
2597 | 2595 | try: |
|
2598 | 2596 | delay = operationObj.getParameterValue(parameterName='delay') |
|
2599 | 2597 | except: |
|
2600 | 2598 | pass |
|
2601 | 2599 | |
|
2602 | 2600 | walk = 0 |
|
2603 | 2601 | try: |
|
2604 | 2602 | walk = operationObj.getParameterValue(parameterName='walk') |
|
2605 | 2603 | except: |
|
2606 | 2604 | pass |
|
2607 | 2605 | |
|
2608 | 2606 | set = '' |
|
2609 | 2607 | try: |
|
2610 | 2608 | set = operationObj.getParameterValue(parameterName='set') |
|
2611 | 2609 | except: |
|
2612 | 2610 | pass |
|
2613 | 2611 | |
|
2614 | 2612 | expLabel = '' |
|
2615 | 2613 | try: |
|
2616 | 2614 | expLabel = operationObj.getParameterValue(parameterName='expLabel') |
|
2617 | 2615 | except: |
|
2618 | 2616 | pass |
|
2619 | 2617 | |
|
2620 | 2618 | ippKm = '' |
|
2621 | 2619 | if datatype.lower() == 'usrp': |
|
2622 | 2620 | try: |
|
2623 | 2621 | ippKm = operationObj.getParameterValue(parameterName='ippKm') |
|
2624 | 2622 | except: |
|
2625 | 2623 | pass |
|
2626 | 2624 | |
|
2627 | 2625 | projectParms = ProjectParms() |
|
2628 | 2626 | |
|
2629 | 2627 | projectParms.name = project_name |
|
2630 | 2628 | projectParms.description = description |
|
2631 | 2629 | projectParms.datatype = datatype |
|
2632 | 2630 | projectParms.ext = None |
|
2633 | 2631 | projectParms.dpath = dpath |
|
2634 | 2632 | projectParms.online = online |
|
2635 | 2633 | projectParms.startDate = startDate |
|
2636 | 2634 | projectParms.endDate = endDate |
|
2637 | 2635 | projectParms.startTime = startTime |
|
2638 | 2636 | projectParms.endTime = endTime |
|
2639 | 2637 | projectParms.delay=delay |
|
2640 | 2638 | projectParms.walk=walk |
|
2641 | 2639 | projectParms.set=set |
|
2642 | 2640 | projectParms.ippKm=ippKm |
|
2643 | 2641 | projectParms.expLabel = expLabel |
|
2644 | 2642 | projectParms.parmsOk=parms_ok |
|
2645 | 2643 | |
|
2646 | 2644 | return projectParms |
|
2647 | 2645 | |
|
2648 | 2646 | def refreshProjectWindow(self, projectObjView): |
|
2649 | 2647 | |
|
2650 | 2648 | projectParms = self.__getParmsFromProjectObj(projectObjView) |
|
2651 | 2649 | |
|
2652 | 2650 | index = projectParms.getDatatypeIndex() |
|
2653 | 2651 | |
|
2654 | 2652 | self.proName.setText(projectParms.name) |
|
2655 | 2653 | self.proDescription.clear() |
|
2656 | 2654 | self.proDescription.append(projectParms.description) |
|
2657 | 2655 | |
|
2658 | 2656 | self.on_proComDataType_activated(index=index) |
|
2659 | 2657 | self.proDataPath.setText(projectParms.dpath) |
|
2660 | 2658 | self.proComDataType.setCurrentIndex(index) |
|
2661 | 2659 | self.proComReadMode.setCurrentIndex(projectParms.online) |
|
2662 | 2660 | self.proDelay.setText(str(projectParms.delay)) |
|
2663 | 2661 | self.proSet.setText(str(projectParms.set)) |
|
2664 | 2662 | self.proIPPKm.setText(str(projectParms.ippKm)) |
|
2665 | 2663 | self.proComWalk.setCurrentIndex(projectParms.walk) |
|
2666 | 2664 | self.proExpLabel.setText(str(projectParms.expLabel).strip()) |
|
2667 | 2665 | |
|
2668 | 2666 | dateList = self.loadDays(data_path = projectParms.dpath, |
|
2669 | 2667 | ext = projectParms.getExt(), |
|
2670 | 2668 | walk = projectParms.walk, |
|
2671 | 2669 | expLabel = projectParms.expLabel) |
|
2672 | 2670 | |
|
2673 | 2671 | try: |
|
2674 | 2672 | startDateIndex = dateList.index(projectParms.startDate) |
|
2675 | 2673 | except: |
|
2676 | 2674 | startDateIndex = 0 |
|
2677 | 2675 | |
|
2678 | 2676 | try: |
|
2679 | 2677 | endDateIndex = dateList.index(projectParms.endDate) |
|
2680 | 2678 | except: |
|
2681 | 2679 | endDateIndex = int(self.proComEndDate.count()-1) |
|
2682 | 2680 | |
|
2683 | 2681 | self.proComStartDate.setCurrentIndex(startDateIndex) |
|
2684 | 2682 | self.proComEndDate.setCurrentIndex(endDateIndex) |
|
2685 | 2683 | |
|
2686 | 2684 | startlist = projectParms.startTime.split(":") |
|
2687 | 2685 | endlist = projectParms.endTime.split(":") |
|
2688 | 2686 | |
|
2689 | 2687 | self.time.setHMS(int(startlist[0]), int(startlist[1]), int(startlist[2])) |
|
2690 | 2688 | self.proStartTime.setTime(self.time) |
|
2691 | 2689 | |
|
2692 | 2690 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
2693 | 2691 | self.proEndTime.setTime(self.time) |
|
2694 | 2692 | |
|
2695 | 2693 | |
|
2696 | 2694 | def __refreshVoltageWindow(self, puObj): |
|
2697 | 2695 | |
|
2698 | 2696 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2699 | 2697 | if opObj == None: |
|
2700 | 2698 | self.volOpRadarfrequency.clear() |
|
2701 | 2699 | self.volOpCebRadarfrequency.setCheckState(0) |
|
2702 | 2700 | else: |
|
2703 | 2701 | value = opObj.getParameterValue(parameterName='frequency') |
|
2704 | 2702 | value = str(float(value)/1e6) |
|
2705 | 2703 | self.volOpRadarfrequency.setText(value) |
|
2706 | 2704 | self.volOpRadarfrequency.setEnabled(True) |
|
2707 | 2705 | self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
2708 | 2706 | |
|
2709 | 2707 | opObj = puObj.getOperationObj(name="selectChannels") |
|
2710 | 2708 | |
|
2711 | 2709 | if opObj == None: |
|
2712 | 2710 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") |
|
2713 | 2711 | |
|
2714 | 2712 | if opObj == None: |
|
2715 | 2713 | self.volOpChannel.clear() |
|
2716 | 2714 | self.volOpCebChannels.setCheckState(0) |
|
2717 | 2715 | else: |
|
2718 | 2716 | channelEnabled = False |
|
2719 | 2717 | try: |
|
2720 | 2718 | value = opObj.getParameterValue(parameterName='channelList') |
|
2721 | 2719 | value = str(value)[1:-1] |
|
2722 | 2720 | channelEnabled = True |
|
2723 | 2721 | channelMode = 0 |
|
2724 | 2722 | except: |
|
2725 | 2723 | pass |
|
2726 | 2724 | try: |
|
2727 | 2725 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
2728 | 2726 | value = str(value)[1:-1] |
|
2729 | 2727 | channelEnabled = True |
|
2730 | 2728 | channelMode = 1 |
|
2731 | 2729 | except: |
|
2732 | 2730 | pass |
|
2733 | 2731 | |
|
2734 | 2732 | if channelEnabled: |
|
2735 | 2733 | self.volOpChannel.setText(value) |
|
2736 | 2734 | self.volOpChannel.setEnabled(True) |
|
2737 | 2735 | self.volOpCebChannels.setCheckState(QtCore.Qt.Checked) |
|
2738 | 2736 | self.volOpComChannels.setCurrentIndex(channelMode) |
|
2739 | 2737 | |
|
2740 | 2738 | opObj = puObj.getOperationObj(name="selectHeights") |
|
2741 | 2739 | if opObj == None: |
|
2742 | 2740 | self.volOpHeights.clear() |
|
2743 | 2741 | self.volOpCebHeights.setCheckState(0) |
|
2744 | 2742 | else: |
|
2745 | 2743 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
2746 | 2744 | value1 = str(value1) |
|
2747 | 2745 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
2748 | 2746 | value2 = str(value2) |
|
2749 | 2747 | value = value1 + "," + value2 |
|
2750 | 2748 | self.volOpHeights.setText(value) |
|
2751 | 2749 | self.volOpHeights.setEnabled(True) |
|
2752 | 2750 | self.volOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
2753 | 2751 | |
|
2754 | 2752 | opObj = puObj.getOperationObj(name="filterByHeights") |
|
2755 | 2753 | if opObj == None: |
|
2756 | 2754 | self.volOpFilter.clear() |
|
2757 | 2755 | self.volOpCebFilter.setCheckState(0) |
|
2758 | 2756 | else: |
|
2759 | 2757 | value = opObj.getParameterValue(parameterName='window') |
|
2760 | 2758 | value = str(value) |
|
2761 | 2759 | self.volOpFilter.setText(value) |
|
2762 | 2760 | self.volOpFilter.setEnabled(True) |
|
2763 | 2761 | self.volOpCebFilter.setCheckState(QtCore.Qt.Checked) |
|
2764 | 2762 | |
|
2765 | 2763 | opObj = puObj.getOperationObj(name="ProfileSelector") |
|
2766 | 2764 | if opObj == None: |
|
2767 | 2765 | self.volOpProfile.clear() |
|
2768 | 2766 | self.volOpCebProfile.setCheckState(0) |
|
2769 | 2767 | else: |
|
2770 | 2768 | for parmObj in opObj.getParameterObjList(): |
|
2771 | 2769 | |
|
2772 | 2770 | if parmObj.name == "profileList": |
|
2773 | 2771 | value = parmObj.getValue() |
|
2774 | 2772 | value = str(value)[1:-1] |
|
2775 | 2773 | self.volOpProfile.setText(value) |
|
2776 | 2774 | self.volOpProfile.setEnabled(True) |
|
2777 | 2775 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2778 | 2776 | self.volOpComProfile.setCurrentIndex(0) |
|
2779 | 2777 | |
|
2780 | 2778 | if parmObj.name == "profileRangeList": |
|
2781 | 2779 | value = parmObj.getValue() |
|
2782 | 2780 | value = str(value)[1:-1] |
|
2783 | 2781 | self.volOpProfile.setText(value) |
|
2784 | 2782 | self.volOpProfile.setEnabled(True) |
|
2785 | 2783 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2786 | 2784 | self.volOpComProfile.setCurrentIndex(1) |
|
2787 | 2785 | |
|
2788 | 2786 | if parmObj.name == "rangeList": |
|
2789 | 2787 | value = parmObj.getValue() |
|
2790 | 2788 | value = str(value)[1:-1] |
|
2791 | 2789 | self.volOpProfile.setText(value) |
|
2792 | 2790 | self.volOpProfile.setEnabled(True) |
|
2793 | 2791 | self.volOpCebProfile.setCheckState(QtCore.Qt.Checked) |
|
2794 | 2792 | self.volOpComProfile.setCurrentIndex(2) |
|
2795 | 2793 | |
|
2796 | 2794 | opObj = puObj.getOperationObj(name="Decoder") |
|
2797 | 2795 | self.volOpCode.setText("") |
|
2798 | 2796 | if opObj == None: |
|
2799 | 2797 | self.volOpCebDecodification.setCheckState(0) |
|
2800 | 2798 | else: |
|
2801 | 2799 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) |
|
2802 | 2800 | |
|
2803 | 2801 | parmObj = opObj.getParameterObj('code') |
|
2804 | 2802 | |
|
2805 | 2803 | if parmObj == None: |
|
2806 | 2804 | self.volOpComCode.setCurrentIndex(0) |
|
2807 | 2805 | else: |
|
2808 | 2806 | |
|
2809 | 2807 | parmObj1 = opObj.getParameterObj('nCode') |
|
2810 | 2808 | parmObj2 = opObj.getParameterObj('nBaud') |
|
2811 | 2809 | |
|
2812 | 2810 | if parmObj1 == None or parmObj2 == None: |
|
2813 | 2811 | self.volOpComCode.setCurrentIndex(0) |
|
2814 | 2812 | else: |
|
2815 | 2813 | code = ast.literal_eval(str(parmObj.getValue())) |
|
2816 | 2814 | nCode = parmObj1.getValue() |
|
2817 | 2815 | nBaud = parmObj2.getValue() |
|
2818 | 2816 | |
|
2819 | 2817 | code = numpy.asarray(code).reshape((nCode, nBaud)).tolist() |
|
2820 | 2818 | |
|
2821 | 2819 | #User defined by default |
|
2822 | 2820 | self.volOpComCode.setCurrentIndex(13) |
|
2823 | 2821 | self.volOpCode.setText(str(code)) |
|
2824 | 2822 | |
|
2825 | 2823 | if nCode == 1: |
|
2826 | 2824 | if nBaud == 3: |
|
2827 | 2825 | self.volOpComCode.setCurrentIndex(1) |
|
2828 | 2826 | if nBaud == 4: |
|
2829 | 2827 | self.volOpComCode.setCurrentIndex(2) |
|
2830 | 2828 | if nBaud == 5: |
|
2831 | 2829 | self.volOpComCode.setCurrentIndex(3) |
|
2832 | 2830 | if nBaud == 7: |
|
2833 | 2831 | self.volOpComCode.setCurrentIndex(4) |
|
2834 | 2832 | if nBaud == 11: |
|
2835 | 2833 | self.volOpComCode.setCurrentIndex(5) |
|
2836 | 2834 | if nBaud == 13: |
|
2837 | 2835 | self.volOpComCode.setCurrentIndex(6) |
|
2838 | 2836 | |
|
2839 | 2837 | if nCode == 2: |
|
2840 | 2838 | if nBaud == 3: |
|
2841 | 2839 | self.volOpComCode.setCurrentIndex(7) |
|
2842 | 2840 | if nBaud == 4: |
|
2843 | 2841 | self.volOpComCode.setCurrentIndex(8) |
|
2844 | 2842 | if nBaud == 5: |
|
2845 | 2843 | self.volOpComCode.setCurrentIndex(9) |
|
2846 | 2844 | if nBaud == 7: |
|
2847 | 2845 | self.volOpComCode.setCurrentIndex(10) |
|
2848 | 2846 | if nBaud == 11: |
|
2849 | 2847 | self.volOpComCode.setCurrentIndex(11) |
|
2850 | 2848 | if nBaud == 13: |
|
2851 | 2849 | self.volOpComCode.setCurrentIndex(12) |
|
2852 | 2850 | |
|
2853 | 2851 | |
|
2854 | 2852 | opObj = puObj.getOperationObj(name="deFlip") |
|
2855 | 2853 | if opObj == None: |
|
2856 | 2854 | self.volOpFlip.clear() |
|
2857 | 2855 | self.volOpFlip.setEnabled(False) |
|
2858 | 2856 | self.volOpCebFlip.setCheckState(0) |
|
2859 | 2857 | else: |
|
2860 | 2858 | try: |
|
2861 | 2859 | value = opObj.getParameterValue(parameterName='channelList') |
|
2862 | 2860 | value = str(value)[1:-1] |
|
2863 | 2861 | except: |
|
2864 | 2862 | value = "" |
|
2865 | 2863 | |
|
2866 | 2864 | self.volOpFlip.setText(value) |
|
2867 | 2865 | self.volOpFlip.setEnabled(True) |
|
2868 | 2866 | self.volOpCebFlip.setCheckState(QtCore.Qt.Checked) |
|
2869 | 2867 | |
|
2870 | 2868 | opObj = puObj.getOperationObj(name="CohInt") |
|
2871 | 2869 | if opObj == None: |
|
2872 | 2870 | self.volOpCohInt.clear() |
|
2873 | 2871 | self.volOpCebCohInt.setCheckState(0) |
|
2874 | 2872 | else: |
|
2875 | 2873 | value = opObj.getParameterValue(parameterName='n') |
|
2876 | 2874 | self.volOpCohInt.setText(str(value)) |
|
2877 | 2875 | self.volOpCohInt.setEnabled(True) |
|
2878 | 2876 | self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked) |
|
2879 | 2877 | |
|
2880 | 2878 | opObj = puObj.getOperationObj(name='Scope') |
|
2881 | 2879 | if opObj == None: |
|
2882 | 2880 | self.volGraphCebshow.setCheckState(0) |
|
2883 | 2881 | else: |
|
2884 | 2882 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) |
|
2885 | 2883 | |
|
2886 | 2884 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
2887 | 2885 | |
|
2888 | 2886 | if parmObj == None: |
|
2889 | 2887 | self.volGraphChannelList.clear() |
|
2890 | 2888 | else: |
|
2891 | 2889 | value = parmObj.getValue() |
|
2892 | 2890 | value = str(value) |
|
2893 | 2891 | self.volGraphChannelList.setText(value) |
|
2894 | 2892 | self.volOpProfile.setEnabled(True) |
|
2895 | 2893 | |
|
2896 | 2894 | parmObj1 = opObj.getParameterObj(parameterName='xmin') |
|
2897 | 2895 | parmObj2 = opObj.getParameterObj(parameterName='xmax') |
|
2898 | 2896 | |
|
2899 | 2897 | if parmObj1 == None or parmObj2 ==None: |
|
2900 | 2898 | self.volGraphfreqrange.clear() |
|
2901 | 2899 | else: |
|
2902 | 2900 | value1 = parmObj1.getValue() |
|
2903 | 2901 | value1 = str(value1) |
|
2904 | 2902 | value2 = parmObj2.getValue() |
|
2905 | 2903 | value2 = str(value2) |
|
2906 | 2904 | value = value1 + "," + value2 |
|
2907 | 2905 | self.volGraphfreqrange.setText(value) |
|
2908 | 2906 | |
|
2909 | 2907 | parmObj1 = opObj.getParameterObj(parameterName='ymin') |
|
2910 | 2908 | parmObj2 = opObj.getParameterObj(parameterName='ymax') |
|
2911 | 2909 | |
|
2912 | 2910 | if parmObj1 == None or parmObj2 ==None: |
|
2913 | 2911 | self.volGraphHeightrange.clear() |
|
2914 | 2912 | else: |
|
2915 | 2913 | value1 = parmObj1.getValue() |
|
2916 | 2914 | value1 = str(value1) |
|
2917 | 2915 | value2 = parmObj2.getValue() |
|
2918 | 2916 | value2 = str(value2) |
|
2919 | 2917 | value = value1 + "," + value2 |
|
2920 | 2918 | value2 = str(value2) |
|
2921 | 2919 | self.volGraphHeightrange.setText(value) |
|
2922 | 2920 | |
|
2923 | 2921 | parmObj = opObj.getParameterObj(parameterName='save') |
|
2924 | 2922 | |
|
2925 | 2923 | if parmObj == None: |
|
2926 | 2924 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
2927 | 2925 | else: |
|
2928 | 2926 | value = parmObj.getValue() |
|
2929 | 2927 | if int(value): |
|
2930 | 2928 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) |
|
2931 | 2929 | else: |
|
2932 | 2930 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
2933 | 2931 | |
|
2934 | 2932 | parmObj = opObj.getParameterObj(parameterName='figpath') |
|
2935 | 2933 | if parmObj == None: |
|
2936 | 2934 | self.volGraphPath.clear() |
|
2937 | 2935 | else: |
|
2938 | 2936 | value = parmObj.getValue() |
|
2939 | 2937 | path = str(value) |
|
2940 | 2938 | self.volGraphPath.setText(path) |
|
2941 | 2939 | |
|
2942 | 2940 | parmObj = opObj.getParameterObj(parameterName='figfile') |
|
2943 | 2941 | if parmObj == None: |
|
2944 | 2942 | self.volGraphPrefix.clear() |
|
2945 | 2943 | else: |
|
2946 | 2944 | value = parmObj.getValue() |
|
2947 | 2945 | figfile = str(value) |
|
2948 | 2946 | self.volGraphPrefix.setText(figfile) |
|
2949 | 2947 | |
|
2950 | 2948 | # outputVoltageWrite |
|
2951 | 2949 | opObj = puObj.getOperationObj(name='VoltageWriter') |
|
2952 | 2950 | |
|
2953 | 2951 | if opObj == None: |
|
2954 | 2952 | self.volOutputPath.clear() |
|
2955 | 2953 | self.volOutputblocksperfile.clear() |
|
2956 | 2954 | self.volOutputprofilesperblock.clear() |
|
2957 | 2955 | else: |
|
2958 | 2956 | parmObj = opObj.getParameterObj(parameterName='path') |
|
2959 | 2957 | if parmObj == None: |
|
2960 | 2958 | self.volOutputPath.clear() |
|
2961 | 2959 | else: |
|
2962 | 2960 | value = parmObj.getValue() |
|
2963 | 2961 | path = str(value) |
|
2964 | 2962 | self.volOutputPath.setText(path) |
|
2965 | 2963 | |
|
2966 | 2964 | parmObj = opObj.getParameterObj(parameterName='blocksPerFile') |
|
2967 | 2965 | if parmObj == None: |
|
2968 | 2966 | self.volOutputblocksperfile.clear() |
|
2969 | 2967 | else: |
|
2970 | 2968 | value = parmObj.getValue() |
|
2971 | 2969 | blocksperfile = str(value) |
|
2972 | 2970 | self.volOutputblocksperfile.setText(blocksperfile) |
|
2973 | 2971 | |
|
2974 | 2972 | parmObj = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
2975 | 2973 | if parmObj == None: |
|
2976 | 2974 | self.volOutputprofilesperblock.clear() |
|
2977 | 2975 | else: |
|
2978 | 2976 | value = parmObj.getValue() |
|
2979 | 2977 | profilesPerBlock = str(value) |
|
2980 | 2978 | self.volOutputprofilesperblock.setText(profilesPerBlock) |
|
2981 | 2979 | |
|
2982 | 2980 | return |
|
2983 | 2981 | |
|
2984 | 2982 | def __refreshSpectraWindow(self, puObj): |
|
2985 | 2983 | |
|
2986 | 2984 | inputId = puObj.getInputId() |
|
2987 | 2985 | inputPUObj = self.__puObjDict[inputId] |
|
2988 | 2986 | |
|
2989 | 2987 | if inputPUObj.datatype == 'Voltage': |
|
2990 | 2988 | self.specOpnFFTpoints.setEnabled(True) |
|
2991 | 2989 | self.specOpProfiles.setEnabled(True) |
|
2992 | 2990 | self.specOpippFactor.setEnabled(True) |
|
2993 | 2991 | else: |
|
2994 | 2992 | self.specOpnFFTpoints.setEnabled(False) |
|
2995 | 2993 | self.specOpProfiles.setEnabled(False) |
|
2996 | 2994 | self.specOpippFactor.setEnabled(False) |
|
2997 | 2995 | |
|
2998 | 2996 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2999 | 2997 | if opObj == None: |
|
3000 | 2998 | self.specOpRadarfrequency.clear() |
|
3001 | 2999 | self.specOpCebRadarfrequency.setCheckState(0) |
|
3002 | 3000 | else: |
|
3003 | 3001 | value = opObj.getParameterValue(parameterName='frequency') |
|
3004 | 3002 | value = str(float(value)/1e6) |
|
3005 | 3003 | self.specOpRadarfrequency.setText(value) |
|
3006 | 3004 | self.specOpRadarfrequency.setEnabled(True) |
|
3007 | 3005 | self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked) |
|
3008 | 3006 | |
|
3009 | 3007 | opObj = puObj.getOperationObj(name="run") |
|
3010 | 3008 | if opObj == None: |
|
3011 | 3009 | self.specOpnFFTpoints.clear() |
|
3012 | 3010 | self.specOpProfiles.clear() |
|
3013 | 3011 | self.specOpippFactor.clear() |
|
3014 | 3012 | else: |
|
3015 | 3013 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
3016 | 3014 | if parmObj == None: |
|
3017 | 3015 | self.specOpnFFTpoints.clear() |
|
3018 | 3016 | else: |
|
3019 | 3017 | self.specOpnFFTpoints.setEnabled(True) |
|
3020 | 3018 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
3021 | 3019 | self.specOpnFFTpoints.setText(str(value)) |
|
3022 | 3020 | |
|
3023 | 3021 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
3024 | 3022 | if parmObj == None: |
|
3025 | 3023 | self.specOpProfiles.clear() |
|
3026 | 3024 | else: |
|
3027 | 3025 | self.specOpProfiles.setEnabled(True) |
|
3028 | 3026 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
3029 | 3027 | self.specOpProfiles.setText(str(value)) |
|
3030 | 3028 | |
|
3031 | 3029 | parmObj = opObj.getParameterObj(parameterName='ippFactor') |
|
3032 | 3030 | if parmObj == None: |
|
3033 | 3031 | self.specOpippFactor.clear() |
|
3034 | 3032 | else: |
|
3035 | 3033 | self.specOpippFactor.setEnabled(True) |
|
3036 | 3034 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
3037 | 3035 | self.specOpippFactor.setText(str(value)) |
|
3038 | 3036 | |
|
3039 | 3037 | opObj = puObj.getOperationObj(name="run") |
|
3040 | 3038 | if opObj == None: |
|
3041 | 3039 | self.specOppairsList.clear() |
|
3042 | 3040 | self.specOpCebCrossSpectra.setCheckState(0) |
|
3043 | 3041 | else: |
|
3044 | 3042 | parmObj = opObj.getParameterObj(parameterName='pairsList') |
|
3045 | 3043 | if parmObj == None: |
|
3046 | 3044 | self.specOppairsList.clear() |
|
3047 | 3045 | self.specOpCebCrossSpectra.setCheckState(0) |
|
3048 | 3046 | else: |
|
3049 | 3047 | value = opObj.getParameterValue(parameterName='pairsList') |
|
3050 | 3048 | value = str(value)[1:-1] |
|
3051 | 3049 | self.specOppairsList.setText(str(value)) |
|
3052 | 3050 | self.specOppairsList.setEnabled(True) |
|
3053 | 3051 | self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked) |
|
3054 | 3052 | |
|
3055 | 3053 | opObj = puObj.getOperationObj(name="selectChannels") |
|
3056 | 3054 | |
|
3057 | 3055 | if opObj == None: |
|
3058 | 3056 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") |
|
3059 | 3057 | |
|
3060 | 3058 | if opObj == None: |
|
3061 | 3059 | self.specOpChannel.clear() |
|
3062 | 3060 | self.specOpCebChannel.setCheckState(0) |
|
3063 | 3061 | else: |
|
3064 | 3062 | channelEnabled = False |
|
3065 | 3063 | try: |
|
3066 | 3064 | value = opObj.getParameterValue(parameterName='channelList') |
|
3067 | 3065 | value = str(value)[1:-1] |
|
3068 | 3066 | channelEnabled = True |
|
3069 | 3067 | channelMode = 0 |
|
3070 | 3068 | except: |
|
3071 | 3069 | pass |
|
3072 | 3070 | try: |
|
3073 | 3071 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
3074 | 3072 | value = str(value)[1:-1] |
|
3075 | 3073 | channelEnabled = True |
|
3076 | 3074 | channelMode = 1 |
|
3077 | 3075 | except: |
|
3078 | 3076 | pass |
|
3079 | 3077 | |
|
3080 | 3078 | if channelEnabled: |
|
3081 | 3079 | self.specOpChannel.setText(value) |
|
3082 | 3080 | self.specOpChannel.setEnabled(True) |
|
3083 | 3081 | self.specOpCebChannel.setCheckState(QtCore.Qt.Checked) |
|
3084 | 3082 | self.specOpComChannel.setCurrentIndex(channelMode) |
|
3085 | 3083 | |
|
3086 | 3084 | opObj = puObj.getOperationObj(name="selectHeights") |
|
3087 | 3085 | if opObj == None: |
|
3088 | 3086 | self.specOpHeights.clear() |
|
3089 | 3087 | self.specOpCebHeights.setCheckState(0) |
|
3090 | 3088 | else: |
|
3091 | 3089 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
3092 | 3090 | value1 = str(value1) |
|
3093 | 3091 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
3094 | 3092 | value2 = str(value2) |
|
3095 | 3093 | value = value1 + "," + value2 |
|
3096 | 3094 | self.specOpHeights.setText(value) |
|
3097 | 3095 | self.specOpHeights.setEnabled(True) |
|
3098 | 3096 | self.specOpCebHeights.setCheckState(QtCore.Qt.Checked) |
|
3099 | 3097 | |
|
3100 | 3098 | opObj = puObj.getOperationObj(name="IncohInt") |
|
3101 | 3099 | if opObj == None: |
|
3102 | 3100 | self.specOpIncoherent.clear() |
|
3103 | 3101 | self.specOpCebIncoherent.setCheckState(0) |
|
3104 | 3102 | else: |
|
3105 | 3103 | for parmObj in opObj.getParameterObjList(): |
|
3106 | 3104 | if parmObj.name == 'timeInterval': |
|
3107 | 3105 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
3108 | 3106 | value = float(value) |
|
3109 | 3107 | self.specOpIncoherent.setText(str(value)) |
|
3110 | 3108 | self.specOpIncoherent.setEnabled(True) |
|
3111 | 3109 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3112 | 3110 | self.specOpCobIncInt.setCurrentIndex(0) |
|
3113 | 3111 | |
|
3114 | 3112 | if parmObj.name == 'n': |
|
3115 | 3113 | value = opObj.getParameterValue(parameterName='n') |
|
3116 | 3114 | value = float(value) |
|
3117 | 3115 | self.specOpIncoherent.setText(str(value)) |
|
3118 | 3116 | self.specOpIncoherent.setEnabled(True) |
|
3119 | 3117 | self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3120 | 3118 | self.specOpCobIncInt.setCurrentIndex(1) |
|
3121 | 3119 | |
|
3122 | 3120 | opObj = puObj.getOperationObj(name="removeDC") |
|
3123 | 3121 | if opObj == None: |
|
3124 | 3122 | self.specOpCebRemoveDC.setCheckState(0) |
|
3125 | 3123 | else: |
|
3126 | 3124 | self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked) |
|
3127 | 3125 | value = opObj.getParameterValue(parameterName='mode') |
|
3128 | 3126 | if value == 1: |
|
3129 | 3127 | self.specOpComRemoveDC.setCurrentIndex(0) |
|
3130 | 3128 | elif value == 2: |
|
3131 | 3129 | self.specOpComRemoveDC.setCurrentIndex(1) |
|
3132 | 3130 | |
|
3133 | 3131 | opObj = puObj.getOperationObj(name="removeInterference") |
|
3134 | 3132 | if opObj == None: |
|
3135 | 3133 | self.specOpCebRemoveInt.setCheckState(0) |
|
3136 | 3134 | else: |
|
3137 | 3135 | self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked) |
|
3138 | 3136 | |
|
3139 | 3137 | opObj = puObj.getOperationObj(name='getNoise') |
|
3140 | 3138 | if opObj == None: |
|
3141 | 3139 | self.specOpCebgetNoise.setCheckState(0) |
|
3142 | 3140 | self.specOpgetNoise.clear() |
|
3143 | 3141 | else: |
|
3144 | 3142 | self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked) |
|
3145 | 3143 | parmObj = opObj.getParameterObj(parameterName='minHei') |
|
3146 | 3144 | if parmObj == None: |
|
3147 | 3145 | self.specOpgetNoise.clear() |
|
3148 | 3146 | value1 = None |
|
3149 | 3147 | else: |
|
3150 | 3148 | value1 = opObj.getParameterValue(parameterName='minHei') |
|
3151 | 3149 | value1 = str(value1) |
|
3152 | 3150 | parmObj = opObj.getParameterObj(parameterName='maxHei') |
|
3153 | 3151 | if parmObj == None: |
|
3154 | 3152 | value2 = None |
|
3155 | 3153 | value = value1 |
|
3156 | 3154 | self.specOpgetNoise.setText(value) |
|
3157 | 3155 | self.specOpgetNoise.setEnabled(True) |
|
3158 | 3156 | else: |
|
3159 | 3157 | value2 = opObj.getParameterValue(parameterName='maxHei') |
|
3160 | 3158 | value2 = str(value2) |
|
3161 | 3159 | parmObj = opObj.getParameterObj(parameterName='minVel') |
|
3162 | 3160 | if parmObj == None: |
|
3163 | 3161 | value3 = None |
|
3164 | 3162 | value = value1 + "," + value2 |
|
3165 | 3163 | self.specOpgetNoise.setText(value) |
|
3166 | 3164 | self.specOpgetNoise.setEnabled(True) |
|
3167 | 3165 | else: |
|
3168 | 3166 | value3 = opObj.getParameterValue(parameterName='minVel') |
|
3169 | 3167 | value3 = str(value3) |
|
3170 | 3168 | parmObj = opObj.getParameterObj(parameterName='maxVel') |
|
3171 | 3169 | if parmObj == None: |
|
3172 | 3170 | value4 = None |
|
3173 | 3171 | value = value1 + "," + value2 + "," + value3 |
|
3174 | 3172 | self.specOpgetNoise.setText(value) |
|
3175 | 3173 | self.specOpgetNoise.setEnabled(True) |
|
3176 | 3174 | else: |
|
3177 | 3175 | value4 = opObj.getParameterValue(parameterName='maxVel') |
|
3178 | 3176 | value4 = str(value4) |
|
3179 | 3177 | value = value1 + "," + value2 + "," + value3 + ',' + value4 |
|
3180 | 3178 | self.specOpgetNoise.setText(value) |
|
3181 | 3179 | self.specOpgetNoise.setEnabled(True) |
|
3182 | 3180 | |
|
3183 | 3181 | self.specGraphPath.clear() |
|
3184 | 3182 | self.specGraphPrefix.clear() |
|
3185 | 3183 | self.specGgraphFreq.clear() |
|
3186 | 3184 | self.specGgraphHeight.clear() |
|
3187 | 3185 | self.specGgraphDbsrange.clear() |
|
3188 | 3186 | self.specGgraphmagnitud.clear() |
|
3189 | 3187 | self.specGgraphPhase.clear() |
|
3190 | 3188 | self.specGgraphChannelList.clear() |
|
3191 | 3189 | self.specGgraphTminTmax.clear() |
|
3192 | 3190 | self.specGgraphTimeRange.clear() |
|
3193 | 3191 | self.specGgraphftpratio.clear() |
|
3194 | 3192 | |
|
3195 | 3193 | opObj = puObj.getOperationObj(name='SpectraPlot') |
|
3196 | 3194 | |
|
3197 | 3195 | if opObj == None: |
|
3198 | 3196 | self.specGraphCebSpectraplot.setCheckState(0) |
|
3199 | 3197 | self.specGraphSaveSpectra.setCheckState(0) |
|
3200 | 3198 | self.specGraphftpSpectra.setCheckState(0) |
|
3201 | 3199 | else: |
|
3202 | 3200 | operationSpectraPlot = "Enable" |
|
3203 | 3201 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3204 | 3202 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3205 | 3203 | if parmObj == None: |
|
3206 | 3204 | self.specGgraphChannelList.clear() |
|
3207 | 3205 | else: |
|
3208 | 3206 | value = opObj.getParameterValue(parameterName='channelList') |
|
3209 | 3207 | channelListSpectraPlot = str(value)[1:-1] |
|
3210 | 3208 | self.specGgraphChannelList.setText(channelListSpectraPlot) |
|
3211 | 3209 | self.specGgraphChannelList.setEnabled(True) |
|
3212 | 3210 | |
|
3213 | 3211 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3214 | 3212 | if parmObj == None: |
|
3215 | 3213 | self.specGgraphFreq.clear() |
|
3216 | 3214 | else: |
|
3217 | 3215 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3218 | 3216 | value1 = str(value1) |
|
3219 | 3217 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3220 | 3218 | value2 = str(value2) |
|
3221 | 3219 | value = value1 + "," + value2 |
|
3222 | 3220 | self.specGgraphFreq.setText(value) |
|
3223 | 3221 | self.specGgraphFreq.setEnabled(True) |
|
3224 | 3222 | |
|
3225 | 3223 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3226 | 3224 | if parmObj == None: |
|
3227 | 3225 | self.specGgraphHeight.clear() |
|
3228 | 3226 | else: |
|
3229 | 3227 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3230 | 3228 | value1 = str(value1) |
|
3231 | 3229 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3232 | 3230 | value2 = str(value2) |
|
3233 | 3231 | value = value1 + "," + value2 |
|
3234 | 3232 | self.specGgraphHeight.setText(value) |
|
3235 | 3233 | self.specGgraphHeight.setEnabled(True) |
|
3236 | 3234 | |
|
3237 | 3235 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3238 | 3236 | if parmObj == None: |
|
3239 | 3237 | self.specGgraphDbsrange.clear() |
|
3240 | 3238 | else: |
|
3241 | 3239 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3242 | 3240 | value1 = str(value1) |
|
3243 | 3241 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3244 | 3242 | value2 = str(value2) |
|
3245 | 3243 | value = value1 + "," + value2 |
|
3246 | 3244 | self.specGgraphDbsrange.setText(value) |
|
3247 | 3245 | self.specGgraphDbsrange.setEnabled(True) |
|
3248 | 3246 | |
|
3249 | 3247 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3250 | 3248 | if parmObj == None: |
|
3251 | 3249 | self.specGraphSaveSpectra.setCheckState(0) |
|
3252 | 3250 | else: |
|
3253 | 3251 | self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
3254 | 3252 | |
|
3255 | 3253 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3256 | 3254 | if parmObj == None: |
|
3257 | 3255 | self.specGraphftpSpectra.setCheckState(0) |
|
3258 | 3256 | else: |
|
3259 | 3257 | self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
3260 | 3258 | |
|
3261 | 3259 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3262 | 3260 | if parmObj: |
|
3263 | 3261 | value = parmObj.getValue() |
|
3264 | 3262 | self.specGraphPath.setText(value) |
|
3265 | 3263 | |
|
3266 | 3264 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3267 | 3265 | if parmObj: |
|
3268 | 3266 | value = parmObj.getValue() |
|
3269 | 3267 | self.specGgraphftpratio.setText(str(value)) |
|
3270 | 3268 | |
|
3271 | 3269 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') |
|
3272 | 3270 | |
|
3273 | 3271 | if opObj == None: |
|
3274 | 3272 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
3275 | 3273 | self.specGraphSaveCross.setCheckState(0) |
|
3276 | 3274 | self.specGraphftpCross.setCheckState(0) |
|
3277 | 3275 | else: |
|
3278 | 3276 | operationCrossSpectraPlot = "Enable" |
|
3279 | 3277 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3280 | 3278 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3281 | 3279 | if parmObj == None: |
|
3282 | 3280 | self.specGgraphFreq.clear() |
|
3283 | 3281 | else: |
|
3284 | 3282 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3285 | 3283 | value1 = str(value1) |
|
3286 | 3284 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3287 | 3285 | value2 = str(value2) |
|
3288 | 3286 | value = value1 + "," + value2 |
|
3289 | 3287 | self.specGgraphFreq.setText(value) |
|
3290 | 3288 | self.specGgraphFreq.setEnabled(True) |
|
3291 | 3289 | |
|
3292 | 3290 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3293 | 3291 | if parmObj == None: |
|
3294 | 3292 | self.specGgraphHeight.clear() |
|
3295 | 3293 | else: |
|
3296 | 3294 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3297 | 3295 | value1 = str(value1) |
|
3298 | 3296 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3299 | 3297 | value2 = str(value2) |
|
3300 | 3298 | value = value1 + "," + value2 |
|
3301 | 3299 | self.specGgraphHeight.setText(value) |
|
3302 | 3300 | self.specGgraphHeight.setEnabled(True) |
|
3303 | 3301 | |
|
3304 | 3302 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3305 | 3303 | if parmObj == None: |
|
3306 | 3304 | self.specGgraphDbsrange.clear() |
|
3307 | 3305 | else: |
|
3308 | 3306 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3309 | 3307 | value1 = str(value1) |
|
3310 | 3308 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3311 | 3309 | value2 = str(value2) |
|
3312 | 3310 | value = value1 + "," + value2 |
|
3313 | 3311 | self.specGgraphDbsrange.setText(value) |
|
3314 | 3312 | self.specGgraphDbsrange.setEnabled(True) |
|
3315 | 3313 | |
|
3316 | 3314 | parmObj = opObj.getParameterObj(parameterName='coh_min') |
|
3317 | 3315 | if parmObj == None: |
|
3318 | 3316 | self.specGgraphmagnitud.clear() |
|
3319 | 3317 | else: |
|
3320 | 3318 | value1 = opObj.getParameterValue(parameterName='coh_min') |
|
3321 | 3319 | value1 = str(value1) |
|
3322 | 3320 | value2 = opObj.getParameterValue(parameterName='coh_max') |
|
3323 | 3321 | value2 = str(value2) |
|
3324 | 3322 | value = value1 + "," + value2 |
|
3325 | 3323 | self.specGgraphmagnitud.setText(value) |
|
3326 | 3324 | self.specGgraphmagnitud.setEnabled(True) |
|
3327 | 3325 | |
|
3328 | 3326 | parmObj = opObj.getParameterObj(parameterName='phase_min') |
|
3329 | 3327 | if parmObj == None: |
|
3330 | 3328 | self.specGgraphPhase.clear() |
|
3331 | 3329 | else: |
|
3332 | 3330 | value1 = opObj.getParameterValue(parameterName='phase_min') |
|
3333 | 3331 | value1 = str(value1) |
|
3334 | 3332 | value2 = opObj.getParameterValue(parameterName='phase_max') |
|
3335 | 3333 | value2 = str(value2) |
|
3336 | 3334 | value = value1 + "," + value2 |
|
3337 | 3335 | self.specGgraphPhase.setText(value) |
|
3338 | 3336 | self.specGgraphPhase.setEnabled(True) |
|
3339 | 3337 | |
|
3340 | 3338 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3341 | 3339 | if parmObj == None: |
|
3342 | 3340 | self.specGraphSaveCross.setCheckState(0) |
|
3343 | 3341 | else: |
|
3344 | 3342 | self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked) |
|
3345 | 3343 | |
|
3346 | 3344 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3347 | 3345 | if parmObj == None: |
|
3348 | 3346 | self.specGraphftpCross.setCheckState(0) |
|
3349 | 3347 | else: |
|
3350 | 3348 | self.specGraphftpCross.setCheckState(QtCore.Qt.Checked) |
|
3351 | 3349 | |
|
3352 | 3350 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3353 | 3351 | if parmObj: |
|
3354 | 3352 | value = parmObj.getValue() |
|
3355 | 3353 | self.specGraphPath.setText(value) |
|
3356 | 3354 | |
|
3357 | 3355 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3358 | 3356 | if parmObj: |
|
3359 | 3357 | value = parmObj.getValue() |
|
3360 | 3358 | self.specGgraphftpratio.setText(str(value)) |
|
3361 | 3359 | |
|
3362 | 3360 | opObj = puObj.getOperationObj(name='RTIPlot') |
|
3363 | 3361 | |
|
3364 | 3362 | if opObj == None: |
|
3365 | 3363 | self.specGraphCebRTIplot.setCheckState(0) |
|
3366 | 3364 | self.specGraphSaveRTIplot.setCheckState(0) |
|
3367 | 3365 | self.specGraphftpRTIplot.setCheckState(0) |
|
3368 | 3366 | else: |
|
3369 | 3367 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3370 | 3368 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3371 | 3369 | if parmObj == None: |
|
3372 | 3370 | self.specGgraphChannelList.clear() |
|
3373 | 3371 | else: |
|
3374 | 3372 | value = opObj.getParameterValue(parameterName='channelList') |
|
3375 | 3373 | channelListRTIPlot = str(value)[1:-1] |
|
3376 | 3374 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
3377 | 3375 | self.specGgraphChannelList.setEnabled(True) |
|
3378 | 3376 | |
|
3379 | 3377 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3380 | 3378 | if parmObj == None: |
|
3381 | 3379 | self.specGgraphTminTmax.clear() |
|
3382 | 3380 | else: |
|
3383 | 3381 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3384 | 3382 | value1 = str(value1) |
|
3385 | 3383 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3386 | 3384 | value2 = str(value2) |
|
3387 | 3385 | value = value1 + "," + value2 |
|
3388 | 3386 | self.specGgraphTminTmax.setText(value) |
|
3389 | 3387 | self.specGgraphTminTmax.setEnabled(True) |
|
3390 | 3388 | |
|
3391 | 3389 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3392 | 3390 | if parmObj == None: |
|
3393 | 3391 | self.specGgraphTimeRange.clear() |
|
3394 | 3392 | else: |
|
3395 | 3393 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3396 | 3394 | value1 = str(value1) |
|
3397 | 3395 | self.specGgraphTimeRange.setText(value1) |
|
3398 | 3396 | self.specGgraphTimeRange.setEnabled(True) |
|
3399 | 3397 | |
|
3400 | 3398 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3401 | 3399 | if parmObj == None: |
|
3402 | 3400 | self.specGgraphHeight.clear() |
|
3403 | 3401 | else: |
|
3404 | 3402 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3405 | 3403 | value1 = str(value1) |
|
3406 | 3404 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3407 | 3405 | value2 = str(value2) |
|
3408 | 3406 | value = value1 + "," + value2 |
|
3409 | 3407 | self.specGgraphHeight.setText(value) |
|
3410 | 3408 | self.specGgraphHeight.setEnabled(True) |
|
3411 | 3409 | |
|
3412 | 3410 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3413 | 3411 | if parmObj == None: |
|
3414 | 3412 | self.specGgraphDbsrange.clear() |
|
3415 | 3413 | else: |
|
3416 | 3414 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3417 | 3415 | value1 = str(value1) |
|
3418 | 3416 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3419 | 3417 | value2 = str(value2) |
|
3420 | 3418 | value = value1 + "," + value2 |
|
3421 | 3419 | self.specGgraphDbsrange.setText(value) |
|
3422 | 3420 | self.specGgraphDbsrange.setEnabled(True) |
|
3423 | 3421 | |
|
3424 | 3422 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3425 | 3423 | if parmObj == None: |
|
3426 | 3424 | self.specGraphSaveRTIplot.setCheckState(0) |
|
3427 | 3425 | else: |
|
3428 | 3426 | self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3429 | 3427 | |
|
3430 | 3428 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3431 | 3429 | if parmObj == None: |
|
3432 | 3430 | self.specGraphftpRTIplot.setCheckState(0) |
|
3433 | 3431 | else: |
|
3434 | 3432 | self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3435 | 3433 | |
|
3436 | 3434 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3437 | 3435 | if parmObj: |
|
3438 | 3436 | value = parmObj.getValue() |
|
3439 | 3437 | self.specGraphPath.setText(value) |
|
3440 | 3438 | |
|
3441 | 3439 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3442 | 3440 | if parmObj: |
|
3443 | 3441 | value = parmObj.getValue() |
|
3444 | 3442 | self.specGgraphftpratio.setText(str(value)) |
|
3445 | 3443 | |
|
3446 | 3444 | opObj = puObj.getOperationObj(name='CoherenceMap') |
|
3447 | 3445 | |
|
3448 | 3446 | if opObj == None: |
|
3449 | 3447 | self.specGraphCebCoherencmap.setCheckState(0) |
|
3450 | 3448 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3451 | 3449 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3452 | 3450 | else: |
|
3453 | 3451 | operationCoherenceMap = "Enable" |
|
3454 | 3452 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
3455 | 3453 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3456 | 3454 | if parmObj == None: |
|
3457 | 3455 | self.specGgraphTminTmax.clear() |
|
3458 | 3456 | else: |
|
3459 | 3457 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3460 | 3458 | value1 = str(value1) |
|
3461 | 3459 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3462 | 3460 | value2 = str(value2) |
|
3463 | 3461 | value = value1 + "," + value2 |
|
3464 | 3462 | self.specGgraphTminTmax.setText(value) |
|
3465 | 3463 | self.specGgraphTminTmax.setEnabled(True) |
|
3466 | 3464 | |
|
3467 | 3465 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3468 | 3466 | if parmObj == None: |
|
3469 | 3467 | self.specGgraphTimeRange.clear() |
|
3470 | 3468 | else: |
|
3471 | 3469 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3472 | 3470 | value1 = str(value1) |
|
3473 | 3471 | self.specGgraphTimeRange.setText(value1) |
|
3474 | 3472 | self.specGgraphTimeRange.setEnabled(True) |
|
3475 | 3473 | |
|
3476 | 3474 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3477 | 3475 | if parmObj == None: |
|
3478 | 3476 | self.specGgraphHeight.clear() |
|
3479 | 3477 | else: |
|
3480 | 3478 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3481 | 3479 | value1 = str(value1) |
|
3482 | 3480 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3483 | 3481 | value2 = str(value2) |
|
3484 | 3482 | value = value1 + "," + value2 |
|
3485 | 3483 | self.specGgraphHeight.setText(value) |
|
3486 | 3484 | self.specGgraphHeight.setEnabled(True) |
|
3487 | 3485 | |
|
3488 | 3486 | parmObj = opObj.getParameterObj(parameterName='zmin') |
|
3489 | 3487 | if parmObj == None: |
|
3490 | 3488 | self.specGgraphmagnitud.clear() |
|
3491 | 3489 | else: |
|
3492 | 3490 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
3493 | 3491 | value1 = str(value1) |
|
3494 | 3492 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
3495 | 3493 | value2 = str(value2) |
|
3496 | 3494 | value = value1 + "," + value2 |
|
3497 | 3495 | self.specGgraphmagnitud.setText(value) |
|
3498 | 3496 | self.specGgraphmagnitud.setEnabled(True) |
|
3499 | 3497 | |
|
3500 | 3498 | parmObj = opObj.getParameterObj(parameterName='coh_min') |
|
3501 | 3499 | if parmObj == None: |
|
3502 | 3500 | self.specGgraphmagnitud.clear() |
|
3503 | 3501 | else: |
|
3504 | 3502 | value1 = opObj.getParameterValue(parameterName='coh_min') |
|
3505 | 3503 | value1 = str(value1) |
|
3506 | 3504 | value2 = opObj.getParameterValue(parameterName='coh_max') |
|
3507 | 3505 | value2 = str(value2) |
|
3508 | 3506 | value = value1 + "," + value2 |
|
3509 | 3507 | self.specGgraphmagnitud.setText(value) |
|
3510 | 3508 | self.specGgraphmagnitud.setEnabled(True) |
|
3511 | 3509 | |
|
3512 | 3510 | parmObj = opObj.getParameterObj(parameterName='phase_min') |
|
3513 | 3511 | if parmObj == None: |
|
3514 | 3512 | self.specGgraphPhase.clear() |
|
3515 | 3513 | else: |
|
3516 | 3514 | value1 = opObj.getParameterValue(parameterName='phase_min') |
|
3517 | 3515 | value1 = str(value1) |
|
3518 | 3516 | value2 = opObj.getParameterValue(parameterName='phase_max') |
|
3519 | 3517 | value2 = str(value2) |
|
3520 | 3518 | value = value1 + "," + value2 |
|
3521 | 3519 | self.specGgraphPhase.setText(value) |
|
3522 | 3520 | self.specGgraphPhase.setEnabled(True) |
|
3523 | 3521 | |
|
3524 | 3522 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3525 | 3523 | if parmObj == None: |
|
3526 | 3524 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3527 | 3525 | else: |
|
3528 | 3526 | self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3529 | 3527 | |
|
3530 | 3528 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3531 | 3529 | if parmObj == None: |
|
3532 | 3530 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3533 | 3531 | else: |
|
3534 | 3532 | self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked) |
|
3535 | 3533 | |
|
3536 | 3534 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3537 | 3535 | if parmObj: |
|
3538 | 3536 | value = parmObj.getValue() |
|
3539 | 3537 | self.specGraphPath.setText(value) |
|
3540 | 3538 | |
|
3541 | 3539 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3542 | 3540 | if parmObj: |
|
3543 | 3541 | value = parmObj.getValue() |
|
3544 | 3542 | self.specGgraphftpratio.setText(str(value)) |
|
3545 | 3543 | |
|
3546 | 3544 | opObj = puObj.getOperationObj(name='PowerProfilePlot') |
|
3547 | 3545 | |
|
3548 | 3546 | if opObj == None: |
|
3549 | 3547 | self.specGraphPowerprofile.setCheckState(0) |
|
3550 | 3548 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3551 | 3549 | self.specGraphftpPowerprofile.setCheckState(0) |
|
3552 | 3550 | operationPowerProfilePlot = "Disabled" |
|
3553 | 3551 | channelList = None |
|
3554 | 3552 | freq_vel = None |
|
3555 | 3553 | heightsrange = None |
|
3556 | 3554 | else: |
|
3557 | 3555 | operationPowerProfilePlot = "Enable" |
|
3558 | 3556 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3559 | 3557 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3560 | 3558 | if parmObj == None: |
|
3561 | 3559 | self.specGgraphDbsrange.clear() |
|
3562 | 3560 | else: |
|
3563 | 3561 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3564 | 3562 | value1 = str(value1) |
|
3565 | 3563 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3566 | 3564 | value2 = str(value2) |
|
3567 | 3565 | value = value1 + "," + value2 |
|
3568 | 3566 | self.specGgraphDbsrange.setText(value) |
|
3569 | 3567 | self.specGgraphDbsrange.setEnabled(True) |
|
3570 | 3568 | |
|
3571 | 3569 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3572 | 3570 | if parmObj == None: |
|
3573 | 3571 | self.specGgraphHeight.clear() |
|
3574 | 3572 | else: |
|
3575 | 3573 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3576 | 3574 | value1 = str(value1) |
|
3577 | 3575 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3578 | 3576 | value2 = str(value2) |
|
3579 | 3577 | value = value1 + "," + value2 |
|
3580 | 3578 | self.specGgraphHeight.setText(value) |
|
3581 | 3579 | self.specGgraphHeight.setEnabled(True) |
|
3582 | 3580 | |
|
3583 | 3581 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3584 | 3582 | if parmObj == None: |
|
3585 | 3583 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3586 | 3584 | else: |
|
3587 | 3585 | self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3588 | 3586 | |
|
3589 | 3587 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3590 | 3588 | if parmObj == None: |
|
3591 | 3589 | self.specGraphftpPowerprofile.setCheckState(0) |
|
3592 | 3590 | else: |
|
3593 | 3591 | self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
3594 | 3592 | |
|
3595 | 3593 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3596 | 3594 | if parmObj: |
|
3597 | 3595 | value = parmObj.getValue() |
|
3598 | 3596 | self.specGraphPath.setText(value) |
|
3599 | 3597 | |
|
3600 | 3598 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3601 | 3599 | if parmObj: |
|
3602 | 3600 | value = parmObj.getValue() |
|
3603 | 3601 | self.specGgraphftpratio.setText(str(value)) |
|
3604 | 3602 | |
|
3605 | 3603 | opObj = puObj.getOperationObj(name='Noise') |
|
3606 | 3604 | |
|
3607 | 3605 | if opObj == None: |
|
3608 | 3606 | self.specGraphCebRTInoise.setCheckState(0) |
|
3609 | 3607 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3610 | 3608 | self.specGraphftpRTInoise.setCheckState(0) |
|
3611 | 3609 | else: |
|
3612 | 3610 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3613 | 3611 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3614 | 3612 | if parmObj == None: |
|
3615 | 3613 | self.specGgraphChannelList.clear() |
|
3616 | 3614 | else: |
|
3617 | 3615 | value = opObj.getParameterValue(parameterName='channelList') |
|
3618 | 3616 | channelListRTINoise = str(value)[1:-1] |
|
3619 | 3617 | self.specGgraphChannelList.setText(channelListRTINoise) |
|
3620 | 3618 | self.specGgraphChannelList.setEnabled(True) |
|
3621 | 3619 | |
|
3622 | 3620 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3623 | 3621 | if parmObj == None: |
|
3624 | 3622 | self.specGgraphTminTmax.clear() |
|
3625 | 3623 | else: |
|
3626 | 3624 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3627 | 3625 | value1 = str(value1) |
|
3628 | 3626 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3629 | 3627 | value2 = str(value2) |
|
3630 | 3628 | value = value1 + "," + value2 |
|
3631 | 3629 | self.specGgraphTminTmax.setText(value) |
|
3632 | 3630 | self.specGgraphTminTmax.setEnabled(True) |
|
3633 | 3631 | |
|
3634 | 3632 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3635 | 3633 | if parmObj == None: |
|
3636 | 3634 | self.specGgraphTimeRange.clear() |
|
3637 | 3635 | else: |
|
3638 | 3636 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3639 | 3637 | value1 = str(value1) |
|
3640 | 3638 | self.specGgraphTimeRange.setText(value1) |
|
3641 | 3639 | self.specGgraphTimeRange.setEnabled(True) |
|
3642 | 3640 | |
|
3643 | 3641 | |
|
3644 | 3642 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3645 | 3643 | if parmObj == None: |
|
3646 | 3644 | self.specGgraphDbsrange.clear() |
|
3647 | 3645 | else: |
|
3648 | 3646 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3649 | 3647 | value1 = str(value1) |
|
3650 | 3648 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3651 | 3649 | value2 = str(value2) |
|
3652 | 3650 | value = value1 + "," + value2 |
|
3653 | 3651 | self.specGgraphDbsrange.setText(value) |
|
3654 | 3652 | self.specGgraphDbsrange.setEnabled(True) |
|
3655 | 3653 | |
|
3656 | 3654 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3657 | 3655 | if parmObj == None: |
|
3658 | 3656 | self.specGraphSaveRTInoise.setCheckState(0) |
|
3659 | 3657 | else: |
|
3660 | 3658 | self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3661 | 3659 | |
|
3662 | 3660 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3663 | 3661 | if parmObj == None: |
|
3664 | 3662 | self.specGraphftpRTInoise.setCheckState(0) |
|
3665 | 3663 | else: |
|
3666 | 3664 | self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked) |
|
3667 | 3665 | |
|
3668 | 3666 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3669 | 3667 | if parmObj: |
|
3670 | 3668 | value = parmObj.getValue() |
|
3671 | 3669 | self.specGraphPath.setText(value) |
|
3672 | 3670 | |
|
3673 | 3671 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3674 | 3672 | if parmObj: |
|
3675 | 3673 | value = parmObj.getValue() |
|
3676 | 3674 | self.specGgraphftpratio.setText(str(value)) |
|
3677 | 3675 | |
|
3678 | 3676 | opObj = puObj.getOperationObj(name='SpectraWriter') |
|
3679 | 3677 | if opObj == None: |
|
3680 | 3678 | self.specOutputPath.clear() |
|
3681 | 3679 | self.specOutputblocksperfile.clear() |
|
3682 | 3680 | else: |
|
3683 | 3681 | value = opObj.getParameterObj(parameterName='path') |
|
3684 | 3682 | if value == None: |
|
3685 | 3683 | self.specOutputPath.clear() |
|
3686 | 3684 | else: |
|
3687 | 3685 | value = opObj.getParameterValue(parameterName='path') |
|
3688 | 3686 | path = str(value) |
|
3689 | 3687 | self.specOutputPath.setText(path) |
|
3690 | 3688 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
3691 | 3689 | if value == None: |
|
3692 | 3690 | self.specOutputblocksperfile.clear() |
|
3693 | 3691 | else: |
|
3694 | 3692 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
3695 | 3693 | blocksperfile = str(value) |
|
3696 | 3694 | self.specOutputblocksperfile.setText(blocksperfile) |
|
3697 | 3695 | |
|
3698 | 3696 | return |
|
3699 | 3697 | |
|
3700 | 3698 | def __refreshSpectraHeisWindow(self, puObj): |
|
3701 | 3699 | |
|
3702 | 3700 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") |
|
3703 | 3701 | if opObj == None: |
|
3704 | 3702 | self.specHeisOpIncoherent.clear() |
|
3705 | 3703 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
3706 | 3704 | else: |
|
3707 | 3705 | for parmObj in opObj.getParameterObjList(): |
|
3708 | 3706 | if parmObj.name == 'timeInterval': |
|
3709 | 3707 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
3710 | 3708 | value = float(value) |
|
3711 | 3709 | self.specHeisOpIncoherent.setText(str(value)) |
|
3712 | 3710 | self.specHeisOpIncoherent.setEnabled(True) |
|
3713 | 3711 | self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked) |
|
3714 | 3712 | self.specHeisOpCobIncInt.setCurrentIndex(0) |
|
3715 | 3713 | |
|
3716 | 3714 | # SpectraHeis Graph |
|
3717 | 3715 | |
|
3718 | 3716 | self.specHeisGgraphXminXmax.clear() |
|
3719 | 3717 | self.specHeisGgraphYminYmax.clear() |
|
3720 | 3718 | |
|
3721 | 3719 | self.specHeisGgraphChannelList.clear() |
|
3722 | 3720 | self.specHeisGgraphTminTmax.clear() |
|
3723 | 3721 | self.specHeisGgraphTimeRange.clear() |
|
3724 | 3722 | self.specHeisGgraphftpratio.clear() |
|
3725 | 3723 | |
|
3726 | 3724 | opObj = puObj.getOperationObj(name='SpectraHeisScope') |
|
3727 | 3725 | if opObj == None: |
|
3728 | 3726 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
3729 | 3727 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3730 | 3728 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3731 | 3729 | else: |
|
3732 | 3730 | operationSpectraHeisScope = "Enable" |
|
3733 | 3731 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3734 | 3732 | |
|
3735 | 3733 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3736 | 3734 | if parmObj == None: |
|
3737 | 3735 | self.specHeisGgraphChannelList.clear() |
|
3738 | 3736 | else: |
|
3739 | 3737 | value = opObj.getParameterValue(parameterName='channelList') |
|
3740 | 3738 | channelListSpectraHeisScope = str(value)[1:-1] |
|
3741 | 3739 | self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope) |
|
3742 | 3740 | self.specHeisGgraphChannelList.setEnabled(True) |
|
3743 | 3741 | |
|
3744 | 3742 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3745 | 3743 | if parmObj == None: |
|
3746 | 3744 | self.specHeisGgraphXminXmax.clear() |
|
3747 | 3745 | else: |
|
3748 | 3746 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3749 | 3747 | value1 = str(value1) |
|
3750 | 3748 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3751 | 3749 | value2 = str(value2) |
|
3752 | 3750 | value = value1 + "," + value2 |
|
3753 | 3751 | self.specHeisGgraphXminXmax.setText(value) |
|
3754 | 3752 | self.specHeisGgraphXminXmax.setEnabled(True) |
|
3755 | 3753 | |
|
3756 | 3754 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3757 | 3755 | if parmObj == None: |
|
3758 | 3756 | self.specHeisGgraphYminYmax.clear() |
|
3759 | 3757 | else: |
|
3760 | 3758 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3761 | 3759 | value1 = str(value1) |
|
3762 | 3760 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3763 | 3761 | value2 = str(value2) |
|
3764 | 3762 | value = value1 + "," + value2 |
|
3765 | 3763 | self.specHeisGgraphYminYmax.setText(value) |
|
3766 | 3764 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3767 | 3765 | |
|
3768 | 3766 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3769 | 3767 | if parmObj == None: |
|
3770 | 3768 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
3771 | 3769 | else: |
|
3772 | 3770 | self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked) |
|
3773 | 3771 | |
|
3774 | 3772 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3775 | 3773 | if parmObj == None: |
|
3776 | 3774 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
3777 | 3775 | else: |
|
3778 | 3776 | self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked) |
|
3779 | 3777 | |
|
3780 | 3778 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3781 | 3779 | if parmObj: |
|
3782 | 3780 | value = parmObj.getValue() |
|
3783 | 3781 | self.specHeisGraphPath.setText(value) |
|
3784 | 3782 | |
|
3785 | 3783 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3786 | 3784 | if parmObj: |
|
3787 | 3785 | value = parmObj.getValue() |
|
3788 | 3786 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3789 | 3787 | |
|
3790 | 3788 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') |
|
3791 | 3789 | |
|
3792 | 3790 | if opObj == None: |
|
3793 | 3791 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
3794 | 3792 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3795 | 3793 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3796 | 3794 | else: |
|
3797 | 3795 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3798 | 3796 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
3799 | 3797 | if parmObj == None: |
|
3800 | 3798 | self.specHeisGgraphChannelList.clear() |
|
3801 | 3799 | else: |
|
3802 | 3800 | value = opObj.getParameterValue(parameterName='channelList') |
|
3803 | 3801 | channelListRTIPlot = str(value)[1:-1] |
|
3804 | 3802 | self.specGgraphChannelList.setText(channelListRTIPlot) |
|
3805 | 3803 | self.specGgraphChannelList.setEnabled(True) |
|
3806 | 3804 | |
|
3807 | 3805 | parmObj = opObj.getParameterObj(parameterName='xmin') |
|
3808 | 3806 | if parmObj == None: |
|
3809 | 3807 | self.specHeisGgraphTminTmax.clear() |
|
3810 | 3808 | else: |
|
3811 | 3809 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
3812 | 3810 | value1 = str(value1) |
|
3813 | 3811 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
3814 | 3812 | value2 = str(value2) |
|
3815 | 3813 | value = value1 + "," + value2 |
|
3816 | 3814 | self.specHeisGgraphTminTmax.setText(value) |
|
3817 | 3815 | self.specHeisGgraphTminTmax.setEnabled(True) |
|
3818 | 3816 | |
|
3819 | 3817 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
3820 | 3818 | if parmObj == None: |
|
3821 | 3819 | self.specGgraphTimeRange.clear() |
|
3822 | 3820 | else: |
|
3823 | 3821 | value1 = opObj.getParameterValue(parameterName='timerange') |
|
3824 | 3822 | value1 = str(value1) |
|
3825 | 3823 | self.specHeisGgraphTimeRange.setText(value1) |
|
3826 | 3824 | self.specHeisGgraphTimeRange.setEnabled(True) |
|
3827 | 3825 | |
|
3828 | 3826 | parmObj = opObj.getParameterObj(parameterName='ymin') |
|
3829 | 3827 | if parmObj == None: |
|
3830 | 3828 | self.specHeisGgraphYminYmax.clear() |
|
3831 | 3829 | else: |
|
3832 | 3830 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
3833 | 3831 | value1 = str(value1) |
|
3834 | 3832 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
3835 | 3833 | value2 = str(value2) |
|
3836 | 3834 | value = value1 + "," + value2 |
|
3837 | 3835 | self.specHeisGgraphYminYmax.setText(value) |
|
3838 | 3836 | self.specHeisGgraphYminYmax.setEnabled(True) |
|
3839 | 3837 | |
|
3840 | 3838 | parmObj = opObj.getParameterObj(parameterName="save") |
|
3841 | 3839 | if parmObj == None: |
|
3842 | 3840 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
3843 | 3841 | else: |
|
3844 | 3842 | self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3845 | 3843 | |
|
3846 | 3844 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
3847 | 3845 | if parmObj == None: |
|
3848 | 3846 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
3849 | 3847 | else: |
|
3850 | 3848 | self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked) |
|
3851 | 3849 | |
|
3852 | 3850 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3853 | 3851 | if parmObj: |
|
3854 | 3852 | value = parmObj.getValue() |
|
3855 | 3853 | self.specHeisGraphPath.setText(value) |
|
3856 | 3854 | |
|
3857 | 3855 | parmObj = opObj.getParameterObj(parameterName="wr_period") |
|
3858 | 3856 | if parmObj: |
|
3859 | 3857 | value = parmObj.getValue() |
|
3860 | 3858 | self.specHeisGgraphftpratio.setText(str(value)) |
|
3861 | 3859 | |
|
3862 | 3860 | # outputSpectraHeisWrite |
|
3863 | 3861 | opObj = puObj.getOperationObj(name='FitsWriter') |
|
3864 | 3862 | if opObj == None: |
|
3865 | 3863 | self.specHeisOutputPath.clear() |
|
3866 | 3864 | self.specHeisOutputblocksperfile.clear() |
|
3867 | 3865 | self.specHeisOutputMetada.clear() |
|
3868 | 3866 | else: |
|
3869 | 3867 | value = opObj.getParameterObj(parameterName='path') |
|
3870 | 3868 | if value == None: |
|
3871 | 3869 | self.specHeisOutputPath.clear() |
|
3872 | 3870 | else: |
|
3873 | 3871 | value = opObj.getParameterValue(parameterName='path') |
|
3874 | 3872 | path = str(value) |
|
3875 | 3873 | self.specHeisOutputPath.setText(path) |
|
3876 | 3874 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') |
|
3877 | 3875 | if value == None: |
|
3878 | 3876 | self.specHeisOutputblocksperfile.clear() |
|
3879 | 3877 | else: |
|
3880 | 3878 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') |
|
3881 | 3879 | blocksperfile = str(value) |
|
3882 | 3880 | self.specHeisOutputblocksperfile.setText(blocksperfile) |
|
3883 | 3881 | value = opObj.getParameterObj(parameterName='metadatafile') |
|
3884 | 3882 | if value == None: |
|
3885 | 3883 | self.specHeisOutputMetada.clear() |
|
3886 | 3884 | else: |
|
3887 | 3885 | value = opObj.getParameterValue(parameterName='metadatafile') |
|
3888 | 3886 | metada = str(value) |
|
3889 | 3887 | self.specHeisOutputMetada.setText(metada) |
|
3890 | 3888 | |
|
3891 | 3889 | return |
|
3892 | 3890 | |
|
3893 | 3891 | def __refreshCorrelationWindow(self, puObj): |
|
3894 | 3892 | pass |
|
3895 | 3893 | |
|
3896 | 3894 | def refreshPUWindow(self, puObj): |
|
3897 | 3895 | |
|
3898 | 3896 | if puObj.datatype == 'Voltage': |
|
3899 | 3897 | self.__refreshVoltageWindow(puObj) |
|
3900 | 3898 | |
|
3901 | 3899 | if puObj.datatype == 'Spectra': |
|
3902 | 3900 | self.__refreshSpectraWindow(puObj) |
|
3903 | 3901 | |
|
3904 | 3902 | if puObj.datatype == 'SpectraHeis': |
|
3905 | 3903 | self.__refreshSpectraHeisWindow(puObj) |
|
3906 | 3904 | |
|
3907 | 3905 | def refreshProjectProperties(self, projectObjView): |
|
3908 | 3906 | |
|
3909 | 3907 | propertyBuffObj = PropertyBuffer() |
|
3910 | 3908 | name = projectObjView.name |
|
3911 | 3909 | |
|
3912 | 3910 | propertyBuffObj.append("Properties", "Name", projectObjView.name), |
|
3913 | 3911 | propertyBuffObj.append("Properties", "Description", projectObjView.description) |
|
3914 | 3912 | propertyBuffObj.append("Properties", "Workspace", self.pathWorkSpace) |
|
3915 | 3913 | |
|
3916 | 3914 | readUnitObj = projectObjView.getReadUnitObj() |
|
3917 | 3915 | runOperationObj = readUnitObj.getOperationObj(name='run') |
|
3918 | 3916 | |
|
3919 | 3917 | for thisParmObj in runOperationObj.getParameterObjList(): |
|
3920 | 3918 | propertyBuffObj.append("Reading parms", thisParmObj.name, str(thisParmObj.getValue())) |
|
3921 | 3919 | |
|
3922 | 3920 | propertiesModel = propertyBuffObj.getPropertyModel() |
|
3923 | 3921 | |
|
3924 | 3922 | self.treeProjectProperties.setModel(propertiesModel) |
|
3925 | 3923 | self.treeProjectProperties.expandAll() |
|
3926 | 3924 | self.treeProjectProperties.resizeColumnToContents(0) |
|
3927 | 3925 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3928 | 3926 | |
|
3929 | 3927 | def refreshPUProperties(self, puObjView): |
|
3930 | 3928 | |
|
3931 | 3929 | ############ FTP CONFIG ################################ |
|
3932 | 3930 | #Deleting FTP Conf. This processing unit have not got any |
|
3933 | 3931 | #FTP configuration by default |
|
3934 | 3932 | if puObjView.id in self.__puLocalFolder2FTP.keys(): |
|
3935 | 3933 | self.__puLocalFolder2FTP.pop(puObjView.id) |
|
3936 | 3934 | ######################################################## |
|
3937 | 3935 | |
|
3938 | 3936 | propertyBuffObj = PropertyBuffer() |
|
3939 | 3937 | |
|
3940 | 3938 | for thisOp in puObjView.getOperationObjList(): |
|
3941 | 3939 | |
|
3942 | 3940 | operationName = thisOp.name |
|
3943 | 3941 | |
|
3944 | 3942 | if operationName == 'run': |
|
3945 | 3943 | operationName = 'Properties' |
|
3946 | 3944 | |
|
3947 | 3945 | else: |
|
3948 | 3946 | if not thisOp.getParameterObjList(): |
|
3949 | 3947 | propertyBuffObj.append(operationName, '--', '--') |
|
3950 | 3948 | continue |
|
3951 | 3949 | |
|
3952 | 3950 | for thisParmObj in thisOp.getParameterObjList(): |
|
3953 | 3951 | propertyBuffObj.append(operationName, thisParmObj.name, str(thisParmObj.getValue())) |
|
3954 | 3952 | |
|
3955 | 3953 | ############ FTP CONFIG ################################ |
|
3956 | 3954 | if thisParmObj.name == "ftp_wei" and thisParmObj.getValue(): |
|
3957 | 3955 | value = thisParmObj.getValue() |
|
3958 | 3956 | self.temporalFTP.ftp_wei = value |
|
3959 | 3957 | |
|
3960 | 3958 | if thisParmObj.name == "exp_code" and thisParmObj.getValue(): |
|
3961 | 3959 | value = thisParmObj.getValue() |
|
3962 | 3960 | self.temporalFTP.exp_code = value |
|
3963 | 3961 | |
|
3964 | 3962 | if thisParmObj.name == "sub_exp_code" and thisParmObj.getValue(): |
|
3965 | 3963 | value = thisParmObj.getValue() |
|
3966 | 3964 | self.temporalFTP.sub_exp_code = value |
|
3967 | 3965 | |
|
3968 | 3966 | if thisParmObj.name == "plot_pos" and thisParmObj.getValue(): |
|
3969 | 3967 | value = thisParmObj.getValue() |
|
3970 | 3968 | self.temporalFTP.plot_pos = value |
|
3971 | 3969 | |
|
3972 | 3970 | if thisParmObj.name == 'ftp' and thisParmObj.getValue(): |
|
3973 | 3971 | figpathObj = thisOp.getParameterObj('figpath') |
|
3974 | 3972 | if figpathObj: |
|
3975 | 3973 | self.__puLocalFolder2FTP[puObjView.id] = figpathObj.getValue() |
|
3976 | 3974 | |
|
3977 | 3975 | ######################################################## |
|
3978 | 3976 | |
|
3979 | 3977 | propertiesModel = propertyBuffObj.getPropertyModel() |
|
3980 | 3978 | |
|
3981 | 3979 | self.treeProjectProperties.setModel(propertiesModel) |
|
3982 | 3980 | self.treeProjectProperties.expandAll() |
|
3983 | 3981 | self.treeProjectProperties.resizeColumnToContents(0) |
|
3984 | 3982 | self.treeProjectProperties.resizeColumnToContents(1) |
|
3985 | 3983 | |
|
3986 | 3984 | def refreshGraphicsId(self): |
|
3987 | 3985 | |
|
3988 | 3986 | projectObj = self.getSelectedProjectObj() |
|
3989 | 3987 | |
|
3990 | 3988 | if not projectObj: |
|
3991 | 3989 | return |
|
3992 | 3990 | |
|
3993 | 3991 | for idPU, puObj in projectObj.procUnitConfObjDict.items(): |
|
3994 | 3992 | |
|
3995 | 3993 | for opObj in puObj.getOperationObjList(): |
|
3996 | 3994 | |
|
3997 | 3995 | if opObj.name not in ('Scope', 'SpectraPlot', 'CrossSpectraPlot', 'RTIPlot', 'CoherenceMap', 'PowerProfilePlot', 'Noise', 'SpectraHeisScope', 'RTIfromSpectraHeis'): |
|
3998 | 3996 | continue |
|
3999 | 3997 | |
|
4000 | 3998 | opObj.changeParameter(name='id', value=opObj.id, format='int') |
|
4001 | 3999 | |
|
4002 | 4000 | def on_click(self, index): |
|
4003 | 4001 | |
|
4004 | 4002 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) |
|
4005 | 4003 | |
|
4006 | 4004 | projectObjView = self.getSelectedProjectObj() |
|
4007 | 4005 | |
|
4008 | 4006 | if not projectObjView: |
|
4009 | 4007 | return |
|
4010 | 4008 | |
|
4011 | 4009 | self.create = False |
|
4012 | 4010 | selectedObjView = self.getSelectedItemObj() |
|
4013 | 4011 | |
|
4014 | 4012 | #A project has been selected |
|
4015 | 4013 | if projectObjView == selectedObjView: |
|
4016 | 4014 | |
|
4017 | 4015 | self.refreshProjectWindow(projectObjView) |
|
4018 | 4016 | self.refreshProjectProperties(projectObjView) |
|
4019 | 4017 | |
|
4020 | 4018 | self.tabProject.setEnabled(True) |
|
4021 | 4019 | self.tabVoltage.setEnabled(False) |
|
4022 | 4020 | self.tabSpectra.setEnabled(False) |
|
4023 | 4021 | self.tabCorrelation.setEnabled(False) |
|
4024 | 4022 | self.tabSpectraHeis.setEnabled(False) |
|
4025 | 4023 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4026 | 4024 | |
|
4027 | 4025 | return |
|
4028 | 4026 | |
|
4029 | 4027 | #A processing unit has been selected |
|
4030 | 4028 | voltEnable = False |
|
4031 | 4029 | specEnable = False |
|
4032 | 4030 | corrEnable = False |
|
4033 | 4031 | specHeisEnable = False |
|
4034 | 4032 | tabSelected = self.tabProject |
|
4035 | 4033 | |
|
4036 | 4034 | puObj = selectedObjView |
|
4037 | 4035 | |
|
4038 | 4036 | self.refreshPUWindow(puObj) |
|
4039 | 4037 | self.refreshPUProperties(puObj) |
|
4040 | 4038 | self.showtabPUCreated(puObj.datatype) |
|
4041 | 4039 | |
|
4042 | 4040 | def on_right_click(self, pos): |
|
4043 | 4041 | |
|
4044 | 4042 | self.menu = QtGui.QMenu() |
|
4045 | 4043 | quitAction0 = self.menu.addAction("Create a New Project") |
|
4046 | 4044 | quitAction1 = self.menu.addAction("Create a New Processing Unit") |
|
4047 | 4045 | quitAction2 = self.menu.addAction("Delete Item") |
|
4048 | 4046 | quitAction3 = self.menu.addAction("Quit") |
|
4049 | 4047 | |
|
4050 | 4048 | if len(self.__itemTreeDict) == 0: |
|
4051 | 4049 | quitAction2.setEnabled(False) |
|
4052 | 4050 | else: |
|
4053 | 4051 | quitAction2.setEnabled(True) |
|
4054 | 4052 | |
|
4055 | 4053 | action = self.menu.exec_(self.mapToGlobal(pos)) |
|
4056 | 4054 | |
|
4057 | 4055 | if action == quitAction0: |
|
4058 | 4056 | self. setInputsProject_View() |
|
4059 | 4057 | self.create = True |
|
4060 | 4058 | |
|
4061 | 4059 | if action == quitAction1: |
|
4062 | 4060 | if len(self.__projectObjDict) == 0: |
|
4063 | 4061 | outputstr = "You need to create a Project before adding a Processing Unit" |
|
4064 | 4062 | self.console.clear() |
|
4065 | 4063 | self.console.append(outputstr) |
|
4066 | 4064 | return 0 |
|
4067 | 4065 | else: |
|
4068 | 4066 | self.addPUWindow() |
|
4069 | 4067 | self.console.clear() |
|
4070 | 4068 | self.console.append("Please, Choose the type of Processing Unit") |
|
4071 | 4069 | # self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage") |
|
4072 | 4070 | # self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation") |
|
4073 | 4071 | # self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis") |
|
4074 | 4072 | |
|
4075 | 4073 | if action == quitAction2: |
|
4076 | 4074 | index = self.selectedItemTree |
|
4077 | 4075 | try: |
|
4078 | 4076 | index.parent() |
|
4079 | 4077 | except: |
|
4080 | 4078 | self.console.append('Please first select a Project or Processing Unit') |
|
4081 | 4079 | return 0 |
|
4082 | 4080 | # print index.parent(),index |
|
4083 | 4081 | if index.parent() == None: |
|
4084 | 4082 | self.projectExplorerModel.removeRow(index.row()) |
|
4085 | 4083 | else: |
|
4086 | 4084 | index.parent().removeRow(index.row()) |
|
4087 | 4085 | self.removeItemTreeFromProject() |
|
4088 | 4086 | self.console.clear() |
|
4089 | 4087 | # for i in self.projectExplorerTree.selectionModel().selection().indexes(): |
|
4090 | 4088 | # print i.row() |
|
4091 | 4089 | |
|
4092 | 4090 | if action == quitAction3: |
|
4093 | 4091 | self.close() |
|
4094 | 4092 | return 0 |
|
4095 | 4093 | |
|
4096 | 4094 | def createProjectView(self, id): |
|
4097 | 4095 | |
|
4098 | 4096 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4099 | 4097 | id = str(id) |
|
4100 | 4098 | projectParms = self.__getParmsFromProjectWindow() |
|
4101 | 4099 | |
|
4102 | 4100 | if not projectParms.isValid(): |
|
4103 | 4101 | return None |
|
4104 | 4102 | |
|
4105 | 4103 | projectObjView = Project() |
|
4106 | 4104 | projectObjView.setup(id=id, name=projectParms.name, description=projectParms.description) |
|
4107 | 4105 | |
|
4108 | 4106 | self.__projectObjDict[id] = projectObjView |
|
4109 | 4107 | self.addProject2ProjectExplorer(id=id, name=projectObjView.name) |
|
4110 | 4108 | |
|
4111 | 4109 | self.create = False |
|
4112 | 4110 | |
|
4113 | 4111 | return projectObjView |
|
4114 | 4112 | |
|
4115 | 4113 | def updateProjectView(self): |
|
4116 | 4114 | |
|
4117 | 4115 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4118 | 4116 | |
|
4119 | 4117 | projectParms = self.__getParmsFromProjectWindow() |
|
4120 | 4118 | |
|
4121 | 4119 | if not projectParms.isValid(): |
|
4122 | 4120 | return None |
|
4123 | 4121 | |
|
4124 | 4122 | projectObjView = self.getSelectedProjectObj() |
|
4125 | 4123 | |
|
4126 | 4124 | if not projectObjView: |
|
4127 | 4125 | self.console.append("Please select a project before update it") |
|
4128 | 4126 | return None |
|
4129 | 4127 | |
|
4130 | 4128 | projectObjView.update(name=projectParms.name, description=projectParms.description) |
|
4131 | 4129 | |
|
4132 | 4130 | return projectObjView |
|
4133 | 4131 | |
|
4134 | 4132 | def createReadUnitView(self, projectObjView): |
|
4135 | 4133 | |
|
4136 | 4134 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
4137 | 4135 | |
|
4138 | 4136 | projectParms = self.__getParmsFromProjectWindow() |
|
4139 | 4137 | |
|
4140 | 4138 | if not projectParms.isValid(): |
|
4141 | 4139 | return None |
|
4142 | 4140 | |
|
4143 | 4141 | if projectParms.datatype in ("Voltage", "Spectra", "Fits"): |
|
4144 | 4142 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, |
|
4145 | 4143 | path=projectParms.dpath, |
|
4146 | 4144 | startDate=projectParms.startDate, |
|
4147 | 4145 | endDate=projectParms.endDate, |
|
4148 | 4146 | startTime=projectParms.startTime, |
|
4149 | 4147 | endTime=projectParms.endTime, |
|
4150 | 4148 | online=projectParms.online, |
|
4151 | 4149 | walk=projectParms.walk |
|
4152 | 4150 | ) |
|
4153 | 4151 | |
|
4154 | 4152 | if projectParms.set: |
|
4155 | 4153 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") |
|
4156 | 4154 | |
|
4157 | 4155 | if projectParms.delay: |
|
4158 | 4156 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4159 | 4157 | |
|
4160 | 4158 | if projectParms.expLabel: |
|
4161 | 4159 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) |
|
4162 | 4160 | |
|
4163 | 4161 | if projectParms.datatype == "USRP": |
|
4164 | 4162 | readUnitConfObj = projectObjView.addReadUnit(datatype=projectParms.datatype, |
|
4165 | 4163 | path=projectParms.dpath, |
|
4166 | 4164 | startDate=projectParms.startDate, |
|
4167 | 4165 | endDate=projectParms.endDate, |
|
4168 | 4166 | startTime=projectParms.startTime, |
|
4169 | 4167 | endTime=projectParms.endTime, |
|
4170 | 4168 | online=projectParms.online, |
|
4171 | 4169 | ippKm=projectParms.ippKm |
|
4172 | 4170 | ) |
|
4173 | 4171 | |
|
4174 | 4172 | if projectParms.delay: |
|
4175 | 4173 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4176 | 4174 | |
|
4177 | 4175 | return readUnitConfObj |
|
4178 | 4176 | |
|
4179 | 4177 | def updateReadUnitView(self, projectObjView, idReadUnit): |
|
4180 | 4178 | |
|
4181 | 4179 | # project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, walk , set = self.getParmsFromProjectWindow() |
|
4182 | 4180 | |
|
4183 | 4181 | readUnitConfObj = projectObjView.getProcUnitObj(idReadUnit) |
|
4184 | 4182 | |
|
4185 | 4183 | projectParms = self.__getParmsFromProjectWindow() |
|
4186 | 4184 | |
|
4187 | 4185 | if not projectParms.isValid(): |
|
4188 | 4186 | return None |
|
4189 | 4187 | |
|
4190 | 4188 | if projectParms.datatype in ["Voltage", "Spectra", "Fits"]: |
|
4191 | 4189 | readUnitConfObj.update(datatype=projectParms.datatype, |
|
4192 | 4190 | path=projectParms.dpath, |
|
4193 | 4191 | startDate=projectParms.startDate, |
|
4194 | 4192 | endDate=projectParms.endDate, |
|
4195 | 4193 | startTime=projectParms.startTime, |
|
4196 | 4194 | endTime=projectParms.endTime, |
|
4197 | 4195 | online=projectParms.online, |
|
4198 | 4196 | walk=projectParms.walk |
|
4199 | 4197 | ) |
|
4200 | 4198 | if projectParms.set: |
|
4201 | 4199 | readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int") |
|
4202 | 4200 | |
|
4203 | 4201 | if projectParms.delay: |
|
4204 | 4202 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4205 | 4203 | |
|
4206 | 4204 | if projectParms.expLabel: |
|
4207 | 4205 | readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel) |
|
4208 | 4206 | |
|
4209 | 4207 | if projectParms.datatype == "USRP": |
|
4210 | 4208 | readUnitConfObj.update(datatype=projectParms.datatype, |
|
4211 | 4209 | path=projectParms.dpath, |
|
4212 | 4210 | startDate=projectParms.startDate, |
|
4213 | 4211 | endDate=projectParms.endDate, |
|
4214 | 4212 | startTime=projectParms.startTime, |
|
4215 | 4213 | endTime=projectParms.endTime, |
|
4216 | 4214 | online=projectParms.online, |
|
4217 | 4215 | ippKm=projectParms.ippKm |
|
4218 | 4216 | ) |
|
4219 | 4217 | |
|
4220 | 4218 | if projectParms.delay: |
|
4221 | 4219 | readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int") |
|
4222 | 4220 | |
|
4223 | 4221 | return readUnitConfObj |
|
4224 | 4222 | |
|
4225 | 4223 | def createProcUnitView(self, projectObjView, datatype, inputId): |
|
4226 | 4224 | |
|
4227 | 4225 | procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId) |
|
4228 | 4226 | |
|
4229 | 4227 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
4230 | 4228 | |
|
4231 | 4229 | return procUnitConfObj |
|
4232 | 4230 | |
|
4233 | 4231 | def updateProcUnitView(self, id): |
|
4234 | 4232 | |
|
4235 | 4233 | procUnitConfObj = projectObjView.getProcUnitObj(id) |
|
4236 | 4234 | procUnitConfObj.removeOperations() |
|
4237 | 4235 | |
|
4238 | 4236 | return procUnitConfObj |
|
4239 | 4237 | |
|
4240 | 4238 | def addPUWindow(self): |
|
4241 | 4239 | |
|
4242 | 4240 | self.configUPWindowObj = UnitProcessWindow(self) |
|
4243 | 4241 | fatherObj = self.getSelectedItemObj() |
|
4244 | 4242 | try: |
|
4245 | 4243 | fatherObj.getElementName() |
|
4246 | 4244 | except: |
|
4247 | 4245 | self.console.append("First left click on Project or Processing Unit") |
|
4248 | 4246 | return 0 |
|
4249 | 4247 | |
|
4250 | 4248 | if fatherObj.getElementName() == 'Project': |
|
4251 | 4249 | readUnitConfObj = fatherObj.getReadUnitObj() |
|
4252 | 4250 | self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype) |
|
4253 | 4251 | |
|
4254 | 4252 | self.configUPWindowObj.getfromWindowList.append(fatherObj) |
|
4255 | 4253 | self.configUPWindowObj.loadTotalList() |
|
4256 | 4254 | self.configUPWindowObj.show() |
|
4257 | 4255 | self.configUPWindowObj.closed.connect(self.createPUWindow) |
|
4258 | 4256 | |
|
4259 | 4257 | def createPUWindow(self): |
|
4260 | 4258 | |
|
4261 | 4259 | if not self.configUPWindowObj.create: |
|
4262 | 4260 | return |
|
4263 | 4261 | |
|
4264 | 4262 | fatherObj = self.configUPWindowObj.getFromWindow |
|
4265 | 4263 | datatype = self.configUPWindowObj.typeofUP |
|
4266 | 4264 | |
|
4267 | 4265 | if fatherObj.getElementName() == 'Project': |
|
4268 | 4266 | inputId = fatherObj.getReadUnitId() |
|
4269 | 4267 | projectObjView = fatherObj |
|
4270 | 4268 | else: |
|
4271 | 4269 | inputId = fatherObj.getId() |
|
4272 | 4270 | projectObjView = self.getSelectedProjectObj() |
|
4273 | 4271 | |
|
4274 | 4272 | if not projectObjView: |
|
4275 | 4273 | return |
|
4276 | 4274 | |
|
4277 | 4275 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) |
|
4278 | 4276 | |
|
4279 | 4277 | self.addPU2ProjectExplorer(puObj) |
|
4280 | 4278 | |
|
4281 | 4279 | self.showtabPUCreated(datatype) |
|
4282 | 4280 | |
|
4283 | 4281 | self.clearPUWindow(datatype) |
|
4284 | 4282 | |
|
4285 | 4283 | self.showPUinitView() |
|
4286 | 4284 | |
|
4287 | 4285 | def addFTPConf2Operation(self, puObj, opObj): |
|
4288 | 4286 | |
|
4289 | 4287 | if not self.temporalFTP.create: |
|
4290 | 4288 | self.temporalFTP.setwithoutconfiguration() |
|
4291 | 4289 | |
|
4292 | 4290 | # opObj.addParameter(name='server', value=self.temporalFTP.server, format='str') |
|
4293 | 4291 | # opObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') |
|
4294 | 4292 | # opObj.addParameter(name='username', value=self.temporalFTP.username, format='str') |
|
4295 | 4293 | # opObj.addParameter(name='password', value=self.temporalFTP.password, format='str') |
|
4296 | 4294 | |
|
4297 | 4295 | if self.temporalFTP.ftp_wei: |
|
4298 | 4296 | opObj.addParameter(name='ftp_wei', value=int(self.temporalFTP.ftp_wei), format='int') |
|
4299 | 4297 | if self.temporalFTP.exp_code: |
|
4300 | 4298 | opObj.addParameter(name='exp_code', value=int(self.temporalFTP.exp_code), format='int') |
|
4301 | 4299 | if self.temporalFTP.sub_exp_code: |
|
4302 | 4300 | opObj.addParameter(name='sub_exp_code', value=int(self.temporalFTP.sub_exp_code), format='int') |
|
4303 | 4301 | if self.temporalFTP.plot_pos: |
|
4304 | 4302 | opObj.addParameter(name='plot_pos', value=int(self.temporalFTP.plot_pos), format='int') |
|
4305 | 4303 | |
|
4306 | 4304 | # def __checkFTPProcUnit(self, projectObj, localfolder): |
|
4307 | 4305 | # |
|
4308 | 4306 | # puId = None |
|
4309 | 4307 | # puObj = None |
|
4310 | 4308 | # |
|
4311 | 4309 | # for thisPuId, thisPuObj in projectObj.procUnitItems(): |
|
4312 | 4310 | # |
|
4313 | 4311 | # if not thisPuObj.name == "SendToServer": |
|
4314 | 4312 | # continue |
|
4315 | 4313 | # |
|
4316 | 4314 | # opObj = thisPuObj.getOperationObj(name='run') |
|
4317 | 4315 | # |
|
4318 | 4316 | # parmObj = opObj.getParameterObj('localfolder') |
|
4319 | 4317 | # |
|
4320 | 4318 | # #localfolder parameter should always be set, if it is not set then ProcUnit should be removed |
|
4321 | 4319 | # if not parmObj: |
|
4322 | 4320 | # projectObj.removeProcUnit(thisPuId) |
|
4323 | 4321 | # continue |
|
4324 | 4322 | # |
|
4325 | 4323 | # thisLocalfolder = parmObj.getValue() |
|
4326 | 4324 | # |
|
4327 | 4325 | # if localfolder != thisLocalfolder: |
|
4328 | 4326 | # continue |
|
4329 | 4327 | # |
|
4330 | 4328 | # puId = thisPuId |
|
4331 | 4329 | # puObj = thisPuObj |
|
4332 | 4330 | # break |
|
4333 | 4331 | # |
|
4334 | 4332 | # return puObj |
|
4335 | 4333 | |
|
4336 | 4334 | def createFTPProcUnitView(self): |
|
4337 | 4335 | |
|
4338 | 4336 | if not self.temporalFTP.create: |
|
4339 | 4337 | self.temporalFTP.setwithoutconfiguration() |
|
4340 | 4338 | |
|
4341 | 4339 | projectObj = self.getSelectedProjectObj() |
|
4342 | 4340 | |
|
4343 | 4341 | if not projectObj: |
|
4344 | 4342 | return |
|
4345 | 4343 | |
|
4346 | 4344 | self.removeAllFTPProcUnitView(projectObj) |
|
4347 | 4345 | |
|
4348 | 4346 | if not self.__puLocalFolder2FTP: |
|
4349 | 4347 | return |
|
4350 | 4348 | |
|
4351 | 4349 | folderList = ",".join(self.__puLocalFolder2FTP.values()) |
|
4352 | 4350 | |
|
4353 | 4351 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") |
|
4354 | 4352 | |
|
4355 | 4353 | procUnitConfObj.addParameter(name='server', value=self.temporalFTP.server, format='str') |
|
4356 | 4354 | procUnitConfObj.addParameter(name='username', value=self.temporalFTP.username, format='str') |
|
4357 | 4355 | procUnitConfObj.addParameter(name='password', value=self.temporalFTP.password, format='str') |
|
4358 | 4356 | procUnitConfObj.addParameter(name='localfolder', value=folderList, format='list') |
|
4359 | 4357 | procUnitConfObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str') |
|
4360 | 4358 | procUnitConfObj.addParameter(name='ext', value=self.temporalFTP.extension, format='str') |
|
4361 | 4359 | procUnitConfObj.addParameter(name='period', value=self.temporalFTP.period, format='int') |
|
4362 | 4360 | procUnitConfObj.addParameter(name='protocol', value=self.temporalFTP.protocol, format='str') |
|
4363 | 4361 | |
|
4364 | 4362 | procUnitConfObj.addParameter(name='ftp_wei', value=self.temporalFTP.ftp_wei, format='int') |
|
4365 | 4363 | procUnitConfObj.addParameter(name='exp_code', value=self.temporalFTP.exp_code, format='int') |
|
4366 | 4364 | procUnitConfObj.addParameter(name='sub_exp_code', value=self.temporalFTP.sub_exp_code, format='int') |
|
4367 | 4365 | procUnitConfObj.addParameter(name='plot_pos', value=self.temporalFTP.plot_pos, format='int') |
|
4368 | 4366 | |
|
4369 | 4367 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
4370 | 4368 | |
|
4371 | 4369 | def removeAllFTPProcUnitView(self, projectObj): |
|
4372 | 4370 | |
|
4373 | 4371 | for thisPuId, thisPuObj in projectObj.procUnitItems(): |
|
4374 | 4372 | |
|
4375 | 4373 | if not thisPuObj.name == "SendToServer": |
|
4376 | 4374 | continue |
|
4377 | 4375 | |
|
4378 | 4376 | projectObj.removeProcUnit(thisPuId) |
|
4379 | 4377 | |
|
4380 | 4378 | if thisPuId not in self.__puObjDict.keys(): |
|
4381 | 4379 | continue |
|
4382 | 4380 | |
|
4383 | 4381 | self.__puObjDict.pop(thisPuId) |
|
4384 | 4382 | |
|
4385 | 4383 | def showPUinitView(self): |
|
4386 | 4384 | |
|
4387 | 4385 | self.propertiesModel = TreeModel() |
|
4388 | 4386 | self.propertiesModel.initPUVoltageView() |
|
4389 | 4387 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4390 | 4388 | self.treeProjectProperties.expandAll() |
|
4391 | 4389 | self.treeProjectProperties.allColumnsShowFocus() |
|
4392 | 4390 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4393 | 4391 | |
|
4394 | 4392 | def saveFTPFromOpObj(self, operationObj): |
|
4395 | 4393 | |
|
4396 | 4394 | if operationObj.name != "SendByFTP": |
|
4397 | 4395 | return |
|
4398 | 4396 | |
|
4399 | 4397 | server = operationObj.getParameterValue("server") |
|
4400 | 4398 | username = operationObj.getParameterValue("username") |
|
4401 | 4399 | password = operationObj.getParameterValue("password") |
|
4402 | 4400 | localfolder = operationObj.getParameterValue("localfolder") |
|
4403 | 4401 | remotefolder = operationObj.getParameterValue("remotefolder") |
|
4404 | 4402 | ext = operationObj.getParameterValue("ext") |
|
4405 | 4403 | period = operationObj.getParameterValue("period") |
|
4406 | 4404 | |
|
4407 | 4405 | self.temporalFTP.save(server=server, |
|
4408 | 4406 | remotefolder=remotefolder, |
|
4409 | 4407 | username=username, |
|
4410 | 4408 | password=password, |
|
4411 | 4409 | localfolder=localfolder, |
|
4412 | 4410 | extension=ext) |
|
4413 | 4411 | |
|
4414 | 4412 | return |
|
4415 | 4413 | |
|
4416 | 4414 | def saveFTPFromProcUnitObj(self, puObj): |
|
4417 | 4415 | |
|
4418 | 4416 | opObj = puObj.getOperationObj(name="run") |
|
4419 | 4417 | |
|
4420 | 4418 | parmObj = opObj.getParameterObj(parameterName="server") |
|
4421 | 4419 | if parmObj == None: |
|
4422 | 4420 | server = 'jro-app.igp.gob.pe' |
|
4423 | 4421 | else: |
|
4424 | 4422 | server = parmObj.getValue() |
|
4425 | 4423 | |
|
4426 | 4424 | parmObj = opObj.getParameterObj(parameterName="remotefolder") |
|
4427 | 4425 | if parmObj == None: |
|
4428 | 4426 | remotefolder = '/home/wmaster/graficos' |
|
4429 | 4427 | else: |
|
4430 | 4428 | remotefolder = parmObj.getValue() |
|
4431 | 4429 | |
|
4432 | 4430 | parmObj = opObj.getParameterObj(parameterName="username") |
|
4433 | 4431 | if parmObj == None: |
|
4434 | 4432 | username = 'wmaster' |
|
4435 | 4433 | else: |
|
4436 | 4434 | username = parmObj.getValue() |
|
4437 | 4435 | |
|
4438 | 4436 | parmObj = opObj.getParameterObj(parameterName="password") |
|
4439 | 4437 | if parmObj == None: |
|
4440 | 4438 | password = 'mst2010vhf' |
|
4441 | 4439 | else: |
|
4442 | 4440 | password = parmObj.getValue() |
|
4443 | 4441 | |
|
4444 | 4442 | parmObj = opObj.getParameterObj(parameterName="ftp_wei") |
|
4445 | 4443 | if parmObj == None: |
|
4446 | 4444 | ftp_wei = 0 |
|
4447 | 4445 | else: |
|
4448 | 4446 | ftp_wei = parmObj.getValue() |
|
4449 | 4447 | |
|
4450 | 4448 | parmObj = opObj.getParameterObj(parameterName="exp_code") |
|
4451 | 4449 | if parmObj == None: |
|
4452 | 4450 | exp_code = 0 |
|
4453 | 4451 | else: |
|
4454 | 4452 | exp_code = parmObj.getValue() |
|
4455 | 4453 | |
|
4456 | 4454 | parmObj = opObj.getParameterObj(parameterName="sub_exp_code") |
|
4457 | 4455 | if parmObj == None: |
|
4458 | 4456 | sub_exp_code = 0 |
|
4459 | 4457 | else: |
|
4460 | 4458 | sub_exp_code = parmObj.getValue() |
|
4461 | 4459 | |
|
4462 | 4460 | parmObj = opObj.getParameterObj(parameterName="plot_pos") |
|
4463 | 4461 | if parmObj == None: |
|
4464 | 4462 | plot_pos = 0 |
|
4465 | 4463 | else: |
|
4466 | 4464 | plot_pos = parmObj.getValue() |
|
4467 | 4465 | |
|
4468 | 4466 | parmObj = opObj.getParameterObj(parameterName="localfolder") |
|
4469 | 4467 | if parmObj == None: |
|
4470 | 4468 | localfolder = None |
|
4471 | 4469 | else: |
|
4472 | 4470 | localfolder = parmObj.getValue() |
|
4473 | 4471 | |
|
4474 | 4472 | parmObj = opObj.getParameterObj(parameterName="ext") |
|
4475 | 4473 | if parmObj == None: |
|
4476 | 4474 | extension = '.png' |
|
4477 | 4475 | else: |
|
4478 | 4476 | extension = parmObj.getValue() |
|
4479 | 4477 | |
|
4480 | 4478 | self.temporalFTP.save(server=server, |
|
4481 | 4479 | remotefolder=remotefolder, |
|
4482 | 4480 | username=username, |
|
4483 | 4481 | password=password, |
|
4484 | 4482 | ftp_wei=ftp_wei, |
|
4485 | 4483 | exp_code=exp_code, |
|
4486 | 4484 | sub_exp_code=sub_exp_code, |
|
4487 | 4485 | plot_pos=plot_pos, |
|
4488 | 4486 | localfolder=localfolder, |
|
4489 | 4487 | extension=extension) |
|
4490 | 4488 | |
|
4491 | 4489 | def addProject2ProjectExplorer(self, id, name): |
|
4492 | 4490 | |
|
4493 | 4491 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4494 | 4492 | |
|
4495 | 4493 | parentItem = self.projectExplorerModel.invisibleRootItem() |
|
4496 | 4494 | parentItem.appendRow(itemTree) |
|
4497 | 4495 | |
|
4498 | 4496 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) |
|
4499 | 4497 | |
|
4500 | 4498 | self.selectedItemTree = itemTree |
|
4501 | 4499 | |
|
4502 | 4500 | self.__itemTreeDict[id] = itemTree |
|
4503 | 4501 | |
|
4504 | 4502 | def addPU2ProjectExplorer(self, puObj): |
|
4505 | 4503 | |
|
4506 | 4504 | id, name = puObj.id, puObj.datatype |
|
4507 | 4505 | |
|
4508 | 4506 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4509 | 4507 | |
|
4510 | 4508 | parentItem = self.selectedItemTree |
|
4511 | 4509 | parentItem.appendRow(itemTree) |
|
4512 | 4510 | self.projectExplorerTree.expandAll() |
|
4513 | 4511 | |
|
4514 | 4512 | self.projectExplorerTree.setCurrentIndex(itemTree.index()) |
|
4515 | 4513 | |
|
4516 | 4514 | self.selectedItemTree = itemTree |
|
4517 | 4515 | |
|
4518 | 4516 | self.__itemTreeDict[id] = itemTree |
|
4519 | 4517 | |
|
4520 | 4518 | def addPU2PELoadXML(self, puObj): |
|
4521 | 4519 | |
|
4522 | 4520 | id, name, inputId = puObj.id, puObj.datatype, puObj.inputId |
|
4523 | 4521 | |
|
4524 | 4522 | itemTree = QtGui.QStandardItem(QtCore.QString(str(name))) |
|
4525 | 4523 | |
|
4526 | 4524 | if self.__itemTreeDict.has_key(inputId): |
|
4527 | 4525 | parentItem = self.__itemTreeDict[inputId] |
|
4528 | 4526 | else: |
|
4529 | 4527 | #If parent is a Reader object |
|
4530 | 4528 | parentItem = self.__itemTreeDict[id[:-1]] |
|
4531 | 4529 | |
|
4532 | 4530 | parentItem.appendRow(itemTree) |
|
4533 | 4531 | self.projectExplorerTree.expandAll() |
|
4534 | 4532 | parentItem = itemTree |
|
4535 | 4533 | self.projectExplorerTree.setCurrentIndex(parentItem.index()) |
|
4536 | 4534 | |
|
4537 | 4535 | self.__itemTreeDict[id] = itemTree |
|
4538 | 4536 | self.selectedItemTree = itemTree |
|
4539 | 4537 | |
|
4540 | 4538 | def getSelectedProjectObj(self): |
|
4541 | 4539 | """ |
|
4542 | 4540 | Return the current project object selected. If a processing unit is |
|
4543 | 4541 | actually selected this function returns associated project. |
|
4544 | 4542 | |
|
4545 | 4543 | None if any project or processing unit is selected |
|
4546 | 4544 | """ |
|
4547 | 4545 | for key in self.__itemTreeDict.keys(): |
|
4548 | 4546 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4549 | 4547 | continue |
|
4550 | 4548 | |
|
4551 | 4549 | if self.__projectObjDict.has_key(key): |
|
4552 | 4550 | projectObj = self.__projectObjDict[key] |
|
4553 | 4551 | return projectObj |
|
4554 | 4552 | |
|
4555 | 4553 | puObj = self.__puObjDict[key] |
|
4556 | 4554 | |
|
4557 | 4555 | if puObj.parentId == None: |
|
4558 | 4556 | projectId = puObj.getId()[0] |
|
4559 | 4557 | else: |
|
4560 | 4558 | projectId = puObj.parentId |
|
4561 | 4559 | |
|
4562 | 4560 | projectObj = self.__projectObjDict[projectId] |
|
4563 | 4561 | return projectObj |
|
4564 | 4562 | |
|
4565 | 4563 | return None |
|
4566 | 4564 | |
|
4567 | 4565 | def getSelectedItemObj(self): |
|
4568 | 4566 | """ |
|
4569 | 4567 | Return the current project or processing unit object selected |
|
4570 | 4568 | |
|
4571 | 4569 | None if any project or processing unit is selected |
|
4572 | 4570 | """ |
|
4573 | 4571 | for key in self.__itemTreeDict.keys(): |
|
4574 | 4572 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4575 | 4573 | continue |
|
4576 | 4574 | |
|
4577 | 4575 | if self.__projectObjDict.has_key(key) == True: |
|
4578 | 4576 | fatherObj = self.__projectObjDict[key] |
|
4579 | 4577 | else: |
|
4580 | 4578 | fatherObj = self.__puObjDict[key] |
|
4581 | 4579 | |
|
4582 | 4580 | return fatherObj |
|
4583 | 4581 | |
|
4584 | 4582 | return None |
|
4585 | 4583 | |
|
4586 | 4584 | def _WarningWindow(self, text, information): |
|
4587 | 4585 | |
|
4588 | 4586 | msgBox = QtGui.QMessageBox() |
|
4589 | 4587 | msgBox.setText(text) |
|
4590 | 4588 | msgBox.setInformativeText(information) |
|
4591 | 4589 | msgBox.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel) |
|
4592 | 4590 | msgBox.setDefaultButton(QtGui.QMessageBox.Ok) |
|
4593 | 4591 | ret = msgBox.exec_() |
|
4594 | 4592 | |
|
4595 | 4593 | answer = False |
|
4596 | 4594 | |
|
4597 | 4595 | if ret == QtGui.QMessageBox.Ok: |
|
4598 | 4596 | answer = True |
|
4599 | 4597 | |
|
4600 | 4598 | return answer |
|
4601 | 4599 | |
|
4602 | 4600 | def __getNewProjectId(self): |
|
4603 | 4601 | |
|
4604 | 4602 | loadProject = False |
|
4605 | 4603 | |
|
4606 | 4604 | for thisId in range(1,10): |
|
4607 | 4605 | newId = str(thisId) |
|
4608 | 4606 | if newId in self.__projectObjDict.keys(): |
|
4609 | 4607 | continue |
|
4610 | 4608 | |
|
4611 | 4609 | loadProject = True |
|
4612 | 4610 | projectId = newId |
|
4613 | 4611 | break |
|
4614 | 4612 | |
|
4615 | 4613 | if not loadProject: |
|
4616 | 4614 | self.console.clear() |
|
4617 | 4615 | self.console.append("The maximum number of projects has been loaded, a new project can not be loaded") |
|
4618 | 4616 | return None |
|
4619 | 4617 | |
|
4620 | 4618 | return projectId |
|
4621 | 4619 | |
|
4622 | 4620 | def openProject(self): |
|
4623 | 4621 | |
|
4624 | 4622 | self.actionStart.setEnabled(False) |
|
4625 | 4623 | self.actionStarToolbar.setEnabled(False) |
|
4626 | 4624 | |
|
4627 | 4625 | self.create = False |
|
4628 | 4626 | self.frame_2.setEnabled(True) |
|
4629 | 4627 | |
|
4630 | 4628 | # print self.dir |
|
4631 | 4629 | filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)"))) |
|
4632 | 4630 | |
|
4633 | 4631 | projectObjLoad = Project() |
|
4634 | 4632 | |
|
4635 | 4633 | try: |
|
4636 | 4634 | projectObjLoad.readXml(filename) |
|
4637 | 4635 | except: |
|
4638 | 4636 | self.console.clear() |
|
4639 | 4637 | self.console.append("The selected xml file could not be loaded ...") |
|
4640 | 4638 | return 0 |
|
4641 | 4639 | |
|
4642 | 4640 | self.refreshProjectWindow(projectObjLoad) |
|
4643 | 4641 | self.refreshProjectProperties(projectObjLoad) |
|
4644 | 4642 | |
|
4645 | 4643 | projectId = projectObjLoad.id |
|
4646 | 4644 | |
|
4647 | 4645 | if projectId in self.__projectObjDict.keys(): |
|
4648 | 4646 | |
|
4649 | 4647 | # answer = self._WarningWindow("You already have a project loaded with the same Id", |
|
4650 | 4648 | # "Do you want to load the file anyway?") |
|
4651 | 4649 | # if not answer: |
|
4652 | 4650 | # return |
|
4653 | 4651 | |
|
4654 | 4652 | projectId = self.__getNewProjectId() |
|
4655 | 4653 | |
|
4656 | 4654 | if not projectId: |
|
4657 | 4655 | return |
|
4658 | 4656 | |
|
4659 | 4657 | projectObjLoad.updateId(projectId) |
|
4660 | 4658 | |
|
4661 | 4659 | self.__projectObjDict[projectId] = projectObjLoad |
|
4662 | 4660 | |
|
4663 | 4661 | self.addProject2ProjectExplorer(id=projectId, name=projectObjLoad.name) |
|
4664 | 4662 | |
|
4665 | 4663 | self.tabWidgetProject.setEnabled(True) |
|
4666 | 4664 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4667 | 4665 | # Disable tabProject after finish the creation |
|
4668 | 4666 | self.tabProject.setEnabled(True) |
|
4669 | 4667 | puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0])) |
|
4670 | 4668 | |
|
4671 | 4669 | for puId, puObj in puObjorderList.items(): |
|
4672 | 4670 | |
|
4673 | 4671 | self.__puObjDict[puId] = puObj |
|
4674 | 4672 | |
|
4675 | 4673 | if puObj.name == "SendToServer": |
|
4676 | 4674 | self.saveFTPFromProcUnitObj(puObj) |
|
4677 | 4675 | |
|
4678 | 4676 | ############## COMPATIBLE WITH OLD VERSIONS ################ |
|
4679 | 4677 | operationObj = puObj.getOperationObj("SendByFTP") |
|
4680 | 4678 | |
|
4681 | 4679 | if operationObj: |
|
4682 | 4680 | self.saveFTPFromOpObj(operationObj) |
|
4683 | 4681 | ############################################################ |
|
4684 | 4682 | |
|
4685 | 4683 | if puObj.inputId == '0': |
|
4686 | 4684 | continue |
|
4687 | 4685 | |
|
4688 | 4686 | self.addPU2PELoadXML(puObj) |
|
4689 | 4687 | |
|
4690 | 4688 | self.refreshPUWindow(puObj) |
|
4691 | 4689 | self.refreshPUProperties(puObj) |
|
4692 | 4690 | self.showtabPUCreated(datatype=puObj.datatype) |
|
4693 | 4691 | |
|
4694 | 4692 | self.console.clear() |
|
4695 | 4693 | self.console.append("The selected xml file has been loaded successfully") |
|
4696 | 4694 | |
|
4697 | 4695 | self.actionStart.setEnabled(True) |
|
4698 | 4696 | self.actionStarToolbar.setEnabled(True) |
|
4699 | 4697 | |
|
4700 | 4698 | def create_updating_timer(self): |
|
4701 | 4699 | self.comm_data_timer = QtCore.QTimer(self) |
|
4702 | 4700 | self.comm_data_timer.timeout.connect(self.on_comm_updating_timer) |
|
4703 | 4701 | self.comm_data_timer.start(1000) |
|
4704 | 4702 | |
|
4705 | 4703 | def on_comm_updating_timer(self): |
|
4706 | 4704 | # Verifica si algun proceso ha sido inicializado y sigue ejecutandose |
|
4707 | 4705 | # Si el proceso se ha parado actualizar el GUI (stopProject) |
|
4708 | 4706 | if not self.__enable: |
|
4709 | 4707 | return |
|
4710 | 4708 | |
|
4711 | 4709 | if self.controllerThread.isFinished(): |
|
4712 | 4710 | self.stopProject() |
|
4713 | 4711 | |
|
4714 | 4712 | # def jobStartedFromThread(self, success): |
|
4715 | 4713 | # |
|
4716 | 4714 | # self.console.clear() |
|
4717 | 4715 | # self.console.append("Job started") |
|
4718 | 4716 | # |
|
4719 | 4717 | # def jobFinishedFromThread(self, success): |
|
4720 | 4718 | # |
|
4721 | 4719 | # self.stopProject() |
|
4722 | 4720 | |
|
4723 | 4721 | def playProject(self, ext=".xml", save=1): |
|
4724 | 4722 | |
|
4725 | 4723 | projectObj = self.getSelectedProjectObj() |
|
4726 | 4724 | |
|
4727 | 4725 | if not projectObj: |
|
4728 | 4726 | self.console.append("Please select a project before pressing PLAY button") |
|
4729 | 4727 | return |
|
4730 | 4728 | |
|
4731 | 4729 | if save: |
|
4732 | 4730 | filename = self.saveProject() |
|
4733 | 4731 | if filename == None: |
|
4734 | 4732 | self.console.append("Process did not initialize.") |
|
4735 | 4733 | return |
|
4736 | 4734 | else: |
|
4737 | 4735 | filename = TEMPORAL_FILE |
|
4738 | 4736 | projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) ) |
|
4739 | 4737 | |
|
4740 | 4738 | self.actionStart.setEnabled(False) |
|
4741 | 4739 | self.actionPause.setEnabled(True) |
|
4742 | 4740 | self.actionStop.setEnabled(True) |
|
4743 | 4741 | |
|
4744 | 4742 | self.actionStarToolbar.setEnabled(False) |
|
4745 | 4743 | self.actionPauseToolbar.setEnabled(True) |
|
4746 | 4744 | self.actionStopToolbar.setEnabled(True) |
|
4747 | 4745 | |
|
4748 | 4746 | self.console.append("Please Wait...") |
|
4749 | 4747 | |
|
4750 | 4748 | self.controllerThread = ControllerThread(filename) |
|
4751 | 4749 | |
|
4752 | 4750 | # QObject.connect( self.controllerThread, SIGNAL( "jobFinished( PyQt_PyObject )" ), self.jobFinishedFromThread ) |
|
4753 | 4751 | # QObject.connect( self.controllerThread, SIGNAL( "jobStarted( PyQt_PyObject )" ), self.jobStartedFromThread ) |
|
4754 | 4752 | self.console.clear() |
|
4755 | 4753 | self.controllerThread.start() |
|
4756 | 4754 | sleep(0.5) |
|
4757 | 4755 | self.__enable = True |
|
4758 | 4756 | |
|
4759 | 4757 | def stopProject(self): |
|
4760 | 4758 | |
|
4761 | 4759 | self.__enable = False |
|
4762 | 4760 | |
|
4763 | 4761 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.STOP, True)) |
|
4764 | 4762 | self.controllerThread.stop() |
|
4765 | 4763 | |
|
4766 | 4764 | while self.controllerThread.isRunning(): |
|
4767 | 4765 | sleep(0.5) |
|
4768 | 4766 | |
|
4769 | 4767 | self.actionStart.setEnabled(True) |
|
4770 | 4768 | self.actionPause.setEnabled(False) |
|
4771 | 4769 | self.actionStop.setEnabled(False) |
|
4772 | 4770 | |
|
4773 | 4771 | self.actionStarToolbar.setEnabled(True) |
|
4774 | 4772 | self.actionPauseToolbar.setEnabled(False) |
|
4775 | 4773 | self.actionStopToolbar.setEnabled(False) |
|
4776 | 4774 | |
|
4777 | 4775 | self.restorePauseIcon() |
|
4778 | 4776 | |
|
4779 | 4777 | def pauseProject(self): |
|
4780 | 4778 | |
|
4781 | 4779 | # self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True)) |
|
4782 | 4780 | self.controllerThread.pause() |
|
4783 | 4781 | |
|
4784 | 4782 | self.actionStart.setEnabled(False) |
|
4785 | 4783 | self.actionPause.setEnabled(True) |
|
4786 | 4784 | self.actionStop.setEnabled(True) |
|
4787 | 4785 | |
|
4788 | 4786 | self.actionStarToolbar.setEnabled(False) |
|
4789 | 4787 | self.actionPauseToolbar.setEnabled(True) |
|
4790 | 4788 | self.actionStopToolbar.setEnabled(True) |
|
4791 | 4789 | |
|
4792 | 4790 | def saveProject(self, filename=None): |
|
4793 | 4791 | |
|
4794 | 4792 | self.actionStart.setEnabled(False) |
|
4795 | 4793 | self.actionStarToolbar.setEnabled(False) |
|
4796 | 4794 | |
|
4797 | 4795 | projectObj = self.getSelectedProjectObj() |
|
4798 | 4796 | |
|
4799 | 4797 | if not projectObj: |
|
4800 | 4798 | self.console.append("Please select a project before save it") |
|
4801 | 4799 | return |
|
4802 | 4800 | |
|
4803 | 4801 | self.refreshGraphicsId() |
|
4804 | 4802 | |
|
4805 | 4803 | sts = True |
|
4806 | 4804 | selectedItemObj = self.getSelectedItemObj() |
|
4807 | 4805 | |
|
4808 | 4806 | #A Processing Unit has been selected |
|
4809 | 4807 | if projectObj == selectedItemObj: |
|
4810 | 4808 | if not self.on_proOk_clicked(): |
|
4811 | 4809 | return None |
|
4812 | 4810 | |
|
4813 | 4811 | #A Processing Unit has been selected |
|
4814 | 4812 | if projectObj != selectedItemObj: |
|
4815 | 4813 | puObj = selectedItemObj |
|
4816 | 4814 | |
|
4817 | 4815 | if puObj.name == 'VoltageProc': |
|
4818 | 4816 | sts = self.on_volOpOk_clicked() |
|
4819 | 4817 | if puObj.name == 'SpectraProc': |
|
4820 | 4818 | sts = self.on_specOpOk_clicked() |
|
4821 | 4819 | if puObj.name == 'SpectraHeisProc': |
|
4822 | 4820 | sts = self.on_specHeisOpOk_clicked() |
|
4823 | 4821 | |
|
4824 | 4822 | if not sts: |
|
4825 | 4823 | return None |
|
4826 | 4824 | |
|
4827 | 4825 | self.createFTPProcUnitView() |
|
4828 | 4826 | |
|
4829 | 4827 | if not filename: |
|
4830 | 4828 | filename = os.path.join( str(self.pathWorkSpace), "%s%s" %(str(projectObj.name), '.xml') ) |
|
4831 | 4829 | |
|
4832 | 4830 | projectObj.writeXml(filename) |
|
4833 | 4831 | self.console.clear() |
|
4834 | 4832 | self.console.append("Project saved") |
|
4835 | 4833 | self.console.append("Press Play button to start data processing ...") |
|
4836 | 4834 | |
|
4837 | 4835 | self.actionStart.setEnabled(True) |
|
4838 | 4836 | self.actionStarToolbar.setEnabled(True) |
|
4839 | 4837 | |
|
4840 | 4838 | return filename |
|
4841 | 4839 | |
|
4842 | 4840 | def removeItemTreeFromProject(self): |
|
4843 | 4841 | """ |
|
4844 | 4842 | Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol |
|
4845 | 4843 | """ |
|
4846 | 4844 | for key in self.__itemTreeDict.keys(): |
|
4847 | 4845 | |
|
4848 | 4846 | #Check again because an item can delete multiple items (childs) |
|
4849 | 4847 | if key not in self.__itemTreeDict.keys(): |
|
4850 | 4848 | continue |
|
4851 | 4849 | |
|
4852 | 4850 | if self.__itemTreeDict[key] != self.selectedItemTree: |
|
4853 | 4851 | continue |
|
4854 | 4852 | |
|
4855 | 4853 | if self.__projectObjDict.has_key(key) == True: |
|
4856 | 4854 | |
|
4857 | 4855 | del self.__projectObjDict[key] |
|
4858 | 4856 | del self.__itemTreeDict[key] |
|
4859 | 4857 | |
|
4860 | 4858 | else: |
|
4861 | 4859 | puObj = self.__puObjDict[key] |
|
4862 | 4860 | idProjectParent = puObj.parentId |
|
4863 | 4861 | projectObj = self.__projectObjDict[idProjectParent] |
|
4864 | 4862 | |
|
4865 | 4863 | del self.__puObjDict[key] |
|
4866 | 4864 | del self.__itemTreeDict[key] |
|
4867 | 4865 | del projectObj.procUnitConfObjDict[key] |
|
4868 | 4866 | |
|
4869 | 4867 | for key in projectObj.procUnitConfObjDict.keys(): |
|
4870 | 4868 | if projectObj.procUnitConfObjDict[key].inputId != puObj.getId(): |
|
4871 | 4869 | continue |
|
4872 | 4870 | del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()] |
|
4873 | 4871 | del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()] |
|
4874 | 4872 | del projectObj.procUnitConfObjDict[key] |
|
4875 | 4873 | # print projectObj.procUnitConfObjDict |
|
4876 | 4874 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict |
|
4877 | 4875 | |
|
4878 | 4876 | def setInputsProject_View(self): |
|
4879 | 4877 | |
|
4880 | 4878 | self.tabWidgetProject.setEnabled(True) |
|
4881 | 4879 | self.tabWidgetProject.setCurrentWidget(self.tabProject) |
|
4882 | 4880 | self.tabProject.setEnabled(True) |
|
4883 | 4881 | self.frame_2.setEnabled(False) |
|
4884 | 4882 | self.proName.clear() |
|
4885 | 4883 | self.proName.setFocus() |
|
4886 | 4884 | self.proName.setSelection(0, 0) |
|
4887 | 4885 | self.proName.setCursorPosition(0) |
|
4888 | 4886 | self.proDataType.setText('.r') |
|
4889 | 4887 | self.proDataPath.clear() |
|
4890 | 4888 | self.proComDataType.clear() |
|
4891 | 4889 | self.proComDataType.addItem("Voltage") |
|
4892 | 4890 | self.proComDataType.addItem("Spectra") |
|
4893 | 4891 | self.proComDataType.addItem("Fits") |
|
4894 | 4892 | self.proComDataType.addItem("USRP") |
|
4895 | 4893 | |
|
4896 | 4894 | self.proComStartDate.clear() |
|
4897 | 4895 | self.proComEndDate.clear() |
|
4898 | 4896 | |
|
4899 | 4897 | startTime = "00:00:00" |
|
4900 | 4898 | endTime = "23:59:59" |
|
4901 | 4899 | starlist = startTime.split(":") |
|
4902 | 4900 | endlist = endTime.split(":") |
|
4903 | 4901 | self.proDelay.setText("60") |
|
4904 | 4902 | self.proSet.setText("") |
|
4905 | 4903 | |
|
4906 | 4904 | self.labelSet.show() |
|
4907 | 4905 | self.proSet.show() |
|
4908 | 4906 | |
|
4909 | 4907 | self.labelIPPKm.hide() |
|
4910 | 4908 | self.proIPPKm.hide() |
|
4911 | 4909 | |
|
4912 | 4910 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
4913 | 4911 | self.proStartTime.setTime(self.time) |
|
4914 | 4912 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
4915 | 4913 | self.proEndTime.setTime(self.time) |
|
4916 | 4914 | self.proDescription.clear() |
|
4917 | 4915 | self.proOk.setEnabled(False) |
|
4918 | 4916 | # self.console.append("Please, Write a name Project") |
|
4919 | 4917 | # self.console.append("Introduce Project Parameters")DC |
|
4920 | 4918 | # self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)") |
|
4921 | 4919 | |
|
4922 | 4920 | def clearPUWindow(self, datatype): |
|
4923 | 4921 | |
|
4924 | 4922 | projectObjView = self.getSelectedProjectObj() |
|
4925 | 4923 | |
|
4926 | 4924 | if not projectObjView: |
|
4927 | 4925 | return |
|
4928 | 4926 | |
|
4929 | 4927 | puObj = self.getSelectedItemObj() |
|
4930 | 4928 | inputId = puObj.getInputId() |
|
4931 | 4929 | inputPUObj = projectObjView.getProcUnitObj(inputId) |
|
4932 | 4930 | |
|
4933 | 4931 | if datatype == 'Voltage': |
|
4934 | 4932 | self.volOpComChannels.setEnabled(False) |
|
4935 | 4933 | self.volOpComHeights.setEnabled(False) |
|
4936 | 4934 | self.volOpFilter.setEnabled(False) |
|
4937 | 4935 | self.volOpComProfile.setEnabled(False) |
|
4938 | 4936 | self.volOpComCode.setEnabled(False) |
|
4939 | 4937 | self.volOpCohInt.setEnabled(False) |
|
4940 | 4938 | self.volOpChannel.setEnabled(False) |
|
4941 | 4939 | self.volOpHeights.setEnabled(False) |
|
4942 | 4940 | self.volOpProfile.setEnabled(False) |
|
4943 | 4941 | self.volOpRadarfrequency.setEnabled(False) |
|
4944 | 4942 | self.volOpCebChannels.setCheckState(0) |
|
4945 | 4943 | self.volOpCebRadarfrequency.setCheckState(0) |
|
4946 | 4944 | self.volOpCebHeights.setCheckState(0) |
|
4947 | 4945 | self.volOpCebFilter.setCheckState(0) |
|
4948 | 4946 | self.volOpCebProfile.setCheckState(0) |
|
4949 | 4947 | self.volOpCebDecodification.setCheckState(0) |
|
4950 | 4948 | self.volOpCebCohInt.setCheckState(0) |
|
4951 | 4949 | |
|
4952 | 4950 | self.volOpChannel.clear() |
|
4953 | 4951 | self.volOpHeights.clear() |
|
4954 | 4952 | self.volOpProfile.clear() |
|
4955 | 4953 | self.volOpFilter.clear() |
|
4956 | 4954 | self.volOpCohInt.clear() |
|
4957 | 4955 | self.volOpRadarfrequency.clear() |
|
4958 | 4956 | |
|
4959 | 4957 | if datatype == 'Spectra': |
|
4960 | 4958 | |
|
4961 | 4959 | if inputPUObj.datatype == 'Spectra': |
|
4962 | 4960 | self.specOpnFFTpoints.setEnabled(False) |
|
4963 | 4961 | self.specOpProfiles.setEnabled(False) |
|
4964 | 4962 | self.specOpippFactor.setEnabled(False) |
|
4965 | 4963 | else: |
|
4966 | 4964 | self.specOpnFFTpoints.setEnabled(True) |
|
4967 | 4965 | self.specOpProfiles.setEnabled(True) |
|
4968 | 4966 | self.specOpippFactor.setEnabled(True) |
|
4969 | 4967 | |
|
4970 | 4968 | self.specOpCebCrossSpectra.setCheckState(0) |
|
4971 | 4969 | self.specOpCebChannel.setCheckState(0) |
|
4972 | 4970 | self.specOpCebHeights.setCheckState(0) |
|
4973 | 4971 | self.specOpCebIncoherent.setCheckState(0) |
|
4974 | 4972 | self.specOpCebRemoveDC.setCheckState(0) |
|
4975 | 4973 | self.specOpCebRemoveInt.setCheckState(0) |
|
4976 | 4974 | self.specOpCebgetNoise.setCheckState(0) |
|
4977 | 4975 | self.specOpCebRadarfrequency.setCheckState(0) |
|
4978 | 4976 | |
|
4979 | 4977 | self.specOpRadarfrequency.setEnabled(False) |
|
4980 | 4978 | self.specOppairsList.setEnabled(False) |
|
4981 | 4979 | self.specOpChannel.setEnabled(False) |
|
4982 | 4980 | self.specOpHeights.setEnabled(False) |
|
4983 | 4981 | self.specOpIncoherent.setEnabled(False) |
|
4984 | 4982 | self.specOpgetNoise.setEnabled(False) |
|
4985 | 4983 | |
|
4986 | 4984 | self.specOpRadarfrequency.clear() |
|
4987 | 4985 | self.specOpnFFTpoints.clear() |
|
4988 | 4986 | self.specOpProfiles.clear() |
|
4989 | 4987 | self.specOpippFactor.clear |
|
4990 | 4988 | self.specOppairsList.clear() |
|
4991 | 4989 | self.specOpChannel.clear() |
|
4992 | 4990 | self.specOpHeights.clear() |
|
4993 | 4991 | self.specOpIncoherent.clear() |
|
4994 | 4992 | self.specOpgetNoise.clear() |
|
4995 | 4993 | |
|
4996 | 4994 | self.specGraphCebSpectraplot.setCheckState(0) |
|
4997 | 4995 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
4998 | 4996 | self.specGraphCebRTIplot.setCheckState(0) |
|
4999 | 4997 | self.specGraphCebRTInoise.setCheckState(0) |
|
5000 | 4998 | self.specGraphCebCoherencmap.setCheckState(0) |
|
5001 | 4999 | self.specGraphPowerprofile.setCheckState(0) |
|
5002 | 5000 | |
|
5003 | 5001 | self.specGraphSaveSpectra.setCheckState(0) |
|
5004 | 5002 | self.specGraphSaveCross.setCheckState(0) |
|
5005 | 5003 | self.specGraphSaveRTIplot.setCheckState(0) |
|
5006 | 5004 | self.specGraphSaveRTInoise.setCheckState(0) |
|
5007 | 5005 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
5008 | 5006 | self.specGraphSavePowerprofile.setCheckState(0) |
|
5009 | 5007 | |
|
5010 | 5008 | self.specGraphftpRTIplot.setCheckState(0) |
|
5011 | 5009 | self.specGraphftpRTInoise.setCheckState(0) |
|
5012 | 5010 | self.specGraphftpCoherencemap.setCheckState(0) |
|
5013 | 5011 | |
|
5014 | 5012 | self.specGraphPath.clear() |
|
5015 | 5013 | self.specGraphPrefix.clear() |
|
5016 | 5014 | |
|
5017 | 5015 | self.specGgraphftpratio.clear() |
|
5018 | 5016 | |
|
5019 | 5017 | self.specGgraphChannelList.clear() |
|
5020 | 5018 | self.specGgraphFreq.clear() |
|
5021 | 5019 | self.specGgraphHeight.clear() |
|
5022 | 5020 | self.specGgraphDbsrange.clear() |
|
5023 | 5021 | self.specGgraphmagnitud.clear() |
|
5024 | 5022 | self.specGgraphTminTmax.clear() |
|
5025 | 5023 | self.specGgraphTimeRange.clear() |
|
5026 | 5024 | |
|
5027 | 5025 | if datatype == 'SpectraHeis': |
|
5028 | 5026 | self.specHeisOpCebIncoherent.setCheckState(0) |
|
5029 | 5027 | self.specHeisOpIncoherent.setEnabled(False) |
|
5030 | 5028 | self.specHeisOpIncoherent.clear() |
|
5031 | 5029 | |
|
5032 | 5030 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
5033 | 5031 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
5034 | 5032 | |
|
5035 | 5033 | self.specHeisGraphSaveSpectra.setCheckState(0) |
|
5036 | 5034 | self.specHeisGraphSaveRTIplot.setCheckState(0) |
|
5037 | 5035 | |
|
5038 | 5036 | self.specHeisGraphftpSpectra.setCheckState(0) |
|
5039 | 5037 | self.specHeisGraphftpRTIplot.setCheckState(0) |
|
5040 | 5038 | |
|
5041 | 5039 | self.specHeisGraphPath.clear() |
|
5042 | 5040 | self.specHeisGraphPrefix.clear() |
|
5043 | 5041 | self.specHeisGgraphChannelList.clear() |
|
5044 | 5042 | self.specHeisGgraphXminXmax.clear() |
|
5045 | 5043 | self.specHeisGgraphYminYmax.clear() |
|
5046 | 5044 | self.specHeisGgraphTminTmax.clear() |
|
5047 | 5045 | self.specHeisGgraphTimeRange.clear() |
|
5048 | 5046 | self.specHeisGgraphftpratio.clear() |
|
5049 | 5047 | |
|
5050 | 5048 | def showtabPUCreated(self, datatype): |
|
5051 | 5049 | |
|
5052 | 5050 | if datatype == "Voltage": |
|
5053 | 5051 | self.tabVoltage.setEnabled(True) |
|
5054 | 5052 | self.tabProject.setEnabled(False) |
|
5055 | 5053 | self.tabSpectra.setEnabled(False) |
|
5056 | 5054 | self.tabCorrelation.setEnabled(False) |
|
5057 | 5055 | self.tabSpectraHeis.setEnabled(False) |
|
5058 | 5056 | self.tabWidgetProject.setCurrentWidget(self.tabVoltage) |
|
5059 | 5057 | |
|
5060 | 5058 | if datatype == "Spectra": |
|
5061 | 5059 | self.tabVoltage.setEnabled(False) |
|
5062 | 5060 | self.tabProject.setEnabled(False) |
|
5063 | 5061 | self.tabSpectra.setEnabled(True) |
|
5064 | 5062 | self.tabCorrelation.setEnabled(False) |
|
5065 | 5063 | self.tabSpectraHeis.setEnabled(False) |
|
5066 | 5064 | self.tabWidgetProject.setCurrentWidget(self.tabSpectra) |
|
5067 | 5065 | |
|
5068 | 5066 | if datatype == "SpectraHeis": |
|
5069 | 5067 | self.tabVoltage.setEnabled(False) |
|
5070 | 5068 | self.tabProject.setEnabled(False) |
|
5071 | 5069 | self.tabSpectra.setEnabled(False) |
|
5072 | 5070 | self.tabCorrelation.setEnabled(False) |
|
5073 | 5071 | self.tabSpectraHeis.setEnabled(True) |
|
5074 | 5072 | self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis) |
|
5075 | 5073 | |
|
5076 | 5074 | def checkInputsProject(self): |
|
5077 | 5075 | """ |
|
5078 | 5076 | Check Inputs Project: |
|
5079 | 5077 | - project_name |
|
5080 | 5078 | - datatype |
|
5081 | 5079 | - ext |
|
5082 | 5080 | - data_path |
|
5083 | 5081 | - readmode |
|
5084 | 5082 | - delay |
|
5085 | 5083 | - set |
|
5086 | 5084 | - walk |
|
5087 | 5085 | """ |
|
5088 | 5086 | parms_ok = True |
|
5089 | 5087 | project_name = str(self.proName.text()) |
|
5090 | 5088 | if project_name == '' or project_name == None: |
|
5091 | 5089 | outputstr = "Enter the Project Name" |
|
5092 | 5090 | self.console.append(outputstr) |
|
5093 | 5091 | parms_ok = False |
|
5094 | 5092 | project_name = None |
|
5095 | 5093 | |
|
5096 | 5094 | datatype = str(self.proComDataType.currentText()) |
|
5097 | 5095 | if not(datatype in ['Voltage', 'Spectra', 'Fits', 'USRP']): |
|
5098 | 5096 | outputstr = 'datatype = %s, this must be either Voltage, Spectra, SpectraHeis or USRP' % datatype |
|
5099 | 5097 | self.console.append(outputstr) |
|
5100 | 5098 | parms_ok = False |
|
5101 | 5099 | datatype = None |
|
5102 | 5100 | |
|
5103 | 5101 | ext = str(self.proDataType.text()) |
|
5104 | 5102 | if not(ext in ['.r', '.pdata', '.fits', '.hdf5']): |
|
5105 | 5103 | outputstr = "extension files must be .r , .pdata, .fits or .hdf5" |
|
5106 | 5104 | self.console.append(outputstr) |
|
5107 | 5105 | parms_ok = False |
|
5108 | 5106 | ext = None |
|
5109 | 5107 | |
|
5110 | 5108 | data_path = str(self.proDataPath.text()) |
|
5111 | 5109 | |
|
5112 | 5110 | if data_path == '': |
|
5113 | 5111 | outputstr = 'Datapath is empty' |
|
5114 | 5112 | self.console.append(outputstr) |
|
5115 | 5113 | parms_ok = False |
|
5116 | 5114 | data_path = None |
|
5117 | 5115 | |
|
5118 | 5116 | if data_path != None: |
|
5119 | 5117 | if not os.path.isdir(data_path): |
|
5120 | 5118 | outputstr = 'Datapath:%s does not exists' % data_path |
|
5121 | 5119 | self.console.append(outputstr) |
|
5122 | 5120 | parms_ok = False |
|
5123 | 5121 | data_path = None |
|
5124 | 5122 | |
|
5125 | 5123 | read_mode = str(self.proComReadMode.currentText()) |
|
5126 | 5124 | if not(read_mode in ['Online', 'Offline']): |
|
5127 | 5125 | outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode |
|
5128 | 5126 | self.console.append(outputstr) |
|
5129 | 5127 | parms_ok = False |
|
5130 | 5128 | read_mode = None |
|
5131 | 5129 | |
|
5132 | 5130 | delay = None |
|
5133 | 5131 | if read_mode == "Online": |
|
5134 | 5132 | parms_ok = False |
|
5135 | 5133 | try: |
|
5136 | 5134 | delay = int(str(self.proDelay.text())) |
|
5137 | 5135 | parms_ok = True |
|
5138 | 5136 | except: |
|
5139 | 5137 | outputstr = 'Delay: %s, this must be a integer number' % str(self.proDelay.text()) |
|
5140 | 5138 | self.console.append(outputstr) |
|
5141 | 5139 | |
|
5142 | 5140 | try: |
|
5143 | 5141 | set = int(str(self.proSet.text())) |
|
5144 | 5142 | except: |
|
5145 | 5143 | # outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text()) |
|
5146 | 5144 | # self.console.append(outputstr) |
|
5147 | 5145 | # parms_ok = False |
|
5148 | 5146 | set = None |
|
5149 | 5147 | |
|
5150 | 5148 | walk = int(self.proComWalk.currentIndex()) |
|
5151 | 5149 | expLabel = str(self.proExpLabel.text()) |
|
5152 | 5150 | |
|
5153 | 5151 | return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel |
|
5154 | 5152 | |
|
5155 | 5153 | def checkInputsPUSave(self, datatype): |
|
5156 | 5154 | """ |
|
5157 | 5155 | Check Inputs Spectra Save: |
|
5158 | 5156 | - path |
|
5159 | 5157 | - blocks Per File |
|
5160 | 5158 | - sufix |
|
5161 | 5159 | - dataformat |
|
5162 | 5160 | """ |
|
5163 | 5161 | parms_ok = True |
|
5164 | 5162 | |
|
5165 | 5163 | if datatype == "Voltage": |
|
5166 | 5164 | output_path = str(self.volOutputPath.text()) |
|
5167 | 5165 | blocksperfile = str(self.volOutputblocksperfile.text()) |
|
5168 | 5166 | profilesperblock = str(self.volOutputprofilesperblock.text()) |
|
5169 | 5167 | |
|
5170 | 5168 | if datatype == "Spectra": |
|
5171 | 5169 | output_path = str(self.specOutputPath.text()) |
|
5172 | 5170 | blocksperfile = str(self.specOutputblocksperfile.text()) |
|
5173 | 5171 | profilesperblock = 0 |
|
5174 | 5172 | |
|
5175 | 5173 | if datatype == "SpectraHeis": |
|
5176 | 5174 | output_path = str(self.specHeisOutputPath.text()) |
|
5177 | 5175 | blocksperfile = str(self.specHeisOutputblocksperfile.text()) |
|
5178 | 5176 | metada = str(self.specHeisOutputMetada.text()) |
|
5179 | 5177 | |
|
5180 | 5178 | if output_path == '': |
|
5181 | 5179 | outputstr = 'Outputpath is empty' |
|
5182 | 5180 | self.console.append(outputstr) |
|
5183 | 5181 | parms_ok = False |
|
5184 | 5182 | data_path = None |
|
5185 | 5183 | |
|
5186 | 5184 | if output_path != None: |
|
5187 | 5185 | if not os.path.exists(output_path): |
|
5188 | 5186 | outputstr = 'OutputPath:%s does not exists' % output_path |
|
5189 | 5187 | self.console.append(outputstr) |
|
5190 | 5188 | parms_ok = False |
|
5191 | 5189 | output_path = None |
|
5192 | 5190 | |
|
5193 | 5191 | |
|
5194 | 5192 | try: |
|
5195 | 5193 | profilesperblock = int(profilesperblock) |
|
5196 | 5194 | except: |
|
5197 | 5195 | if datatype == "Voltage": |
|
5198 | 5196 | outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.volOutputprofilesperblock.text()) |
|
5199 | 5197 | self.console.append(outputstr) |
|
5200 | 5198 | parms_ok = False |
|
5201 | 5199 | profilesperblock = None |
|
5202 | 5200 | |
|
5203 | 5201 | try: |
|
5204 | 5202 | blocksperfile = int(blocksperfile) |
|
5205 | 5203 | except: |
|
5206 | 5204 | if datatype == "Voltage": |
|
5207 | 5205 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.volOutputblocksperfile.text()) |
|
5208 | 5206 | elif datatype == "Spectra": |
|
5209 | 5207 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specOutputblocksperfile.text()) |
|
5210 | 5208 | elif datatype == "SpectraHeis": |
|
5211 | 5209 | outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specHeisOutputblocksperfile.text()) |
|
5212 | 5210 | |
|
5213 | 5211 | self.console.append(outputstr) |
|
5214 | 5212 | parms_ok = False |
|
5215 | 5213 | blocksperfile = None |
|
5216 | 5214 | |
|
5217 | 5215 | if datatype == "SpectraHeis": |
|
5218 | 5216 | if metada == '': |
|
5219 | 5217 | outputstr = 'Choose metada file' |
|
5220 | 5218 | self.console.append(outputstr) |
|
5221 | 5219 | parms_ok = False |
|
5222 | 5220 | if metada != None: |
|
5223 | 5221 | if not os.path.isfile(metada): |
|
5224 | 5222 | outputstr = 'Metadata:%s does not exists' % metada |
|
5225 | 5223 | self.console.append(outputstr) |
|
5226 | 5224 | parms_ok = False |
|
5227 | 5225 | output_path = None |
|
5228 | 5226 | |
|
5229 | 5227 | if datatype == "Voltage": |
|
5230 | 5228 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5231 | 5229 | |
|
5232 | 5230 | |
|
5233 | 5231 | if datatype == "Spectra": |
|
5234 | 5232 | return parms_ok, output_path, blocksperfile, profilesperblock |
|
5235 | 5233 | |
|
5236 | 5234 | |
|
5237 | 5235 | if datatype == "SpectraHeis": |
|
5238 | 5236 | return parms_ok, output_path, blocksperfile, metada |
|
5239 | 5237 | |
|
5240 | 5238 | def findDatafiles(self, data_path, ext, walk, expLabel=''): |
|
5241 | 5239 | |
|
5242 | 5240 | dateList = [] |
|
5243 | 5241 | fileList = [] |
|
5244 | 5242 | |
|
5245 | 5243 | if ext == ".r": |
|
5246 | 5244 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5247 | 5245 | |
|
5248 | 5246 | readerObj = JRODataReader() |
|
5249 | 5247 | dateList = readerObj.findDatafiles(path=data_path, |
|
5250 | 5248 | expLabel=expLabel, |
|
5251 | 5249 | ext=ext, |
|
5252 | 5250 | walk=walk) |
|
5253 | 5251 | |
|
5254 | 5252 | if ext == ".pdata": |
|
5255 | 5253 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5256 | 5254 | |
|
5257 | 5255 | readerObj = JRODataReader() |
|
5258 | 5256 | dateList = readerObj.findDatafiles(path=data_path, |
|
5259 | 5257 | expLabel=expLabel, |
|
5260 | 5258 | ext=ext, |
|
5261 | 5259 | walk=walk) |
|
5262 | 5260 | |
|
5263 | 5261 | if ext == ".fits": |
|
5264 | 5262 | from schainpy.model.io.jroIO_base import JRODataReader |
|
5265 | 5263 | |
|
5266 | 5264 | readerObj = JRODataReader() |
|
5267 | 5265 | dateList = readerObj.findDatafiles(path=data_path, |
|
5268 | 5266 | expLabel=expLabel, |
|
5269 | 5267 | ext=ext, |
|
5270 | 5268 | walk=walk) |
|
5271 | 5269 | |
|
5272 | 5270 | if ext == ".hdf5": |
|
5273 | 5271 | from schainpy.model.io.jroIO_usrp import USRPReader |
|
5274 | 5272 | |
|
5275 | 5273 | readerObj = USRPReader() |
|
5276 | 5274 | dateList = readerObj.findDatafiles(path=data_path) |
|
5277 | 5275 | |
|
5278 | 5276 | return dateList |
|
5279 | 5277 | |
|
5280 | 5278 | def loadDays(self, data_path, ext, walk, expLabel=''): |
|
5281 | 5279 | """ |
|
5282 | 5280 | Method to loads day |
|
5283 | 5281 | """ |
|
5284 | 5282 | self.proOk.setEnabled(False) |
|
5285 | 5283 | self.proComStartDate.clear() |
|
5286 | 5284 | self.proComEndDate.clear() |
|
5287 | 5285 | |
|
5288 | 5286 | self.dateList = [] |
|
5289 | 5287 | |
|
5290 | 5288 | if not os.path.isdir(data_path): |
|
5291 | 5289 | return |
|
5292 | 5290 | |
|
5293 | 5291 | self.dataPath = data_path |
|
5294 | 5292 | |
|
5295 | 5293 | dateList = self.findDatafiles(data_path, ext=ext, walk=walk, expLabel=expLabel) |
|
5296 | 5294 | |
|
5297 | 5295 | if not dateList: |
|
5298 | 5296 | # self.console.clear() |
|
5299 | 5297 | if walk: |
|
5300 | 5298 | if expLabel: |
|
5301 | 5299 | outputstr = "No files (*%s) were found on %s/DOYPATH/%s" % (ext, data_path, expLabel) |
|
5302 | 5300 | else: |
|
5303 | 5301 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) |
|
5304 | 5302 | else: |
|
5305 | 5303 | outputstr = "No files (*%s) were found on %s" % (ext, data_path) |
|
5306 | 5304 | |
|
5307 | 5305 | self.console.append(outputstr) |
|
5308 | 5306 | return |
|
5309 | 5307 | |
|
5310 | 5308 | dateStrList = [] |
|
5311 | 5309 | for thisDate in dateList: |
|
5312 | 5310 | dateStr = thisDate.strftime("%Y/%m/%d") |
|
5313 | 5311 | |
|
5314 | 5312 | self.proComStartDate.addItem(dateStr) |
|
5315 | 5313 | self.proComEndDate.addItem(dateStr) |
|
5316 | 5314 | dateStrList.append(dateStr) |
|
5317 | 5315 | |
|
5318 | 5316 | self.proComStartDate.setCurrentIndex(0) |
|
5319 | 5317 | self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1) |
|
5320 | 5318 | |
|
5321 | 5319 | self.dateList = dateStrList |
|
5322 | 5320 | self.proOk.setEnabled(True) |
|
5323 | 5321 | |
|
5324 | 5322 | self.console.clear() |
|
5325 | 5323 | self.console.append("Successful load") |
|
5326 | 5324 | |
|
5327 | 5325 | return self.dateList |
|
5328 | 5326 | |
|
5329 | 5327 | def setWorkSpaceGUI(self, pathWorkSpace=None): |
|
5330 | 5328 | |
|
5331 | 5329 | if pathWorkSpace == None: |
|
5332 | 5330 | home = os.path.expanduser("~") |
|
5333 | 5331 | pathWorkSpace = os.path.join(home,'schain_workspace') |
|
5334 | 5332 | |
|
5335 | 5333 | self.pathWorkSpace = pathWorkSpace |
|
5336 | 5334 | |
|
5337 | 5335 | """ |
|
5338 | 5336 | Comandos Usados en Console |
|
5339 | 5337 | """ |
|
5340 | 5338 | def __del__(self): |
|
5341 | 5339 | sys.stdout = sys.__stdout__ |
|
5342 | 5340 | sys.stderr = sys.__stderr__ |
|
5343 | 5341 | |
|
5344 | 5342 | def normalOutputWritten(self, text): |
|
5345 | 5343 | color_black = QtGui.QColor(0,0,0) |
|
5346 | 5344 | self.console.setTextColor(color_black) |
|
5347 | 5345 | self.console.append(text) |
|
5348 | 5346 | |
|
5349 | 5347 | def errorOutputWritten(self, text): |
|
5350 | 5348 | color_red = QtGui.QColor(255,0,0) |
|
5351 | 5349 | color_black = QtGui.QColor(0,0,0) |
|
5352 | 5350 | |
|
5353 | 5351 | self.console.setTextColor(color_red) |
|
5354 | 5352 | self.console.append(text) |
|
5355 | 5353 | self.console.setTextColor(color_black) |
|
5356 | 5354 | |
|
5357 | 5355 | def setGUIStatus(self): |
|
5358 | 5356 | |
|
5359 | 5357 | self.setWindowTitle("ROJ-Signal Chain") |
|
5360 | 5358 | self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"adn.jpg") )) |
|
5361 | 5359 | |
|
5362 | 5360 | self.tabWidgetProject.setEnabled(False) |
|
5363 | 5361 | self.tabVoltage.setEnabled(False) |
|
5364 | 5362 | self.tabSpectra.setEnabled(False) |
|
5365 | 5363 | self.tabCorrelation.setEnabled(False) |
|
5366 | 5364 | self.frame_2.setEnabled(False) |
|
5367 | 5365 | |
|
5368 | 5366 | self.actionCreate.setShortcut('Ctrl+N') |
|
5369 | 5367 | self.actionOpen.setShortcut('Ctrl+O') |
|
5370 | 5368 | self.actionSave.setShortcut('Ctrl+S') |
|
5371 | 5369 | self.actionClose.setShortcut('Ctrl+X') |
|
5372 | 5370 | |
|
5373 | 5371 | self.actionStart.setShortcut('Ctrl+1') |
|
5374 | 5372 | self.actionPause.setShortcut('Ctrl+2') |
|
5375 | 5373 | self.actionStop.setShortcut('Ctrl+3') |
|
5376 | 5374 | |
|
5377 | 5375 | self.actionFTP.setShortcut('Ctrl+F') |
|
5378 | 5376 | |
|
5379 | 5377 | self.actionStart.setEnabled(False) |
|
5380 | 5378 | self.actionPause.setEnabled(False) |
|
5381 | 5379 | self.actionStop.setEnabled(False) |
|
5382 | 5380 | |
|
5383 | 5381 | self.actionStarToolbar.setEnabled(False) |
|
5384 | 5382 | self.actionPauseToolbar.setEnabled(False) |
|
5385 | 5383 | self.actionStopToolbar.setEnabled(False) |
|
5386 | 5384 | |
|
5387 | 5385 | self.proName.clear() |
|
5388 | 5386 | self.proDataPath.setText('') |
|
5389 | 5387 | self.console.setReadOnly(True) |
|
5390 | 5388 | self.console.append("Welcome to Signal Chain\nOpen a project or Create a new one") |
|
5391 | 5389 | self.proStartTime.setDisplayFormat("hh:mm:ss") |
|
5392 | 5390 | self.proDataType.setEnabled(False) |
|
5393 | 5391 | self.time = QtCore.QTime() |
|
5394 | 5392 | self.hour = 0 |
|
5395 | 5393 | self.min = 0 |
|
5396 | 5394 | self.sec = 0 |
|
5397 | 5395 | self.proEndTime.setDisplayFormat("hh:mm:ss") |
|
5398 | 5396 | startTime = "00:00:00" |
|
5399 | 5397 | endTime = "23:59:59" |
|
5400 | 5398 | starlist = startTime.split(":") |
|
5401 | 5399 | endlist = endTime.split(":") |
|
5402 | 5400 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
5403 | 5401 | self.proStartTime.setTime(self.time) |
|
5404 | 5402 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
5405 | 5403 | self.proEndTime.setTime(self.time) |
|
5406 | 5404 | self.proOk.setEnabled(False) |
|
5407 | 5405 | # set model Project Explorer |
|
5408 | 5406 | self.projectExplorerModel = QtGui.QStandardItemModel() |
|
5409 | 5407 | self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",)) |
|
5410 | 5408 | layout = QtGui.QVBoxLayout() |
|
5411 | 5409 | layout.addWidget(self.projectExplorerTree) |
|
5412 | 5410 | self.projectExplorerTree.setModel(self.projectExplorerModel) |
|
5413 | 5411 | self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
|
5414 | 5412 | self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click) |
|
5415 | 5413 | self.projectExplorerTree.clicked.connect(self.on_click) |
|
5416 | 5414 | self.projectExplorerTree.expandAll() |
|
5417 | 5415 | # set model Project Properties |
|
5418 | 5416 | |
|
5419 | 5417 | self.propertiesModel = TreeModel() |
|
5420 | 5418 | self.propertiesModel.initProjectView() |
|
5421 | 5419 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
5422 | 5420 | self.treeProjectProperties.expandAll() |
|
5423 | 5421 | self.treeProjectProperties.allColumnsShowFocus() |
|
5424 | 5422 | self.treeProjectProperties.resizeColumnToContents(1) |
|
5425 | 5423 | |
|
5426 | 5424 | # set Project |
|
5427 | 5425 | self.proExpLabel.setEnabled(True) |
|
5428 | 5426 | self.proDelay.setEnabled(False) |
|
5429 | 5427 | self.proSet.setEnabled(True) |
|
5430 | 5428 | self.proDataType.setReadOnly(True) |
|
5431 | 5429 | |
|
5432 | 5430 | # set Operation Voltage |
|
5433 | 5431 | self.volOpComChannels.setEnabled(False) |
|
5434 | 5432 | self.volOpComHeights.setEnabled(False) |
|
5435 | 5433 | self.volOpFilter.setEnabled(False) |
|
5436 | 5434 | self.volOpComProfile.setEnabled(False) |
|
5437 | 5435 | self.volOpComCode.setEnabled(False) |
|
5438 | 5436 | self.volOpFlip.setEnabled(False) |
|
5439 | 5437 | self.volOpCohInt.setEnabled(False) |
|
5440 | 5438 | self.volOpRadarfrequency.setEnabled(False) |
|
5441 | 5439 | |
|
5442 | 5440 | self.volOpChannel.setEnabled(False) |
|
5443 | 5441 | self.volOpHeights.setEnabled(False) |
|
5444 | 5442 | self.volOpProfile.setEnabled(False) |
|
5445 | 5443 | self.volOpComMode.setEnabled(False) |
|
5446 | 5444 | |
|
5447 | 5445 | self.volGraphPath.setEnabled(False) |
|
5448 | 5446 | self.volGraphPrefix.setEnabled(False) |
|
5449 | 5447 | self.volGraphToolPath.setEnabled(False) |
|
5450 | 5448 | |
|
5451 | 5449 | # set Graph Voltage |
|
5452 | 5450 | self.volGraphChannelList.setEnabled(False) |
|
5453 | 5451 | self.volGraphfreqrange.setEnabled(False) |
|
5454 | 5452 | self.volGraphHeightrange.setEnabled(False) |
|
5455 | 5453 | |
|
5456 | 5454 | # set Operation Spectra |
|
5457 | 5455 | self.specOpnFFTpoints.setEnabled(False) |
|
5458 | 5456 | self.specOpProfiles.setEnabled(False) |
|
5459 | 5457 | self.specOpippFactor.setEnabled(False) |
|
5460 | 5458 | self.specOppairsList.setEnabled(False) |
|
5461 | 5459 | self.specOpComChannel.setEnabled(False) |
|
5462 | 5460 | self.specOpComHeights.setEnabled(False) |
|
5463 | 5461 | self.specOpIncoherent.setEnabled(False) |
|
5464 | 5462 | self.specOpgetNoise.setEnabled(False) |
|
5465 | 5463 | self.specOpRadarfrequency.setEnabled(False) |
|
5466 | 5464 | |
|
5467 | 5465 | |
|
5468 | 5466 | self.specOpChannel.setEnabled(False) |
|
5469 | 5467 | self.specOpHeights.setEnabled(False) |
|
5470 | 5468 | # set Graph Spectra |
|
5471 | 5469 | self.specGgraphChannelList.setEnabled(False) |
|
5472 | 5470 | self.specGgraphFreq.setEnabled(False) |
|
5473 | 5471 | self.specGgraphHeight.setEnabled(False) |
|
5474 | 5472 | self.specGgraphDbsrange.setEnabled(False) |
|
5475 | 5473 | self.specGgraphmagnitud.setEnabled(False) |
|
5476 | 5474 | self.specGgraphTminTmax.setEnabled(False) |
|
5477 | 5475 | self.specGgraphTimeRange.setEnabled(False) |
|
5478 | 5476 | self.specGraphPath.setEnabled(False) |
|
5479 | 5477 | self.specGraphToolPath.setEnabled(False) |
|
5480 | 5478 | self.specGraphPrefix.setEnabled(False) |
|
5481 | 5479 | |
|
5482 | 5480 | self.specGgraphftpratio.setEnabled(False) |
|
5483 | 5481 | # set Operation SpectraHeis |
|
5484 | 5482 | self.specHeisOpIncoherent.setEnabled(False) |
|
5485 | 5483 | self.specHeisOpCobIncInt.setEnabled(False) |
|
5486 | 5484 | # set Graph SpectraHeis |
|
5487 | 5485 | self.specHeisGgraphChannelList.setEnabled(False) |
|
5488 | 5486 | self.specHeisGgraphXminXmax.setEnabled(False) |
|
5489 | 5487 | self.specHeisGgraphYminYmax.setEnabled(False) |
|
5490 | 5488 | self.specHeisGgraphTminTmax.setEnabled(False) |
|
5491 | 5489 | self.specHeisGgraphTimeRange.setEnabled(False) |
|
5492 | 5490 | self.specHeisGgraphftpratio.setEnabled(False) |
|
5493 | 5491 | self.specHeisGraphPath.setEnabled(False) |
|
5494 | 5492 | self.specHeisGraphPrefix.setEnabled(False) |
|
5495 | 5493 | self.specHeisGraphToolPath.setEnabled(False) |
|
5496 | 5494 | |
|
5497 | 5495 | |
|
5498 | 5496 | # tool tip gui |
|
5499 | 5497 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
5500 | 5498 | self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process') |
|
5501 | 5499 | # tool tip gui project |
|
5502 | 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 | 5501 | self.proComWalk.setCurrentIndex(0) |
|
5504 | 5502 | # tool tip gui volOp |
|
5505 | 5503 | self.volOpChannel.setToolTip('Example: 1,2,3,4,5') |
|
5506 | 5504 | self.volOpHeights.setToolTip('Example: 90,180') |
|
5507 | 5505 | self.volOpFilter.setToolTip('Example: 2') |
|
5508 | 5506 | self.volOpProfile.setToolTip('Example:0,127') |
|
5509 | 5507 | self.volOpCohInt.setToolTip('Example: 128') |
|
5510 | 5508 | self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3') |
|
5511 | 5509 | self.volOpOk.setToolTip('If you have finished, please Ok ') |
|
5512 | 5510 | # tool tip gui volGraph |
|
5513 | 5511 | self.volGraphfreqrange.setToolTip('Height range. Example: 50,100') |
|
5514 | 5512 | self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000') |
|
5515 | 5513 | # tool tip gui specOp |
|
5516 | 5514 | self.specOpnFFTpoints.setToolTip('Example: 128') |
|
5517 | 5515 | self.specOpProfiles.setToolTip('Example: 128') |
|
5518 | 5516 | self.specOpippFactor.setToolTip('Example:1.0') |
|
5519 | 5517 | self.specOpIncoherent.setToolTip('Example: 10') |
|
5520 | 5518 | self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)') |
|
5521 | 5519 | |
|
5522 | 5520 | self.specOpChannel.setToolTip('Example: 0,1,2,3') |
|
5523 | 5521 | self.specOpHeights.setToolTip('Example: 90,180') |
|
5524 | 5522 | self.specOppairsList.setToolTip('Example: (0,1),(2,3)') |
|
5525 | 5523 | # tool tip gui specGraph |
|
5526 | 5524 | |
|
5527 | 5525 | self.specGgraphChannelList.setToolTip('Example: 0,3,4') |
|
5528 | 5526 | self.specGgraphFreq.setToolTip('Example: -20,20') |
|
5529 | 5527 | self.specGgraphHeight.setToolTip('Example: 100,400') |
|
5530 | 5528 | self.specGgraphDbsrange.setToolTip('Example: 30,170') |
|
5531 | 5529 | |
|
5532 | 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 | 5541 | self.labelSet.show() |
|
5535 | 5542 | self.proSet.show() |
|
5536 | 5543 | |
|
5537 | 5544 | self.labelIPPKm.hide() |
|
5538 | 5545 | self.proIPPKm.hide() |
|
5539 | 5546 | |
|
5540 | 5547 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) |
|
5541 | 5548 | # sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten) |
|
5542 | 5549 | |
|
5543 | 5550 | |
|
5544 | 5551 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): |
|
5545 | 5552 | """ |
|
5546 | 5553 | Class documentation goes here. |
|
5547 | 5554 | """ |
|
5548 | 5555 | closed = pyqtSignal() |
|
5549 | 5556 | create = False |
|
5550 | 5557 | |
|
5551 | 5558 | def __init__(self, parent=None): |
|
5552 | 5559 | """ |
|
5553 | 5560 | Constructor |
|
5554 | 5561 | """ |
|
5555 | 5562 | QMainWindow.__init__(self, parent) |
|
5556 | 5563 | self.setupUi(self) |
|
5557 | 5564 | self.getFromWindow = None |
|
5558 | 5565 | self.getfromWindowList = [] |
|
5559 | 5566 | self.dataTypeProject = None |
|
5560 | 5567 | |
|
5561 | 5568 | self.listUP = None |
|
5562 | 5569 | |
|
5563 | 5570 | @pyqtSignature("") |
|
5564 | 5571 | def on_unitPokbut_clicked(self): |
|
5565 | 5572 | """ |
|
5566 | 5573 | Slot documentation goes here. |
|
5567 | 5574 | """ |
|
5568 | 5575 | self.create = True |
|
5569 | 5576 | self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())] |
|
5570 | 5577 | # self.nameofUP= str(self.nameUptxt.text()) |
|
5571 | 5578 | self.typeofUP = str(self.comboTypeBox.currentText()) |
|
5572 | 5579 | self.close() |
|
5573 | 5580 | |
|
5574 | 5581 | |
|
5575 | 5582 | @pyqtSignature("") |
|
5576 | 5583 | def on_unitPcancelbut_clicked(self): |
|
5577 | 5584 | """ |
|
5578 | 5585 | Slot documentation goes here. |
|
5579 | 5586 | """ |
|
5580 | 5587 | self.create = False |
|
5581 | 5588 | self.close() |
|
5582 | 5589 | |
|
5583 | 5590 | def loadTotalList(self): |
|
5584 | 5591 | self.comboInputBox.clear() |
|
5585 | 5592 | for i in self.getfromWindowList: |
|
5586 | 5593 | |
|
5587 | 5594 | name = i.getElementName() |
|
5588 | 5595 | if name == 'Project': |
|
5589 | 5596 | id = i.id |
|
5590 | 5597 | name = i.name |
|
5591 | 5598 | if self.dataTypeProject == 'Voltage': |
|
5592 | 5599 | self.comboTypeBox.clear() |
|
5593 | 5600 | self.comboTypeBox.addItem("Voltage") |
|
5594 | 5601 | |
|
5595 | 5602 | if self.dataTypeProject == 'Spectra': |
|
5596 | 5603 | self.comboTypeBox.clear() |
|
5597 | 5604 | self.comboTypeBox.addItem("Spectra") |
|
5598 | 5605 | self.comboTypeBox.addItem("Correlation") |
|
5599 | 5606 | if self.dataTypeProject == 'Fits': |
|
5600 | 5607 | self.comboTypeBox.clear() |
|
5601 | 5608 | self.comboTypeBox.addItem("SpectraHeis") |
|
5602 | 5609 | |
|
5603 | 5610 | |
|
5604 | 5611 | if name == 'ProcUnit': |
|
5605 | 5612 | id = int(i.id) - 1 |
|
5606 | 5613 | name = i.datatype |
|
5607 | 5614 | if name == 'Voltage': |
|
5608 | 5615 | self.comboTypeBox.clear() |
|
5609 | 5616 | self.comboTypeBox.addItem("Spectra") |
|
5610 | 5617 | self.comboTypeBox.addItem("SpectraHeis") |
|
5611 | 5618 | self.comboTypeBox.addItem("Correlation") |
|
5612 | 5619 | if name == 'Spectra': |
|
5613 | 5620 | self.comboTypeBox.clear() |
|
5614 | 5621 | self.comboTypeBox.addItem("Spectra") |
|
5615 | 5622 | self.comboTypeBox.addItem("SpectraHeis") |
|
5616 | 5623 | self.comboTypeBox.addItem("Correlation") |
|
5617 | 5624 | if name == 'SpectraHeis': |
|
5618 | 5625 | self.comboTypeBox.clear() |
|
5619 | 5626 | self.comboTypeBox.addItem("SpectraHeis") |
|
5620 | 5627 | |
|
5621 | 5628 | self.comboInputBox.addItem(str(name)) |
|
5622 | 5629 | # self.comboInputBox.addItem(str(name)+str(id)) |
|
5623 | 5630 | |
|
5624 | 5631 | def closeEvent(self, event): |
|
5625 | 5632 | self.closed.emit() |
|
5626 | 5633 | event.accept() |
|
5627 | 5634 | |
|
5628 | 5635 | class Ftp(QMainWindow, Ui_Ftp): |
|
5629 | 5636 | """ |
|
5630 | 5637 | Class documentation goes here. |
|
5631 | 5638 | """ |
|
5632 | 5639 | create = False |
|
5633 | 5640 | closed = pyqtSignal() |
|
5634 | 5641 | server = None |
|
5635 | 5642 | remotefolder = None |
|
5636 | 5643 | username = None |
|
5637 | 5644 | password = None |
|
5638 | 5645 | ftp_wei = None |
|
5639 | 5646 | exp_code = None |
|
5640 | 5647 | sub_exp_code = None |
|
5641 | 5648 | plot_pos = None |
|
5642 | 5649 | |
|
5643 | 5650 | def __init__(self, parent=None): |
|
5644 | 5651 | """ |
|
5645 | 5652 | Constructor |
|
5646 | 5653 | """ |
|
5647 | 5654 | QMainWindow.__init__(self, parent) |
|
5648 | 5655 | self.setupUi(self) |
|
5649 | 5656 | self.setGUIStatus() |
|
5650 | 5657 | |
|
5651 | 5658 | def setGUIStatus(self): |
|
5652 | 5659 | self.setWindowTitle("ROJ-Signal Chain") |
|
5653 | 5660 | self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe') |
|
5654 | 5661 | self.folderFTP.setToolTip('Example: /home/wmaster/graficos') |
|
5655 | 5662 | self.usernameFTP.setToolTip('Example: myusername') |
|
5656 | 5663 | self.passwordFTP.setToolTip('Example: mypass ') |
|
5657 | 5664 | self.weightFTP.setToolTip('Example: 0') |
|
5658 | 5665 | self.expcodeFTP.setToolTip('Example: 0') |
|
5659 | 5666 | self.subexpFTP.setToolTip('Example: 0') |
|
5660 | 5667 | self.plotposFTP.setToolTip('Example: 0') |
|
5661 | 5668 | |
|
5662 | 5669 | def setParmsfromTemporal(self, server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos): |
|
5663 | 5670 | self.serverFTP.setText(str(server)) |
|
5664 | 5671 | self.folderFTP.setText(str(remotefolder)) |
|
5665 | 5672 | self.usernameFTP.setText(str(username)) |
|
5666 | 5673 | self.passwordFTP.setText(str(password)) |
|
5667 | 5674 | self.weightFTP.setText(str(ftp_wei)) |
|
5668 | 5675 | self.expcodeFTP.setText(str(exp_code)) |
|
5669 | 5676 | self.subexpFTP.setText(str(sub_exp_code)) |
|
5670 | 5677 | self.plotposFTP.setText(str(plot_pos)) |
|
5671 | 5678 | |
|
5672 | 5679 | def getParmsFromFtpWindow(self): |
|
5673 | 5680 | """ |
|
5674 | 5681 | Return Inputs Project: |
|
5675 | 5682 | - server |
|
5676 | 5683 | - remotefolder |
|
5677 | 5684 | - username |
|
5678 | 5685 | - password |
|
5679 | 5686 | - ftp_wei |
|
5680 | 5687 | - exp_code |
|
5681 | 5688 | - sub_exp_code |
|
5682 | 5689 | - plot_pos |
|
5683 | 5690 | """ |
|
5684 | 5691 | name_server_ftp = str(self.serverFTP.text()) |
|
5685 | 5692 | if not name_server_ftp: |
|
5686 | 5693 | self.console.clear() |
|
5687 | 5694 | self.console.append("Please Write a FTP Server") |
|
5688 | 5695 | return 0 |
|
5689 | 5696 | |
|
5690 | 5697 | folder_server_ftp = str(self.folderFTP.text()) |
|
5691 | 5698 | if not folder_server_ftp: |
|
5692 | 5699 | self.console.clear() |
|
5693 | 5700 | self.console.append("Please Write a Folder") |
|
5694 | 5701 | return 0 |
|
5695 | 5702 | |
|
5696 | 5703 | username_ftp = str(self.usernameFTP.text()) |
|
5697 | 5704 | if not username_ftp: |
|
5698 | 5705 | self.console.clear() |
|
5699 | 5706 | self.console.append("Please Write a User Name") |
|
5700 | 5707 | return 0 |
|
5701 | 5708 | |
|
5702 | 5709 | password_ftp = str(self.passwordFTP.text()) |
|
5703 | 5710 | if not password_ftp: |
|
5704 | 5711 | self.console.clear() |
|
5705 | 5712 | self.console.append("Please Write a passwordFTP") |
|
5706 | 5713 | return 0 |
|
5707 | 5714 | |
|
5708 | 5715 | ftp_wei = str(self.weightFTP.text()) |
|
5709 | 5716 | if not ftp_wei == "": |
|
5710 | 5717 | try: |
|
5711 | 5718 | ftp_wei = int(self.weightFTP.text()) |
|
5712 | 5719 | except: |
|
5713 | 5720 | self.console.clear() |
|
5714 | 5721 | self.console.append("Please Write a ftp_wei number") |
|
5715 | 5722 | return 0 |
|
5716 | 5723 | |
|
5717 | 5724 | exp_code = str(self.expcodeFTP.text()) |
|
5718 | 5725 | if not exp_code == "": |
|
5719 | 5726 | try: |
|
5720 | 5727 | exp_code = int(self.expcodeFTP.text()) |
|
5721 | 5728 | except: |
|
5722 | 5729 | self.console.clear() |
|
5723 | 5730 | self.console.append("Please Write a exp_code number") |
|
5724 | 5731 | return 0 |
|
5725 | 5732 | |
|
5726 | 5733 | |
|
5727 | 5734 | sub_exp_code = str(self.subexpFTP.text()) |
|
5728 | 5735 | if not sub_exp_code == "": |
|
5729 | 5736 | try: |
|
5730 | 5737 | sub_exp_code = int(self.subexpFTP.text()) |
|
5731 | 5738 | except: |
|
5732 | 5739 | self.console.clear() |
|
5733 | 5740 | self.console.append("Please Write a sub_exp_code number") |
|
5734 | 5741 | return 0 |
|
5735 | 5742 | |
|
5736 | 5743 | plot_pos = str(self.plotposFTP.text()) |
|
5737 | 5744 | if not plot_pos == "": |
|
5738 | 5745 | try: |
|
5739 | 5746 | plot_pos = int(self.plotposFTP.text()) |
|
5740 | 5747 | except: |
|
5741 | 5748 | self.console.clear() |
|
5742 | 5749 | self.console.append("Please Write a plot_pos number") |
|
5743 | 5750 | return 0 |
|
5744 | 5751 | |
|
5745 | 5752 | return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos |
|
5746 | 5753 | |
|
5747 | 5754 | @pyqtSignature("") |
|
5748 | 5755 | def on_ftpOkButton_clicked(self): |
|
5749 | 5756 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow() |
|
5750 | 5757 | self.create = True |
|
5751 | 5758 | self.close() |
|
5752 | 5759 | |
|
5753 | 5760 | @pyqtSignature("") |
|
5754 | 5761 | def on_ftpCancelButton_clicked(self): |
|
5755 | 5762 | self.create = False |
|
5756 | 5763 | self.close() |
|
5757 | 5764 | |
|
5758 | 5765 | def closeEvent(self, event): |
|
5759 | 5766 | self.closed.emit() |
|
5760 | 5767 | event.accept() |
|
5761 | 5768 | |
|
5762 | 5769 | class ftpBuffer(): |
|
5763 | 5770 | |
|
5764 | 5771 | server = None |
|
5765 | 5772 | remotefolder = None |
|
5766 | 5773 | username = None |
|
5767 | 5774 | password = None |
|
5768 | 5775 | ftp_wei = None |
|
5769 | 5776 | exp_code = None |
|
5770 | 5777 | sub_exp_code = None |
|
5771 | 5778 | plot_pos = None |
|
5772 | 5779 | create = False |
|
5773 | 5780 | withoutconfig = False |
|
5774 | 5781 | createforView = False |
|
5775 | 5782 | localfolder = None |
|
5776 | 5783 | extension = None |
|
5777 | 5784 | period = None |
|
5778 | 5785 | protocol = None |
|
5779 | 5786 | |
|
5780 | 5787 | def __init__(self): |
|
5781 | 5788 | |
|
5782 | 5789 | self.create = False |
|
5783 | 5790 | self.server = None |
|
5784 | 5791 | self.remotefolder = None |
|
5785 | 5792 | self.username = None |
|
5786 | 5793 | self.password = None |
|
5787 | 5794 | self.ftp_wei = None |
|
5788 | 5795 | self.exp_code = None |
|
5789 | 5796 | self.sub_exp_code = None |
|
5790 | 5797 | self.plot_pos = None |
|
5791 | 5798 | # self.create = False |
|
5792 | 5799 | self.localfolder = None |
|
5793 | 5800 | self.extension = None |
|
5794 | 5801 | self.period = None |
|
5795 | 5802 | self.protocol = None |
|
5796 | 5803 | |
|
5797 | 5804 | def setwithoutconfiguration(self): |
|
5798 | 5805 | |
|
5799 | 5806 | self.create = False |
|
5800 | 5807 | self.server = "jro-app.igp.gob.pe" |
|
5801 | 5808 | self.remotefolder = "/home/wmaster/graficos" |
|
5802 | 5809 | self.username = "wmaster" |
|
5803 | 5810 | self.password = "mst2010vhf" |
|
5804 | 5811 | self.withoutconfig = True |
|
5805 | 5812 | self.localfolder = './' |
|
5806 | 5813 | self.extension = '.png' |
|
5807 | 5814 | self.period = 60 |
|
5808 | 5815 | self.protocol = 'ftp' |
|
5809 | 5816 | self.createforView = True |
|
5810 | 5817 | |
|
5811 | 5818 | if not self.ftp_wei: |
|
5812 | 5819 | self.ftp_wei = 0 |
|
5813 | 5820 | |
|
5814 | 5821 | if not self.exp_code: |
|
5815 | 5822 | self.exp_code = 0 |
|
5816 | 5823 | |
|
5817 | 5824 | if not self.sub_exp_code: |
|
5818 | 5825 | self.sub_exp_code = 0 |
|
5819 | 5826 | |
|
5820 | 5827 | if not self.plot_pos: |
|
5821 | 5828 | self.plot_pos = 0 |
|
5822 | 5829 | |
|
5823 | 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 | 5832 | self.server = server |
|
5826 | 5833 | self.remotefolder = remotefolder |
|
5827 | 5834 | self.username = username |
|
5828 | 5835 | self.password = password |
|
5829 | 5836 | self.ftp_wei = ftp_wei |
|
5830 | 5837 | self.exp_code = exp_code |
|
5831 | 5838 | self.sub_exp_code = sub_exp_code |
|
5832 | 5839 | self.plot_pos = plot_pos |
|
5833 | 5840 | self.create = True |
|
5834 | 5841 | self.withoutconfig = False |
|
5835 | 5842 | self.createforView = True |
|
5836 | 5843 | self.localfolder = localfolder |
|
5837 | 5844 | self.extension = extension |
|
5838 | 5845 | self.period = period |
|
5839 | 5846 | self.protocol = protocol |
|
5840 | 5847 | |
|
5841 | 5848 | def recover(self): |
|
5842 | 5849 | |
|
5843 | 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 | 5852 | class ShowMeConsole(QtCore.QObject): |
|
5846 | 5853 | |
|
5847 | 5854 | textWritten = QtCore.pyqtSignal(str) |
|
5848 | 5855 | |
|
5849 | 5856 | def write(self, text): |
|
5850 | 5857 | |
|
5851 | 5858 | if text[-1] == "\n": |
|
5852 | 5859 | text = text[:-1] |
|
5853 | 5860 | |
|
5854 | 5861 | self.textWritten.emit(str(text)) |
@@ -1,240 +1,240 | |||
|
1 | 1 | from PyQt4 import QtCore, QtGui |
|
2 | 2 | |
|
3 | 3 | try: |
|
4 | 4 | _fromUtf8 = QtCore.QString.fromUtf8 |
|
5 | 5 | except AttributeError: |
|
6 | 6 | def _fromUtf8(s): |
|
7 | 7 | return s |
|
8 | 8 | |
|
9 | 9 | try: |
|
10 | 10 | _encoding = QtGui.QApplication.UnicodeUTF8 |
|
11 | 11 | def _translate(context, text, disambig): |
|
12 | 12 | return QtGui.QApplication.translate(context, text, disambig, _encoding) |
|
13 | 13 | except AttributeError: |
|
14 | 14 | def _translate(context, text, disambig): |
|
15 | 15 | return QtGui.QApplication.translate(context, text, disambig) |
|
16 | 16 | |
|
17 | 17 | class Ui_SpectraHeisTab(object): |
|
18 | 18 | |
|
19 | 19 | def setupUi(self): |
|
20 | 20 | |
|
21 | 21 | self.tabSpectraHeis = QtGui.QWidget() |
|
22 | 22 | self.tabSpectraHeis.setObjectName(_fromUtf8("tabSpectraHeis")) |
|
23 | 23 | self.gridLayout_23 = QtGui.QGridLayout(self.tabSpectraHeis) |
|
24 | 24 | self.gridLayout_23.setObjectName(_fromUtf8("gridLayout_23")) |
|
25 | 25 | self.frame_6 = QtGui.QFrame(self.tabSpectraHeis) |
|
26 | 26 | self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) |
|
27 | 27 | self.frame_6.setFrameShadow(QtGui.QFrame.Raised) |
|
28 | 28 | self.frame_6.setObjectName(_fromUtf8("frame_6")) |
|
29 | 29 | self.gridLayout_22 = QtGui.QGridLayout(self.frame_6) |
|
30 | 30 | self.gridLayout_22.setObjectName(_fromUtf8("gridLayout_22")) |
|
31 | 31 | self.specHeisGraphClear = QtGui.QPushButton(self.frame_6) |
|
32 | 32 | self.specHeisGraphClear.setObjectName(_fromUtf8("specHeisGraphClear")) |
|
33 | 33 | self.gridLayout_22.addWidget(self.specHeisGraphClear, 0, 1, 1, 1) |
|
34 | 34 | self.specHeisOpOk = QtGui.QPushButton(self.frame_6) |
|
35 | 35 | self.specHeisOpOk.setObjectName(_fromUtf8("specHeisOpOk")) |
|
36 | 36 | self.gridLayout_22.addWidget(self.specHeisOpOk, 0, 0, 1, 1) |
|
37 | 37 | self.gridLayout_23.addWidget(self.frame_6, 1, 0, 1, 1) |
|
38 | 38 | self.tabWidgetSpectraHeis = QtGui.QTabWidget(self.tabSpectraHeis) |
|
39 | 39 | self.tabWidgetSpectraHeis.setObjectName(_fromUtf8("tabWidgetSpectraHeis")) |
|
40 | 40 | self.tabopSpectraHeis = QtGui.QWidget() |
|
41 | 41 | self.tabopSpectraHeis.setObjectName(_fromUtf8("tabopSpectraHeis")) |
|
42 | 42 | self.gridLayout_21 = QtGui.QGridLayout(self.tabopSpectraHeis) |
|
43 | 43 | self.gridLayout_21.setObjectName(_fromUtf8("gridLayout_21")) |
|
44 | 44 | spacerItem21 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
45 | 45 | self.gridLayout_21.addItem(spacerItem21, 0, 1, 1, 1) |
|
46 | 46 | self.specHeisOpCobIncInt = QtGui.QComboBox(self.tabopSpectraHeis) |
|
47 | 47 | self.specHeisOpCobIncInt.setObjectName(_fromUtf8("specHeisOpCobIncInt")) |
|
48 | 48 | self.specHeisOpCobIncInt.addItem(_fromUtf8("")) |
|
49 | 49 | self.gridLayout_21.addWidget(self.specHeisOpCobIncInt, 1, 0, 1, 1) |
|
50 | 50 | self.specHeisOpCebIncoherent = QtGui.QCheckBox(self.tabopSpectraHeis) |
|
51 | 51 | self.specHeisOpCebIncoherent.setObjectName(_fromUtf8("specHeisOpCebIncoherent")) |
|
52 | 52 | self.gridLayout_21.addWidget(self.specHeisOpCebIncoherent, 0, 0, 1, 1) |
|
53 | 53 | self.specHeisOpIncoherent = QtGui.QLineEdit(self.tabopSpectraHeis) |
|
54 | 54 | self.specHeisOpIncoherent.setObjectName(_fromUtf8("specHeisOpIncoherent")) |
|
55 | 55 | self.gridLayout_21.addWidget(self.specHeisOpIncoherent, 1, 1, 1, 1) |
|
56 | 56 | spacerItem22 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
57 | 57 | self.gridLayout_21.addItem(spacerItem22, 2, 0, 1, 1) |
|
58 | 58 | self.tabWidgetSpectraHeis.addTab(self.tabopSpectraHeis, _fromUtf8("")) |
|
59 | 59 | self.tabgraphSpectraHeis = QtGui.QWidget() |
|
60 | 60 | self.tabgraphSpectraHeis.setObjectName(_fromUtf8("tabgraphSpectraHeis")) |
|
61 | 61 | self.gridLayout_20 = QtGui.QGridLayout(self.tabgraphSpectraHeis) |
|
62 | 62 | self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20")) |
|
63 | 63 | self.label_54 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
64 | 64 | self.label_54.setObjectName(_fromUtf8("label_54")) |
|
65 | 65 | self.gridLayout_20.addWidget(self.label_54, 1, 0, 1, 1) |
|
66 | 66 | self.specHeisGraphToolPath = QtGui.QToolButton(self.tabgraphSpectraHeis) |
|
67 | 67 | self.specHeisGraphToolPath.setObjectName(_fromUtf8("specHeisGraphToolPath")) |
|
68 | 68 | self.gridLayout_20.addWidget(self.specHeisGraphToolPath, 0, 6, 1, 1) |
|
69 | 69 | self.specHeisGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
70 | 70 | self.specHeisGraphCebRTIplot.setText(_fromUtf8("")) |
|
71 | 71 | self.specHeisGraphCebRTIplot.setObjectName(_fromUtf8("specHeisGraphCebRTIplot")) |
|
72 | 72 | self.gridLayout_20.addWidget(self.specHeisGraphCebRTIplot, 4, 2, 1, 1) |
|
73 | 73 | self.label_62 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
74 | 74 | self.label_62.setObjectName(_fromUtf8("label_62")) |
|
75 | 75 | self.gridLayout_20.addWidget(self.label_62, 7, 0, 1, 1) |
|
76 | 76 | self.label_63 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
77 | 77 | self.label_63.setObjectName(_fromUtf8("label_63")) |
|
78 | 78 | self.gridLayout_20.addWidget(self.label_63, 8, 0, 1, 1) |
|
79 | 79 | self.label_64 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
80 | 80 | self.label_64.setObjectName(_fromUtf8("label_64")) |
|
81 | 81 | self.gridLayout_20.addWidget(self.label_64, 9, 0, 1, 1) |
|
82 | 82 | self.label_65 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
83 | 83 | self.label_65.setObjectName(_fromUtf8("label_65")) |
|
84 | 84 | self.gridLayout_20.addWidget(self.label_65, 10, 0, 1, 1) |
|
85 | 85 | spacerItem23 = QtGui.QSpacerItem(134, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
86 | 86 | self.gridLayout_20.addItem(spacerItem23, 11, 0, 1, 2) |
|
87 | 87 | self.specHeisGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
88 | 88 | self.specHeisGgraphftpratio.setObjectName(_fromUtf8("specHeisGgraphftpratio")) |
|
89 | 89 | self.gridLayout_20.addWidget(self.specHeisGgraphftpratio, 10, 1, 1, 6) |
|
90 | 90 | self.specHeisGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
91 | 91 | self.specHeisGraphftpRTIplot.setText(_fromUtf8("")) |
|
92 | 92 | self.specHeisGraphftpRTIplot.setObjectName(_fromUtf8("specHeisGraphftpRTIplot")) |
|
93 | 93 | self.gridLayout_20.addWidget(self.specHeisGraphftpRTIplot, 4, 6, 1, 1) |
|
94 | 94 | self.specHeisGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
95 | 95 | self.specHeisGgraphTminTmax.setObjectName(_fromUtf8("specHeisGgraphTminTmax")) |
|
96 | 96 | self.gridLayout_20.addWidget(self.specHeisGgraphTminTmax, 8, 1, 1, 6) |
|
97 | 97 | self.label_60 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
98 | 98 | self.label_60.setObjectName(_fromUtf8("label_60")) |
|
99 | 99 | self.gridLayout_20.addWidget(self.label_60, 5, 0, 1, 1) |
|
100 | 100 | self.label_61 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
101 | 101 | self.label_61.setObjectName(_fromUtf8("label_61")) |
|
102 | 102 | self.gridLayout_20.addWidget(self.label_61, 6, 0, 1, 1) |
|
103 | 103 | self.specHeisGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
104 | 104 | self.specHeisGraphPrefix.setObjectName(_fromUtf8("specHeisGraphPrefix")) |
|
105 | 105 | self.gridLayout_20.addWidget(self.specHeisGraphPrefix, 1, 1, 1, 6) |
|
106 | 106 | self.label_56 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
107 | 107 | self.label_56.setObjectName(_fromUtf8("label_56")) |
|
108 | 108 | self.gridLayout_20.addWidget(self.label_56, 2, 4, 1, 1) |
|
109 | 109 | self.label_57 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
110 | 110 | self.label_57.setObjectName(_fromUtf8("label_57")) |
|
111 | 111 | self.gridLayout_20.addWidget(self.label_57, 2, 6, 1, 1) |
|
112 | 112 | self.label_58 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
113 | 113 | self.label_58.setObjectName(_fromUtf8("label_58")) |
|
114 | 114 | self.gridLayout_20.addWidget(self.label_58, 3, 0, 1, 1) |
|
115 | 115 | self.specHeisGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
116 | 116 | self.specHeisGraphCebSpectraplot.setText(_fromUtf8("")) |
|
117 | 117 | self.specHeisGraphCebSpectraplot.setObjectName(_fromUtf8("specHeisGraphCebSpectraplot")) |
|
118 | 118 | self.gridLayout_20.addWidget(self.specHeisGraphCebSpectraplot, 3, 2, 1, 1) |
|
119 | 119 | self.specHeisGgraphYminYmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
120 | 120 | self.specHeisGgraphYminYmax.setObjectName(_fromUtf8("specHeisGgraphYminYmax")) |
|
121 | 121 | self.gridLayout_20.addWidget(self.specHeisGgraphYminYmax, 7, 1, 1, 6) |
|
122 | 122 | self.label_53 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
123 | 123 | self.label_53.setObjectName(_fromUtf8("label_53")) |
|
124 | 124 | self.gridLayout_20.addWidget(self.label_53, 0, 0, 1, 1) |
|
125 | 125 | self.label_55 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
126 | 126 | self.label_55.setObjectName(_fromUtf8("label_55")) |
|
127 | 127 | self.gridLayout_20.addWidget(self.label_55, 2, 2, 1, 1) |
|
128 | 128 | self.specHeisGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
129 | 129 | self.specHeisGraphSaveRTIplot.setText(_fromUtf8("")) |
|
130 | 130 | self.specHeisGraphSaveRTIplot.setObjectName(_fromUtf8("specHeisGraphSaveRTIplot")) |
|
131 | 131 | self.gridLayout_20.addWidget(self.specHeisGraphSaveRTIplot, 4, 4, 1, 1) |
|
132 | 132 | spacerItem24 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
133 | 133 | self.gridLayout_20.addItem(spacerItem24, 2, 3, 1, 1) |
|
134 | 134 | self.specHeisGgraphXminXmax = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
135 | 135 | self.specHeisGgraphXminXmax.setObjectName(_fromUtf8("specHeisGgraphXminXmax")) |
|
136 | 136 | self.gridLayout_20.addWidget(self.specHeisGgraphXminXmax, 6, 1, 1, 6) |
|
137 | 137 | self.specHeisGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
138 | 138 | self.specHeisGgraphChannelList.setObjectName(_fromUtf8("specHeisGgraphChannelList")) |
|
139 | 139 | self.gridLayout_20.addWidget(self.specHeisGgraphChannelList, 5, 1, 1, 6) |
|
140 | 140 | self.specHeisGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
141 | 141 | self.specHeisGgraphTimeRange.setObjectName(_fromUtf8("specHeisGgraphTimeRange")) |
|
142 | 142 | self.gridLayout_20.addWidget(self.specHeisGgraphTimeRange, 9, 1, 1, 6) |
|
143 | 143 | spacerItem25 = QtGui.QSpacerItem(106, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
144 | 144 | self.gridLayout_20.addItem(spacerItem25, 11, 3, 1, 3) |
|
145 | 145 | self.specHeisGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
146 | 146 | self.specHeisGraphSaveSpectra.setText(_fromUtf8("")) |
|
147 | 147 | self.specHeisGraphSaveSpectra.setObjectName(_fromUtf8("specHeisGraphSaveSpectra")) |
|
148 | 148 | self.gridLayout_20.addWidget(self.specHeisGraphSaveSpectra, 3, 4, 1, 1) |
|
149 | 149 | self.specHeisGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectraHeis) |
|
150 | 150 | self.specHeisGraphftpSpectra.setText(_fromUtf8("")) |
|
151 | 151 | self.specHeisGraphftpSpectra.setObjectName(_fromUtf8("specHeisGraphftpSpectra")) |
|
152 | 152 | self.gridLayout_20.addWidget(self.specHeisGraphftpSpectra, 3, 6, 1, 1) |
|
153 | 153 | self.label_59 = QtGui.QLabel(self.tabgraphSpectraHeis) |
|
154 | 154 | self.label_59.setObjectName(_fromUtf8("label_59")) |
|
155 | 155 | self.gridLayout_20.addWidget(self.label_59, 4, 0, 1, 1) |
|
156 | 156 | spacerItem26 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
157 | 157 | self.gridLayout_20.addItem(spacerItem26, 2, 5, 1, 1) |
|
158 | 158 | self.specHeisGraphPath = QtGui.QLineEdit(self.tabgraphSpectraHeis) |
|
159 | 159 | self.specHeisGraphPath.setObjectName(_fromUtf8("specHeisGraphPath")) |
|
160 | 160 | self.gridLayout_20.addWidget(self.specHeisGraphPath, 0, 1, 1, 5) |
|
161 | 161 | self.tabWidgetSpectraHeis.addTab(self.tabgraphSpectraHeis, _fromUtf8("")) |
|
162 | 162 | self.taboutputSpectraHeis = QtGui.QWidget() |
|
163 | 163 | self.taboutputSpectraHeis.setObjectName(_fromUtf8("taboutputSpectraHeis")) |
|
164 | 164 | self.gridLayout_19 = QtGui.QGridLayout(self.taboutputSpectraHeis) |
|
165 | 165 | self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19")) |
|
166 | 166 | self.label_67 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
167 | 167 | self.label_67.setObjectName(_fromUtf8("label_67")) |
|
168 | 168 | self.gridLayout_19.addWidget(self.label_67, 1, 0, 1, 1) |
|
169 | 169 | self.label_68 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
170 | 170 | self.label_68.setObjectName(_fromUtf8("label_68")) |
|
171 | 171 | self.gridLayout_19.addWidget(self.label_68, 2, 0, 1, 2) |
|
172 | 172 | self.label_66 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
173 | 173 | self.label_66.setObjectName(_fromUtf8("label_66")) |
|
174 | 174 | self.gridLayout_19.addWidget(self.label_66, 0, 0, 1, 1) |
|
175 | 175 | spacerItem27 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
176 | 176 | self.gridLayout_19.addItem(spacerItem27, 4, 0, 1, 1) |
|
177 | 177 | self.specHeisOutputToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
178 | 178 | self.specHeisOutputToolPath.setObjectName(_fromUtf8("specHeisOutputToolPath")) |
|
179 | 179 | self.gridLayout_19.addWidget(self.specHeisOutputToolPath, 1, 4, 1, 1) |
|
180 | 180 | self.specHeisOutputPath = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
181 | 181 | self.specHeisOutputPath.setObjectName(_fromUtf8("specHeisOutputPath")) |
|
182 | 182 | self.gridLayout_19.addWidget(self.specHeisOutputPath, 1, 3, 1, 1) |
|
183 | 183 | self.specHeisOutputComdata = QtGui.QComboBox(self.taboutputSpectraHeis) |
|
184 | 184 | self.specHeisOutputComdata.setObjectName(_fromUtf8("specHeisOutputComdata")) |
|
185 | 185 | self.specHeisOutputComdata.addItem(_fromUtf8("")) |
|
186 | 186 | self.gridLayout_19.addWidget(self.specHeisOutputComdata, 0, 3, 1, 2) |
|
187 | 187 | self.label_69 = QtGui.QLabel(self.taboutputSpectraHeis) |
|
188 | 188 | self.label_69.setObjectName(_fromUtf8("label_69")) |
|
189 | 189 | self.gridLayout_19.addWidget(self.label_69, 3, 0, 1, 2) |
|
190 | 190 | self.specHeisOutputblocksperfile = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
191 | 191 | self.specHeisOutputblocksperfile.setObjectName(_fromUtf8("specHeisOutputblocksperfile")) |
|
192 | 192 | self.gridLayout_19.addWidget(self.specHeisOutputblocksperfile, 2, 3, 1, 1) |
|
193 | 193 | self.specHeisOutputMetada = QtGui.QLineEdit(self.taboutputSpectraHeis) |
|
194 | 194 | self.specHeisOutputMetada.setObjectName(_fromUtf8("specHeisOutputMetada")) |
|
195 | 195 | self.gridLayout_19.addWidget(self.specHeisOutputMetada, 3, 3, 1, 1) |
|
196 | 196 | self.specHeisOutputMetadaToolPath = QtGui.QToolButton(self.taboutputSpectraHeis) |
|
197 | 197 | self.specHeisOutputMetadaToolPath.setObjectName(_fromUtf8("specHeisOutputMetadaToolPath")) |
|
198 | 198 | self.gridLayout_19.addWidget(self.specHeisOutputMetadaToolPath, 3, 4, 1, 1) |
|
199 | 199 | self.tabWidgetSpectraHeis.addTab(self.taboutputSpectraHeis, _fromUtf8("")) |
|
200 | 200 | self.gridLayout_23.addWidget(self.tabWidgetSpectraHeis, 0, 0, 1, 1) |
|
201 | 201 | |
|
202 | 202 | self.tabWidgetProject.addTab(self.tabSpectraHeis, _fromUtf8("")) |
|
203 | 203 | |
|
204 | 204 | self.tabWidgetSpectraHeis.setCurrentIndex(0) |
|
205 | 205 | |
|
206 | 206 | def retranslateUi(self): |
|
207 | 207 | |
|
208 | 208 | self.specHeisGraphClear.setText(_translate("MainWindow", "Clear", None)) |
|
209 | 209 | self.specHeisOpOk.setText(_translate("MainWindow", "Ok", None)) |
|
210 | 210 | self.specHeisOpCobIncInt.setItemText(0, _translate("MainWindow", "Time Interval", None)) |
|
211 | 211 | self.specHeisOpCebIncoherent.setText(_translate("MainWindow", "Incoherent Intergration", None)) |
|
212 | 212 | |
|
213 | 213 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabopSpectraHeis), _translate("MainWindow", "Operation", None)) |
|
214 | 214 | self.label_54.setText(_translate("MainWindow", "Prefix", None)) |
|
215 | 215 | self.specHeisGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
216 |
self.label_62.setText(_translate("MainWindow", " |
|
|
217 |
self.label_63.setText(_translate("MainWindow", "T |
|
|
218 |
self.label_64.setText(_translate("MainWindow", "Time |
|
|
216 | self.label_62.setText(_translate("MainWindow", "Intensity range (dB)", None)) | |
|
217 | self.label_63.setText(_translate("MainWindow", "Time range (hours):", None)) | |
|
218 | self.label_64.setText(_translate("MainWindow", "Time interval:", None)) | |
|
219 | 219 | self.label_65.setText(_translate("MainWindow", "Wr Period", None)) |
|
220 | 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 | 222 | self.label_56.setText(_translate("MainWindow", "Save", None)) |
|
223 | 223 | self.label_57.setText(_translate("MainWindow", "ftp", None)) |
|
224 | 224 | self.label_58.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
225 | 225 | self.label_53.setText(_translate("MainWindow", "Path", None)) |
|
226 | 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 | 229 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.tabgraphSpectraHeis), _translate("MainWindow", "Graphics", None)) |
|
230 | 230 | self.label_67.setText(_translate("MainWindow", "Path:", None)) |
|
231 | 231 | self.label_68.setText(_translate("MainWindow", "Blocks per File:", None)) |
|
232 | 232 | self.label_66.setText(_translate("MainWindow", "Type:", None)) |
|
233 | 233 | |
|
234 | 234 | self.tabWidgetSpectraHeis.setTabText(self.tabWidgetSpectraHeis.indexOf(self.taboutputSpectraHeis), _translate("MainWindow", "Output", None)) |
|
235 | 235 | self.specHeisOutputToolPath.setText(_translate("MainWindow", "...", None)) |
|
236 | 236 | self.specHeisOutputComdata.setItemText(0, _translate("MainWindow", ".fits", None)) |
|
237 | 237 | self.label_69.setText(_translate("MainWindow", "Metada", None)) |
|
238 | 238 | self.specHeisOutputMetadaToolPath.setText(_translate("MainWindow", "...", None)) |
|
239 | 239 | |
|
240 | 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