|
@@
-1,6074
+1,6082
|
|
1
|
# -*- coding: utf-8 -*-
|
|
1
|
# -*- coding: utf-8 -*-
|
|
2
|
"""
|
|
2
|
"""
|
|
3
|
Module implementing MainWindow.
|
|
3
|
Module implementing MainWindow.
|
|
4
|
#+++++++++++++GUI V1++++++++++++++#
|
|
4
|
#+++++++++++++GUI V1++++++++++++++#
|
|
5
|
@author: AlexanderValdezPortocarrero
|
|
5
|
@author: AlexanderValdezPortocarrero
|
|
6
|
|
|
6
|
|
|
7
|
#+++++++++++++GUI V2++++++++++++++#
|
|
7
|
#+++++++++++++GUI V2++++++++++++++#
|
|
8
|
@author Miguel Urco
|
|
8
|
@author Miguel Urco
|
|
9
|
"""
|
|
9
|
"""
|
|
10
|
import os, sys
|
|
10
|
import os, sys
|
|
11
|
import datetime
|
|
11
|
import datetime
|
|
12
|
import numpy
|
|
12
|
import numpy
|
|
13
|
import ast
|
|
13
|
import ast
|
|
14
|
|
|
14
|
|
|
15
|
from Queue import Queue
|
|
15
|
from Queue import Queue
|
|
16
|
|
|
16
|
|
|
17
|
from collections import OrderedDict
|
|
17
|
from collections import OrderedDict
|
|
18
|
from os.path import expanduser
|
|
18
|
from os.path import expanduser
|
|
19
|
from time import sleep
|
|
19
|
from time import sleep
|
|
20
|
|
|
20
|
|
|
21
|
from PyQt4.QtGui import QMainWindow
|
|
21
|
from PyQt4.QtGui import QMainWindow
|
|
22
|
from PyQt4.QtCore import pyqtSignature
|
|
22
|
from PyQt4.QtCore import pyqtSignature
|
|
23
|
from PyQt4.QtCore import pyqtSignal
|
|
23
|
from PyQt4.QtCore import pyqtSignal
|
|
24
|
from PyQt4 import QtCore
|
|
24
|
from PyQt4 import QtCore
|
|
25
|
from PyQt4 import QtGui
|
|
25
|
from PyQt4 import QtGui
|
|
26
|
|
|
26
|
|
|
27
|
from propertiesViewModel import TreeModel, PropertyBuffer
|
|
27
|
from propertiesViewModel import TreeModel, PropertyBuffer
|
|
28
|
from parametersModel import ProjectParms
|
|
28
|
from parametersModel import ProjectParms
|
|
29
|
|
|
29
|
|
|
30
|
from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess
|
|
30
|
from schainpy.gui.viewer.ui_unitprocess import Ui_UnitProcess
|
|
31
|
from schainpy.gui.viewer.ui_ftp import Ui_Ftp
|
|
31
|
from schainpy.gui.viewer.ui_ftp import Ui_Ftp
|
|
32
|
from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow
|
|
32
|
from schainpy.gui.viewer.ui_mainwindow import Ui_BasicWindow
|
|
33
|
|
|
33
|
|
|
34
|
from schainpy.controller_api import ControllerThread
|
|
34
|
from schainpy.controller_api import ControllerThread
|
|
35
|
from schainpy.controller import Project
|
|
35
|
from schainpy.controller import Project
|
|
36
|
|
|
36
|
|
|
37
|
from schainpy.model.graphics.jroplotter import PlotManager
|
|
37
|
from schainpy.model.graphics.jroplotter import PlotManager
|
|
38
|
from schainpy.gui.figures import tools
|
|
38
|
from schainpy.gui.figures import tools
|
|
39
|
|
|
39
|
|
|
40
|
FIGURES_PATH = tools.get_path()
|
|
40
|
FIGURES_PATH = tools.get_path()
|
|
41
|
TEMPORAL_FILE = ".temp.xml"
|
|
41
|
TEMPORAL_FILE = ".temp.xml"
|
|
42
|
|
|
42
|
|
|
43
|
def isRadarFile(file):
|
|
43
|
def isRadarFile(file):
|
|
44
|
try:
|
|
44
|
try:
|
|
45
|
year = int(file[1:5])
|
|
45
|
year = int(file[1:5])
|
|
46
|
doy = int(file[5:8])
|
|
46
|
doy = int(file[5:8])
|
|
47
|
set = int(file[8:11])
|
|
47
|
set = int(file[8:11])
|
|
48
|
except:
|
|
48
|
except:
|
|
49
|
return 0
|
|
49
|
return 0
|
|
50
|
|
|
50
|
|
|
51
|
return 1
|
|
51
|
return 1
|
|
52
|
|
|
52
|
|
|
53
|
def isRadarPath(path):
|
|
53
|
def isRadarPath(path):
|
|
54
|
try:
|
|
54
|
try:
|
|
55
|
year = int(path[1:5])
|
|
55
|
year = int(path[1:5])
|
|
56
|
doy = int(path[5:8])
|
|
56
|
doy = int(path[5:8])
|
|
57
|
except:
|
|
57
|
except:
|
|
58
|
return 0
|
|
58
|
return 0
|
|
59
|
|
|
59
|
|
|
60
|
return 1
|
|
60
|
return 1
|
|
61
|
|
|
61
|
|
|
62
|
def isInt(cadena):
|
|
62
|
def isInt(cadena):
|
|
63
|
|
|
63
|
|
|
64
|
try:
|
|
64
|
try:
|
|
65
|
int(cadena)
|
|
65
|
int(cadena)
|
|
66
|
except:
|
|
66
|
except:
|
|
67
|
return 0
|
|
67
|
return 0
|
|
68
|
|
|
68
|
|
|
69
|
return 1
|
|
69
|
return 1
|
|
70
|
|
|
70
|
|
|
71
|
def isFloat(cadena):
|
|
71
|
def isFloat(cadena):
|
|
72
|
|
|
72
|
|
|
73
|
try:
|
|
73
|
try:
|
|
74
|
float(cadena)
|
|
74
|
float(cadena)
|
|
75
|
except:
|
|
75
|
except:
|
|
76
|
return 0
|
|
76
|
return 0
|
|
77
|
|
|
77
|
|
|
78
|
return 1
|
|
78
|
return 1
|
|
79
|
|
|
79
|
|
|
80
|
def isList(cadena):
|
|
80
|
def isList(cadena):
|
|
81
|
|
|
81
|
|
|
82
|
value = str.strip(cadena)
|
|
82
|
value = str.strip(cadena)
|
|
83
|
|
|
83
|
|
|
84
|
if not value:
|
|
84
|
if not value:
|
|
85
|
return 0
|
|
85
|
return 0
|
|
86
|
|
|
86
|
|
|
87
|
try:
|
|
87
|
try:
|
|
88
|
x = ast.literal_eval(value)
|
|
88
|
x = ast.literal_eval(value)
|
|
89
|
except:
|
|
89
|
except:
|
|
90
|
return 0
|
|
90
|
return 0
|
|
91
|
|
|
91
|
|
|
92
|
if type(x) in (int, float, tuple, list):
|
|
92
|
if type(x) in (int, float, tuple, list):
|
|
93
|
return 1
|
|
93
|
return 1
|
|
94
|
|
|
94
|
|
|
95
|
return 0
|
|
95
|
return 0
|
|
96
|
|
|
96
|
|
|
97
|
def isIntList(cadena):
|
|
97
|
def isIntList(cadena):
|
|
98
|
|
|
98
|
|
|
99
|
value = str.strip(cadena)
|
|
99
|
value = str.strip(cadena)
|
|
100
|
|
|
100
|
|
|
101
|
if not value:
|
|
101
|
if not value:
|
|
102
|
return 0
|
|
102
|
return 0
|
|
103
|
|
|
103
|
|
|
104
|
try:
|
|
104
|
try:
|
|
105
|
x = ast.literal_eval(value)
|
|
105
|
x = ast.literal_eval(value)
|
|
106
|
except:
|
|
106
|
except:
|
|
107
|
return 0
|
|
107
|
return 0
|
|
108
|
|
|
108
|
|
|
109
|
if type(x) not in (int, tuple, list):
|
|
109
|
if type(x) not in (int, tuple, list):
|
|
110
|
return 0
|
|
110
|
return 0
|
|
111
|
|
|
111
|
|
|
112
|
return 1
|
|
112
|
return 1
|
|
113
|
|
|
113
|
|
|
114
|
def isFloatRange(cadena):
|
|
114
|
def isFloatRange(cadena):
|
|
115
|
|
|
115
|
|
|
116
|
value = str.strip(cadena)
|
|
116
|
value = str.strip(cadena)
|
|
117
|
|
|
117
|
|
|
118
|
if not value:
|
|
118
|
if not value:
|
|
119
|
return 0
|
|
119
|
return 0
|
|
120
|
|
|
120
|
|
|
121
|
c = str.split(value, ",")
|
|
121
|
c = str.split(value, ",")
|
|
122
|
|
|
122
|
|
|
123
|
if len(c) != 2:
|
|
123
|
if len(c) != 2:
|
|
124
|
return 0
|
|
124
|
return 0
|
|
125
|
|
|
125
|
|
|
126
|
if not isFloat(c[0]):
|
|
126
|
if not isFloat(c[0]):
|
|
127
|
return 0
|
|
127
|
return 0
|
|
128
|
|
|
128
|
|
|
129
|
if not isFloat(c[1]):
|
|
129
|
if not isFloat(c[1]):
|
|
130
|
return 0
|
|
130
|
return 0
|
|
131
|
|
|
131
|
|
|
132
|
return 1
|
|
132
|
return 1
|
|
133
|
|
|
133
|
|
|
134
|
def isIntRange(cadena):
|
|
134
|
def isIntRange(cadena):
|
|
135
|
|
|
135
|
|
|
136
|
value = str.strip(cadena)
|
|
136
|
value = str.strip(cadena)
|
|
137
|
|
|
137
|
|
|
138
|
if not value:
|
|
138
|
if not value:
|
|
139
|
return 0
|
|
139
|
return 0
|
|
140
|
|
|
140
|
|
|
141
|
c = str.split(value, ",")
|
|
141
|
c = str.split(value, ",")
|
|
142
|
|
|
142
|
|
|
143
|
if len(c) != 2:
|
|
143
|
if len(c) != 2:
|
|
144
|
return 0
|
|
144
|
return 0
|
|
145
|
|
|
145
|
|
|
146
|
if not isInt(c[0]):
|
|
146
|
if not isInt(c[0]):
|
|
147
|
return 0
|
|
147
|
return 0
|
|
148
|
|
|
148
|
|
|
149
|
if not isInt(c[1]):
|
|
149
|
if not isInt(c[1]):
|
|
150
|
return 0
|
|
150
|
return 0
|
|
151
|
|
|
151
|
|
|
152
|
def isPair(value):
|
|
152
|
def isPair(value):
|
|
153
|
|
|
153
|
|
|
154
|
if type(value) not in (tuple, list):
|
|
154
|
if type(value) not in (tuple, list):
|
|
155
|
return 0
|
|
155
|
return 0
|
|
156
|
|
|
156
|
|
|
157
|
if len(value) != 2:
|
|
157
|
if len(value) != 2:
|
|
158
|
return 0
|
|
158
|
return 0
|
|
159
|
|
|
159
|
|
|
160
|
for i in value:
|
|
160
|
for i in value:
|
|
161
|
if type(i) not in (int,):
|
|
161
|
if type(i) not in (int,):
|
|
162
|
return 0
|
|
162
|
return 0
|
|
163
|
|
|
163
|
|
|
164
|
return 1
|
|
164
|
return 1
|
|
165
|
|
|
165
|
|
|
166
|
def isPairList(cadena):
|
|
166
|
def isPairList(cadena):
|
|
167
|
|
|
167
|
|
|
168
|
value = str.strip(cadena)
|
|
168
|
value = str.strip(cadena)
|
|
169
|
|
|
169
|
|
|
170
|
if not value:
|
|
170
|
if not value:
|
|
171
|
return 0
|
|
171
|
return 0
|
|
172
|
|
|
172
|
|
|
173
|
try:
|
|
173
|
try:
|
|
174
|
x = ast.literal_eval(value)
|
|
174
|
x = ast.literal_eval(value)
|
|
175
|
except:
|
|
175
|
except:
|
|
176
|
return 0
|
|
176
|
return 0
|
|
177
|
|
|
177
|
|
|
178
|
if type(x) not in (tuple, list):
|
|
178
|
if type(x) not in (tuple, list):
|
|
179
|
return 0
|
|
179
|
return 0
|
|
180
|
|
|
180
|
|
|
181
|
if type(x[0]) not in (tuple, list):
|
|
181
|
if type(x[0]) not in (tuple, list):
|
|
182
|
#x = (0,1)
|
|
182
|
#x = (0,1)
|
|
183
|
if not isPair(x):
|
|
183
|
if not isPair(x):
|
|
184
|
return 0
|
|
184
|
return 0
|
|
185
|
|
|
185
|
|
|
186
|
return 1
|
|
186
|
return 1
|
|
187
|
|
|
187
|
|
|
188
|
for thisPair in x:
|
|
188
|
for thisPair in x:
|
|
189
|
if not isPair(thisPair):
|
|
189
|
if not isPair(thisPair):
|
|
190
|
return 0
|
|
190
|
return 0
|
|
191
|
|
|
191
|
|
|
192
|
return 1
|
|
192
|
return 1
|
|
193
|
|
|
193
|
|
|
194
|
def isMultiList(cadena):
|
|
194
|
def isMultiList(cadena):
|
|
195
|
|
|
195
|
|
|
196
|
value = str.strip(cadena)
|
|
196
|
value = str.strip(cadena)
|
|
197
|
|
|
197
|
|
|
198
|
if not value:
|
|
198
|
if not value:
|
|
199
|
return 0
|
|
199
|
return 0
|
|
200
|
|
|
200
|
|
|
201
|
try:
|
|
201
|
try:
|
|
202
|
x = ast.literal_eval(value)
|
|
202
|
x = ast.literal_eval(value)
|
|
203
|
except:
|
|
203
|
except:
|
|
204
|
return 0
|
|
204
|
return 0
|
|
205
|
|
|
205
|
|
|
206
|
if type(x) not in (tuple, list):
|
|
206
|
if type(x) not in (tuple, list):
|
|
207
|
return 0
|
|
207
|
return 0
|
|
208
|
|
|
208
|
|
|
209
|
for thisList in x:
|
|
209
|
for thisList in x:
|
|
210
|
if type(thisList) not in (int, float, tuple, list):
|
|
210
|
if type(thisList) not in (int, float, tuple, list):
|
|
211
|
return 0
|
|
211
|
return 0
|
|
212
|
|
|
212
|
|
|
213
|
return 1
|
|
213
|
return 1
|
|
214
|
|
|
214
|
|
|
215
|
def getCode(cadena):
|
|
215
|
def getCode(cadena):
|
|
216
|
|
|
216
|
|
|
217
|
if not isMultiList(cadena):
|
|
217
|
if not isMultiList(cadena):
|
|
218
|
return None
|
|
218
|
return None
|
|
219
|
|
|
219
|
|
|
220
|
try:
|
|
220
|
try:
|
|
221
|
x = ast.literal_eval(cadena)
|
|
221
|
x = ast.literal_eval(cadena)
|
|
222
|
except:
|
|
222
|
except:
|
|
223
|
return None
|
|
223
|
return None
|
|
224
|
|
|
224
|
|
|
225
|
if type(x[0]) in (int, float):
|
|
225
|
if type(x[0]) in (int, float):
|
|
226
|
return [x]
|
|
226
|
return [x]
|
|
227
|
|
|
227
|
|
|
228
|
return x
|
|
228
|
return x
|
|
229
|
|
|
229
|
|
|
230
|
|
|
230
|
|
|
231
|
class BasicWindow(QMainWindow, Ui_BasicWindow):
|
|
231
|
class BasicWindow(QMainWindow, Ui_BasicWindow):
|
|
232
|
"""
|
|
232
|
"""
|
|
233
|
"""
|
|
233
|
"""
|
|
234
|
def __init__(self, parent=None):
|
|
234
|
def __init__(self, parent=None):
|
|
235
|
"""
|
|
235
|
"""
|
|
236
|
|
|
236
|
|
|
237
|
"""
|
|
237
|
"""
|
|
238
|
QMainWindow.__init__(self, parent)
|
|
238
|
QMainWindow.__init__(self, parent)
|
|
239
|
self.setupUi(self)
|
|
239
|
self.setupUi(self)
|
|
240
|
self.__puObjDict = {}
|
|
240
|
self.__puObjDict = {}
|
|
241
|
self.__itemTreeDict = {}
|
|
241
|
self.__itemTreeDict = {}
|
|
242
|
self.readUnitConfObjList = []
|
|
242
|
self.readUnitConfObjList = []
|
|
243
|
self.operObjList = []
|
|
243
|
self.operObjList = []
|
|
244
|
self.projecObjView = None
|
|
244
|
self.projecObjView = None
|
|
245
|
self.idProject = 0
|
|
245
|
self.idProject = 0
|
|
246
|
# self.idImag = 0
|
|
246
|
# self.idImag = 0
|
|
247
|
|
|
247
|
|
|
248
|
self.idImagscope = 0
|
|
248
|
self.idImagscope = 0
|
|
249
|
self.idImagspectra = 0
|
|
249
|
self.idImagspectra = 0
|
|
250
|
self.idImagcross = 0
|
|
250
|
self.idImagcross = 0
|
|
251
|
self.idImagrti = 0
|
|
251
|
self.idImagrti = 0
|
|
252
|
self.idImagcoherence = 0
|
|
252
|
self.idImagcoherence = 0
|
|
253
|
self.idImagpower = 0
|
|
253
|
self.idImagpower = 0
|
|
254
|
self.idImagrtinoise = 0
|
|
254
|
self.idImagrtinoise = 0
|
|
255
|
self.idImagspectraHeis = 0
|
|
255
|
self.idImagspectraHeis = 0
|
|
256
|
self.idImagrtiHeis = 0
|
|
256
|
self.idImagrtiHeis = 0
|
|
257
|
|
|
257
|
|
|
258
|
self.dateList = []
|
|
258
|
self.dateList = []
|
|
259
|
self.dataPath = None
|
|
259
|
self.dataPath = None
|
|
260
|
self.create = False
|
|
260
|
self.create = False
|
|
261
|
self.selectedItemTree = None
|
|
261
|
self.selectedItemTree = None
|
|
262
|
self.controllerThread = None
|
|
262
|
self.controllerThread = None
|
|
263
|
# self.commCtrlPThread = None
|
|
263
|
# self.commCtrlPThread = None
|
|
264
|
# self.create_figure()
|
|
264
|
# self.create_figure()
|
|
265
|
self.temporalFTP = ftpBuffer()
|
|
265
|
self.temporalFTP = ftpBuffer()
|
|
266
|
self.projectProperCaracteristica = []
|
|
266
|
self.projectProperCaracteristica = []
|
|
267
|
self.projectProperPrincipal = []
|
|
267
|
self.projectProperPrincipal = []
|
|
268
|
self.projectProperDescripcion = []
|
|
268
|
self.projectProperDescripcion = []
|
|
269
|
self.volProperCaracteristica = []
|
|
269
|
self.volProperCaracteristica = []
|
|
270
|
self.volProperPrincipal = []
|
|
270
|
self.volProperPrincipal = []
|
|
271
|
self.volProperDescripcion = []
|
|
271
|
self.volProperDescripcion = []
|
|
272
|
self.specProperCaracteristica = []
|
|
272
|
self.specProperCaracteristica = []
|
|
273
|
self.specProperPrincipal = []
|
|
273
|
self.specProperPrincipal = []
|
|
274
|
self.specProperDescripcion = []
|
|
274
|
self.specProperDescripcion = []
|
|
275
|
|
|
275
|
|
|
276
|
self.specHeisProperCaracteristica = []
|
|
276
|
self.specHeisProperCaracteristica = []
|
|
277
|
self.specHeisProperPrincipal = []
|
|
277
|
self.specHeisProperPrincipal = []
|
|
278
|
self.specHeisProperDescripcion = []
|
|
278
|
self.specHeisProperDescripcion = []
|
|
279
|
|
|
279
|
|
|
280
|
# self.pathWorkSpace = './'
|
|
280
|
# self.pathWorkSpace = './'
|
|
281
|
|
|
281
|
|
|
282
|
self.__projectObjDict = {}
|
|
282
|
self.__projectObjDict = {}
|
|
283
|
self.__operationObjDict = {}
|
|
283
|
self.__operationObjDict = {}
|
|
284
|
|
|
284
|
|
|
285
|
self.__puLocalFolder2FTP = {}
|
|
285
|
self.__puLocalFolder2FTP = {}
|
|
286
|
self.threadStarted = False
|
|
286
|
self.threadStarted = False
|
|
287
|
|
|
287
|
|
|
288
|
self.plotManager = None
|
|
288
|
self.plotManager = None
|
|
289
|
|
|
289
|
|
|
290
|
# self.create_comm()
|
|
290
|
# self.create_comm()
|
|
291
|
self.create_updating_timer()
|
|
291
|
self.create_updating_timer()
|
|
292
|
self.setGUIStatus()
|
|
292
|
self.setGUIStatus()
|
|
293
|
|
|
293
|
|
|
294
|
@pyqtSignature("")
|
|
294
|
@pyqtSignature("")
|
|
295
|
def on_actionOpen_triggered(self):
|
|
295
|
def on_actionOpen_triggered(self):
|
|
296
|
"""
|
|
296
|
"""
|
|
297
|
Slot documentation goes here.
|
|
297
|
Slot documentation goes here.
|
|
298
|
"""
|
|
298
|
"""
|
|
299
|
self.openProject()
|
|
299
|
self.openProject()
|
|
300
|
|
|
300
|
|
|
301
|
@pyqtSignature("")
|
|
301
|
@pyqtSignature("")
|
|
302
|
def on_actionCreate_triggered(self):
|
|
302
|
def on_actionCreate_triggered(self):
|
|
303
|
"""
|
|
303
|
"""
|
|
304
|
Slot documentation goes here.
|
|
304
|
Slot documentation goes here.
|
|
305
|
"""
|
|
305
|
"""
|
|
306
|
self.setInputsProject_View()
|
|
306
|
self.setInputsProject_View()
|
|
307
|
self.create = True
|
|
307
|
self.create = True
|
|
308
|
|
|
308
|
|
|
309
|
@pyqtSignature("")
|
|
309
|
@pyqtSignature("")
|
|
310
|
def on_actionSave_triggered(self):
|
|
310
|
def on_actionSave_triggered(self):
|
|
311
|
"""
|
|
311
|
"""
|
|
312
|
Slot documentation goes here.
|
|
312
|
Slot documentation goes here.
|
|
313
|
"""
|
|
313
|
"""
|
|
314
|
self.saveProject()
|
|
314
|
self.saveProject()
|
|
315
|
|
|
315
|
|
|
316
|
@pyqtSignature("")
|
|
316
|
@pyqtSignature("")
|
|
317
|
def on_actionClose_triggered(self):
|
|
317
|
def on_actionClose_triggered(self):
|
|
318
|
"""
|
|
318
|
"""
|
|
319
|
Slot documentation goes here.
|
|
319
|
Slot documentation goes here.
|
|
320
|
"""
|
|
320
|
"""
|
|
321
|
self.close()
|
|
321
|
self.close()
|
|
322
|
|
|
322
|
|
|
323
|
@pyqtSignature("")
|
|
323
|
@pyqtSignature("")
|
|
324
|
def on_actionStart_triggered(self):
|
|
324
|
def on_actionStart_triggered(self):
|
|
325
|
"""
|
|
325
|
"""
|
|
326
|
"""
|
|
326
|
"""
|
|
327
|
self.playProject()
|
|
327
|
self.playProject()
|
|
328
|
|
|
328
|
|
|
329
|
@pyqtSignature("")
|
|
329
|
@pyqtSignature("")
|
|
330
|
def on_actionPause_triggered(self):
|
|
330
|
def on_actionPause_triggered(self):
|
|
331
|
"""
|
|
331
|
"""
|
|
332
|
"""
|
|
332
|
"""
|
|
333
|
self.pauseProject()
|
|
333
|
self.pauseProject()
|
|
334
|
|
|
334
|
|
|
335
|
@pyqtSignature("")
|
|
335
|
@pyqtSignature("")
|
|
336
|
def on_actionStop_triggered(self):
|
|
336
|
def on_actionStop_triggered(self):
|
|
337
|
"""
|
|
337
|
"""
|
|
338
|
"""
|
|
338
|
"""
|
|
339
|
self.stopProject()
|
|
339
|
self.stopProject()
|
|
340
|
|
|
340
|
|
|
341
|
@pyqtSignature("")
|
|
341
|
@pyqtSignature("")
|
|
342
|
def on_actionAbout_triggered(self):
|
|
342
|
def on_actionAbout_triggered(self):
|
|
343
|
"""
|
|
343
|
"""
|
|
344
|
"""
|
|
344
|
"""
|
|
345
|
self.aboutEvent()
|
|
345
|
self.aboutEvent()
|
|
346
|
|
|
346
|
|
|
347
|
@pyqtSignature("")
|
|
347
|
@pyqtSignature("")
|
|
348
|
def on_actionFTP_triggered(self):
|
|
348
|
def on_actionFTP_triggered(self):
|
|
349
|
"""
|
|
349
|
"""
|
|
350
|
"""
|
|
350
|
"""
|
|
351
|
self.configFTPWindowObj = Ftp(self)
|
|
351
|
self.configFTPWindowObj = Ftp(self)
|
|
352
|
|
|
352
|
|
|
353
|
if not self.temporalFTP.create:
|
|
353
|
if not self.temporalFTP.create:
|
|
354
|
self.temporalFTP.setwithoutconfiguration()
|
|
354
|
self.temporalFTP.setwithoutconfiguration()
|
|
355
|
|
|
355
|
|
|
356
|
self.configFTPWindowObj.setParmsfromTemporal(self.temporalFTP.server,
|
|
356
|
self.configFTPWindowObj.setParmsfromTemporal(self.temporalFTP.server,
|
|
357
|
self.temporalFTP.remotefolder,
|
|
357
|
self.temporalFTP.remotefolder,
|
|
358
|
self.temporalFTP.username,
|
|
358
|
self.temporalFTP.username,
|
|
359
|
self.temporalFTP.password,
|
|
359
|
self.temporalFTP.password,
|
|
360
|
self.temporalFTP.ftp_wei,
|
|
360
|
self.temporalFTP.ftp_wei,
|
|
361
|
self.temporalFTP.exp_code,
|
|
361
|
self.temporalFTP.exp_code,
|
|
362
|
self.temporalFTP.sub_exp_code,
|
|
362
|
self.temporalFTP.sub_exp_code,
|
|
363
|
self.temporalFTP.plot_pos)
|
|
363
|
self.temporalFTP.plot_pos)
|
|
364
|
|
|
364
|
|
|
365
|
self.configFTPWindowObj.show()
|
|
365
|
self.configFTPWindowObj.show()
|
|
366
|
self.configFTPWindowObj.closed.connect(self.createFTPConfig)
|
|
366
|
self.configFTPWindowObj.closed.connect(self.createFTPConfig)
|
|
367
|
|
|
367
|
|
|
368
|
def createFTPConfig(self):
|
|
368
|
def createFTPConfig(self):
|
|
369
|
|
|
369
|
|
|
370
|
if not self.configFTPWindowObj.create:
|
|
370
|
if not self.configFTPWindowObj.create:
|
|
371
|
self.console.clear()
|
|
371
|
self.console.clear()
|
|
372
|
self.console.append("There is no FTP configuration")
|
|
372
|
self.console.append("There is no FTP configuration")
|
|
373
|
return
|
|
373
|
return
|
|
374
|
|
|
374
|
|
|
375
|
self.console.append("Push Ok in Spectra view to Add FTP Configuration")
|
|
375
|
self.console.append("Push Ok in Spectra view to Add FTP Configuration")
|
|
376
|
|
|
376
|
|
|
377
|
server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow()
|
|
377
|
server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.configFTPWindowObj.getParmsFromFtpWindow()
|
|
378
|
self.temporalFTP.save(server=server,
|
|
378
|
self.temporalFTP.save(server=server,
|
|
379
|
remotefolder=remotefolder,
|
|
379
|
remotefolder=remotefolder,
|
|
380
|
username=username,
|
|
380
|
username=username,
|
|
381
|
password=password,
|
|
381
|
password=password,
|
|
382
|
ftp_wei=ftp_wei,
|
|
382
|
ftp_wei=ftp_wei,
|
|
383
|
exp_code=exp_code,
|
|
383
|
exp_code=exp_code,
|
|
384
|
sub_exp_code=sub_exp_code,
|
|
384
|
sub_exp_code=sub_exp_code,
|
|
385
|
plot_pos=plot_pos)
|
|
385
|
plot_pos=plot_pos)
|
|
386
|
|
|
386
|
|
|
387
|
@pyqtSignature("")
|
|
387
|
@pyqtSignature("")
|
|
388
|
def on_actionOpenToolbar_triggered(self):
|
|
388
|
def on_actionOpenToolbar_triggered(self):
|
|
389
|
"""
|
|
389
|
"""
|
|
390
|
Slot documentation goes here.
|
|
390
|
Slot documentation goes here.
|
|
391
|
"""
|
|
391
|
"""
|
|
392
|
self.openProject()
|
|
392
|
self.openProject()
|
|
393
|
|
|
393
|
|
|
394
|
@pyqtSignature("")
|
|
394
|
@pyqtSignature("")
|
|
395
|
def on_actionCreateToolbar_triggered(self):
|
|
395
|
def on_actionCreateToolbar_triggered(self):
|
|
396
|
"""
|
|
396
|
"""
|
|
397
|
Slot documentation goes here.
|
|
397
|
Slot documentation goes here.
|
|
398
|
"""
|
|
398
|
"""
|
|
399
|
self.setInputsProject_View()
|
|
399
|
self.setInputsProject_View()
|
|
400
|
self.create = True
|
|
400
|
self.create = True
|
|
401
|
|
|
401
|
|
|
402
|
@pyqtSignature("")
|
|
402
|
@pyqtSignature("")
|
|
403
|
def on_actionAddPU_triggered(self):
|
|
403
|
def on_actionAddPU_triggered(self):
|
|
404
|
|
|
404
|
|
|
405
|
if len(self.__projectObjDict) == 0:
|
|
405
|
if len(self.__projectObjDict) == 0:
|
|
406
|
outputstr = "First create a Project before add any Processing Unit"
|
|
406
|
outputstr = "First create a Project before add any Processing Unit"
|
|
407
|
self.console.clear()
|
|
407
|
self.console.clear()
|
|
408
|
self.console.append(outputstr)
|
|
408
|
self.console.append(outputstr)
|
|
409
|
return
|
|
409
|
return
|
|
410
|
else:
|
|
410
|
else:
|
|
411
|
self.addPUWindow()
|
|
411
|
self.addPUWindow()
|
|
412
|
self.console.clear()
|
|
412
|
self.console.clear()
|
|
413
|
self.console.append("Please, Choose the type of Processing Unit")
|
|
413
|
self.console.append("Please, Choose the type of Processing Unit")
|
|
414
|
# self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage")
|
|
414
|
# self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage")
|
|
415
|
# self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation")
|
|
415
|
# self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation")
|
|
416
|
# self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis")
|
|
416
|
# self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis")
|
|
417
|
|
|
417
|
|
|
418
|
|
|
418
|
|
|
419
|
@pyqtSignature("")
|
|
419
|
@pyqtSignature("")
|
|
420
|
def on_actionSaveToolbar_triggered(self):
|
|
420
|
def on_actionSaveToolbar_triggered(self):
|
|
421
|
"""
|
|
421
|
"""
|
|
422
|
Slot documentation goes here.
|
|
422
|
Slot documentation goes here.
|
|
423
|
"""
|
|
423
|
"""
|
|
424
|
self.saveProject()
|
|
424
|
self.saveProject()
|
|
425
|
|
|
425
|
|
|
426
|
@pyqtSignature("")
|
|
426
|
@pyqtSignature("")
|
|
427
|
def on_actionStarToolbar_triggered(self):
|
|
427
|
def on_actionStarToolbar_triggered(self):
|
|
428
|
"""
|
|
428
|
"""
|
|
429
|
Slot documentation goes here.
|
|
429
|
Slot documentation goes here.
|
|
430
|
"""
|
|
430
|
"""
|
|
431
|
self.playProject()
|
|
431
|
self.playProject()
|
|
432
|
|
|
432
|
|
|
433
|
@pyqtSignature("")
|
|
433
|
@pyqtSignature("")
|
|
434
|
def on_actionPauseToolbar_triggered(self):
|
|
434
|
def on_actionPauseToolbar_triggered(self):
|
|
435
|
|
|
435
|
|
|
436
|
self.pauseProject()
|
|
436
|
self.pauseProject()
|
|
437
|
|
|
437
|
|
|
438
|
@pyqtSignature("")
|
|
438
|
@pyqtSignature("")
|
|
439
|
def on_actionStopToolbar_triggered(self):
|
|
439
|
def on_actionStopToolbar_triggered(self):
|
|
440
|
"""
|
|
440
|
"""
|
|
441
|
Slot documentation goes here.
|
|
441
|
Slot documentation goes here.
|
|
442
|
"""
|
|
442
|
"""
|
|
443
|
self.stopProject()
|
|
443
|
self.stopProject()
|
|
444
|
|
|
444
|
|
|
445
|
@pyqtSignature("int")
|
|
445
|
@pyqtSignature("int")
|
|
446
|
def on_proComReadMode_activated(self, index):
|
|
446
|
def on_proComReadMode_activated(self, index):
|
|
447
|
"""
|
|
447
|
"""
|
|
448
|
SELECCION DEL MODO DE LECTURA ON=1, OFF=0
|
|
448
|
SELECCION DEL MODO DE LECTURA ON=1, OFF=0
|
|
449
|
"""
|
|
449
|
"""
|
|
450
|
if index == 0:
|
|
450
|
if index == 0:
|
|
451
|
# self.proDelay.setText("0")
|
|
451
|
# self.proDelay.setText("0")
|
|
452
|
self.proSet.setEnabled(True)
|
|
452
|
self.proSet.setEnabled(True)
|
|
453
|
self.proDelay.setEnabled(False)
|
|
453
|
self.proDelay.setEnabled(False)
|
|
454
|
elif index == 1:
|
|
454
|
elif index == 1:
|
|
455
|
self.proSet.setText("")
|
|
455
|
self.proSet.setText("")
|
|
456
|
# self.proDelay.setText("5")
|
|
456
|
# self.proDelay.setText("5")
|
|
457
|
self.proSet.setEnabled(False)
|
|
457
|
self.proSet.setEnabled(False)
|
|
458
|
self.proDelay.setEnabled(True)
|
|
458
|
self.proDelay.setEnabled(True)
|
|
459
|
|
|
459
|
|
|
460
|
|
|
460
|
|
|
461
|
def __setRawDataWindow(self):
|
|
461
|
def __setRawDataWindow(self):
|
|
462
|
|
|
462
|
|
|
463
|
self.__setPDataWindow()
|
|
463
|
self.__setPDataWindow()
|
|
464
|
|
|
464
|
|
|
465
|
self.frame_data.show()
|
|
465
|
self.frame_data.show()
|
|
466
|
|
|
466
|
|
|
467
|
self.labnTxs.show()
|
|
467
|
self.labnTxs.show()
|
|
468
|
self.pronTxs.show()
|
|
468
|
self.pronTxs.show()
|
|
469
|
|
|
469
|
|
|
470
|
self.labByBlock.show()
|
|
470
|
self.labByBlock.show()
|
|
471
|
self.proComByBlock.show()
|
|
471
|
self.proComByBlock.show()
|
|
472
|
|
|
472
|
|
|
473
|
def __setPDataWindow(self):
|
|
473
|
def __setPDataWindow(self):
|
|
474
|
|
|
474
|
|
|
475
|
self.labelIPPKm.hide()
|
|
475
|
self.labelIPPKm.hide()
|
|
476
|
self.proIPPKm.hide()
|
|
476
|
self.proIPPKm.hide()
|
|
477
|
|
|
477
|
|
|
478
|
self.labelSet.show()
|
|
478
|
self.labelSet.show()
|
|
479
|
self.proSet.show()
|
|
479
|
self.proSet.show()
|
|
480
|
|
|
480
|
|
|
481
|
self.labExpLabel.show()
|
|
481
|
self.labExpLabel.show()
|
|
482
|
self.proExpLabel.show()
|
|
482
|
self.proExpLabel.show()
|
|
483
|
|
|
483
|
|
|
484
|
self.labelWalk.show()
|
|
484
|
self.labelWalk.show()
|
|
485
|
self.proComWalk.show()
|
|
485
|
self.proComWalk.show()
|
|
486
|
|
|
486
|
|
|
487
|
self.frame_data.hide()
|
|
487
|
self.frame_data.hide()
|
|
488
|
|
|
488
|
|
|
489
|
# self.labnTxs.hide()
|
|
489
|
# self.labnTxs.hide()
|
|
490
|
# self.pronTxs.hide()
|
|
490
|
# self.pronTxs.hide()
|
|
491
|
#
|
|
491
|
#
|
|
492
|
# self.labByBlock.hide()
|
|
492
|
# self.labByBlock.hide()
|
|
493
|
# self.proComByBlock.hide()
|
|
493
|
# self.proComByBlock.hide()
|
|
494
|
|
|
494
|
|
|
495
|
def __setUSRPDataWindow(self):
|
|
495
|
def __setUSRPDataWindow(self):
|
|
496
|
|
|
496
|
|
|
497
|
self.frame_data.show()
|
|
497
|
self.frame_data.show()
|
|
498
|
|
|
498
|
|
|
499
|
self.labelIPPKm.show()
|
|
499
|
self.labelIPPKm.show()
|
|
500
|
self.proIPPKm.show()
|
|
500
|
self.proIPPKm.show()
|
|
501
|
|
|
501
|
|
|
502
|
self.labelSet.hide()
|
|
502
|
self.labelSet.hide()
|
|
503
|
self.proSet.hide()
|
|
503
|
self.proSet.hide()
|
|
504
|
|
|
504
|
|
|
505
|
self.labExpLabel.hide()
|
|
505
|
self.labExpLabel.hide()
|
|
506
|
self.proExpLabel.hide()
|
|
506
|
self.proExpLabel.hide()
|
|
507
|
|
|
507
|
|
|
508
|
self.labelWalk.hide()
|
|
508
|
self.labelWalk.hide()
|
|
509
|
self.proComWalk.hide()
|
|
509
|
self.proComWalk.hide()
|
|
510
|
|
|
510
|
|
|
511
|
self.labnTxs.hide()
|
|
511
|
self.labnTxs.hide()
|
|
512
|
self.pronTxs.hide()
|
|
512
|
self.pronTxs.hide()
|
|
513
|
|
|
513
|
|
|
514
|
self.labByBlock.hide()
|
|
514
|
self.labByBlock.hide()
|
|
515
|
self.proComByBlock.hide()
|
|
515
|
self.proComByBlock.hide()
|
|
516
|
|
|
516
|
|
|
517
|
@pyqtSignature("int")
|
|
517
|
@pyqtSignature("int")
|
|
518
|
def on_proComDataType_activated(self, index):
|
|
518
|
def on_proComDataType_activated(self, index):
|
|
519
|
"""
|
|
519
|
"""
|
|
520
|
Voltage or Spectra
|
|
520
|
Voltage or Spectra
|
|
521
|
"""
|
|
521
|
"""
|
|
522
|
|
|
522
|
|
|
523
|
if index == 0:
|
|
523
|
if index == 0:
|
|
524
|
extension = '.r'
|
|
524
|
extension = '.r'
|
|
525
|
self.__setRawDataWindow()
|
|
525
|
self.__setRawDataWindow()
|
|
526
|
|
|
526
|
|
|
527
|
elif index == 1:
|
|
527
|
elif index == 1:
|
|
528
|
extension = '.pdata'
|
|
528
|
extension = '.pdata'
|
|
529
|
self.__setPDataWindow()
|
|
529
|
self.__setPDataWindow()
|
|
530
|
|
|
530
|
|
|
531
|
|
|
531
|
|
|
532
|
elif index == 2:
|
|
532
|
elif index == 2:
|
|
533
|
extension = '.fits'
|
|
533
|
extension = '.fits'
|
|
534
|
self.__setPDataWindow()
|
|
534
|
self.__setPDataWindow()
|
|
535
|
|
|
535
|
|
|
536
|
elif index == 3:
|
|
536
|
elif index == 3:
|
|
537
|
extension = '.hdf5'
|
|
537
|
extension = '.hdf5'
|
|
538
|
self.__setUSRPDataWindow()
|
|
538
|
self.__setUSRPDataWindow()
|
|
539
|
|
|
539
|
|
|
540
|
self.proDataType.setText(extension)
|
|
540
|
self.proDataType.setText(extension)
|
|
541
|
|
|
541
|
|
|
542
|
@pyqtSignature("int")
|
|
542
|
@pyqtSignature("int")
|
|
543
|
def on_proComWalk_activated(self, index):
|
|
543
|
def on_proComWalk_activated(self, index):
|
|
544
|
"""
|
|
544
|
"""
|
|
545
|
|
|
545
|
|
|
546
|
"""
|
|
546
|
"""
|
|
547
|
if index == 0:
|
|
547
|
if index == 0:
|
|
548
|
self.proExpLabel.setEnabled(False)
|
|
548
|
self.proExpLabel.setEnabled(False)
|
|
549
|
elif index == 1:
|
|
549
|
elif index == 1:
|
|
550
|
self.proExpLabel.setEnabled(True)
|
|
550
|
self.proExpLabel.setEnabled(True)
|
|
551
|
|
|
551
|
|
|
552
|
@pyqtSignature("")
|
|
552
|
@pyqtSignature("")
|
|
553
|
def on_proToolPath_clicked(self):
|
|
553
|
def on_proToolPath_clicked(self):
|
|
554
|
"""
|
|
554
|
"""
|
|
555
|
Choose your path
|
|
555
|
Choose your path
|
|
556
|
"""
|
|
556
|
"""
|
|
557
|
|
|
557
|
|
|
558
|
current_dpath = './'
|
|
558
|
current_dpath = './'
|
|
559
|
if self.dataPath:
|
|
559
|
if self.dataPath:
|
|
560
|
current_dpath = self.dataPath
|
|
560
|
current_dpath = self.dataPath
|
|
561
|
|
|
561
|
|
|
562
|
datapath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', current_dpath, QtGui.QFileDialog.ShowDirsOnly))
|
|
562
|
datapath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', current_dpath, QtGui.QFileDialog.ShowDirsOnly))
|
|
563
|
|
|
563
|
|
|
564
|
#If it was canceled
|
|
564
|
#If it was canceled
|
|
565
|
if not datapath:
|
|
565
|
if not datapath:
|
|
566
|
return
|
|
566
|
return
|
|
567
|
|
|
567
|
|
|
568
|
#If any change was done
|
|
568
|
#If any change was done
|
|
569
|
if datapath == self.dataPath:
|
|
569
|
if datapath == self.dataPath:
|
|
570
|
return
|
|
570
|
return
|
|
571
|
|
|
571
|
|
|
572
|
self.proDataPath.setText(datapath)
|
|
572
|
self.proDataPath.setText(datapath)
|
|
573
|
|
|
573
|
|
|
574
|
self._disable_play_button()
|
|
574
|
self._disable_play_button()
|
|
575
|
self._disable_save_button()
|
|
575
|
self._disable_save_button()
|
|
576
|
self.proOk.setEnabled(False)
|
|
576
|
self.proOk.setEnabled(False)
|
|
577
|
|
|
577
|
|
|
578
|
self.proComStartDate.clear()
|
|
578
|
self.proComStartDate.clear()
|
|
579
|
self.proComEndDate.clear()
|
|
579
|
self.proComEndDate.clear()
|
|
580
|
|
|
580
|
|
|
581
|
if not os.path.exists(datapath):
|
|
581
|
if not os.path.exists(datapath):
|
|
582
|
|
|
582
|
|
|
583
|
self.console.clear()
|
|
583
|
self.console.clear()
|
|
584
|
self.console.append("Write a valid path")
|
|
584
|
self.console.append("Write a valid path")
|
|
585
|
return
|
|
585
|
return
|
|
586
|
|
|
586
|
|
|
587
|
self.dataPath = datapath
|
|
587
|
self.dataPath = datapath
|
|
588
|
|
|
588
|
|
|
589
|
self.console.clear()
|
|
589
|
self.console.clear()
|
|
590
|
self.console.append("Select the read mode and press 'load button'")
|
|
590
|
self.console.append("Select the read mode and press 'load button'")
|
|
591
|
|
|
591
|
|
|
592
|
|
|
592
|
|
|
593
|
@pyqtSignature("")
|
|
593
|
@pyqtSignature("")
|
|
594
|
def on_proLoadButton_clicked(self):
|
|
594
|
def on_proLoadButton_clicked(self):
|
|
595
|
|
|
595
|
|
|
596
|
self.console.clear()
|
|
596
|
self.console.clear()
|
|
597
|
|
|
597
|
|
|
598
|
projectParms = self.__getParmsFromProjectWindow()
|
|
598
|
projectParms = self.__getParmsFromProjectWindow()
|
|
599
|
|
|
599
|
|
|
600
|
if not projectParms.online:
|
|
600
|
if not projectParms.online:
|
|
601
|
self.proComStartDate.clear()
|
|
601
|
self.proComStartDate.clear()
|
|
602
|
self.proComEndDate.clear()
|
|
602
|
self.proComEndDate.clear()
|
|
603
|
self.proComStartDate.setEnabled(True)
|
|
603
|
self.proComStartDate.setEnabled(True)
|
|
604
|
self.proComEndDate.setEnabled(True)
|
|
604
|
self.proComEndDate.setEnabled(True)
|
|
605
|
self.proStartTime.setEnabled(True)
|
|
605
|
self.proStartTime.setEnabled(True)
|
|
606
|
self.proEndTime.setEnabled(True)
|
|
606
|
self.proEndTime.setEnabled(True)
|
|
607
|
self.frame_2.setEnabled(True)
|
|
607
|
self.frame_2.setEnabled(True)
|
|
608
|
|
|
608
|
|
|
609
|
else:
|
|
609
|
else:
|
|
610
|
self.proComStartDate.addItem("1960/01/30")
|
|
610
|
self.proComStartDate.addItem("1960/01/30")
|
|
611
|
self.proComEndDate.addItem("2018/12/31")
|
|
611
|
self.proComEndDate.addItem("2018/12/31")
|
|
612
|
self.proComStartDate.setEnabled(False)
|
|
612
|
self.proComStartDate.setEnabled(False)
|
|
613
|
self.proComEndDate.setEnabled(False)
|
|
613
|
self.proComEndDate.setEnabled(False)
|
|
614
|
self.proStartTime.setEnabled(False)
|
|
614
|
self.proStartTime.setEnabled(False)
|
|
615
|
self.proEndTime.setEnabled(False)
|
|
615
|
self.proEndTime.setEnabled(False)
|
|
616
|
self.frame_2.setEnabled(True)
|
|
616
|
self.frame_2.setEnabled(True)
|
|
617
|
|
|
617
|
|
|
618
|
if self.loadDays(projectParms.dpath, projectParms.ext, projectParms.walk, projectParms.expLabel) == []:
|
|
618
|
if self.loadDays(projectParms.dpath, projectParms.ext, projectParms.walk, projectParms.expLabel) == []:
|
|
619
|
self._disable_save_button()
|
|
619
|
self._disable_save_button()
|
|
620
|
self._disable_play_button()
|
|
620
|
self._disable_play_button()
|
|
621
|
self.proOk.setEnabled(False)
|
|
621
|
self.proOk.setEnabled(False)
|
|
622
|
else:
|
|
622
|
else:
|
|
623
|
self._enable_save_button()
|
|
623
|
self._enable_save_button()
|
|
624
|
self._enable_play_button()
|
|
624
|
self._enable_play_button()
|
|
625
|
self.proOk.setEnabled(True)
|
|
625
|
self.proOk.setEnabled(True)
|
|
626
|
|
|
626
|
|
|
627
|
@pyqtSignature("int")
|
|
627
|
@pyqtSignature("int")
|
|
628
|
def on_proComStartDate_activated(self, index):
|
|
628
|
def on_proComStartDate_activated(self, index):
|
|
629
|
"""
|
|
629
|
"""
|
|
630
|
SELECCION DEL RANGO DE FECHAS -START DATE
|
|
630
|
SELECCION DEL RANGO DE FECHAS -START DATE
|
|
631
|
"""
|
|
631
|
"""
|
|
632
|
stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() - 1
|
|
632
|
stopIndex = self.proComEndDate.count() - self.proComEndDate.currentIndex() - 1
|
|
633
|
|
|
633
|
|
|
634
|
self.proComEndDate.clear()
|
|
634
|
self.proComEndDate.clear()
|
|
635
|
for i in self.dateList[index:]:
|
|
635
|
for i in self.dateList[index:]:
|
|
636
|
self.proComEndDate.addItem(i)
|
|
636
|
self.proComEndDate.addItem(i)
|
|
637
|
|
|
637
|
|
|
638
|
if self.proComEndDate.count() - stopIndex - 1 >= 0:
|
|
638
|
if self.proComEndDate.count() - stopIndex - 1 >= 0:
|
|
639
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex - 1)
|
|
639
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - stopIndex - 1)
|
|
640
|
else:
|
|
640
|
else:
|
|
641
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1)
|
|
641
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1)
|
|
642
|
|
|
642
|
|
|
643
|
@pyqtSignature("int")
|
|
643
|
@pyqtSignature("int")
|
|
644
|
def on_proComEndDate_activated(self, index):
|
|
644
|
def on_proComEndDate_activated(self, index):
|
|
645
|
"""
|
|
645
|
"""
|
|
646
|
SELECCION DEL RANGO DE FECHAS-END DATE
|
|
646
|
SELECCION DEL RANGO DE FECHAS-END DATE
|
|
647
|
"""
|
|
647
|
"""
|
|
648
|
pass
|
|
648
|
pass
|
|
649
|
|
|
649
|
|
|
650
|
@pyqtSignature("")
|
|
650
|
@pyqtSignature("")
|
|
651
|
def on_proOk_clicked(self):
|
|
651
|
def on_proOk_clicked(self):
|
|
652
|
"""
|
|
652
|
"""
|
|
653
|
AΓ±ade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml.
|
|
653
|
AΓ±ade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml.
|
|
654
|
Prepara la configuraciΓ³n del diΓ‘grama del Arbol del treeView numero 2
|
|
654
|
Prepara la configuraciΓ³n del diΓ‘grama del Arbol del treeView numero 2
|
|
655
|
"""
|
|
655
|
"""
|
|
656
|
|
|
656
|
|
|
657
|
self._disable_play_button()
|
|
657
|
self._disable_play_button()
|
|
658
|
self._disable_save_button()
|
|
658
|
self._disable_save_button()
|
|
659
|
|
|
659
|
|
|
660
|
self.console.clear()
|
|
660
|
self.console.clear()
|
|
661
|
|
|
661
|
|
|
662
|
if self.create:
|
|
662
|
if self.create:
|
|
663
|
|
|
663
|
|
|
664
|
projectId = self.__getNewProjectId()
|
|
664
|
projectId = self.__getNewProjectId()
|
|
665
|
|
|
665
|
|
|
666
|
if not projectId:
|
|
666
|
if not projectId:
|
|
667
|
return 0
|
|
667
|
return 0
|
|
668
|
|
|
668
|
|
|
669
|
projectObjView = self.createProjectView(projectId)
|
|
669
|
projectObjView = self.createProjectView(projectId)
|
|
670
|
|
|
670
|
|
|
671
|
if not projectObjView:
|
|
671
|
if not projectObjView:
|
|
672
|
return 0
|
|
672
|
return 0
|
|
673
|
|
|
673
|
|
|
674
|
self.create = False
|
|
674
|
self.create = False
|
|
675
|
|
|
675
|
|
|
676
|
readUnitObj = self.createReadUnitView(projectObjView)
|
|
676
|
readUnitObj = self.createReadUnitView(projectObjView)
|
|
677
|
|
|
677
|
|
|
678
|
if not readUnitObj:
|
|
678
|
if not readUnitObj:
|
|
679
|
return 0
|
|
679
|
return 0
|
|
680
|
|
|
680
|
|
|
681
|
else:
|
|
681
|
else:
|
|
682
|
projectObjView = self.updateProjectView()
|
|
682
|
projectObjView = self.updateProjectView()
|
|
683
|
|
|
683
|
|
|
684
|
if not projectObjView:
|
|
684
|
if not projectObjView:
|
|
685
|
return 0
|
|
685
|
return 0
|
|
686
|
|
|
686
|
|
|
687
|
projectId = projectObjView.getId()
|
|
687
|
projectId = projectObjView.getId()
|
|
688
|
idReadUnit = projectObjView.getReadUnitId()
|
|
688
|
idReadUnit = projectObjView.getReadUnitId()
|
|
689
|
readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit)
|
|
689
|
readUnitObj = self.updateReadUnitView(projectObjView, idReadUnit)
|
|
690
|
|
|
690
|
|
|
691
|
if not readUnitObj:
|
|
691
|
if not readUnitObj:
|
|
692
|
return 0
|
|
692
|
return 0
|
|
693
|
|
|
693
|
|
|
694
|
self.__itemTreeDict[projectId].setText(projectObjView.name)
|
|
694
|
self.__itemTreeDict[projectId].setText(projectObjView.name)
|
|
695
|
# Project Properties
|
|
695
|
# Project Properties
|
|
696
|
self.refreshProjectProperties(projectObjView)
|
|
696
|
self.refreshProjectProperties(projectObjView)
|
|
697
|
# Disable tabProject after finish the creation
|
|
697
|
# Disable tabProject after finish the creation
|
|
698
|
|
|
698
|
|
|
699
|
self._enable_play_button()
|
|
699
|
self._enable_play_button()
|
|
700
|
self._enable_save_button()
|
|
700
|
self._enable_save_button()
|
|
701
|
|
|
701
|
|
|
702
|
self.console.clear()
|
|
702
|
self.console.clear()
|
|
703
|
self.console.append("The project parameters were validated")
|
|
703
|
self.console.append("The project parameters were validated")
|
|
704
|
|
|
704
|
|
|
705
|
return 1
|
|
705
|
return 1
|
|
706
|
|
|
706
|
|
|
707
|
@pyqtSignature("")
|
|
707
|
@pyqtSignature("")
|
|
708
|
def on_proClear_clicked(self):
|
|
708
|
def on_proClear_clicked(self):
|
|
709
|
|
|
709
|
|
|
710
|
self.console.clear()
|
|
710
|
self.console.clear()
|
|
711
|
|
|
711
|
|
|
712
|
@pyqtSignature("int")
|
|
712
|
@pyqtSignature("int")
|
|
713
|
def on_volOpCebChannels_stateChanged(self, p0):
|
|
713
|
def on_volOpCebChannels_stateChanged(self, p0):
|
|
714
|
"""
|
|
714
|
"""
|
|
715
|
Check Box habilita operaciones de SelecciοΏ½n de Canales
|
|
715
|
Check Box habilita operaciones de SelecciοΏ½n de Canales
|
|
716
|
"""
|
|
716
|
"""
|
|
717
|
if p0 == 2:
|
|
717
|
if p0 == 2:
|
|
718
|
self.volOpComChannels.setEnabled(True)
|
|
718
|
self.volOpComChannels.setEnabled(True)
|
|
719
|
self.volOpChannel.setEnabled(True)
|
|
719
|
self.volOpChannel.setEnabled(True)
|
|
720
|
|
|
720
|
|
|
721
|
if p0 == 0:
|
|
721
|
if p0 == 0:
|
|
722
|
self.volOpComChannels.setEnabled(False)
|
|
722
|
self.volOpComChannels.setEnabled(False)
|
|
723
|
self.volOpChannel.setEnabled(False)
|
|
723
|
self.volOpChannel.setEnabled(False)
|
|
724
|
# self.volOpChannel.clear()
|
|
724
|
# self.volOpChannel.clear()
|
|
725
|
|
|
725
|
|
|
726
|
@pyqtSignature("int")
|
|
726
|
@pyqtSignature("int")
|
|
727
|
def on_volOpCebHeights_stateChanged(self, p0):
|
|
727
|
def on_volOpCebHeights_stateChanged(self, p0):
|
|
728
|
"""
|
|
728
|
"""
|
|
729
|
Check Box habilita operaciones de SelecciοΏ½n de Alturas
|
|
729
|
Check Box habilita operaciones de SelecciοΏ½n de Alturas
|
|
730
|
"""
|
|
730
|
"""
|
|
731
|
if p0 == 2:
|
|
731
|
if p0 == 2:
|
|
732
|
self.volOpHeights.setEnabled(True)
|
|
732
|
self.volOpHeights.setEnabled(True)
|
|
733
|
self.volOpComHeights.setEnabled(True)
|
|
733
|
self.volOpComHeights.setEnabled(True)
|
|
734
|
|
|
734
|
|
|
735
|
if p0 == 0:
|
|
735
|
if p0 == 0:
|
|
736
|
self.volOpHeights.setEnabled(False)
|
|
736
|
self.volOpHeights.setEnabled(False)
|
|
737
|
# self.volOpHeights.clear()
|
|
737
|
# self.volOpHeights.clear()
|
|
738
|
self.volOpComHeights.setEnabled(False)
|
|
738
|
self.volOpComHeights.setEnabled(False)
|
|
739
|
|
|
739
|
|
|
740
|
@pyqtSignature("int")
|
|
740
|
@pyqtSignature("int")
|
|
741
|
def on_volOpCebFilter_stateChanged(self, p0):
|
|
741
|
def on_volOpCebFilter_stateChanged(self, p0):
|
|
742
|
"""
|
|
742
|
"""
|
|
743
|
Name='Decoder', optype='other'
|
|
743
|
Name='Decoder', optype='other'
|
|
744
|
"""
|
|
744
|
"""
|
|
745
|
if p0 == 2:
|
|
745
|
if p0 == 2:
|
|
746
|
self.volOpFilter.setEnabled(True)
|
|
746
|
self.volOpFilter.setEnabled(True)
|
|
747
|
|
|
747
|
|
|
748
|
if p0 == 0:
|
|
748
|
if p0 == 0:
|
|
749
|
self.volOpFilter.setEnabled(False)
|
|
749
|
self.volOpFilter.setEnabled(False)
|
|
750
|
# self.volOpFilter.clear()
|
|
750
|
# self.volOpFilter.clear()
|
|
751
|
|
|
751
|
|
|
752
|
@pyqtSignature("int")
|
|
752
|
@pyqtSignature("int")
|
|
753
|
def on_volOpCebProfile_stateChanged(self, p0):
|
|
753
|
def on_volOpCebProfile_stateChanged(self, p0):
|
|
754
|
"""
|
|
754
|
"""
|
|
755
|
Check Box habilita ingreso del rango de Perfiles
|
|
755
|
Check Box habilita ingreso del rango de Perfiles
|
|
756
|
"""
|
|
756
|
"""
|
|
757
|
if p0 == 2:
|
|
757
|
if p0 == 2:
|
|
758
|
self.volOpComProfile.setEnabled(True)
|
|
758
|
self.volOpComProfile.setEnabled(True)
|
|
759
|
self.volOpProfile.setEnabled(True)
|
|
759
|
self.volOpProfile.setEnabled(True)
|
|
760
|
|
|
760
|
|
|
761
|
if p0 == 0:
|
|
761
|
if p0 == 0:
|
|
762
|
self.volOpComProfile.setEnabled(False)
|
|
762
|
self.volOpComProfile.setEnabled(False)
|
|
763
|
self.volOpProfile.setEnabled(False)
|
|
763
|
self.volOpProfile.setEnabled(False)
|
|
764
|
# self.volOpProfile.clear()
|
|
764
|
# self.volOpProfile.clear()
|
|
765
|
|
|
765
|
|
|
766
|
@pyqtSignature("int")
|
|
766
|
@pyqtSignature("int")
|
|
767
|
def on_volOpComProfile_activated(self, index):
|
|
767
|
def on_volOpComProfile_activated(self, index):
|
|
768
|
"""
|
|
768
|
"""
|
|
769
|
Check Box habilita ingreso del rango de Perfiles
|
|
769
|
Check Box habilita ingreso del rango de Perfiles
|
|
770
|
"""
|
|
770
|
"""
|
|
771
|
#Profile List
|
|
771
|
#Profile List
|
|
772
|
if index == 0:
|
|
772
|
if index == 0:
|
|
773
|
self.volOpProfile.setToolTip('List of selected profiles. Example: 0, 1, 2, 3, 4, 5, 6, 7')
|
|
773
|
self.volOpProfile.setToolTip('List of selected profiles. Example: 0, 1, 2, 3, 4, 5, 6, 7')
|
|
774
|
|
|
774
|
|
|
775
|
#Profile Range
|
|
775
|
#Profile Range
|
|
776
|
if index == 1:
|
|
776
|
if index == 1:
|
|
777
|
self.volOpProfile.setToolTip('Minimum and maximum profile index. Example: 0, 7')
|
|
777
|
self.volOpProfile.setToolTip('Minimum and maximum profile index. Example: 0, 7')
|
|
778
|
|
|
778
|
|
|
779
|
#Profile Range List
|
|
779
|
#Profile Range List
|
|
780
|
if index == 2:
|
|
780
|
if index == 2:
|
|
781
|
self.volOpProfile.setToolTip('List of profile ranges. Example: (0, 7), (12, 19), (100, 200)')
|
|
781
|
self.volOpProfile.setToolTip('List of profile ranges. Example: (0, 7), (12, 19), (100, 200)')
|
|
782
|
|
|
782
|
|
|
783
|
@pyqtSignature("int")
|
|
783
|
@pyqtSignature("int")
|
|
784
|
def on_volOpCebDecodification_stateChanged(self, p0):
|
|
784
|
def on_volOpCebDecodification_stateChanged(self, p0):
|
|
785
|
"""
|
|
785
|
"""
|
|
786
|
Check Box habilita
|
|
786
|
Check Box habilita
|
|
787
|
"""
|
|
787
|
"""
|
|
788
|
if p0 == 2:
|
|
788
|
if p0 == 2:
|
|
789
|
self.volOpComCode.setEnabled(True)
|
|
789
|
self.volOpComCode.setEnabled(True)
|
|
790
|
self.volOpComMode.setEnabled(True)
|
|
790
|
self.volOpComMode.setEnabled(True)
|
|
791
|
if p0 == 0:
|
|
791
|
if p0 == 0:
|
|
792
|
self.volOpComCode.setEnabled(False)
|
|
792
|
self.volOpComCode.setEnabled(False)
|
|
793
|
self.volOpComMode.setEnabled(False)
|
|
793
|
self.volOpComMode.setEnabled(False)
|
|
794
|
|
|
794
|
|
|
795
|
@pyqtSignature("int")
|
|
795
|
@pyqtSignature("int")
|
|
796
|
def on_volOpComCode_activated(self, index):
|
|
796
|
def on_volOpComCode_activated(self, index):
|
|
797
|
"""
|
|
797
|
"""
|
|
798
|
Check Box habilita ingreso
|
|
798
|
Check Box habilita ingreso
|
|
799
|
"""
|
|
799
|
"""
|
|
800
|
if index == 13:
|
|
800
|
if index == 13:
|
|
801
|
self.volOpCode.setEnabled(True)
|
|
801
|
self.volOpCode.setEnabled(True)
|
|
802
|
else:
|
|
802
|
else:
|
|
803
|
self.volOpCode.setEnabled(False)
|
|
803
|
self.volOpCode.setEnabled(False)
|
|
804
|
|
|
804
|
|
|
805
|
if index == 0:
|
|
805
|
if index == 0:
|
|
806
|
# code = ''
|
|
806
|
# code = ''
|
|
807
|
# self.volOpCode.setText(str(code))
|
|
807
|
# self.volOpCode.setText(str(code))
|
|
808
|
return
|
|
808
|
return
|
|
809
|
|
|
809
|
|
|
810
|
if index == 1:
|
|
810
|
if index == 1:
|
|
811
|
code = '(1,1,-1)'
|
|
811
|
code = '(1,1,-1)'
|
|
812
|
nCode = '1'
|
|
812
|
nCode = '1'
|
|
813
|
nBaud = '3'
|
|
813
|
nBaud = '3'
|
|
814
|
if index == 2:
|
|
814
|
if index == 2:
|
|
815
|
code = '(1,1,-1,1)'
|
|
815
|
code = '(1,1,-1,1)'
|
|
816
|
nCode = '1'
|
|
816
|
nCode = '1'
|
|
817
|
nBaud = '4'
|
|
817
|
nBaud = '4'
|
|
818
|
if index == 3:
|
|
818
|
if index == 3:
|
|
819
|
code = '(1,1,1,-1,1)'
|
|
819
|
code = '(1,1,1,-1,1)'
|
|
820
|
nCode = '1'
|
|
820
|
nCode = '1'
|
|
821
|
nBaud = '5'
|
|
821
|
nBaud = '5'
|
|
822
|
if index == 4:
|
|
822
|
if index == 4:
|
|
823
|
code = '(1,1,1,-1,-1,1,-1)'
|
|
823
|
code = '(1,1,1,-1,-1,1,-1)'
|
|
824
|
nCode = '1'
|
|
824
|
nCode = '1'
|
|
825
|
nBaud = '7'
|
|
825
|
nBaud = '7'
|
|
826
|
if index == 5:
|
|
826
|
if index == 5:
|
|
827
|
code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1)'
|
|
827
|
code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1)'
|
|
828
|
nCode = '1'
|
|
828
|
nCode = '1'
|
|
829
|
nBaud = '11'
|
|
829
|
nBaud = '11'
|
|
830
|
if index == 6:
|
|
830
|
if index == 6:
|
|
831
|
code = '(1,1,1,1,1,-1,-1,1,1,-1,1,-1,1)'
|
|
831
|
code = '(1,1,1,1,1,-1,-1,1,1,-1,1,-1,1)'
|
|
832
|
nCode = '1'
|
|
832
|
nCode = '1'
|
|
833
|
nBaud = '13'
|
|
833
|
nBaud = '13'
|
|
834
|
if index == 7:
|
|
834
|
if index == 7:
|
|
835
|
code = '(1,1,-1,-1,-1,1)'
|
|
835
|
code = '(1,1,-1,-1,-1,1)'
|
|
836
|
nCode = '2'
|
|
836
|
nCode = '2'
|
|
837
|
nBaud = '3'
|
|
837
|
nBaud = '3'
|
|
838
|
if index == 8:
|
|
838
|
if index == 8:
|
|
839
|
code = '(1,1,-1,1,-1,-1,1,-1)'
|
|
839
|
code = '(1,1,-1,1,-1,-1,1,-1)'
|
|
840
|
nCode = '2'
|
|
840
|
nCode = '2'
|
|
841
|
nBaud = '4'
|
|
841
|
nBaud = '4'
|
|
842
|
if index == 9:
|
|
842
|
if index == 9:
|
|
843
|
code = '(1,1,1,-1,1,-1,-1,-1,1,-1)'
|
|
843
|
code = '(1,1,1,-1,1,-1,-1,-1,1,-1)'
|
|
844
|
nCode = '2'
|
|
844
|
nCode = '2'
|
|
845
|
nBaud = '5'
|
|
845
|
nBaud = '5'
|
|
846
|
if index == 10:
|
|
846
|
if index == 10:
|
|
847
|
code = '(1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1)'
|
|
847
|
code = '(1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1)'
|
|
848
|
nCode = '2'
|
|
848
|
nCode = '2'
|
|
849
|
nBaud = '7'
|
|
849
|
nBaud = '7'
|
|
850
|
if index == 11:
|
|
850
|
if index == 11:
|
|
851
|
code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1 ,-1 ,-1 ,1 ,1,1,-1 ,1 ,1 ,-1 ,1)'
|
|
851
|
code = '(1,1,1,-1,-1,-1,1,-1,-1,1,-1,-1 ,-1 ,-1 ,1 ,1,1,-1 ,1 ,1 ,-1 ,1)'
|
|
852
|
nCode = '2'
|
|
852
|
nCode = '2'
|
|
853
|
nBaud = '11'
|
|
853
|
nBaud = '11'
|
|
854
|
if index == 12:
|
|
854
|
if index == 12:
|
|
855
|
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)'
|
|
855
|
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)'
|
|
856
|
nCode = '2'
|
|
856
|
nCode = '2'
|
|
857
|
nBaud = '13'
|
|
857
|
nBaud = '13'
|
|
858
|
|
|
858
|
|
|
859
|
code = ast.literal_eval(code)
|
|
859
|
code = ast.literal_eval(code)
|
|
860
|
nCode = int(nCode)
|
|
860
|
nCode = int(nCode)
|
|
861
|
nBaud = int(nBaud)
|
|
861
|
nBaud = int(nBaud)
|
|
862
|
|
|
862
|
|
|
863
|
code = numpy.asarray(code).reshape((nCode, nBaud)).tolist()
|
|
863
|
code = numpy.asarray(code).reshape((nCode, nBaud)).tolist()
|
|
864
|
|
|
864
|
|
|
865
|
self.volOpCode.setText(str(code))
|
|
865
|
self.volOpCode.setText(str(code))
|
|
866
|
|
|
866
|
|
|
867
|
@pyqtSignature("int")
|
|
867
|
@pyqtSignature("int")
|
|
868
|
def on_volOpCebFlip_stateChanged(self, p0):
|
|
868
|
def on_volOpCebFlip_stateChanged(self, p0):
|
|
869
|
"""
|
|
869
|
"""
|
|
870
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
870
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
871
|
"""
|
|
871
|
"""
|
|
872
|
if p0 == 2:
|
|
872
|
if p0 == 2:
|
|
873
|
self.volOpFlip.setEnabled(True)
|
|
873
|
self.volOpFlip.setEnabled(True)
|
|
874
|
if p0 == 0:
|
|
874
|
if p0 == 0:
|
|
875
|
self.volOpFlip.setEnabled(False)
|
|
875
|
self.volOpFlip.setEnabled(False)
|
|
876
|
# self.volOpFlip.clear()
|
|
876
|
# self.volOpFlip.clear()
|
|
877
|
|
|
877
|
|
|
878
|
@pyqtSignature("int")
|
|
878
|
@pyqtSignature("int")
|
|
879
|
def on_volOpCebCohInt_stateChanged(self, p0):
|
|
879
|
def on_volOpCebCohInt_stateChanged(self, p0):
|
|
880
|
"""
|
|
880
|
"""
|
|
881
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
881
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
882
|
"""
|
|
882
|
"""
|
|
883
|
if p0 == 2:
|
|
883
|
if p0 == 2:
|
|
884
|
self.volOpCohInt.setEnabled(True)
|
|
884
|
self.volOpCohInt.setEnabled(True)
|
|
885
|
if p0 == 0:
|
|
885
|
if p0 == 0:
|
|
886
|
self.volOpCohInt.setEnabled(False)
|
|
886
|
self.volOpCohInt.setEnabled(False)
|
|
887
|
# self.volOpCohInt.clear()
|
|
887
|
# self.volOpCohInt.clear()
|
|
888
|
|
|
888
|
|
|
889
|
@pyqtSignature("int")
|
|
889
|
@pyqtSignature("int")
|
|
890
|
def on_volOpCebRadarfrequency_stateChanged(self, p0):
|
|
890
|
def on_volOpCebRadarfrequency_stateChanged(self, p0):
|
|
891
|
"""
|
|
891
|
"""
|
|
892
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
892
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
893
|
"""
|
|
893
|
"""
|
|
894
|
if p0 == 2:
|
|
894
|
if p0 == 2:
|
|
895
|
self.volOpRadarfrequency.setEnabled(True)
|
|
895
|
self.volOpRadarfrequency.setEnabled(True)
|
|
896
|
if p0 == 0:
|
|
896
|
if p0 == 0:
|
|
897
|
self.volOpRadarfrequency.clear()
|
|
897
|
self.volOpRadarfrequency.clear()
|
|
898
|
self.volOpRadarfrequency.setEnabled(False)
|
|
898
|
self.volOpRadarfrequency.setEnabled(False)
|
|
899
|
|
|
899
|
|
|
900
|
@pyqtSignature("")
|
|
900
|
@pyqtSignature("")
|
|
901
|
def on_volOutputToolPath_clicked(self):
|
|
901
|
def on_volOutputToolPath_clicked(self):
|
|
902
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
902
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
903
|
self.volOutputPath.setText(dirOutPath)
|
|
903
|
self.volOutputPath.setText(dirOutPath)
|
|
904
|
|
|
904
|
|
|
905
|
@pyqtSignature("")
|
|
905
|
@pyqtSignature("")
|
|
906
|
def on_specOutputToolPath_clicked(self):
|
|
906
|
def on_specOutputToolPath_clicked(self):
|
|
907
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
907
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
908
|
self.specOutputPath.setText(dirOutPath)
|
|
908
|
self.specOutputPath.setText(dirOutPath)
|
|
909
|
|
|
909
|
|
|
910
|
@pyqtSignature("")
|
|
910
|
@pyqtSignature("")
|
|
911
|
def on_specHeisOutputToolPath_clicked(self):
|
|
911
|
def on_specHeisOutputToolPath_clicked(self):
|
|
912
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
912
|
dirOutPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
913
|
self.specHeisOutputPath.setText(dirOutPath)
|
|
913
|
self.specHeisOutputPath.setText(dirOutPath)
|
|
914
|
|
|
914
|
|
|
915
|
@pyqtSignature("")
|
|
915
|
@pyqtSignature("")
|
|
916
|
def on_specHeisOutputMetadaToolPath_clicked(self):
|
|
916
|
def on_specHeisOutputMetadaToolPath_clicked(self):
|
|
917
|
|
|
917
|
|
|
918
|
filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)")))
|
|
918
|
filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open text file", self.pathWorkSpace, self.tr("Text Files (*.xml)")))
|
|
919
|
self.specHeisOutputMetada.setText(filename)
|
|
919
|
self.specHeisOutputMetada.setText(filename)
|
|
920
|
|
|
920
|
|
|
921
|
@pyqtSignature("")
|
|
921
|
@pyqtSignature("")
|
|
922
|
def on_volOpOk_clicked(self):
|
|
922
|
def on_volOpOk_clicked(self):
|
|
923
|
"""
|
|
923
|
"""
|
|
924
|
BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
|
|
924
|
BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
|
|
925
|
PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
|
|
925
|
PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
|
|
926
|
"""
|
|
926
|
"""
|
|
927
|
|
|
927
|
|
|
928
|
checkPath = False
|
|
928
|
checkPath = False
|
|
929
|
|
|
929
|
|
|
930
|
self._disable_play_button()
|
|
930
|
self._disable_play_button()
|
|
931
|
self._disable_save_button()
|
|
931
|
self._disable_save_button()
|
|
932
|
|
|
932
|
|
|
933
|
self.console.clear()
|
|
933
|
self.console.clear()
|
|
934
|
self.console.append("Checking input parameters:\n")
|
|
934
|
self.console.append("Checking input parameters:\n")
|
|
935
|
|
|
935
|
|
|
936
|
puObj = self.getSelectedItemObj()
|
|
936
|
puObj = self.getSelectedItemObj()
|
|
937
|
puObj.removeOperations()
|
|
937
|
puObj.removeOperations()
|
|
938
|
|
|
938
|
|
|
939
|
if self.volOpCebRadarfrequency.isChecked():
|
|
939
|
if self.volOpCebRadarfrequency.isChecked():
|
|
940
|
value = str(self.volOpRadarfrequency.text())
|
|
940
|
value = str(self.volOpRadarfrequency.text())
|
|
941
|
format = 'float'
|
|
941
|
format = 'float'
|
|
942
|
name_operation = 'setRadarFrequency'
|
|
942
|
name_operation = 'setRadarFrequency'
|
|
943
|
name_parameter = 'frequency'
|
|
943
|
name_parameter = 'frequency'
|
|
944
|
|
|
944
|
|
|
945
|
if not isFloat(value):
|
|
945
|
if not isFloat(value):
|
|
946
|
self.console.append("Invalid value '%s' for Radar Frequency" %value)
|
|
946
|
self.console.append("Invalid value '%s' for Radar Frequency" %value)
|
|
947
|
return 0
|
|
947
|
return 0
|
|
948
|
|
|
948
|
|
|
949
|
opObj = puObj.addOperation(name=name_operation)
|
|
949
|
opObj = puObj.addOperation(name=name_operation)
|
|
950
|
opObj.addParameter(name=name_parameter, value=radarfreq, format=format)
|
|
950
|
opObj.addParameter(name=name_parameter, value=radarfreq, format=format)
|
|
951
|
|
|
951
|
|
|
952
|
if self.volOpCebChannels.isChecked():
|
|
952
|
if self.volOpCebChannels.isChecked():
|
|
953
|
|
|
953
|
|
|
954
|
format = 'intlist'
|
|
954
|
format = 'intlist'
|
|
955
|
if self.volOpComChannels.currentIndex() == 0:
|
|
955
|
if self.volOpComChannels.currentIndex() == 0:
|
|
956
|
name_operation = "selectChannels"
|
|
956
|
name_operation = "selectChannels"
|
|
957
|
name_parameter = 'channelList'
|
|
957
|
name_parameter = 'channelList'
|
|
958
|
else:
|
|
958
|
else:
|
|
959
|
name_operation = "selectChannelsByIndex"
|
|
959
|
name_operation = "selectChannelsByIndex"
|
|
960
|
name_parameter = 'channelIndexList'
|
|
960
|
name_parameter = 'channelIndexList'
|
|
961
|
|
|
961
|
|
|
962
|
value = str(self.volOpChannel.text())
|
|
962
|
value = str(self.volOpChannel.text())
|
|
963
|
|
|
963
|
|
|
964
|
if not isIntList(value):
|
|
964
|
if not isIntList(value):
|
|
965
|
self.console.append("Invalid value '%s' for %s" %(value,name_parameter))
|
|
965
|
self.console.append("Invalid value '%s' for %s" %(value,name_parameter))
|
|
966
|
return 0
|
|
966
|
return 0
|
|
967
|
|
|
967
|
|
|
968
|
opObj = puObj.addOperation(name=name_operation)
|
|
968
|
opObj = puObj.addOperation(name=name_operation)
|
|
969
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
969
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
970
|
|
|
970
|
|
|
971
|
if self.volOpCebHeights.isChecked():
|
|
971
|
if self.volOpCebHeights.isChecked():
|
|
972
|
value = str(self.volOpHeights.text())
|
|
972
|
value = str(self.volOpHeights.text())
|
|
973
|
|
|
973
|
|
|
974
|
if not isFloatRange(value):
|
|
974
|
if not isFloatRange(value):
|
|
975
|
self.console.append("Invalid value '%s' for Height range" %value)
|
|
975
|
self.console.append("Invalid value '%s' for Height range" %value)
|
|
976
|
return 0
|
|
976
|
return 0
|
|
977
|
|
|
977
|
|
|
978
|
valueList = value.split(',')
|
|
978
|
valueList = value.split(',')
|
|
979
|
|
|
979
|
|
|
980
|
if self.volOpComHeights.currentIndex() == 0:
|
|
980
|
if self.volOpComHeights.currentIndex() == 0:
|
|
981
|
format = 'float'
|
|
981
|
format = 'float'
|
|
982
|
name_operation = 'selectHeights'
|
|
982
|
name_operation = 'selectHeights'
|
|
983
|
name_parameter1 = 'minHei'
|
|
983
|
name_parameter1 = 'minHei'
|
|
984
|
name_parameter2 = 'maxHei'
|
|
984
|
name_parameter2 = 'maxHei'
|
|
985
|
else:
|
|
985
|
else:
|
|
986
|
format = 'int'
|
|
986
|
format = 'int'
|
|
987
|
name_operation = 'selectHeightsByIndex'
|
|
987
|
name_operation = 'selectHeightsByIndex'
|
|
988
|
name_parameter1 = 'minIndex'
|
|
988
|
name_parameter1 = 'minIndex'
|
|
989
|
name_parameter2 = 'maxIndex'
|
|
989
|
name_parameter2 = 'maxIndex'
|
|
990
|
|
|
990
|
|
|
991
|
opObj = puObj.addOperation(name=name_operation)
|
|
991
|
opObj = puObj.addOperation(name=name_operation)
|
|
992
|
opObj.addParameter(name=name_parameter1, value=valueList[0], format=format)
|
|
992
|
opObj.addParameter(name=name_parameter1, value=valueList[0], format=format)
|
|
993
|
opObj.addParameter(name=name_parameter2, value=valueList[1], format=format)
|
|
993
|
opObj.addParameter(name=name_parameter2, value=valueList[1], format=format)
|
|
994
|
|
|
994
|
|
|
995
|
if self.volOpCebFilter.isChecked():
|
|
995
|
if self.volOpCebFilter.isChecked():
|
|
996
|
value = str(self.volOpFilter.text())
|
|
996
|
value = str(self.volOpFilter.text())
|
|
997
|
|
|
997
|
|
|
998
|
if not isInt(value):
|
|
998
|
if not isInt(value):
|
|
999
|
self.console.append("Invalid value '%s' for Filter" %value)
|
|
999
|
self.console.append("Invalid value '%s' for Filter" %value)
|
|
1000
|
return 0
|
|
1000
|
return 0
|
|
1001
|
|
|
1001
|
|
|
1002
|
format = 'int'
|
|
1002
|
format = 'int'
|
|
1003
|
name_operation = 'filterByHeights'
|
|
1003
|
name_operation = 'filterByHeights'
|
|
1004
|
name_parameter = 'window'
|
|
1004
|
name_parameter = 'window'
|
|
1005
|
opObj = puObj.addOperation(name=name_operation)
|
|
1005
|
opObj = puObj.addOperation(name=name_operation)
|
|
1006
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1006
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1007
|
|
|
1007
|
|
|
1008
|
if self.volOpCebProfile.isChecked():
|
|
1008
|
if self.volOpCebProfile.isChecked():
|
|
1009
|
value = str(self.volOpProfile.text())
|
|
1009
|
value = str(self.volOpProfile.text())
|
|
1010
|
|
|
1010
|
|
|
1011
|
format = 'intlist'
|
|
1011
|
format = 'intlist'
|
|
1012
|
optype = 'other'
|
|
1012
|
optype = 'other'
|
|
1013
|
name_operation = 'ProfileSelector'
|
|
1013
|
name_operation = 'ProfileSelector'
|
|
1014
|
|
|
1014
|
|
|
1015
|
if self.volOpComProfile.currentIndex() == 0:
|
|
1015
|
if self.volOpComProfile.currentIndex() == 0:
|
|
1016
|
name_parameter = 'profileList'
|
|
1016
|
name_parameter = 'profileList'
|
|
1017
|
if self.volOpComProfile.currentIndex() == 1:
|
|
1017
|
if self.volOpComProfile.currentIndex() == 1:
|
|
1018
|
name_parameter = 'profileRangeList'
|
|
1018
|
name_parameter = 'profileRangeList'
|
|
1019
|
if self.volOpComProfile.currentIndex() == 2:
|
|
1019
|
if self.volOpComProfile.currentIndex() == 2:
|
|
1020
|
name_parameter = 'rangeList'
|
|
1020
|
name_parameter = 'rangeList'
|
|
1021
|
|
|
1021
|
|
|
1022
|
if not isIntList(value):
|
|
1022
|
if not isIntList(value):
|
|
1023
|
self.console.append("Invalid value '%s' for %s" %(value, name_parameter) )
|
|
1023
|
self.console.append("Invalid value '%s' for %s" %(value, name_parameter) )
|
|
1024
|
return 0
|
|
1024
|
return 0
|
|
1025
|
|
|
1025
|
|
|
1026
|
opObj = puObj.addOperation(name='ProfileSelector', optype='other')
|
|
1026
|
opObj = puObj.addOperation(name='ProfileSelector', optype='other')
|
|
1027
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1027
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1028
|
|
|
1028
|
|
|
1029
|
if self.volOpCebDecodification.isChecked():
|
|
1029
|
if self.volOpCebDecodification.isChecked():
|
|
1030
|
name_operation = 'Decoder'
|
|
1030
|
name_operation = 'Decoder'
|
|
1031
|
opObj = puObj.addOperation(name=name_operation, optype='other')
|
|
1031
|
opObj = puObj.addOperation(name=name_operation, optype='other')
|
|
1032
|
|
|
1032
|
|
|
1033
|
if self.volOpComCode.currentIndex() != 0:
|
|
1033
|
if self.volOpComCode.currentIndex() != 0:
|
|
1034
|
|
|
1034
|
|
|
1035
|
code = str(self.volOpCode.text())
|
|
1035
|
code = str(self.volOpCode.text())
|
|
1036
|
|
|
1036
|
|
|
1037
|
if not isMultiList(code):
|
|
1037
|
if not isMultiList(code):
|
|
1038
|
self.console.append("Please write a valid Code (Example: [1,1,-1], [1,-1,1])")
|
|
1038
|
self.console.append("Please write a valid Code (Example: [1,1,-1], [1,-1,1])")
|
|
1039
|
return 0
|
|
1039
|
return 0
|
|
1040
|
|
|
1040
|
|
|
1041
|
real_code = getCode(code)
|
|
1041
|
real_code = getCode(code)
|
|
1042
|
nCode = len(real_code)
|
|
1042
|
nCode = len(real_code)
|
|
1043
|
nBaud = len(real_code[0])
|
|
1043
|
nBaud = len(real_code[0])
|
|
1044
|
|
|
1044
|
|
|
1045
|
opObj.addParameter(name='code', value=code, format='intlist')
|
|
1045
|
opObj.addParameter(name='code', value=code, format='intlist')
|
|
1046
|
opObj.addParameter(name='nCode', value=nCode, format='int')
|
|
1046
|
opObj.addParameter(name='nCode', value=nCode, format='int')
|
|
1047
|
opObj.addParameter(name='nBaud', value=nBaud, format='int')
|
|
1047
|
opObj.addParameter(name='nBaud', value=nBaud, format='int')
|
|
1048
|
|
|
1048
|
|
|
1049
|
name_parameter = 'mode'
|
|
1049
|
name_parameter = 'mode'
|
|
1050
|
format = 'int'
|
|
1050
|
format = 'int'
|
|
1051
|
value = str(self.volOpComMode.currentIndex())
|
|
1051
|
value = str(self.volOpComMode.currentIndex())
|
|
1052
|
|
|
1052
|
|
|
1053
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1053
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1054
|
|
|
1054
|
|
|
1055
|
|
|
1055
|
|
|
1056
|
if self.volOpCebFlip.isChecked():
|
|
1056
|
if self.volOpCebFlip.isChecked():
|
|
1057
|
name_operation = 'deFlip'
|
|
1057
|
name_operation = 'deFlip'
|
|
1058
|
optype = 'self'
|
|
1058
|
optype = 'self'
|
|
1059
|
|
|
1059
|
|
|
1060
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1060
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1061
|
|
|
1061
|
|
|
1062
|
value = str(self.volOpFlip.text())
|
|
1062
|
value = str(self.volOpFlip.text())
|
|
1063
|
|
|
1063
|
|
|
1064
|
if value:
|
|
1064
|
if value:
|
|
1065
|
|
|
1065
|
|
|
1066
|
name_parameter = 'channelList'
|
|
1066
|
name_parameter = 'channelList'
|
|
1067
|
format = 'intlist'
|
|
1067
|
format = 'intlist'
|
|
1068
|
|
|
1068
|
|
|
1069
|
if not isIntList(value):
|
|
1069
|
if not isIntList(value):
|
|
1070
|
self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter))
|
|
1070
|
self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter))
|
|
1071
|
return 0
|
|
1071
|
return 0
|
|
1072
|
|
|
1072
|
|
|
1073
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1073
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1074
|
|
|
1074
|
|
|
1075
|
if self.volOpCebCohInt.isChecked():
|
|
1075
|
if self.volOpCebCohInt.isChecked():
|
|
1076
|
name_operation = 'CohInt'
|
|
1076
|
name_operation = 'CohInt'
|
|
1077
|
optype = 'other'
|
|
1077
|
optype = 'other'
|
|
1078
|
value = str(self.volOpCohInt.text())
|
|
1078
|
value = str(self.volOpCohInt.text())
|
|
1079
|
|
|
1079
|
|
|
1080
|
if not isInt(value):
|
|
1080
|
if not isInt(value):
|
|
1081
|
self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter))
|
|
1081
|
self.console.append("Invalid value '%s' for '%s'" %(value,name_parameter))
|
|
1082
|
return 0
|
|
1082
|
return 0
|
|
1083
|
|
|
1083
|
|
|
1084
|
name_parameter = 'n'
|
|
1084
|
name_parameter = 'n'
|
|
1085
|
format = 'int'
|
|
1085
|
format = 'int'
|
|
1086
|
|
|
1086
|
|
|
1087
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1087
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1088
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1088
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1089
|
|
|
1089
|
|
|
1090
|
if self.volGraphCebshow.isChecked():
|
|
1090
|
if self.volGraphCebshow.isChecked():
|
|
1091
|
name_operation = 'Scope'
|
|
1091
|
name_operation = 'Scope'
|
|
1092
|
optype = 'other'
|
|
1092
|
optype = 'other'
|
|
1093
|
|
|
1093
|
|
|
1094
|
name_parameter1 = 'id'
|
|
1094
|
name_parameter1 = 'id'
|
|
1095
|
format1 = 'int'
|
|
1095
|
format1 = 'int'
|
|
1096
|
|
|
1096
|
|
|
1097
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1097
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1098
|
opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1)
|
|
1098
|
opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1)
|
|
1099
|
|
|
1099
|
|
|
1100
|
channelList = str(self.volGraphChannelList.text()).strip()
|
|
1100
|
channelList = str(self.volGraphChannelList.text()).strip()
|
|
1101
|
xvalue = str(self.volGraphHeightrange.text()).strip()
|
|
1101
|
xvalue = str(self.volGraphHeightrange.text()).strip()
|
|
1102
|
yvalue = str(self.volGraphIntensityRange.text()).strip()
|
|
1102
|
yvalue = str(self.volGraphIntensityRange.text()).strip()
|
|
1103
|
figpath = str(self.volGraphPath.text()).strip()
|
|
1103
|
figpath = str(self.volGraphPath.text()).strip()
|
|
1104
|
figfile = str(self.volGraphPrefix.text()).strip()
|
|
1104
|
figfile = str(self.volGraphPrefix.text()).strip()
|
|
1105
|
|
|
1105
|
|
|
1106
|
if channelList != "":
|
|
1106
|
if channelList != "":
|
|
1107
|
if not isIntList(channelList):
|
|
1107
|
if not isIntList(channelList):
|
|
1108
|
self.console.append("Invalid value '%s' for 'Graphics:ChannelList'" %(channelList))
|
|
1108
|
self.console.append("Invalid value '%s' for 'Graphics:ChannelList'" %(channelList))
|
|
1109
|
return 0
|
|
1109
|
return 0
|
|
1110
|
|
|
1110
|
|
|
1111
|
if xvalue != "":
|
|
1111
|
if xvalue != "":
|
|
1112
|
if not isFloatRange(xvalue):
|
|
1112
|
if not isFloatRange(xvalue):
|
|
1113
|
self.console.append("Invalid value '%s' for 'Graphics:Height-Range'" %(xvalue))
|
|
1113
|
self.console.append("Invalid value '%s' for 'Graphics:Height-Range'" %(xvalue))
|
|
1114
|
return 0
|
|
1114
|
return 0
|
|
1115
|
|
|
1115
|
|
|
1116
|
if yvalue != "":
|
|
1116
|
if yvalue != "":
|
|
1117
|
if not isFloatRange(yvalue):
|
|
1117
|
if not isFloatRange(yvalue):
|
|
1118
|
self.console.append("Invalid value '%s' for 'Graphics:Amplitude-Range'" %(yvalue))
|
|
1118
|
self.console.append("Invalid value '%s' for 'Graphics:Amplitude-Range'" %(yvalue))
|
|
1119
|
return 0
|
|
1119
|
return 0
|
|
1120
|
|
|
1120
|
|
|
1121
|
|
|
1121
|
|
|
1122
|
if channelList:
|
|
1122
|
if channelList:
|
|
1123
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1123
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1124
|
|
|
1124
|
|
|
1125
|
if xvalue:
|
|
1125
|
if xvalue:
|
|
1126
|
xvalueList = xvalue.split(',')
|
|
1126
|
xvalueList = xvalue.split(',')
|
|
1127
|
|
|
1127
|
|
|
1128
|
opObj.addParameter(name='xmin', value=xvalueList[0], format='float')
|
|
1128
|
opObj.addParameter(name='xmin', value=xvalueList[0], format='float')
|
|
1129
|
opObj.addParameter(name='xmax', value=xvalueList[1], format='float')
|
|
1129
|
opObj.addParameter(name='xmax', value=xvalueList[1], format='float')
|
|
1130
|
|
|
1130
|
|
|
1131
|
if yvalue:
|
|
1131
|
if yvalue:
|
|
1132
|
yvalueList = yvalue.split(",")
|
|
1132
|
yvalueList = yvalue.split(",")
|
|
1133
|
|
|
1133
|
|
|
1134
|
opObj.addParameter(name='ymin', value=yvalueList[0], format='int')
|
|
1134
|
opObj.addParameter(name='ymin', value=yvalueList[0], format='int')
|
|
1135
|
opObj.addParameter(name='ymax', value=yvalueList[1], format='int')
|
|
1135
|
opObj.addParameter(name='ymax', value=yvalueList[1], format='int')
|
|
1136
|
|
|
1136
|
|
|
1137
|
plot_type = self.volComScopeType.currentIndex()
|
|
1137
|
plot_type = self.volComScopeType.currentIndex()
|
|
1138
|
|
|
1138
|
|
|
1139
|
if plot_type == 0:
|
|
1139
|
if plot_type == 0:
|
|
1140
|
opObj.addParameter(name='type', value="iq")
|
|
1140
|
opObj.addParameter(name='type', value="iq")
|
|
1141
|
if plot_type == 1:
|
|
1141
|
if plot_type == 1:
|
|
1142
|
opObj.addParameter(name='type', value="power")
|
|
1142
|
opObj.addParameter(name='type', value="power")
|
|
1143
|
|
|
1143
|
|
|
1144
|
if self.volGraphCebSave.isChecked():
|
|
1144
|
if self.volGraphCebSave.isChecked():
|
|
1145
|
checkPath = True
|
|
1145
|
checkPath = True
|
|
1146
|
|
|
1146
|
|
|
1147
|
opObj.addParameter(name='save', value='1', format='int')
|
|
1147
|
opObj.addParameter(name='save', value='1', format='int')
|
|
1148
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1148
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1149
|
|
|
1149
|
|
|
1150
|
if figfile:
|
|
1150
|
if figfile:
|
|
1151
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1151
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1152
|
|
|
1152
|
|
|
1153
|
if checkPath:
|
|
1153
|
if checkPath:
|
|
1154
|
|
|
1154
|
|
|
1155
|
if not figpath:
|
|
1155
|
if not figpath:
|
|
1156
|
self.console.clear()
|
|
1156
|
self.console.clear()
|
|
1157
|
self.console.append("Graphic path should be defined")
|
|
1157
|
self.console.append("Graphic path should be defined")
|
|
1158
|
return 0
|
|
1158
|
return 0
|
|
1159
|
|
|
1159
|
|
|
1160
|
# if os.path.isdir(figpath):
|
|
1160
|
# if os.path.isdir(figpath):
|
|
1161
|
# self.console.clear()
|
|
1161
|
# self.console.clear()
|
|
1162
|
# self.console.append("Graphic path does not exist, it has to be created")
|
|
1162
|
# self.console.append("Graphic path does not exist, it has to be created")
|
|
1163
|
# return 0
|
|
1163
|
# return 0
|
|
1164
|
|
|
1164
|
|
|
1165
|
self.console.clear()
|
|
1165
|
self.console.clear()
|
|
1166
|
|
|
1166
|
|
|
1167
|
# if something happend
|
|
1167
|
# if something happend
|
|
1168
|
parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage')
|
|
1168
|
parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Voltage')
|
|
1169
|
if parms_ok:
|
|
1169
|
if parms_ok:
|
|
1170
|
name_operation = 'VoltageWriter'
|
|
1170
|
name_operation = 'VoltageWriter'
|
|
1171
|
optype = 'other'
|
|
1171
|
optype = 'other'
|
|
1172
|
name_parameter1 = 'path'
|
|
1172
|
name_parameter1 = 'path'
|
|
1173
|
name_parameter2 = 'blocksPerFile'
|
|
1173
|
name_parameter2 = 'blocksPerFile'
|
|
1174
|
name_parameter3 = 'profilesPerBlock'
|
|
1174
|
name_parameter3 = 'profilesPerBlock'
|
|
1175
|
value1 = output_path
|
|
1175
|
value1 = output_path
|
|
1176
|
value2 = blocksperfile
|
|
1176
|
value2 = blocksperfile
|
|
1177
|
value3 = profilesperblock
|
|
1177
|
value3 = profilesperblock
|
|
1178
|
format = "int"
|
|
1178
|
format = "int"
|
|
1179
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1179
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1180
|
opObj.addParameter(name=name_parameter1, value=value1)
|
|
1180
|
opObj.addParameter(name=name_parameter1, value=value1)
|
|
1181
|
opObj.addParameter(name=name_parameter2, value=value2, format=format)
|
|
1181
|
opObj.addParameter(name=name_parameter2, value=value2, format=format)
|
|
1182
|
opObj.addParameter(name=name_parameter3, value=value3, format=format)
|
|
1182
|
opObj.addParameter(name=name_parameter3, value=value3, format=format)
|
|
1183
|
|
|
1183
|
|
|
1184
|
try:
|
|
1184
|
try:
|
|
1185
|
self.refreshPUProperties(puObj)
|
|
1185
|
self.refreshPUProperties(puObj)
|
|
1186
|
except:
|
|
1186
|
except:
|
|
1187
|
self.console.append("An error reading input parameters was found ...Check them!")
|
|
1187
|
self.console.append("An error reading input parameters was found ...Check them!")
|
|
1188
|
return 0
|
|
1188
|
return 0
|
|
1189
|
|
|
1189
|
|
|
1190
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
1190
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
1191
|
|
|
1191
|
|
|
1192
|
self._enable_play_button()
|
|
1192
|
self._enable_play_button()
|
|
1193
|
self._enable_save_button()
|
|
1193
|
self._enable_save_button()
|
|
1194
|
|
|
1194
|
|
|
1195
|
return 1
|
|
1195
|
return 1
|
|
1196
|
|
|
1196
|
|
|
1197
|
@pyqtSignature("")
|
|
1197
|
@pyqtSignature("")
|
|
1198
|
def on_volGraphClear_clicked(self):
|
|
1198
|
def on_volGraphClear_clicked(self):
|
|
1199
|
|
|
1199
|
|
|
1200
|
self.console.clear()
|
|
1200
|
self.console.clear()
|
|
1201
|
|
|
1201
|
|
|
1202
|
"""
|
|
1202
|
"""
|
|
1203
|
Voltage Graph
|
|
1203
|
Voltage Graph
|
|
1204
|
"""
|
|
1204
|
"""
|
|
1205
|
@pyqtSignature("int")
|
|
1205
|
@pyqtSignature("int")
|
|
1206
|
def on_volGraphCebSave_stateChanged(self, p0):
|
|
1206
|
def on_volGraphCebSave_stateChanged(self, p0):
|
|
1207
|
"""
|
|
1207
|
"""
|
|
1208
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1208
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1209
|
"""
|
|
1209
|
"""
|
|
1210
|
if p0 == 2:
|
|
1210
|
if p0 == 2:
|
|
1211
|
self.volGraphPath.setEnabled(True)
|
|
1211
|
self.volGraphPath.setEnabled(True)
|
|
1212
|
self.volGraphPrefix.setEnabled(True)
|
|
1212
|
self.volGraphPrefix.setEnabled(True)
|
|
1213
|
self.volGraphToolPath.setEnabled(True)
|
|
1213
|
self.volGraphToolPath.setEnabled(True)
|
|
1214
|
|
|
1214
|
|
|
1215
|
if p0 == 0:
|
|
1215
|
if p0 == 0:
|
|
1216
|
self.volGraphPath.setEnabled(False)
|
|
1216
|
self.volGraphPath.setEnabled(False)
|
|
1217
|
self.volGraphPrefix.setEnabled(False)
|
|
1217
|
self.volGraphPrefix.setEnabled(False)
|
|
1218
|
self.volGraphToolPath.setEnabled(False)
|
|
1218
|
self.volGraphToolPath.setEnabled(False)
|
|
1219
|
|
|
1219
|
|
|
1220
|
@pyqtSignature("")
|
|
1220
|
@pyqtSignature("")
|
|
1221
|
def on_volGraphToolPath_clicked(self):
|
|
1221
|
def on_volGraphToolPath_clicked(self):
|
|
1222
|
"""
|
|
1222
|
"""
|
|
1223
|
Donde se guardan los DATOS
|
|
1223
|
Donde se guardan los DATOS
|
|
1224
|
"""
|
|
1224
|
"""
|
|
1225
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
1225
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
1226
|
self.volGraphPath.setText(save_path)
|
|
1226
|
self.volGraphPath.setText(save_path)
|
|
1227
|
|
|
1227
|
|
|
1228
|
if not os.path.exists(save_path):
|
|
1228
|
if not os.path.exists(save_path):
|
|
1229
|
self.console.clear()
|
|
1229
|
self.console.clear()
|
|
1230
|
self.console.append("Set a valid path")
|
|
1230
|
self.console.append("Set a valid path")
|
|
1231
|
self.volGraphOk.setEnabled(False)
|
|
1231
|
self.volGraphOk.setEnabled(False)
|
|
1232
|
return
|
|
1232
|
return
|
|
1233
|
|
|
1233
|
|
|
1234
|
@pyqtSignature("int")
|
|
1234
|
@pyqtSignature("int")
|
|
1235
|
def on_volGraphCebshow_stateChanged(self, p0):
|
|
1235
|
def on_volGraphCebshow_stateChanged(self, p0):
|
|
1236
|
"""
|
|
1236
|
"""
|
|
1237
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1237
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1238
|
"""
|
|
1238
|
"""
|
|
1239
|
if p0 == 0:
|
|
1239
|
if p0 == 0:
|
|
1240
|
|
|
1240
|
|
|
1241
|
self.volGraphChannelList.setEnabled(False)
|
|
1241
|
self.volGraphChannelList.setEnabled(False)
|
|
1242
|
self.volGraphIntensityRange.setEnabled(False)
|
|
1242
|
self.volGraphIntensityRange.setEnabled(False)
|
|
1243
|
self.volGraphHeightrange.setEnabled(False)
|
|
1243
|
self.volGraphHeightrange.setEnabled(False)
|
|
1244
|
if p0 == 2:
|
|
1244
|
if p0 == 2:
|
|
1245
|
|
|
1245
|
|
|
1246
|
self.volGraphChannelList.setEnabled(True)
|
|
1246
|
self.volGraphChannelList.setEnabled(True)
|
|
1247
|
self.volGraphIntensityRange.setEnabled(True)
|
|
1247
|
self.volGraphIntensityRange.setEnabled(True)
|
|
1248
|
self.volGraphHeightrange.setEnabled(True)
|
|
1248
|
self.volGraphHeightrange.setEnabled(True)
|
|
1249
|
|
|
1249
|
|
|
1250
|
"""
|
|
1250
|
"""
|
|
1251
|
Spectra operation
|
|
1251
|
Spectra operation
|
|
1252
|
"""
|
|
1252
|
"""
|
|
1253
|
@pyqtSignature("int")
|
|
1253
|
@pyqtSignature("int")
|
|
1254
|
def on_specOpCebRadarfrequency_stateChanged(self, p0):
|
|
1254
|
def on_specOpCebRadarfrequency_stateChanged(self, p0):
|
|
1255
|
"""
|
|
1255
|
"""
|
|
1256
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1256
|
Check Box habilita ingresode del numero de Integraciones a realizar
|
|
1257
|
"""
|
|
1257
|
"""
|
|
1258
|
if p0 == 2:
|
|
1258
|
if p0 == 2:
|
|
1259
|
self.specOpRadarfrequency.setEnabled(True)
|
|
1259
|
self.specOpRadarfrequency.setEnabled(True)
|
|
1260
|
if p0 == 0:
|
|
1260
|
if p0 == 0:
|
|
1261
|
# self.specOpRadarfrequency.clear()
|
|
1261
|
# self.specOpRadarfrequency.clear()
|
|
1262
|
self.specOpRadarfrequency.setEnabled(False)
|
|
1262
|
self.specOpRadarfrequency.setEnabled(False)
|
|
1263
|
|
|
1263
|
|
|
1264
|
|
|
1264
|
|
|
1265
|
@pyqtSignature("int")
|
|
1265
|
@pyqtSignature("int")
|
|
1266
|
def on_specOpCebCrossSpectra_stateChanged(self, p0):
|
|
1266
|
def on_specOpCebCrossSpectra_stateChanged(self, p0):
|
|
1267
|
"""
|
|
1267
|
"""
|
|
1268
|
Habilita la opcion de aοΏ½adir el parοΏ½metro CrossSpectra a la Unidad de Procesamiento .
|
|
1268
|
Habilita la opcion de aοΏ½adir el parοΏ½metro CrossSpectra a la Unidad de Procesamiento .
|
|
1269
|
"""
|
|
1269
|
"""
|
|
1270
|
if p0 == 2:
|
|
1270
|
if p0 == 2:
|
|
1271
|
# self.specOpnFFTpoints.setEnabled(True)
|
|
1271
|
# self.specOpnFFTpoints.setEnabled(True)
|
|
1272
|
self.specOpComCrossSpectra.setEnabled(True)
|
|
1272
|
self.specOpComCrossSpectra.setEnabled(True)
|
|
1273
|
self.specOppairsList.setEnabled(True)
|
|
1273
|
self.specOppairsList.setEnabled(True)
|
|
1274
|
|
|
1274
|
|
|
1275
|
if p0 == 0:
|
|
1275
|
if p0 == 0:
|
|
1276
|
# self.specOpnFFTpoints.setEnabled(False)
|
|
1276
|
# self.specOpnFFTpoints.setEnabled(False)
|
|
1277
|
self.specOpComCrossSpectra.setEnabled(False)
|
|
1277
|
self.specOpComCrossSpectra.setEnabled(False)
|
|
1278
|
self.specOppairsList.setEnabled(False)
|
|
1278
|
self.specOppairsList.setEnabled(False)
|
|
1279
|
|
|
1279
|
|
|
1280
|
@pyqtSignature("int")
|
|
1280
|
@pyqtSignature("int")
|
|
1281
|
def on_specOpCebChannel_stateChanged(self, p0):
|
|
1281
|
def on_specOpCebChannel_stateChanged(self, p0):
|
|
1282
|
"""
|
|
1282
|
"""
|
|
1283
|
Habilita la opcion de aοΏ½adir el parοΏ½metro numero de Canales a la Unidad de Procesamiento .
|
|
1283
|
Habilita la opcion de aοΏ½adir el parοΏ½metro numero de Canales a la Unidad de Procesamiento .
|
|
1284
|
"""
|
|
1284
|
"""
|
|
1285
|
if p0 == 2:
|
|
1285
|
if p0 == 2:
|
|
1286
|
self.specOpChannel.setEnabled(True)
|
|
1286
|
self.specOpChannel.setEnabled(True)
|
|
1287
|
self.specOpComChannel.setEnabled(True)
|
|
1287
|
self.specOpComChannel.setEnabled(True)
|
|
1288
|
if p0 == 0:
|
|
1288
|
if p0 == 0:
|
|
1289
|
self.specOpChannel.setEnabled(False)
|
|
1289
|
self.specOpChannel.setEnabled(False)
|
|
1290
|
self.specOpComChannel.setEnabled(False)
|
|
1290
|
self.specOpComChannel.setEnabled(False)
|
|
1291
|
|
|
1291
|
|
|
1292
|
@pyqtSignature("int")
|
|
1292
|
@pyqtSignature("int")
|
|
1293
|
def on_specOpCebHeights_stateChanged(self, p0):
|
|
1293
|
def on_specOpCebHeights_stateChanged(self, p0):
|
|
1294
|
"""
|
|
1294
|
"""
|
|
1295
|
Habilita la opcion de aοΏ½adir el parοΏ½metro de alturas a la Unidad de Procesamiento .
|
|
1295
|
Habilita la opcion de aοΏ½adir el parοΏ½metro de alturas a la Unidad de Procesamiento .
|
|
1296
|
"""
|
|
1296
|
"""
|
|
1297
|
if p0 == 2:
|
|
1297
|
if p0 == 2:
|
|
1298
|
self.specOpComHeights.setEnabled(True)
|
|
1298
|
self.specOpComHeights.setEnabled(True)
|
|
1299
|
self.specOpHeights.setEnabled(True)
|
|
1299
|
self.specOpHeights.setEnabled(True)
|
|
1300
|
if p0 == 0:
|
|
1300
|
if p0 == 0:
|
|
1301
|
self.specOpComHeights.setEnabled(False)
|
|
1301
|
self.specOpComHeights.setEnabled(False)
|
|
1302
|
self.specOpHeights.setEnabled(False)
|
|
1302
|
self.specOpHeights.setEnabled(False)
|
|
1303
|
|
|
1303
|
|
|
1304
|
|
|
1304
|
|
|
1305
|
@pyqtSignature("int")
|
|
1305
|
@pyqtSignature("int")
|
|
1306
|
def on_specOpCebIncoherent_stateChanged(self, p0):
|
|
1306
|
def on_specOpCebIncoherent_stateChanged(self, p0):
|
|
1307
|
"""
|
|
1307
|
"""
|
|
1308
|
Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento .
|
|
1308
|
Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento .
|
|
1309
|
"""
|
|
1309
|
"""
|
|
1310
|
if p0 == 2:
|
|
1310
|
if p0 == 2:
|
|
1311
|
self.specOpIncoherent.setEnabled(True)
|
|
1311
|
self.specOpIncoherent.setEnabled(True)
|
|
1312
|
if p0 == 0:
|
|
1312
|
if p0 == 0:
|
|
1313
|
self.specOpIncoherent.setEnabled(False)
|
|
1313
|
self.specOpIncoherent.setEnabled(False)
|
|
1314
|
|
|
1314
|
|
|
1315
|
@pyqtSignature("int")
|
|
1315
|
@pyqtSignature("int")
|
|
1316
|
def on_specOpCebRemoveDC_stateChanged(self, p0):
|
|
1316
|
def on_specOpCebRemoveDC_stateChanged(self, p0):
|
|
1317
|
"""
|
|
1317
|
"""
|
|
1318
|
Habilita la opcion de aοΏ½adir el parοΏ½metro remover DC a la Unidad de Procesamiento .
|
|
1318
|
Habilita la opcion de aοΏ½adir el parοΏ½metro remover DC a la Unidad de Procesamiento .
|
|
1319
|
"""
|
|
1319
|
"""
|
|
1320
|
if p0 == 2:
|
|
1320
|
if p0 == 2:
|
|
1321
|
self.specOpComRemoveDC.setEnabled(True)
|
|
1321
|
self.specOpComRemoveDC.setEnabled(True)
|
|
1322
|
if p0 == 0:
|
|
1322
|
if p0 == 0:
|
|
1323
|
self.specOpComRemoveDC.setEnabled(False)
|
|
1323
|
self.specOpComRemoveDC.setEnabled(False)
|
|
1324
|
|
|
1324
|
|
|
1325
|
@pyqtSignature("int")
|
|
1325
|
@pyqtSignature("int")
|
|
1326
|
def on_specOpCebgetNoise_stateChanged(self, p0):
|
|
1326
|
def on_specOpCebgetNoise_stateChanged(self, p0):
|
|
1327
|
"""
|
|
1327
|
"""
|
|
1328
|
Habilita la opcion de aοΏ½adir la estimacion de ruido a la Unidad de Procesamiento .
|
|
1328
|
Habilita la opcion de aοΏ½adir la estimacion de ruido a la Unidad de Procesamiento .
|
|
1329
|
"""
|
|
1329
|
"""
|
|
1330
|
if p0 == 2:
|
|
1330
|
if p0 == 2:
|
|
1331
|
self.specOpgetNoise.setEnabled(True)
|
|
1331
|
self.specOpgetNoise.setEnabled(True)
|
|
1332
|
|
|
1332
|
|
|
1333
|
if p0 == 0:
|
|
1333
|
if p0 == 0:
|
|
1334
|
self.specOpgetNoise.setEnabled(False)
|
|
1334
|
self.specOpgetNoise.setEnabled(False)
|
|
1335
|
|
|
1335
|
|
|
1336
|
@pyqtSignature("")
|
|
1336
|
@pyqtSignature("")
|
|
1337
|
def on_specOpOk_clicked(self):
|
|
1337
|
def on_specOpOk_clicked(self):
|
|
1338
|
"""
|
|
1338
|
"""
|
|
1339
|
AΓADE OPERACION SPECTRA
|
|
1339
|
AΓADE OPERACION SPECTRA
|
|
1340
|
"""
|
|
1340
|
"""
|
|
1341
|
|
|
1341
|
|
|
1342
|
addFTP = False
|
|
1342
|
addFTP = False
|
|
1343
|
checkPath = False
|
|
1343
|
checkPath = False
|
|
1344
|
|
|
1344
|
|
|
1345
|
self._disable_play_button()
|
|
1345
|
self._disable_play_button()
|
|
1346
|
self._disable_save_button()
|
|
1346
|
self._disable_save_button()
|
|
1347
|
|
|
1347
|
|
|
1348
|
self.console.clear()
|
|
1348
|
self.console.clear()
|
|
1349
|
self.console.append("Checking input parameters:\n")
|
|
1349
|
self.console.append("Checking input parameters:\n")
|
|
1350
|
|
|
1350
|
|
|
1351
|
projectObj = self.getSelectedProjectObj()
|
|
1351
|
projectObj = self.getSelectedProjectObj()
|
|
1352
|
|
|
1352
|
|
|
1353
|
if not projectObj:
|
|
1353
|
if not projectObj:
|
|
1354
|
self.console.append("Please select a project before update it")
|
|
1354
|
self.console.append("Please select a project before update it")
|
|
1355
|
return
|
|
1355
|
return
|
|
1356
|
|
|
1356
|
|
|
1357
|
puObj = self.getSelectedItemObj()
|
|
1357
|
puObj = self.getSelectedItemObj()
|
|
1358
|
|
|
1358
|
|
|
1359
|
puObj.removeOperations()
|
|
1359
|
puObj.removeOperations()
|
|
1360
|
|
|
1360
|
|
|
1361
|
if self.specOpCebRadarfrequency.isChecked():
|
|
1361
|
if self.specOpCebRadarfrequency.isChecked():
|
|
1362
|
value = str(self.specOpRadarfrequency.text())
|
|
1362
|
value = str(self.specOpRadarfrequency.text())
|
|
1363
|
format = 'float'
|
|
1363
|
format = 'float'
|
|
1364
|
name_operation = 'setRadarFrequency'
|
|
1364
|
name_operation = 'setRadarFrequency'
|
|
1365
|
name_parameter = 'frequency'
|
|
1365
|
name_parameter = 'frequency'
|
|
1366
|
|
|
1366
|
|
|
1367
|
if not isFloat(value):
|
|
1367
|
if not isFloat(value):
|
|
1368
|
self.console.clear()
|
|
1368
|
self.console.clear()
|
|
1369
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1369
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1370
|
return 0
|
|
1370
|
return 0
|
|
1371
|
|
|
1371
|
|
|
1372
|
radarfreq = float(value)*1e6
|
|
1372
|
radarfreq = float(value)*1e6
|
|
1373
|
opObj = puObj.addOperation(name=name_operation)
|
|
1373
|
opObj = puObj.addOperation(name=name_operation)
|
|
1374
|
opObj.addParameter(name=name_parameter, value=radarfreq, format=format)
|
|
1374
|
opObj.addParameter(name=name_parameter, value=radarfreq, format=format)
|
|
1375
|
|
|
1375
|
|
|
1376
|
inputId = puObj.getInputId()
|
|
1376
|
inputId = puObj.getInputId()
|
|
1377
|
inputPuObj = projectObj.getProcUnitObj(inputId)
|
|
1377
|
inputPuObj = projectObj.getProcUnitObj(inputId)
|
|
1378
|
|
|
1378
|
|
|
1379
|
if inputPuObj.datatype == 'Voltage' or inputPuObj.datatype == 'USRP':
|
|
1379
|
if inputPuObj.datatype == 'Voltage' or inputPuObj.datatype == 'USRP':
|
|
1380
|
|
|
1380
|
|
|
1381
|
value = str(self.specOpnFFTpoints.text())
|
|
1381
|
value = str(self.specOpnFFTpoints.text())
|
|
1382
|
|
|
1382
|
|
|
1383
|
if not isInt(value):
|
|
1383
|
if not isInt(value):
|
|
1384
|
self.console.append("Invalid value [%s] for '%s'" %(value, 'nFFTPoints'))
|
|
1384
|
self.console.append("Invalid value [%s] for '%s'" %(value, 'nFFTPoints'))
|
|
1385
|
return 0
|
|
1385
|
return 0
|
|
1386
|
|
|
1386
|
|
|
1387
|
puObj.addParameter(name='nFFTPoints', value=value, format='int')
|
|
1387
|
puObj.addParameter(name='nFFTPoints', value=value, format='int')
|
|
1388
|
|
|
1388
|
|
|
1389
|
value = str(self.specOpProfiles.text())
|
|
1389
|
value = str(self.specOpProfiles.text())
|
|
1390
|
if not isInt(value):
|
|
1390
|
if not isInt(value):
|
|
1391
|
self.console.append("Please write a value on Profiles field")
|
|
1391
|
self.console.append("Please write a value on Profiles field")
|
|
1392
|
else:
|
|
1392
|
else:
|
|
1393
|
puObj.addParameter(name='nProfiles', value=value, format='int')
|
|
1393
|
puObj.addParameter(name='nProfiles', value=value, format='int')
|
|
1394
|
|
|
1394
|
|
|
1395
|
value = str(self.specOpippFactor.text())
|
|
1395
|
value = str(self.specOpippFactor.text())
|
|
1396
|
if not isInt(value):
|
|
1396
|
if not isInt(value):
|
|
1397
|
self.console.append("Please write a value on IppFactor field")
|
|
1397
|
self.console.append("Please write a value on IppFactor field")
|
|
1398
|
else:
|
|
1398
|
else:
|
|
1399
|
puObj.addParameter(name='ippFactor' , value=value , format='int')
|
|
1399
|
puObj.addParameter(name='ippFactor' , value=value , format='int')
|
|
1400
|
|
|
1400
|
|
|
1401
|
if self.specOpCebCrossSpectra.isChecked():
|
|
1401
|
if self.specOpCebCrossSpectra.isChecked():
|
|
1402
|
name_parameter = 'pairsList'
|
|
1402
|
name_parameter = 'pairsList'
|
|
1403
|
format = 'pairslist'
|
|
1403
|
format = 'pairslist'
|
|
1404
|
value = str(self.specOppairsList.text())
|
|
1404
|
value = str(self.specOppairsList.text())
|
|
1405
|
|
|
1405
|
|
|
1406
|
if not isPairList(value):
|
|
1406
|
if not isPairList(value):
|
|
1407
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1407
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1408
|
return 0
|
|
1408
|
return 0
|
|
1409
|
|
|
1409
|
|
|
1410
|
puObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1410
|
puObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1411
|
|
|
1411
|
|
|
1412
|
if self.specOpCebHeights.isChecked():
|
|
1412
|
if self.specOpCebHeights.isChecked():
|
|
1413
|
value = str(self.specOpHeights.text())
|
|
1413
|
value = str(self.specOpHeights.text())
|
|
1414
|
|
|
1414
|
|
|
1415
|
if not isFloatRange(value):
|
|
1415
|
if not isFloatRange(value):
|
|
1416
|
self.console.append("Invalid value [%s] for Height range" %value)
|
|
1416
|
self.console.append("Invalid value [%s] for Height range" %value)
|
|
1417
|
return 0
|
|
1417
|
return 0
|
|
1418
|
|
|
1418
|
|
|
1419
|
valueList = value.split(',')
|
|
1419
|
valueList = value.split(',')
|
|
1420
|
value0 = valueList[0]
|
|
1420
|
value0 = valueList[0]
|
|
1421
|
value1 = valueList[1]
|
|
1421
|
value1 = valueList[1]
|
|
1422
|
|
|
1422
|
|
|
1423
|
if self.specOpComHeights.currentIndex() == 0:
|
|
1423
|
if self.specOpComHeights.currentIndex() == 0:
|
|
1424
|
name_operation = 'selectHeights'
|
|
1424
|
name_operation = 'selectHeights'
|
|
1425
|
name_parameter1 = 'minHei'
|
|
1425
|
name_parameter1 = 'minHei'
|
|
1426
|
name_parameter2 = 'maxHei'
|
|
1426
|
name_parameter2 = 'maxHei'
|
|
1427
|
else:
|
|
1427
|
else:
|
|
1428
|
name_operation = 'selectHeightsByIndex'
|
|
1428
|
name_operation = 'selectHeightsByIndex'
|
|
1429
|
name_parameter1 = 'minIndex'
|
|
1429
|
name_parameter1 = 'minIndex'
|
|
1430
|
name_parameter2 = 'maxIndex'
|
|
1430
|
name_parameter2 = 'maxIndex'
|
|
1431
|
|
|
1431
|
|
|
1432
|
format = 'float'
|
|
1432
|
format = 'float'
|
|
1433
|
|
|
1433
|
|
|
1434
|
opObj = puObj.addOperation(name=name_operation)
|
|
1434
|
opObj = puObj.addOperation(name=name_operation)
|
|
1435
|
opObj.addParameter(name=name_parameter1, value=value0, format=format)
|
|
1435
|
opObj.addParameter(name=name_parameter1, value=value0, format=format)
|
|
1436
|
opObj.addParameter(name=name_parameter2, value=value1, format=format)
|
|
1436
|
opObj.addParameter(name=name_parameter2, value=value1, format=format)
|
|
1437
|
|
|
1437
|
|
|
1438
|
if self.specOpCebChannel.isChecked():
|
|
1438
|
if self.specOpCebChannel.isChecked():
|
|
1439
|
|
|
1439
|
|
|
1440
|
if self.specOpComChannel.currentIndex() == 0:
|
|
1440
|
if self.specOpComChannel.currentIndex() == 0:
|
|
1441
|
name_operation = "selectChannels"
|
|
1441
|
name_operation = "selectChannels"
|
|
1442
|
name_parameter = 'channelList'
|
|
1442
|
name_parameter = 'channelList'
|
|
1443
|
else:
|
|
1443
|
else:
|
|
1444
|
name_operation = "selectChannelsByIndex"
|
|
1444
|
name_operation = "selectChannelsByIndex"
|
|
1445
|
name_parameter = 'channelIndexList'
|
|
1445
|
name_parameter = 'channelIndexList'
|
|
1446
|
|
|
1446
|
|
|
1447
|
format = 'intlist'
|
|
1447
|
format = 'intlist'
|
|
1448
|
value = str(self.specOpChannel.text())
|
|
1448
|
value = str(self.specOpChannel.text())
|
|
1449
|
|
|
1449
|
|
|
1450
|
if not isIntList(value):
|
|
1450
|
if not isIntList(value):
|
|
1451
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1451
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1452
|
return 0
|
|
1452
|
return 0
|
|
1453
|
|
|
1453
|
|
|
1454
|
opObj = puObj.addOperation(name=name_operation)
|
|
1454
|
opObj = puObj.addOperation(name=name_operation)
|
|
1455
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1455
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1456
|
|
|
1456
|
|
|
1457
|
if self.specOpCebIncoherent.isChecked():
|
|
1457
|
if self.specOpCebIncoherent.isChecked():
|
|
1458
|
|
|
1458
|
|
|
1459
|
name_operation = 'IncohInt'
|
|
1459
|
name_operation = 'IncohInt'
|
|
1460
|
optype = 'other'
|
|
1460
|
optype = 'other'
|
|
1461
|
|
|
1461
|
|
|
1462
|
if self.specOpCobIncInt.currentIndex() == 0:
|
|
1462
|
if self.specOpCobIncInt.currentIndex() == 0:
|
|
1463
|
name_parameter = 'timeInterval'
|
|
1463
|
name_parameter = 'timeInterval'
|
|
1464
|
format = 'float'
|
|
1464
|
format = 'float'
|
|
1465
|
else:
|
|
1465
|
else:
|
|
1466
|
name_parameter = 'n'
|
|
1466
|
name_parameter = 'n'
|
|
1467
|
format = 'int'
|
|
1467
|
format = 'int'
|
|
1468
|
|
|
1468
|
|
|
1469
|
value = str(self.specOpIncoherent.text())
|
|
1469
|
value = str(self.specOpIncoherent.text())
|
|
1470
|
|
|
1470
|
|
|
1471
|
if not isFloat(value):
|
|
1471
|
if not isFloat(value):
|
|
1472
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1472
|
self.console.append("Invalid value [%s] for '%s'" %(value, name_parameter))
|
|
1473
|
return 0
|
|
1473
|
return 0
|
|
1474
|
|
|
1474
|
|
|
1475
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1475
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
1476
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1476
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1477
|
|
|
1477
|
|
|
1478
|
if self.specOpCebRemoveDC.isChecked():
|
|
1478
|
if self.specOpCebRemoveDC.isChecked():
|
|
1479
|
name_operation = 'removeDC'
|
|
1479
|
name_operation = 'removeDC'
|
|
1480
|
name_parameter = 'mode'
|
|
1480
|
name_parameter = 'mode'
|
|
1481
|
format = 'int'
|
|
1481
|
format = 'int'
|
|
1482
|
|
|
1482
|
|
|
1483
|
if self.specOpComRemoveDC.currentIndex() == 0:
|
|
1483
|
if self.specOpComRemoveDC.currentIndex() == 0:
|
|
1484
|
value = 1
|
|
1484
|
value = 1
|
|
1485
|
else:
|
|
1485
|
else:
|
|
1486
|
value = 2
|
|
1486
|
value = 2
|
|
1487
|
|
|
1487
|
|
|
1488
|
opObj = puObj.addOperation(name=name_operation)
|
|
1488
|
opObj = puObj.addOperation(name=name_operation)
|
|
1489
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1489
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
1490
|
|
|
1490
|
|
|
1491
|
if self.specOpCebRemoveInt.isChecked():
|
|
1491
|
if self.specOpCebRemoveInt.isChecked():
|
|
1492
|
name_operation = 'removeInterference'
|
|
1492
|
name_operation = 'removeInterference'
|
|
1493
|
opObj = puObj.addOperation(name=name_operation)
|
|
1493
|
opObj = puObj.addOperation(name=name_operation)
|
|
1494
|
|
|
1494
|
|
|
1495
|
|
|
1495
|
|
|
1496
|
if self.specOpCebgetNoise.isChecked():
|
|
1496
|
if self.specOpCebgetNoise.isChecked():
|
|
1497
|
value = str(self.specOpgetNoise.text())
|
|
1497
|
value = str(self.specOpgetNoise.text())
|
|
1498
|
valueList = value.split(',')
|
|
1498
|
valueList = value.split(',')
|
|
1499
|
format = 'float'
|
|
1499
|
format = 'float'
|
|
1500
|
name_operation = "getNoise"
|
|
1500
|
name_operation = "getNoise"
|
|
1501
|
opObj = puObj.addOperation(name=name_operation)
|
|
1501
|
opObj = puObj.addOperation(name=name_operation)
|
|
1502
|
|
|
1502
|
|
|
1503
|
if not value == '':
|
|
1503
|
if not value == '':
|
|
1504
|
valueList = value.split(',')
|
|
1504
|
valueList = value.split(',')
|
|
1505
|
length = len(valueList)
|
|
1505
|
length = len(valueList)
|
|
1506
|
if length == 1:
|
|
1506
|
if length == 1:
|
|
1507
|
try:
|
|
1507
|
try:
|
|
1508
|
value1 = float(valueList[0])
|
|
1508
|
value1 = float(valueList[0])
|
|
1509
|
except:
|
|
1509
|
except:
|
|
1510
|
self.console.clear()
|
|
1510
|
self.console.clear()
|
|
1511
|
self.console.append("Please Write correct parameter Get Noise")
|
|
1511
|
self.console.append("Please Write correct parameter Get Noise")
|
|
1512
|
return 0
|
|
1512
|
return 0
|
|
1513
|
name1 = 'minHei'
|
|
1513
|
name1 = 'minHei'
|
|
1514
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1514
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1515
|
elif length == 2:
|
|
1515
|
elif length == 2:
|
|
1516
|
try:
|
|
1516
|
try:
|
|
1517
|
value1 = float(valueList[0])
|
|
1517
|
value1 = float(valueList[0])
|
|
1518
|
value2 = float(valueList[1])
|
|
1518
|
value2 = float(valueList[1])
|
|
1519
|
except:
|
|
1519
|
except:
|
|
1520
|
self.console.clear()
|
|
1520
|
self.console.clear()
|
|
1521
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1521
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1522
|
return 0
|
|
1522
|
return 0
|
|
1523
|
name1 = 'minHei'
|
|
1523
|
name1 = 'minHei'
|
|
1524
|
name2 = 'maxHei'
|
|
1524
|
name2 = 'maxHei'
|
|
1525
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1525
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1526
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1526
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1527
|
|
|
1527
|
|
|
1528
|
elif length == 3:
|
|
1528
|
elif length == 3:
|
|
1529
|
try:
|
|
1529
|
try:
|
|
1530
|
value1 = float(valueList[0])
|
|
1530
|
value1 = float(valueList[0])
|
|
1531
|
value2 = float(valueList[1])
|
|
1531
|
value2 = float(valueList[1])
|
|
1532
|
value3 = float(valueList[2])
|
|
1532
|
value3 = float(valueList[2])
|
|
1533
|
except:
|
|
1533
|
except:
|
|
1534
|
self.console.clear()
|
|
1534
|
self.console.clear()
|
|
1535
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1535
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1536
|
return 0
|
|
1536
|
return 0
|
|
1537
|
name1 = 'minHei'
|
|
1537
|
name1 = 'minHei'
|
|
1538
|
name2 = 'maxHei'
|
|
1538
|
name2 = 'maxHei'
|
|
1539
|
name3 = 'minVel'
|
|
1539
|
name3 = 'minVel'
|
|
1540
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1540
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1541
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1541
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1542
|
opObj.addParameter(name=name3, value=value3, format=format)
|
|
1542
|
opObj.addParameter(name=name3, value=value3, format=format)
|
|
1543
|
|
|
1543
|
|
|
1544
|
elif length == 4:
|
|
1544
|
elif length == 4:
|
|
1545
|
try:
|
|
1545
|
try:
|
|
1546
|
value1 = float(valueList[0])
|
|
1546
|
value1 = float(valueList[0])
|
|
1547
|
value2 = float(valueList[1])
|
|
1547
|
value2 = float(valueList[1])
|
|
1548
|
value3 = float(valueList[2])
|
|
1548
|
value3 = float(valueList[2])
|
|
1549
|
value4 = float(valueList[3])
|
|
1549
|
value4 = float(valueList[3])
|
|
1550
|
except:
|
|
1550
|
except:
|
|
1551
|
self.console.clear()
|
|
1551
|
self.console.clear()
|
|
1552
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1552
|
self.console.append("Please Write corrects parameter Get Noise")
|
|
1553
|
return 0
|
|
1553
|
return 0
|
|
1554
|
name1 = 'minHei'
|
|
1554
|
name1 = 'minHei'
|
|
1555
|
name2 = 'maxHei'
|
|
1555
|
name2 = 'maxHei'
|
|
1556
|
name3 = 'minVel'
|
|
1556
|
name3 = 'minVel'
|
|
1557
|
name4 = 'maxVel'
|
|
1557
|
name4 = 'maxVel'
|
|
1558
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1558
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
1559
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1559
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
1560
|
opObj.addParameter(name=name3, value=value3, format=format)
|
|
1560
|
opObj.addParameter(name=name3, value=value3, format=format)
|
|
1561
|
opObj.addParameter(name=name4, value=value4, format=format)
|
|
1561
|
opObj.addParameter(name=name4, value=value4, format=format)
|
|
1562
|
|
|
1562
|
|
|
1563
|
elif length > 4:
|
|
1563
|
elif length > 4:
|
|
1564
|
self.console.clear()
|
|
1564
|
self.console.clear()
|
|
1565
|
self.console.append("Get Noise Operation only accepts 4 parameters")
|
|
1565
|
self.console.append("Get Noise Operation only accepts 4 parameters")
|
|
1566
|
return 0
|
|
1566
|
return 0
|
|
1567
|
|
|
1567
|
|
|
1568
|
channelList = str(self.specGgraphChannelList.text()).strip()
|
|
1568
|
channelList = str(self.specGgraphChannelList.text()).strip()
|
|
1569
|
vel_range = str(self.specGgraphFreq.text()).strip()
|
|
1569
|
vel_range = str(self.specGgraphFreq.text()).strip()
|
|
1570
|
hei_range = str(self.specGgraphHeight.text()).strip()
|
|
1570
|
hei_range = str(self.specGgraphHeight.text()).strip()
|
|
1571
|
db_range = str(self.specGgraphDbsrange.text()).strip()
|
|
1571
|
db_range = str(self.specGgraphDbsrange.text()).strip()
|
|
1572
|
|
|
1572
|
|
|
1573
|
trange = str(self.specGgraphTminTmax.text()).strip()
|
|
1573
|
trange = str(self.specGgraphTminTmax.text()).strip()
|
|
1574
|
magrange = str(self.specGgraphmagnitud.text()).strip()
|
|
1574
|
magrange = str(self.specGgraphmagnitud.text()).strip()
|
|
1575
|
phaserange = str(self.specGgraphPhase.text()).strip()
|
|
1575
|
phaserange = str(self.specGgraphPhase.text()).strip()
|
|
1576
|
# timerange = str(self.specGgraphTimeRange.text()).strip()
|
|
1576
|
timerange = str(self.specGgraphTimeRange.text()).strip()
|
|
1577
|
|
|
1577
|
|
|
1578
|
figpath = str(self.specGraphPath.text()).strip()
|
|
1578
|
figpath = str(self.specGraphPath.text()).strip()
|
|
1579
|
figfile = str(self.specGraphPrefix.text()).strip()
|
|
1579
|
figfile = str(self.specGraphPrefix.text()).strip()
|
|
1580
|
|
|
1580
|
|
|
1581
|
try:
|
|
1581
|
try:
|
|
1582
|
wrperiod = int(str(self.specGgraphftpratio.text()).strip())
|
|
1582
|
wrperiod = int(str(self.specGgraphftpratio.text()).strip())
|
|
1583
|
except:
|
|
1583
|
except:
|
|
1584
|
wrperiod = None
|
|
1584
|
wrperiod = None
|
|
1585
|
|
|
1585
|
|
|
1586
|
#-----Spectra Plot-----
|
|
1586
|
#-----Spectra Plot-----
|
|
1587
|
if self.specGraphCebSpectraplot.isChecked():
|
|
1587
|
if self.specGraphCebSpectraplot.isChecked():
|
|
1588
|
|
|
1588
|
|
|
1589
|
opObj = puObj.addOperation(name='SpectraPlot', optype='other')
|
|
1589
|
opObj = puObj.addOperation(name='SpectraPlot', optype='other')
|
|
1590
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1590
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1591
|
|
|
1591
|
|
|
1592
|
if channelList:
|
|
1592
|
if channelList:
|
|
1593
|
|
|
1593
|
|
|
1594
|
if not isList(channelList):
|
|
1594
|
if not isList(channelList):
|
|
1595
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1595
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1596
|
return 0
|
|
1596
|
return 0
|
|
1597
|
|
|
1597
|
|
|
1598
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1598
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1599
|
|
|
1599
|
|
|
1600
|
if vel_range:
|
|
1600
|
if vel_range:
|
|
1601
|
|
|
1601
|
|
|
1602
|
if not isFloatRange(vel_range):
|
|
1602
|
if not isFloatRange(vel_range):
|
|
1603
|
self.console.append("Invalid value [%s] for 'Graphic:Velocity-Range" %(vel_range))
|
|
1603
|
self.console.append("Invalid value [%s] for 'Graphic:Velocity-Range" %(vel_range))
|
|
1604
|
return 0
|
|
1604
|
return 0
|
|
1605
|
|
|
1605
|
|
|
1606
|
xvalueList = vel_range.split(',')
|
|
1606
|
xvalueList = vel_range.split(',')
|
|
1607
|
value1 = float(xvalueList[0])
|
|
1607
|
value1 = float(xvalueList[0])
|
|
1608
|
value2 = float(xvalueList[1])
|
|
1608
|
value2 = float(xvalueList[1])
|
|
1609
|
|
|
1609
|
|
|
1610
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1610
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1611
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1611
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1612
|
|
|
1612
|
|
|
1613
|
if hei_range:
|
|
1613
|
if hei_range:
|
|
1614
|
|
|
1614
|
|
|
1615
|
if not isFloatRange(hei_range):
|
|
1615
|
if not isFloatRange(hei_range):
|
|
1616
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1616
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1617
|
return 0
|
|
1617
|
return 0
|
|
1618
|
|
|
1618
|
|
|
1619
|
yvalueList = hei_range.split(",")
|
|
1619
|
yvalueList = hei_range.split(",")
|
|
1620
|
value1 = float(yvalueList[0])
|
|
1620
|
value1 = float(yvalueList[0])
|
|
1621
|
value2 = float(yvalueList[1])
|
|
1621
|
value2 = float(yvalueList[1])
|
|
1622
|
|
|
1622
|
|
|
1623
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1623
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1624
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1624
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1625
|
|
|
1625
|
|
|
1626
|
if db_range:
|
|
1626
|
if db_range:
|
|
1627
|
|
|
1627
|
|
|
1628
|
if not isFloatRange(db_range):
|
|
1628
|
if not isFloatRange(db_range):
|
|
1629
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1629
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1630
|
return 0
|
|
1630
|
return 0
|
|
1631
|
|
|
1631
|
|
|
1632
|
zvalueList = db_range.split(",")
|
|
1632
|
zvalueList = db_range.split(",")
|
|
1633
|
value1 = float(zvalueList[0])
|
|
1633
|
value1 = float(zvalueList[0])
|
|
1634
|
value2 = float(zvalueList[1])
|
|
1634
|
value2 = float(zvalueList[1])
|
|
1635
|
|
|
1635
|
|
|
1636
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1636
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1637
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1637
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1638
|
|
|
1638
|
|
|
1639
|
if self.specGraphSaveSpectra.isChecked():
|
|
1639
|
if self.specGraphSaveSpectra.isChecked():
|
|
1640
|
|
|
1640
|
|
|
1641
|
checkPath = True
|
|
1641
|
checkPath = True
|
|
1642
|
opObj.addParameter(name='save', value=1 , format='bool')
|
|
1642
|
opObj.addParameter(name='save', value=1 , format='bool')
|
|
1643
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1643
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1644
|
if figfile:
|
|
1644
|
if figfile:
|
|
1645
|
opObj.addParameter(name='figfile', value=figfile, format='str')
|
|
1645
|
opObj.addParameter(name='figfile', value=figfile, format='str')
|
|
1646
|
if wrperiod:
|
|
1646
|
if wrperiod:
|
|
1647
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1647
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1648
|
|
|
1648
|
|
|
1649
|
if self.specGraphftpSpectra.isChecked():
|
|
1649
|
if self.specGraphftpSpectra.isChecked():
|
|
1650
|
|
|
1650
|
|
|
1651
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1651
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1652
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1652
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1653
|
addFTP = True
|
|
1653
|
addFTP = True
|
|
1654
|
|
|
1654
|
|
|
1655
|
if self.specGraphCebCrossSpectraplot.isChecked():
|
|
1655
|
if self.specGraphCebCrossSpectraplot.isChecked():
|
|
1656
|
|
|
1656
|
|
|
1657
|
opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other')
|
|
1657
|
opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other')
|
|
1658
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1658
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1659
|
|
|
1659
|
|
|
1660
|
if vel_range:
|
|
1660
|
if vel_range:
|
|
1661
|
|
|
1661
|
|
|
1662
|
if not isFloatRange(vel_range):
|
|
1662
|
if not isFloatRange(vel_range):
|
|
1663
|
self.console.append("Invalid value [%s] for 'Graphic:Velocity-Range" %(vel_range))
|
|
1663
|
self.console.append("Invalid value [%s] for 'Graphic:Velocity-Range" %(vel_range))
|
|
1664
|
return 0
|
|
1664
|
return 0
|
|
1665
|
|
|
1665
|
|
|
1666
|
xvalueList = vel_range.split(',')
|
|
1666
|
xvalueList = vel_range.split(',')
|
|
1667
|
value1 = float(xvalueList[0])
|
|
1667
|
value1 = float(xvalueList[0])
|
|
1668
|
value2 = float(xvalueList[1])
|
|
1668
|
value2 = float(xvalueList[1])
|
|
1669
|
|
|
1669
|
|
|
1670
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1670
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1671
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1671
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1672
|
|
|
1672
|
|
|
1673
|
if hei_range:
|
|
1673
|
if hei_range:
|
|
1674
|
|
|
1674
|
|
|
1675
|
if not isFloatRange(hei_range):
|
|
1675
|
if not isFloatRange(hei_range):
|
|
1676
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1676
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1677
|
return 0
|
|
1677
|
return 0
|
|
1678
|
|
|
1678
|
|
|
1679
|
yvalueList = hei_range.split(",")
|
|
1679
|
yvalueList = hei_range.split(",")
|
|
1680
|
value1 = float(yvalueList[0])
|
|
1680
|
value1 = float(yvalueList[0])
|
|
1681
|
value2 = float(yvalueList[1])
|
|
1681
|
value2 = float(yvalueList[1])
|
|
1682
|
|
|
1682
|
|
|
1683
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1683
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1684
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1684
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1685
|
|
|
1685
|
|
|
1686
|
if db_range:
|
|
1686
|
if db_range:
|
|
1687
|
|
|
1687
|
|
|
1688
|
if not isFloatRange(db_range):
|
|
1688
|
if not isFloatRange(db_range):
|
|
1689
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1689
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1690
|
return 0
|
|
1690
|
return 0
|
|
1691
|
|
|
1691
|
|
|
1692
|
zvalueList = db_range.split(",")
|
|
1692
|
zvalueList = db_range.split(",")
|
|
1693
|
value1 = float(zvalueList[0])
|
|
1693
|
value1 = float(zvalueList[0])
|
|
1694
|
value2 = float(zvalueList[1])
|
|
1694
|
value2 = float(zvalueList[1])
|
|
1695
|
|
|
1695
|
|
|
1696
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1696
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1697
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1697
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1698
|
|
|
1698
|
|
|
1699
|
if magrange:
|
|
1699
|
if magrange:
|
|
1700
|
|
|
1700
|
|
|
1701
|
if not isFloatRange(magrange):
|
|
1701
|
if not isFloatRange(magrange):
|
|
1702
|
self.console.append("Invalid value [%s] for 'Graphic:Magnitud-Range" %(magrange))
|
|
1702
|
self.console.append("Invalid value [%s] for 'Graphic:Magnitud-Range" %(magrange))
|
|
1703
|
return 0
|
|
1703
|
return 0
|
|
1704
|
|
|
1704
|
|
|
1705
|
zvalueList = magrange.split(",")
|
|
1705
|
zvalueList = magrange.split(",")
|
|
1706
|
value1 = float(zvalueList[0])
|
|
1706
|
value1 = float(zvalueList[0])
|
|
1707
|
value2 = float(zvalueList[1])
|
|
1707
|
value2 = float(zvalueList[1])
|
|
1708
|
|
|
1708
|
|
|
1709
|
opObj.addParameter(name='coh_min', value=value1, format='float')
|
|
1709
|
opObj.addParameter(name='coh_min', value=value1, format='float')
|
|
1710
|
opObj.addParameter(name='coh_max', value=value2, format='float')
|
|
1710
|
opObj.addParameter(name='coh_max', value=value2, format='float')
|
|
1711
|
|
|
1711
|
|
|
1712
|
if phaserange:
|
|
1712
|
if phaserange:
|
|
1713
|
|
|
1713
|
|
|
1714
|
if not isFloatRange(phaserange):
|
|
1714
|
if not isFloatRange(phaserange):
|
|
1715
|
self.console.append("Invalid value [%s] for 'Graphic:Phase-Range" %(phaserange))
|
|
1715
|
self.console.append("Invalid value [%s] for 'Graphic:Phase-Range" %(phaserange))
|
|
1716
|
return 0
|
|
1716
|
return 0
|
|
1717
|
|
|
1717
|
|
|
1718
|
zvalueList = phaserange.split(",")
|
|
1718
|
zvalueList = phaserange.split(",")
|
|
1719
|
value1 = float(zvalueList[0])
|
|
1719
|
value1 = float(zvalueList[0])
|
|
1720
|
value2 = float(zvalueList[1])
|
|
1720
|
value2 = float(zvalueList[1])
|
|
1721
|
|
|
1721
|
|
|
1722
|
opObj.addParameter(name='phase_min', value=value1, format='float')
|
|
1722
|
opObj.addParameter(name='phase_min', value=value1, format='float')
|
|
1723
|
opObj.addParameter(name='phase_max', value=value2, format='float')
|
|
1723
|
opObj.addParameter(name='phase_max', value=value2, format='float')
|
|
1724
|
|
|
1724
|
|
|
1725
|
if self.specGraphSaveCross.isChecked():
|
|
1725
|
if self.specGraphSaveCross.isChecked():
|
|
1726
|
checkPath = True
|
|
1726
|
checkPath = True
|
|
1727
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1727
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1728
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1728
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1729
|
if figfile:
|
|
1729
|
if figfile:
|
|
1730
|
opObj.addParameter(name='figfile', value=figfile, format='str')
|
|
1730
|
opObj.addParameter(name='figfile', value=figfile, format='str')
|
|
1731
|
if wrperiod:
|
|
1731
|
if wrperiod:
|
|
1732
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1732
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1733
|
|
|
1733
|
|
|
1734
|
if self.specGraphftpCross.isChecked():
|
|
1734
|
if self.specGraphftpCross.isChecked():
|
|
1735
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1735
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1736
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1736
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1737
|
addFTP = True
|
|
1737
|
addFTP = True
|
|
1738
|
|
|
1738
|
|
|
1739
|
if self.specGraphCebRTIplot.isChecked():
|
|
1739
|
if self.specGraphCebRTIplot.isChecked():
|
|
1740
|
|
|
1740
|
|
|
1741
|
opObj = puObj.addOperation(name='RTIPlot', optype='other')
|
|
1741
|
opObj = puObj.addOperation(name='RTIPlot', optype='other')
|
|
1742
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1742
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1743
|
|
|
1743
|
|
|
1744
|
if channelList:
|
|
1744
|
if channelList:
|
|
1745
|
|
|
1745
|
|
|
1746
|
if not isIntList(channelList):
|
|
1746
|
if not isIntList(channelList):
|
|
1747
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1747
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1748
|
return 0
|
|
1748
|
return 0
|
|
1749
|
|
|
1749
|
|
|
1750
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1750
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1751
|
|
|
1751
|
|
|
1752
|
if trange:
|
|
1752
|
if trange:
|
|
1753
|
|
|
1753
|
|
|
1754
|
if not isFloatRange(trange):
|
|
1754
|
if not isFloatRange(trange):
|
|
1755
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1755
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1756
|
return 0
|
|
1756
|
return 0
|
|
1757
|
|
|
1757
|
|
|
1758
|
zvalueList = trange.split(",")
|
|
1758
|
zvalueList = trange.split(",")
|
|
1759
|
value1 = float(zvalueList[0])
|
|
1759
|
value1 = float(zvalueList[0])
|
|
1760
|
value2 = float(zvalueList[1])
|
|
1760
|
value2 = float(zvalueList[1])
|
|
1761
|
|
|
1761
|
|
|
1762
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1762
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1763
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1763
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
|
|
|
1764
|
|
|
|
|
|
1765
|
if timerange:
|
|
|
|
|
1766
|
try:
|
|
|
|
|
1767
|
timerange = int(timerange)
|
|
|
|
|
1768
|
except:
|
|
|
|
|
1769
|
return 0
|
|
|
|
|
1770
|
opObj.addParameter(name='timerange', value=timerange, format='int')
|
|
1764
|
|
|
1771
|
|
|
1765
|
if hei_range:
|
|
1772
|
if hei_range:
|
|
1766
|
|
|
1773
|
|
|
1767
|
if not isFloatRange(hei_range):
|
|
1774
|
if not isFloatRange(hei_range):
|
|
1768
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1775
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1769
|
return 0
|
|
1776
|
return 0
|
|
1770
|
|
|
1777
|
|
|
1771
|
yvalueList = hei_range.split(",")
|
|
1778
|
yvalueList = hei_range.split(",")
|
|
1772
|
value1 = float(yvalueList[0])
|
|
1779
|
value1 = float(yvalueList[0])
|
|
1773
|
value2 = float(yvalueList[1])
|
|
1780
|
value2 = float(yvalueList[1])
|
|
1774
|
|
|
1781
|
|
|
1775
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1782
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1776
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1783
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1777
|
|
|
1784
|
|
|
1778
|
if db_range:
|
|
1785
|
if db_range:
|
|
1779
|
|
|
1786
|
|
|
1780
|
if not isFloatRange(db_range):
|
|
1787
|
if not isFloatRange(db_range):
|
|
1781
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1788
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1782
|
return 0
|
|
1789
|
return 0
|
|
1783
|
|
|
1790
|
|
|
1784
|
zvalueList = db_range.split(",")
|
|
1791
|
zvalueList = db_range.split(",")
|
|
1785
|
value1 = float(zvalueList[0])
|
|
1792
|
value1 = float(zvalueList[0])
|
|
1786
|
value2 = float(zvalueList[1])
|
|
1793
|
value2 = float(zvalueList[1])
|
|
1787
|
|
|
1794
|
|
|
1788
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1795
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1789
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1796
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1790
|
|
|
1797
|
|
|
1791
|
if self.specGraphSaveRTIplot.isChecked():
|
|
1798
|
if self.specGraphSaveRTIplot.isChecked():
|
|
1792
|
checkPath = True
|
|
1799
|
checkPath = True
|
|
1793
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1800
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1794
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1801
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1795
|
if figfile:
|
|
1802
|
if figfile:
|
|
1796
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1803
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1797
|
if wrperiod:
|
|
1804
|
if wrperiod:
|
|
1798
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1805
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1799
|
|
|
1806
|
|
|
1800
|
if self.specGraphftpRTIplot.isChecked():
|
|
1807
|
if self.specGraphftpRTIplot.isChecked():
|
|
1801
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1808
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1802
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1809
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1803
|
addFTP = True
|
|
1810
|
addFTP = True
|
|
1804
|
|
|
1811
|
|
|
1805
|
if self.specGraphCebCoherencmap.isChecked():
|
|
1812
|
if self.specGraphCebCoherencmap.isChecked():
|
|
1806
|
|
|
1813
|
|
|
1807
|
opObj = puObj.addOperation(name='CoherenceMap', optype='other')
|
|
1814
|
opObj = puObj.addOperation(name='CoherenceMap', optype='other')
|
|
1808
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1815
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1809
|
|
|
1816
|
|
|
1810
|
if trange:
|
|
1817
|
if trange:
|
|
1811
|
|
|
1818
|
|
|
1812
|
if not isFloatRange(trange):
|
|
1819
|
if not isFloatRange(trange):
|
|
1813
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1820
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1814
|
return 0
|
|
1821
|
return 0
|
|
1815
|
|
|
1822
|
|
|
1816
|
zvalueList = trange.split(",")
|
|
1823
|
zvalueList = trange.split(",")
|
|
1817
|
value1 = float(zvalueList[0])
|
|
1824
|
value1 = float(zvalueList[0])
|
|
1818
|
value2 = float(zvalueList[1])
|
|
1825
|
value2 = float(zvalueList[1])
|
|
1819
|
|
|
1826
|
|
|
1820
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1827
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1821
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1828
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1822
|
|
|
1829
|
|
|
1823
|
if hei_range:
|
|
1830
|
if hei_range:
|
|
1824
|
|
|
1831
|
|
|
1825
|
if not isFloatRange(hei_range):
|
|
1832
|
if not isFloatRange(hei_range):
|
|
1826
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1833
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1827
|
return 0
|
|
1834
|
return 0
|
|
1828
|
|
|
1835
|
|
|
1829
|
yvalueList = hei_range.split(",")
|
|
1836
|
yvalueList = hei_range.split(",")
|
|
1830
|
value1 = float(yvalueList[0])
|
|
1837
|
value1 = float(yvalueList[0])
|
|
1831
|
value2 = float(yvalueList[1])
|
|
1838
|
value2 = float(yvalueList[1])
|
|
1832
|
|
|
1839
|
|
|
1833
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1840
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1834
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1841
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1835
|
|
|
1842
|
|
|
1836
|
if magrange:
|
|
1843
|
if magrange:
|
|
1837
|
|
|
1844
|
|
|
1838
|
if not isFloatRange(magrange):
|
|
1845
|
if not isFloatRange(magrange):
|
|
1839
|
self.console.append("Invalid value [%s] for 'Graphic:Magnitud-Range" %(magrange))
|
|
1846
|
self.console.append("Invalid value [%s] for 'Graphic:Magnitud-Range" %(magrange))
|
|
1840
|
return 0
|
|
1847
|
return 0
|
|
1841
|
|
|
1848
|
|
|
1842
|
zvalueList = magrange.split(",")
|
|
1849
|
zvalueList = magrange.split(",")
|
|
1843
|
value1 = float(zvalueList[0])
|
|
1850
|
value1 = float(zvalueList[0])
|
|
1844
|
value2 = float(zvalueList[1])
|
|
1851
|
value2 = float(zvalueList[1])
|
|
1845
|
|
|
1852
|
|
|
1846
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1853
|
opObj.addParameter(name='zmin', value=value1, format='float')
|
|
1847
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1854
|
opObj.addParameter(name='zmax', value=value2, format='float')
|
|
1848
|
|
|
1855
|
|
|
1849
|
if phaserange:
|
|
1856
|
if phaserange:
|
|
1850
|
|
|
1857
|
|
|
1851
|
if not isFloatRange(phaserange):
|
|
1858
|
if not isFloatRange(phaserange):
|
|
1852
|
self.console.append("Invalid value [%s] for 'Graphic:Phase-Range" %(phaserange))
|
|
1859
|
self.console.append("Invalid value [%s] for 'Graphic:Phase-Range" %(phaserange))
|
|
1853
|
return 0
|
|
1860
|
return 0
|
|
1854
|
|
|
1861
|
|
|
1855
|
zvalueList = phaserange.split(",")
|
|
1862
|
zvalueList = phaserange.split(",")
|
|
1856
|
value1 = float(zvalueList[0])
|
|
1863
|
value1 = float(zvalueList[0])
|
|
1857
|
value2 = float(zvalueList[1])
|
|
1864
|
value2 = float(zvalueList[1])
|
|
1858
|
|
|
1865
|
|
|
1859
|
opObj.addParameter(name='phase_min', value=value1, format='float')
|
|
1866
|
opObj.addParameter(name='phase_min', value=value1, format='float')
|
|
1860
|
opObj.addParameter(name='phase_max', value=value2, format='float')
|
|
1867
|
opObj.addParameter(name='phase_max', value=value2, format='float')
|
|
1861
|
|
|
1868
|
|
|
1862
|
if self.specGraphSaveCoherencemap.isChecked():
|
|
1869
|
if self.specGraphSaveCoherencemap.isChecked():
|
|
1863
|
checkPath = True
|
|
1870
|
checkPath = True
|
|
1864
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1871
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1865
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1872
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1866
|
if figfile:
|
|
1873
|
if figfile:
|
|
1867
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1874
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1868
|
if wrperiod:
|
|
1875
|
if wrperiod:
|
|
1869
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1876
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1870
|
|
|
1877
|
|
|
1871
|
if self.specGraphftpCoherencemap.isChecked():
|
|
1878
|
if self.specGraphftpCoherencemap.isChecked():
|
|
1872
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1879
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1873
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1880
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1874
|
addFTP = True
|
|
1881
|
addFTP = True
|
|
1875
|
|
|
1882
|
|
|
1876
|
if self.specGraphPowerprofile.isChecked():
|
|
1883
|
if self.specGraphPowerprofile.isChecked():
|
|
1877
|
|
|
1884
|
|
|
1878
|
opObj = puObj.addOperation(name='PowerProfilePlot', optype='other')
|
|
1885
|
opObj = puObj.addOperation(name='PowerProfilePlot', optype='other')
|
|
1879
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1886
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1880
|
|
|
1887
|
|
|
1881
|
if channelList:
|
|
1888
|
if channelList:
|
|
1882
|
|
|
1889
|
|
|
1883
|
if not isList(channelList):
|
|
1890
|
if not isList(channelList):
|
|
1884
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1891
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1885
|
return 0
|
|
1892
|
return 0
|
|
1886
|
|
|
1893
|
|
|
1887
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1894
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1888
|
|
|
1895
|
|
|
1889
|
if hei_range:
|
|
1896
|
if hei_range:
|
|
1890
|
|
|
1897
|
|
|
1891
|
if not isFloatRange(hei_range):
|
|
1898
|
if not isFloatRange(hei_range):
|
|
1892
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1899
|
self.console.append("Invalid value [%s] for 'Graphic:Height-Range" %(hei_range))
|
|
1893
|
return 0
|
|
1900
|
return 0
|
|
1894
|
|
|
1901
|
|
|
1895
|
yvalueList = hei_range.split(",")
|
|
1902
|
yvalueList = hei_range.split(",")
|
|
1896
|
value1 = float(yvalueList[0])
|
|
1903
|
value1 = float(yvalueList[0])
|
|
1897
|
value2 = float(yvalueList[1])
|
|
1904
|
value2 = float(yvalueList[1])
|
|
1898
|
|
|
1905
|
|
|
1899
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1906
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1900
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1907
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1901
|
|
|
1908
|
|
|
1902
|
if db_range:
|
|
1909
|
if db_range:
|
|
1903
|
|
|
1910
|
|
|
1904
|
if not isFloatRange(db_range):
|
|
1911
|
if not isFloatRange(db_range):
|
|
1905
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1912
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1906
|
return 0
|
|
1913
|
return 0
|
|
1907
|
|
|
1914
|
|
|
1908
|
zvalueList = db_range.split(",")
|
|
1915
|
zvalueList = db_range.split(",")
|
|
1909
|
value1 = float(zvalueList[0])
|
|
1916
|
value1 = float(zvalueList[0])
|
|
1910
|
value2 = float(zvalueList[1])
|
|
1917
|
value2 = float(zvalueList[1])
|
|
1911
|
|
|
1918
|
|
|
1912
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1919
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1913
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1920
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1914
|
|
|
1921
|
|
|
1915
|
if self.specGraphSavePowerprofile.isChecked():
|
|
1922
|
if self.specGraphSavePowerprofile.isChecked():
|
|
1916
|
checkPath = True
|
|
1923
|
checkPath = True
|
|
1917
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1924
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1918
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1925
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1919
|
if figfile:
|
|
1926
|
if figfile:
|
|
1920
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1927
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1921
|
if wrperiod:
|
|
1928
|
if wrperiod:
|
|
1922
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1929
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1923
|
|
|
1930
|
|
|
1924
|
if self.specGraphftpPowerprofile.isChecked():
|
|
1931
|
if self.specGraphftpPowerprofile.isChecked():
|
|
1925
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1932
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1926
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1933
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1927
|
addFTP = True
|
|
1934
|
addFTP = True
|
|
1928
|
# rti noise
|
|
1935
|
# rti noise
|
|
1929
|
|
|
1936
|
|
|
1930
|
if self.specGraphCebRTInoise.isChecked():
|
|
1937
|
if self.specGraphCebRTInoise.isChecked():
|
|
1931
|
|
|
1938
|
|
|
1932
|
opObj = puObj.addOperation(name='Noise', optype='other')
|
|
1939
|
opObj = puObj.addOperation(name='Noise', optype='other')
|
|
1933
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1940
|
opObj.addParameter(name='id', value=opObj.id, format='int')
|
|
1934
|
|
|
1941
|
|
|
1935
|
if channelList:
|
|
1942
|
if channelList:
|
|
1936
|
|
|
1943
|
|
|
1937
|
if not isList(channelList):
|
|
1944
|
if not isList(channelList):
|
|
1938
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1945
|
self.console.append("Invalid value [%s] for 'Graphic:ChannelList" %(channelList))
|
|
1939
|
return 0
|
|
1946
|
return 0
|
|
1940
|
|
|
1947
|
|
|
1941
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1948
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
1942
|
|
|
1949
|
|
|
1943
|
if trange:
|
|
1950
|
if trange:
|
|
1944
|
|
|
1951
|
|
|
1945
|
if not isFloatRange(trange):
|
|
1952
|
if not isFloatRange(trange):
|
|
1946
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1953
|
self.console.append("Invalid value [%s] for 'Graphic:Time-Range" %(trange))
|
|
1947
|
return 0
|
|
1954
|
return 0
|
|
1948
|
|
|
1955
|
|
|
1949
|
zvalueList = trange.split(",")
|
|
1956
|
zvalueList = trange.split(",")
|
|
1950
|
value1 = float(zvalueList[0])
|
|
1957
|
value1 = float(zvalueList[0])
|
|
1951
|
value2 = float(zvalueList[1])
|
|
1958
|
value2 = float(zvalueList[1])
|
|
1952
|
|
|
1959
|
|
|
1953
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1960
|
opObj.addParameter(name='xmin', value=value1, format='float')
|
|
1954
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1961
|
opObj.addParameter(name='xmax', value=value2, format='float')
|
|
1955
|
|
|
1962
|
|
|
1956
|
if db_range:
|
|
1963
|
if db_range:
|
|
1957
|
|
|
1964
|
|
|
1958
|
if not isFloatRange(db_range):
|
|
1965
|
if not isFloatRange(db_range):
|
|
1959
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1966
|
self.console.append("Invalid value [%s] for 'Graphic:dB-Range" %(db_range))
|
|
1960
|
return 0
|
|
1967
|
return 0
|
|
1961
|
|
|
1968
|
|
|
1962
|
zvalueList = db_range.split(",")
|
|
1969
|
zvalueList = db_range.split(",")
|
|
1963
|
value1 = float(zvalueList[0])
|
|
1970
|
value1 = float(zvalueList[0])
|
|
1964
|
value2 = float(zvalueList[1])
|
|
1971
|
value2 = float(zvalueList[1])
|
|
1965
|
|
|
1972
|
|
|
1966
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1973
|
opObj.addParameter(name='ymin', value=value1, format='float')
|
|
1967
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1974
|
opObj.addParameter(name='ymax', value=value2, format='float')
|
|
1968
|
|
|
1975
|
|
|
1969
|
if self.specGraphSaveRTInoise.isChecked():
|
|
1976
|
if self.specGraphSaveRTInoise.isChecked():
|
|
1970
|
checkPath = True
|
|
1977
|
checkPath = True
|
|
1971
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1978
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
1972
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1979
|
opObj.addParameter(name='figpath', value=figpath, format='str')
|
|
1973
|
if figfile:
|
|
1980
|
if figfile:
|
|
1974
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1981
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
1975
|
if wrperiod:
|
|
1982
|
if wrperiod:
|
|
1976
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1983
|
opObj.addParameter(name='wr_period', value=wrperiod,format='int')
|
|
1977
|
|
|
1984
|
|
|
1978
|
# test_ftp
|
|
1985
|
# test_ftp
|
|
1979
|
if self.specGraphftpRTInoise.isChecked():
|
|
1986
|
if self.specGraphftpRTInoise.isChecked():
|
|
1980
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1987
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
1981
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1988
|
self.addFTPConf2Operation(puObj, opObj)
|
|
1982
|
addFTP = True
|
|
1989
|
addFTP = True
|
|
1983
|
|
|
1990
|
|
|
1984
|
if checkPath:
|
|
1991
|
if checkPath:
|
|
1985
|
if not figpath:
|
|
1992
|
if not figpath:
|
|
1986
|
self.console.clear()
|
|
1993
|
self.console.clear()
|
|
1987
|
self.console.append("Graphic path should be defined")
|
|
1994
|
self.console.append("Graphic path should be defined")
|
|
1988
|
return 0
|
|
1995
|
return 0
|
|
1989
|
|
|
1996
|
|
|
1990
|
if addFTP and not figpath:
|
|
1997
|
if addFTP and not figpath:
|
|
1991
|
self.console.clear()
|
|
1998
|
self.console.clear()
|
|
1992
|
self.console.append("You have to save the plots before sending them to FTP Server")
|
|
1999
|
self.console.append("You have to save the plots before sending them to FTP Server")
|
|
1993
|
return 0
|
|
2000
|
return 0
|
|
1994
|
|
|
2001
|
|
|
1995
|
self.console.clear()
|
|
2002
|
self.console.clear()
|
|
1996
|
|
|
2003
|
|
|
1997
|
# if something happend
|
|
2004
|
# if something happend
|
|
1998
|
parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra')
|
|
2005
|
parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra')
|
|
1999
|
if parms_ok:
|
|
2006
|
if parms_ok:
|
|
2000
|
opObj = puObj.addOperation(name='SpectraWriter', optype='other')
|
|
2007
|
opObj = puObj.addOperation(name='SpectraWriter', optype='other')
|
|
2001
|
opObj.addParameter(name='path', value=output_path)
|
|
2008
|
opObj.addParameter(name='path', value=output_path)
|
|
2002
|
opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int')
|
|
2009
|
opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int')
|
|
2003
|
|
|
2010
|
|
|
2004
|
try:
|
|
2011
|
try:
|
|
2005
|
self.refreshPUProperties(puObj)
|
|
2012
|
self.refreshPUProperties(puObj)
|
|
2006
|
except:
|
|
2013
|
except:
|
|
2007
|
self.console.append("An error reading input parameters was found ... Check them!")
|
|
2014
|
self.console.append("An error reading input parameters was found ... Check them!")
|
|
2008
|
return 0
|
|
2015
|
return 0
|
|
2009
|
|
|
2016
|
|
|
2010
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
2017
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
2011
|
|
|
2018
|
|
|
2012
|
self._enable_play_button()
|
|
2019
|
self._enable_play_button()
|
|
2013
|
self._enable_save_button()
|
|
2020
|
self._enable_save_button()
|
|
2014
|
|
|
2021
|
|
|
2015
|
return 1
|
|
2022
|
return 1
|
|
2016
|
|
|
2023
|
|
|
2017
|
|
|
2024
|
|
|
2018
|
@pyqtSignature("")
|
|
2025
|
@pyqtSignature("")
|
|
2019
|
def on_specGraphClear_clicked(self):
|
|
2026
|
def on_specGraphClear_clicked(self):
|
|
2020
|
|
|
2027
|
|
|
2021
|
self.console.clear()
|
|
2028
|
self.console.clear()
|
|
2022
|
|
|
2029
|
|
|
2023
|
"""
|
|
2030
|
"""
|
|
2024
|
Spectra Graph
|
|
2031
|
Spectra Graph
|
|
2025
|
"""
|
|
2032
|
"""
|
|
2026
|
@pyqtSignature("int")
|
|
2033
|
@pyqtSignature("int")
|
|
2027
|
def on_specGraphCebSpectraplot_stateChanged(self, p0):
|
|
2034
|
def on_specGraphCebSpectraplot_stateChanged(self, p0):
|
|
2028
|
|
|
2035
|
|
|
2029
|
self.__checkSpecGraphFilters()
|
|
2036
|
self.__checkSpecGraphFilters()
|
|
2030
|
|
|
2037
|
|
|
2031
|
|
|
2038
|
|
|
2032
|
@pyqtSignature("int")
|
|
2039
|
@pyqtSignature("int")
|
|
2033
|
def on_specGraphCebCrossSpectraplot_stateChanged(self, p0):
|
|
2040
|
def on_specGraphCebCrossSpectraplot_stateChanged(self, p0):
|
|
2034
|
|
|
2041
|
|
|
2035
|
self.__checkSpecGraphFilters()
|
|
2042
|
self.__checkSpecGraphFilters()
|
|
2036
|
|
|
2043
|
|
|
2037
|
@pyqtSignature("int")
|
|
2044
|
@pyqtSignature("int")
|
|
2038
|
def on_specGraphCebRTIplot_stateChanged(self, p0):
|
|
2045
|
def on_specGraphCebRTIplot_stateChanged(self, p0):
|
|
2039
|
|
|
2046
|
|
|
2040
|
self.__checkSpecGraphFilters()
|
|
2047
|
self.__checkSpecGraphFilters()
|
|
2041
|
|
|
2048
|
|
|
2042
|
|
|
2049
|
|
|
2043
|
@pyqtSignature("int")
|
|
2050
|
@pyqtSignature("int")
|
|
2044
|
def on_specGraphCebRTInoise_stateChanged(self, p0):
|
|
2051
|
def on_specGraphCebRTInoise_stateChanged(self, p0):
|
|
2045
|
|
|
2052
|
|
|
2046
|
self.__checkSpecGraphFilters()
|
|
2053
|
self.__checkSpecGraphFilters()
|
|
2047
|
|
|
2054
|
|
|
2048
|
|
|
2055
|
|
|
2049
|
@pyqtSignature("int")
|
|
2056
|
@pyqtSignature("int")
|
|
2050
|
def on_specGraphCebCoherencmap_stateChanged(self, p0):
|
|
2057
|
def on_specGraphCebCoherencmap_stateChanged(self, p0):
|
|
2051
|
|
|
2058
|
|
|
2052
|
self.__checkSpecGraphFilters()
|
|
2059
|
self.__checkSpecGraphFilters()
|
|
2053
|
|
|
2060
|
|
|
2054
|
@pyqtSignature("int")
|
|
2061
|
@pyqtSignature("int")
|
|
2055
|
def on_specGraphPowerprofile_stateChanged(self, p0):
|
|
2062
|
def on_specGraphPowerprofile_stateChanged(self, p0):
|
|
2056
|
|
|
2063
|
|
|
2057
|
self.__checkSpecGraphFilters()
|
|
2064
|
self.__checkSpecGraphFilters()
|
|
2058
|
|
|
2065
|
|
|
2059
|
@pyqtSignature("int")
|
|
2066
|
@pyqtSignature("int")
|
|
2060
|
def on_specGraphPhase_stateChanged(self, p0):
|
|
2067
|
def on_specGraphPhase_stateChanged(self, p0):
|
|
2061
|
|
|
2068
|
|
|
2062
|
self.__checkSpecGraphFilters()
|
|
2069
|
self.__checkSpecGraphFilters()
|
|
2063
|
|
|
2070
|
|
|
2064
|
@pyqtSignature("int")
|
|
2071
|
@pyqtSignature("int")
|
|
2065
|
def on_specGraphSaveSpectra_stateChanged(self, p0):
|
|
2072
|
def on_specGraphSaveSpectra_stateChanged(self, p0):
|
|
2066
|
"""
|
|
2073
|
"""
|
|
2067
|
"""
|
|
2074
|
"""
|
|
2068
|
self.__checkSpecGraphSaving()
|
|
2075
|
self.__checkSpecGraphSaving()
|
|
2069
|
|
|
2076
|
|
|
2070
|
@pyqtSignature("int")
|
|
2077
|
@pyqtSignature("int")
|
|
2071
|
def on_specGraphSaveCross_stateChanged(self, p0):
|
|
2078
|
def on_specGraphSaveCross_stateChanged(self, p0):
|
|
2072
|
|
|
2079
|
|
|
2073
|
self.__checkSpecGraphSaving()
|
|
2080
|
self.__checkSpecGraphSaving()
|
|
2074
|
|
|
2081
|
|
|
2075
|
@pyqtSignature("int")
|
|
2082
|
@pyqtSignature("int")
|
|
2076
|
def on_specGraphSaveRTIplot_stateChanged(self, p0):
|
|
2083
|
def on_specGraphSaveRTIplot_stateChanged(self, p0):
|
|
2077
|
|
|
2084
|
|
|
2078
|
self.__checkSpecGraphSaving()
|
|
2085
|
self.__checkSpecGraphSaving()
|
|
2079
|
|
|
2086
|
|
|
2080
|
@pyqtSignature("int")
|
|
2087
|
@pyqtSignature("int")
|
|
2081
|
def on_specGraphSaveRTInoise_stateChanged(self, p0):
|
|
2088
|
def on_specGraphSaveRTInoise_stateChanged(self, p0):
|
|
2082
|
|
|
2089
|
|
|
2083
|
self.__checkSpecGraphSaving()
|
|
2090
|
self.__checkSpecGraphSaving()
|
|
2084
|
|
|
2091
|
|
|
2085
|
@pyqtSignature("int")
|
|
2092
|
@pyqtSignature("int")
|
|
2086
|
def on_specGraphSaveCoherencemap_stateChanged(self, p0):
|
|
2093
|
def on_specGraphSaveCoherencemap_stateChanged(self, p0):
|
|
2087
|
|
|
2094
|
|
|
2088
|
self.__checkSpecGraphSaving()
|
|
2095
|
self.__checkSpecGraphSaving()
|
|
2089
|
|
|
2096
|
|
|
2090
|
@pyqtSignature("int")
|
|
2097
|
@pyqtSignature("int")
|
|
2091
|
def on_specGraphSavePowerprofile_stateChanged(self, p0):
|
|
2098
|
def on_specGraphSavePowerprofile_stateChanged(self, p0):
|
|
2092
|
|
|
2099
|
|
|
2093
|
self.__checkSpecGraphSaving()
|
|
2100
|
self.__checkSpecGraphSaving()
|
|
2094
|
|
|
2101
|
|
|
2095
|
@pyqtSignature("int")
|
|
2102
|
@pyqtSignature("int")
|
|
2096
|
def on_specGraphftpSpectra_stateChanged(self, p0):
|
|
2103
|
def on_specGraphftpSpectra_stateChanged(self, p0):
|
|
2097
|
"""
|
|
2104
|
"""
|
|
2098
|
"""
|
|
2105
|
"""
|
|
2099
|
self.__checkSpecGraphFTP()
|
|
2106
|
self.__checkSpecGraphFTP()
|
|
2100
|
|
|
2107
|
|
|
2101
|
|
|
2108
|
|
|
2102
|
@pyqtSignature("int")
|
|
2109
|
@pyqtSignature("int")
|
|
2103
|
def on_specGraphftpCross_stateChanged(self, p0):
|
|
2110
|
def on_specGraphftpCross_stateChanged(self, p0):
|
|
2104
|
|
|
2111
|
|
|
2105
|
self.__checkSpecGraphFTP()
|
|
2112
|
self.__checkSpecGraphFTP()
|
|
2106
|
|
|
2113
|
|
|
2107
|
@pyqtSignature("int")
|
|
2114
|
@pyqtSignature("int")
|
|
2108
|
def on_specGraphftpRTIplot_stateChanged(self, p0):
|
|
2115
|
def on_specGraphftpRTIplot_stateChanged(self, p0):
|
|
2109
|
|
|
2116
|
|
|
2110
|
self.__checkSpecGraphFTP()
|
|
2117
|
self.__checkSpecGraphFTP()
|
|
2111
|
|
|
2118
|
|
|
2112
|
@pyqtSignature("int")
|
|
2119
|
@pyqtSignature("int")
|
|
2113
|
def on_specGraphftpRTInoise_stateChanged(self, p0):
|
|
2120
|
def on_specGraphftpRTInoise_stateChanged(self, p0):
|
|
2114
|
|
|
2121
|
|
|
2115
|
self.__checkSpecGraphFTP()
|
|
2122
|
self.__checkSpecGraphFTP()
|
|
2116
|
|
|
2123
|
|
|
2117
|
@pyqtSignature("int")
|
|
2124
|
@pyqtSignature("int")
|
|
2118
|
def on_specGraphftpCoherencemap_stateChanged(self, p0):
|
|
2125
|
def on_specGraphftpCoherencemap_stateChanged(self, p0):
|
|
2119
|
|
|
2126
|
|
|
2120
|
self.__checkSpecGraphFTP()
|
|
2127
|
self.__checkSpecGraphFTP()
|
|
2121
|
|
|
2128
|
|
|
2122
|
@pyqtSignature("int")
|
|
2129
|
@pyqtSignature("int")
|
|
2123
|
def on_specGraphftpPowerprofile_stateChanged(self, p0):
|
|
2130
|
def on_specGraphftpPowerprofile_stateChanged(self, p0):
|
|
2124
|
|
|
2131
|
|
|
2125
|
self.__checkSpecGraphFTP()
|
|
2132
|
self.__checkSpecGraphFTP()
|
|
2126
|
|
|
2133
|
|
|
2127
|
@pyqtSignature("")
|
|
2134
|
@pyqtSignature("")
|
|
2128
|
def on_specGraphToolPath_clicked(self):
|
|
2135
|
def on_specGraphToolPath_clicked(self):
|
|
2129
|
"""
|
|
2136
|
"""
|
|
2130
|
"""
|
|
2137
|
"""
|
|
2131
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
2138
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
2132
|
self.specGraphPath.setText(save_path)
|
|
2139
|
self.specGraphPath.setText(save_path)
|
|
2133
|
if not os.path.exists(save_path):
|
|
2140
|
if not os.path.exists(save_path):
|
|
2134
|
self.console.clear()
|
|
2141
|
self.console.clear()
|
|
2135
|
self.console.append("Write a valid path")
|
|
2142
|
self.console.append("Write a valid path")
|
|
2136
|
return
|
|
2143
|
return
|
|
2137
|
|
|
2144
|
|
|
2138
|
@pyqtSignature("")
|
|
2145
|
@pyqtSignature("")
|
|
2139
|
def on_specHeisGraphToolPath_clicked(self):
|
|
2146
|
def on_specHeisGraphToolPath_clicked(self):
|
|
2140
|
"""
|
|
2147
|
"""
|
|
2141
|
"""
|
|
2148
|
"""
|
|
2142
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
2149
|
save_path = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
|
|
2143
|
self.specHeisGraphPath.setText(save_path)
|
|
2150
|
self.specHeisGraphPath.setText(save_path)
|
|
2144
|
if not os.path.exists(save_path):
|
|
2151
|
if not os.path.exists(save_path):
|
|
2145
|
self.console.clear()
|
|
2152
|
self.console.clear()
|
|
2146
|
self.console.append("Write a valid path")
|
|
2153
|
self.console.append("Write a valid path")
|
|
2147
|
return
|
|
2154
|
return
|
|
2148
|
|
|
2155
|
|
|
2149
|
@pyqtSignature("int")
|
|
2156
|
@pyqtSignature("int")
|
|
2150
|
def on_specHeisOpCebIncoherent_stateChanged(self, p0):
|
|
2157
|
def on_specHeisOpCebIncoherent_stateChanged(self, p0):
|
|
2151
|
"""
|
|
2158
|
"""
|
|
2152
|
Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento .
|
|
2159
|
Habilita la opcion de aοΏ½adir el parοΏ½metro integraciones incoherentes a la Unidad de Procesamiento .
|
|
2153
|
"""
|
|
2160
|
"""
|
|
2154
|
if p0 == 2:
|
|
2161
|
if p0 == 2:
|
|
2155
|
self.specHeisOpIncoherent.setEnabled(True)
|
|
2162
|
self.specHeisOpIncoherent.setEnabled(True)
|
|
2156
|
self.specHeisOpCobIncInt.setEnabled(True)
|
|
2163
|
self.specHeisOpCobIncInt.setEnabled(True)
|
|
2157
|
if p0 == 0:
|
|
2164
|
if p0 == 0:
|
|
2158
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
2165
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
2159
|
self.specHeisOpCobIncInt.setEnabled(False)
|
|
2166
|
self.specHeisOpCobIncInt.setEnabled(False)
|
|
2160
|
|
|
2167
|
|
|
2161
|
@pyqtSignature("")
|
|
2168
|
@pyqtSignature("")
|
|
2162
|
def on_specHeisOpOk_clicked(self):
|
|
2169
|
def on_specHeisOpOk_clicked(self):
|
|
2163
|
"""
|
|
2170
|
"""
|
|
2164
|
AΓADE OPERACION SPECTRAHEIS
|
|
2171
|
AΓADE OPERACION SPECTRAHEIS
|
|
2165
|
"""
|
|
2172
|
"""
|
|
2166
|
addFTP = False
|
|
2173
|
addFTP = False
|
|
2167
|
checkPath = False
|
|
2174
|
checkPath = False
|
|
2168
|
|
|
2175
|
|
|
2169
|
self._disable_play_button()
|
|
2176
|
self._disable_play_button()
|
|
2170
|
self._disable_save_button()
|
|
2177
|
self._disable_save_button()
|
|
2171
|
|
|
2178
|
|
|
2172
|
self.console.clear()
|
|
2179
|
self.console.clear()
|
|
2173
|
self.console.append("Checking input parameters ...")
|
|
2180
|
self.console.append("Checking input parameters ...")
|
|
2174
|
|
|
2181
|
|
|
2175
|
puObj = self.getSelectedItemObj()
|
|
2182
|
puObj = self.getSelectedItemObj()
|
|
2176
|
puObj.removeOperations()
|
|
2183
|
puObj.removeOperations()
|
|
2177
|
|
|
2184
|
|
|
2178
|
if self.specHeisOpCebIncoherent.isChecked():
|
|
2185
|
if self.specHeisOpCebIncoherent.isChecked():
|
|
2179
|
value = str(self.specHeisOpIncoherent.text())
|
|
2186
|
value = str(self.specHeisOpIncoherent.text())
|
|
2180
|
name_operation = 'IncohInt4SpectraHeis'
|
|
2187
|
name_operation = 'IncohInt4SpectraHeis'
|
|
2181
|
optype = 'other'
|
|
2188
|
optype = 'other'
|
|
2182
|
|
|
2189
|
|
|
2183
|
name_parameter = 'timeInterval'
|
|
2190
|
name_parameter = 'timeInterval'
|
|
2184
|
format = 'float'
|
|
2191
|
format = 'float'
|
|
2185
|
|
|
2192
|
|
|
2186
|
if self.specOpCobIncInt.currentIndex() == 0:
|
|
2193
|
if self.specOpCobIncInt.currentIndex() == 0:
|
|
2187
|
name_parameter = 'timeInterval'
|
|
2194
|
name_parameter = 'timeInterval'
|
|
2188
|
format = 'float'
|
|
2195
|
format = 'float'
|
|
2189
|
|
|
2196
|
|
|
2190
|
if not isFloat(value):
|
|
2197
|
if not isFloat(value):
|
|
2191
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2198
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2192
|
return 0
|
|
2199
|
return 0
|
|
2193
|
|
|
2200
|
|
|
2194
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2201
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2195
|
|
|
2202
|
|
|
2196
|
if not opObj.addParameter(name=name_parameter, value=value, format=format):
|
|
2203
|
if not opObj.addParameter(name=name_parameter, value=value, format=format):
|
|
2197
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2204
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2198
|
return 0
|
|
2205
|
return 0
|
|
2199
|
|
|
2206
|
|
|
2200
|
channelList = str(self.specHeisGgraphChannelList.text())
|
|
2207
|
channelList = str(self.specHeisGgraphChannelList.text())
|
|
2201
|
freq_range = str(self.specHeisGgraphXminXmax.text())
|
|
2208
|
freq_range = str(self.specHeisGgraphXminXmax.text())
|
|
2202
|
power_range = str(self.specHeisGgraphYminYmax.text())
|
|
2209
|
power_range = str(self.specHeisGgraphYminYmax.text())
|
|
2203
|
time_range = str(self.specHeisGgraphTminTmax.text())
|
|
2210
|
time_range = str(self.specHeisGgraphTminTmax.text())
|
|
2204
|
timerange = str(self.specHeisGgraphTimeRange.text())
|
|
2211
|
timerange = str(self.specHeisGgraphTimeRange.text())
|
|
2205
|
|
|
2212
|
|
|
2206
|
if self.specHeisGraphCebSpectraplot.isChecked():
|
|
2213
|
if self.specHeisGraphCebSpectraplot.isChecked():
|
|
2207
|
|
|
2214
|
|
|
2208
|
name_operation = 'SpectraHeisScope'
|
|
2215
|
name_operation = 'SpectraHeisScope'
|
|
2209
|
optype = 'other'
|
|
2216
|
optype = 'other'
|
|
2210
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2217
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2211
|
|
|
2218
|
|
|
2212
|
name_parameter = 'id'
|
|
2219
|
name_parameter = 'id'
|
|
2213
|
format = 'int'
|
|
2220
|
format = 'int'
|
|
2214
|
value = opObj.id
|
|
2221
|
value = opObj.id
|
|
2215
|
|
|
2222
|
|
|
2216
|
if not opObj.addParameter(name=name_parameter, value=value, format=format):
|
|
2223
|
if not opObj.addParameter(name=name_parameter, value=value, format=format):
|
|
2217
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2224
|
self.console.append("Invalid value '%s' for '%s'" %(value, name_parameter))
|
|
2218
|
return 0
|
|
2225
|
return 0
|
|
2219
|
|
|
2226
|
|
|
2220
|
if not (channelList == ''):
|
|
2227
|
if not (channelList == ''):
|
|
2221
|
name_parameter = 'channelList'
|
|
2228
|
name_parameter = 'channelList'
|
|
2222
|
format = 'intlist'
|
|
2229
|
format = 'intlist'
|
|
2223
|
|
|
2230
|
|
|
2224
|
if not isList(channelList):
|
|
2231
|
if not isList(channelList):
|
|
2225
|
self.console.append("Invalid value '%s' for '%s'" %(channelList, name_parameter))
|
|
2232
|
self.console.append("Invalid value '%s' for '%s'" %(channelList, name_parameter))
|
|
2226
|
return 0
|
|
2233
|
return 0
|
|
2227
|
|
|
2234
|
|
|
2228
|
opObj.addParameter(name=name_parameter, value=channelList, format=format)
|
|
2235
|
opObj.addParameter(name=name_parameter, value=channelList, format=format)
|
|
2229
|
|
|
2236
|
|
|
2230
|
if not freq_range == '':
|
|
2237
|
if not freq_range == '':
|
|
2231
|
xvalueList = freq_range.split(',')
|
|
2238
|
xvalueList = freq_range.split(',')
|
|
2232
|
|
|
2239
|
|
|
2233
|
if len(xvalueList) != 2:
|
|
2240
|
if len(xvalueList) != 2:
|
|
2234
|
self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange"))
|
|
2241
|
self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange"))
|
|
2235
|
return 0
|
|
2242
|
return 0
|
|
2236
|
|
|
2243
|
|
|
2237
|
value1 = xvalueList[0]
|
|
2244
|
value1 = xvalueList[0]
|
|
2238
|
value2 = xvalueList[1]
|
|
2245
|
value2 = xvalueList[1]
|
|
2239
|
|
|
2246
|
|
|
2240
|
if not isFloat(value1) or not isFloat(value2):
|
|
2247
|
if not isFloat(value1) or not isFloat(value2):
|
|
2241
|
self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange"))
|
|
2248
|
self.console.append("Invalid value '%s' for '%s'" %(freq_range, "xrange"))
|
|
2242
|
return 0
|
|
2249
|
return 0
|
|
2243
|
|
|
2250
|
|
|
2244
|
name1 = 'xmin'
|
|
2251
|
name1 = 'xmin'
|
|
2245
|
name2 = 'xmax'
|
|
2252
|
name2 = 'xmax'
|
|
2246
|
format = 'float'
|
|
2253
|
format = 'float'
|
|
2247
|
|
|
2254
|
|
|
2248
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
2255
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
2249
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
2256
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
2250
|
|
|
2257
|
|
|
2251
|
if not power_range == '':
|
|
2258
|
if not power_range == '':
|
|
2252
|
yvalueList = power_range.split(",")
|
|
2259
|
yvalueList = power_range.split(",")
|
|
2253
|
|
|
2260
|
|
|
2254
|
if len(yvalueList) != 2:
|
|
2261
|
if len(yvalueList) != 2:
|
|
2255
|
self.console.append("Invalid value '%s' for '%s'" %(power_range, "xrange"))
|
|
2262
|
self.console.append("Invalid value '%s' for '%s'" %(power_range, "xrange"))
|
|
2256
|
return 0
|
|
2263
|
return 0
|
|
2257
|
|
|
2264
|
|
|
2258
|
value1 = yvalueList[0]
|
|
2265
|
value1 = yvalueList[0]
|
|
2259
|
value2 = yvalueList[1]
|
|
2266
|
value2 = yvalueList[1]
|
|
2260
|
|
|
2267
|
|
|
2261
|
if not isFloat(value1) or not isFloat(value2):
|
|
2268
|
if not isFloat(value1) or not isFloat(value2):
|
|
2262
|
self.console.append("Invalid value '%s' for '%s'" %(power_range, "yrange"))
|
|
2269
|
self.console.append("Invalid value '%s' for '%s'" %(power_range, "yrange"))
|
|
2263
|
return 0
|
|
2270
|
return 0
|
|
2264
|
|
|
2271
|
|
|
2265
|
name1 = 'ymin'
|
|
2272
|
name1 = 'ymin'
|
|
2266
|
name2 = 'ymax'
|
|
2273
|
name2 = 'ymax'
|
|
2267
|
format = 'float'
|
|
2274
|
format = 'float'
|
|
2268
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
2275
|
opObj.addParameter(name=name1, value=value1, format=format)
|
|
2269
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
2276
|
opObj.addParameter(name=name2, value=value2, format=format)
|
|
2270
|
|
|
2277
|
|
|
2271
|
if self.specHeisGraphSaveSpectra.isChecked():
|
|
2278
|
if self.specHeisGraphSaveSpectra.isChecked():
|
|
2272
|
checkPath = True
|
|
2279
|
checkPath = True
|
|
2273
|
name_parameter1 = 'save'
|
|
2280
|
name_parameter1 = 'save'
|
|
2274
|
name_parameter2 = 'figpath'
|
|
2281
|
name_parameter2 = 'figpath'
|
|
2275
|
name_parameter3 = 'figfile'
|
|
2282
|
name_parameter3 = 'figfile'
|
|
2276
|
value1 = '1'
|
|
2283
|
value1 = '1'
|
|
2277
|
value2 = str(self.specHeisGraphPath.text())
|
|
2284
|
value2 = str(self.specHeisGraphPath.text())
|
|
2278
|
value3 = str(self.specHeisGraphPrefix.text())
|
|
2285
|
value3 = str(self.specHeisGraphPrefix.text())
|
|
2279
|
format1 = 'bool'
|
|
2286
|
format1 = 'bool'
|
|
2280
|
format2 = 'str'
|
|
2287
|
format2 = 'str'
|
|
2281
|
opObj.addParameter(name=name_parameter1, value=value1 , format=format1)
|
|
2288
|
opObj.addParameter(name=name_parameter1, value=value1 , format=format1)
|
|
2282
|
opObj.addParameter(name=name_parameter2, value=value2, format=format2)
|
|
2289
|
opObj.addParameter(name=name_parameter2, value=value2, format=format2)
|
|
2283
|
if not value3 == "":
|
|
2290
|
if not value3 == "":
|
|
2284
|
try:
|
|
2291
|
try:
|
|
2285
|
value3 = str(self.specHeisGraphPrefix.text())
|
|
2292
|
value3 = str(self.specHeisGraphPrefix.text())
|
|
2286
|
except:
|
|
2293
|
except:
|
|
2287
|
self.console.clear()
|
|
2294
|
self.console.clear()
|
|
2288
|
self.console.append("Please Write prefix")
|
|
2295
|
self.console.append("Please Write prefix")
|
|
2289
|
return 0
|
|
2296
|
return 0
|
|
2290
|
opObj.addParameter(name='figfile', value=str(self.specHeisGraphPrefix.text()), format='str')
|
|
2297
|
opObj.addParameter(name='figfile', value=str(self.specHeisGraphPrefix.text()), format='str')
|
|
2291
|
|
|
2298
|
|
|
2292
|
# opObj.addParameter(name=name_parameter3, value=value3, format=format2)
|
|
2299
|
# opObj.addParameter(name=name_parameter3, value=value3, format=format2)
|
|
2293
|
# opObj.addParameter(name='wr_period', value='5',format='int')
|
|
2300
|
# opObj.addParameter(name='wr_period', value='5',format='int')
|
|
2294
|
|
|
2301
|
|
|
2295
|
if self.specHeisGraphftpSpectra.isChecked():
|
|
2302
|
if self.specHeisGraphftpSpectra.isChecked():
|
|
2296
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
2303
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
2297
|
self.addFTPConf2Operation(puObj, opObj)
|
|
2304
|
self.addFTPConf2Operation(puObj, opObj)
|
|
2298
|
addFTP = True
|
|
2305
|
addFTP = True
|
|
2299
|
|
|
2306
|
|
|
2300
|
if self.specHeisGraphCebRTIplot.isChecked():
|
|
2307
|
if self.specHeisGraphCebRTIplot.isChecked():
|
|
2301
|
name_operation = 'RTIfromSpectraHeis'
|
|
2308
|
name_operation = 'RTIfromSpectraHeis'
|
|
2302
|
optype = 'other'
|
|
2309
|
optype = 'other'
|
|
2303
|
|
|
2310
|
|
|
2304
|
name_parameter = 'id'
|
|
2311
|
name_parameter = 'id'
|
|
2305
|
format = 'int'
|
|
2312
|
format = 'int'
|
|
2306
|
|
|
2313
|
|
|
2307
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2314
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2308
|
value = opObj.id
|
|
2315
|
value = opObj.id
|
|
2309
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
2316
|
opObj.addParameter(name=name_parameter, value=value, format=format)
|
|
2310
|
|
|
2317
|
|
|
2311
|
if not channelList == '':
|
|
2318
|
if not channelList == '':
|
|
2312
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
2319
|
opObj.addParameter(name='channelList', value=channelList, format='intlist')
|
|
2313
|
|
|
2320
|
|
|
2314
|
if not time_range == '':
|
|
2321
|
if not time_range == '':
|
|
2315
|
xvalueList = time_range.split(',')
|
|
2322
|
xvalueList = time_range.split(',')
|
|
2316
|
try:
|
|
2323
|
try:
|
|
2317
|
value = float(xvalueList[0])
|
|
2324
|
value = float(xvalueList[0])
|
|
2318
|
value = float(xvalueList[1])
|
|
2325
|
value = float(xvalueList[1])
|
|
2319
|
except:
|
|
2326
|
except:
|
|
2320
|
return 0
|
|
2327
|
return 0
|
|
2321
|
format = 'float'
|
|
2328
|
format = 'float'
|
|
2322
|
opObj.addParameter(name='xmin', value=xvalueList[0], format=format)
|
|
2329
|
opObj.addParameter(name='xmin', value=xvalueList[0], format=format)
|
|
2323
|
opObj.addParameter(name='xmax', value=xvalueList[1], format=format)
|
|
2330
|
opObj.addParameter(name='xmax', value=xvalueList[1], format=format)
|
|
2324
|
|
|
2331
|
|
|
2325
|
if not timerange == '':
|
|
2332
|
if not timerange == '':
|
|
2326
|
format = 'int'
|
|
2333
|
format = 'int'
|
|
2327
|
try:
|
|
2334
|
try:
|
|
2328
|
timerange = int(timerange)
|
|
2335
|
timerange = int(timerange)
|
|
2329
|
except:
|
|
2336
|
except:
|
|
2330
|
return 0
|
|
2337
|
return 0
|
|
2331
|
opObj.addParameter(name='timerange', value=timerange, format=format)
|
|
2338
|
opObj.addParameter(name='timerange', value=timerange, format=format)
|
|
2332
|
|
|
2339
|
|
|
2333
|
|
|
2340
|
|
|
2334
|
if not power_range == '':
|
|
2341
|
if not power_range == '':
|
|
2335
|
yvalueList = power_range.split(",")
|
|
2342
|
yvalueList = power_range.split(",")
|
|
2336
|
try:
|
|
2343
|
try:
|
|
2337
|
value = float(yvalueList[0])
|
|
2344
|
value = float(yvalueList[0])
|
|
2338
|
value = float(yvalueList[1])
|
|
2345
|
value = float(yvalueList[1])
|
|
2339
|
except:
|
|
2346
|
except:
|
|
2340
|
return 0
|
|
2347
|
return 0
|
|
2341
|
|
|
2348
|
|
|
2342
|
format = 'float'
|
|
2349
|
format = 'float'
|
|
2343
|
opObj.addParameter(name='ymin', value=yvalueList[0], format=format)
|
|
2350
|
opObj.addParameter(name='ymin', value=yvalueList[0], format=format)
|
|
2344
|
opObj.addParameter(name='ymax', value=yvalueList[1], format=format)
|
|
2351
|
opObj.addParameter(name='ymax', value=yvalueList[1], format=format)
|
|
2345
|
|
|
2352
|
|
|
2346
|
if self.specHeisGraphSaveRTIplot.isChecked():
|
|
2353
|
if self.specHeisGraphSaveRTIplot.isChecked():
|
|
2347
|
checkPath = True
|
|
2354
|
checkPath = True
|
|
2348
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
2355
|
opObj.addParameter(name='save', value='1', format='bool')
|
|
2349
|
opObj.addParameter(name='figpath', value=str(self.specHeisGraphPath.text()), format='str')
|
|
2356
|
opObj.addParameter(name='figpath', value=str(self.specHeisGraphPath.text()), format='str')
|
|
2350
|
value = str(self.specHeisGraphPrefix.text())
|
|
2357
|
value = str(self.specHeisGraphPrefix.text())
|
|
2351
|
if not value == "":
|
|
2358
|
if not value == "":
|
|
2352
|
try:
|
|
2359
|
try:
|
|
2353
|
value = str(self.specHeisGraphPrefix.text())
|
|
2360
|
value = str(self.specHeisGraphPrefix.text())
|
|
2354
|
except:
|
|
2361
|
except:
|
|
2355
|
self.console.clear()
|
|
2362
|
self.console.clear()
|
|
2356
|
self.console.append("Please Write prefix")
|
|
2363
|
self.console.append("Please Write prefix")
|
|
2357
|
return 0
|
|
2364
|
return 0
|
|
2358
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
2365
|
opObj.addParameter(name='figfile', value=value, format='str')
|
|
2359
|
|
|
2366
|
|
|
2360
|
# test_ftp
|
|
2367
|
# test_ftp
|
|
2361
|
if self.specHeisGraphftpRTIplot.isChecked():
|
|
2368
|
if self.specHeisGraphftpRTIplot.isChecked():
|
|
2362
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
2369
|
opObj.addParameter(name='ftp', value='1', format='int')
|
|
2363
|
self.addFTPConf2Operation(puObj, opObj)
|
|
2370
|
self.addFTPConf2Operation(puObj, opObj)
|
|
2364
|
addFTP = True
|
|
2371
|
addFTP = True
|
|
2365
|
|
|
2372
|
|
|
2366
|
localfolder = None
|
|
2373
|
localfolder = None
|
|
2367
|
if checkPath:
|
|
2374
|
if checkPath:
|
|
2368
|
localfolder = str(self.specHeisGraphPath.text())
|
|
2375
|
localfolder = str(self.specHeisGraphPath.text())
|
|
2369
|
if localfolder == '':
|
|
2376
|
if localfolder == '':
|
|
2370
|
self.console.clear()
|
|
2377
|
self.console.clear()
|
|
2371
|
self.console.append("Graphic path should be defined")
|
|
2378
|
self.console.append("Graphic path should be defined")
|
|
2372
|
return 0
|
|
2379
|
return 0
|
|
2373
|
|
|
2380
|
|
|
2374
|
if addFTP and not localfolder:
|
|
2381
|
if addFTP and not localfolder:
|
|
2375
|
self.console.clear()
|
|
2382
|
self.console.clear()
|
|
2376
|
self.console.append("You should save plots before send them to FTP Server")
|
|
2383
|
self.console.append("You should save plots before send them to FTP Server")
|
|
2377
|
return 0
|
|
2384
|
return 0
|
|
2378
|
|
|
2385
|
|
|
2379
|
# if something happened
|
|
2386
|
# if something happened
|
|
2380
|
parms_ok, output_path, blocksperfile, metadata_file = self.checkInputsPUSave(datatype='SpectraHeis')
|
|
2387
|
parms_ok, output_path, blocksperfile, metadata_file = self.checkInputsPUSave(datatype='SpectraHeis')
|
|
2381
|
if parms_ok:
|
|
2388
|
if parms_ok:
|
|
2382
|
name_operation = 'FitsWriter'
|
|
2389
|
name_operation = 'FitsWriter'
|
|
2383
|
optype = 'other'
|
|
2390
|
optype = 'other'
|
|
2384
|
name_parameter1 = 'path'
|
|
2391
|
name_parameter1 = 'path'
|
|
2385
|
name_parameter2 = 'dataBlocksPerFile'
|
|
2392
|
name_parameter2 = 'dataBlocksPerFile'
|
|
2386
|
name_parameter3 = 'metadatafile'
|
|
2393
|
name_parameter3 = 'metadatafile'
|
|
2387
|
value1 = output_path
|
|
2394
|
value1 = output_path
|
|
2388
|
value2 = blocksperfile
|
|
2395
|
value2 = blocksperfile
|
|
2389
|
value3 = metadata_file
|
|
2396
|
value3 = metadata_file
|
|
2390
|
format2 = "int"
|
|
2397
|
format2 = "int"
|
|
2391
|
format3 = "str"
|
|
2398
|
format3 = "str"
|
|
2392
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2399
|
opObj = puObj.addOperation(name=name_operation, optype=optype)
|
|
2393
|
|
|
2400
|
|
|
2394
|
opObj.addParameter(name=name_parameter1, value=value1)
|
|
2401
|
opObj.addParameter(name=name_parameter1, value=value1)
|
|
2395
|
|
|
2402
|
|
|
2396
|
if blocksperfile:
|
|
2403
|
if blocksperfile:
|
|
2397
|
opObj.addParameter(name=name_parameter2, value=value2, format=format2)
|
|
2404
|
opObj.addParameter(name=name_parameter2, value=value2, format=format2)
|
|
2398
|
|
|
2405
|
|
|
2399
|
if metadata_file:
|
|
2406
|
if metadata_file:
|
|
2400
|
opObj.addParameter(name=name_parameter3, value=value3, format=format3)
|
|
2407
|
opObj.addParameter(name=name_parameter3, value=value3, format=format3)
|
|
2401
|
|
|
2408
|
|
|
2402
|
self.console.clear()
|
|
2409
|
self.console.clear()
|
|
2403
|
try:
|
|
2410
|
try:
|
|
2404
|
self.refreshPUProperties(puObj)
|
|
2411
|
self.refreshPUProperties(puObj)
|
|
2405
|
except:
|
|
2412
|
except:
|
|
2406
|
self.console.append("An error reading input parameters was found ... Check them!")
|
|
2413
|
self.console.append("An error reading input parameters was found ... Check them!")
|
|
2407
|
return 0
|
|
2414
|
return 0
|
|
2408
|
|
|
2415
|
|
|
2409
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
2416
|
self.console.append("Save your project and press Play button to start signal processing")
|
|
2410
|
|
|
2417
|
|
|
2411
|
self._enable_save_button()
|
|
2418
|
self._enable_save_button()
|
|
2412
|
self._enable_play_button()
|
|
2419
|
self._enable_play_button()
|
|
2413
|
|
|
2420
|
|
|
2414
|
return 1
|
|
2421
|
return 1
|
|
2415
|
|
|
2422
|
|
|
2416
|
@pyqtSignature("")
|
|
2423
|
@pyqtSignature("")
|
|
2417
|
def on_specHeisGraphClear_clicked(self):
|
|
2424
|
def on_specHeisGraphClear_clicked(self):
|
|
2418
|
|
|
2425
|
|
|
2419
|
self.console.clear()
|
|
2426
|
self.console.clear()
|
|
2420
|
|
|
2427
|
|
|
2421
|
@pyqtSignature("int")
|
|
2428
|
@pyqtSignature("int")
|
|
2422
|
def on_specHeisGraphCebSpectraplot_stateChanged(self, p0):
|
|
2429
|
def on_specHeisGraphCebSpectraplot_stateChanged(self, p0):
|
|
2423
|
|
|
2430
|
|
|
2424
|
if p0 == 2:
|
|
2431
|
if p0 == 2:
|
|
2425
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
2432
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
2426
|
self.specHeisGgraphXminXmax.setEnabled(True)
|
|
2433
|
self.specHeisGgraphXminXmax.setEnabled(True)
|
|
2427
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
2434
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
2428
|
if p0 == 0:
|
|
2435
|
if p0 == 0:
|
|
2429
|
self.specHeisGgraphXminXmax.setEnabled(False)
|
|
2436
|
self.specHeisGgraphXminXmax.setEnabled(False)
|
|
2430
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
2437
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
2431
|
|
|
2438
|
|
|
2432
|
@pyqtSignature("int")
|
|
2439
|
@pyqtSignature("int")
|
|
2433
|
def on_specHeisGraphCebRTIplot_stateChanged(self, p0):
|
|
2440
|
def on_specHeisGraphCebRTIplot_stateChanged(self, p0):
|
|
2434
|
|
|
2441
|
|
|
2435
|
if p0 == 2:
|
|
2442
|
if p0 == 2:
|
|
2436
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
2443
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
2437
|
self.specHeisGgraphTminTmax.setEnabled(True)
|
|
2444
|
self.specHeisGgraphTminTmax.setEnabled(True)
|
|
2438
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
2445
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
2439
|
self.specHeisGgraphTimeRange.setEnabled(True)
|
|
2446
|
self.specHeisGgraphTimeRange.setEnabled(True)
|
|
2440
|
|
|
2447
|
|
|
2441
|
if p0 == 0:
|
|
2448
|
if p0 == 0:
|
|
2442
|
self.specHeisGgraphTminTmax.setEnabled(False)
|
|
2449
|
self.specHeisGgraphTminTmax.setEnabled(False)
|
|
2443
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
2450
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
2444
|
self.specHeisGgraphTimeRange.setEnabled(False)
|
|
2451
|
self.specHeisGgraphTimeRange.setEnabled(False)
|
|
2445
|
|
|
2452
|
|
|
2446
|
@pyqtSignature("int")
|
|
2453
|
@pyqtSignature("int")
|
|
2447
|
def on_specHeisGraphSaveSpectra_stateChanged(self, p0):
|
|
2454
|
def on_specHeisGraphSaveSpectra_stateChanged(self, p0):
|
|
2448
|
"""
|
|
2455
|
"""
|
|
2449
|
"""
|
|
2456
|
"""
|
|
2450
|
if p0 == 2:
|
|
2457
|
if p0 == 2:
|
|
2451
|
self.specHeisGraphPath.setEnabled(True)
|
|
2458
|
self.specHeisGraphPath.setEnabled(True)
|
|
2452
|
self.specHeisGraphPrefix.setEnabled(True)
|
|
2459
|
self.specHeisGraphPrefix.setEnabled(True)
|
|
2453
|
self.specHeisGraphToolPath.setEnabled(True)
|
|
2460
|
self.specHeisGraphToolPath.setEnabled(True)
|
|
2454
|
if p0 == 0:
|
|
2461
|
if p0 == 0:
|
|
2455
|
self.specHeisGraphPath.setEnabled(False)
|
|
2462
|
self.specHeisGraphPath.setEnabled(False)
|
|
2456
|
self.specHeisGraphPrefix.setEnabled(False)
|
|
2463
|
self.specHeisGraphPrefix.setEnabled(False)
|
|
2457
|
self.specHeisGraphToolPath.setEnabled(False)
|
|
2464
|
self.specHeisGraphToolPath.setEnabled(False)
|
|
2458
|
|
|
2465
|
|
|
2459
|
@pyqtSignature("int")
|
|
2466
|
@pyqtSignature("int")
|
|
2460
|
def on_specHeisGraphSaveRTIplot_stateChanged(self, p0):
|
|
2467
|
def on_specHeisGraphSaveRTIplot_stateChanged(self, p0):
|
|
2461
|
if p0 == 2:
|
|
2468
|
if p0 == 2:
|
|
2462
|
self.specHeisGraphPath.setEnabled(True)
|
|
2469
|
self.specHeisGraphPath.setEnabled(True)
|
|
2463
|
self.specHeisGraphPrefix.setEnabled(True)
|
|
2470
|
self.specHeisGraphPrefix.setEnabled(True)
|
|
2464
|
self.specHeisGraphToolPath.setEnabled(True)
|
|
2471
|
self.specHeisGraphToolPath.setEnabled(True)
|
|
2465
|
|
|
2472
|
|
|
2466
|
@pyqtSignature("int")
|
|
2473
|
@pyqtSignature("int")
|
|
2467
|
def on_specHeisGraphftpSpectra_stateChanged(self, p0):
|
|
2474
|
def on_specHeisGraphftpSpectra_stateChanged(self, p0):
|
|
2468
|
"""
|
|
2475
|
"""
|
|
2469
|
"""
|
|
2476
|
"""
|
|
2470
|
if p0 == 2:
|
|
2477
|
if p0 == 2:
|
|
2471
|
self.specHeisGgraphftpratio.setEnabled(True)
|
|
2478
|
self.specHeisGgraphftpratio.setEnabled(True)
|
|
2472
|
|
|
2479
|
|
|
2473
|
if p0 == 0:
|
|
2480
|
if p0 == 0:
|
|
2474
|
self.specHeisGgraphftpratio.setEnabled(False)
|
|
2481
|
self.specHeisGgraphftpratio.setEnabled(False)
|
|
2475
|
|
|
2482
|
|
|
2476
|
@pyqtSignature("int")
|
|
2483
|
@pyqtSignature("int")
|
|
2477
|
def on_specHeisGraphftpRTIplot_stateChanged(self, p0):
|
|
2484
|
def on_specHeisGraphftpRTIplot_stateChanged(self, p0):
|
|
2478
|
if p0 == 2:
|
|
2485
|
if p0 == 2:
|
|
2479
|
self.specHeisGgraphftpratio.setEnabled(True)
|
|
2486
|
self.specHeisGgraphftpratio.setEnabled(True)
|
|
2480
|
|
|
2487
|
|
|
2481
|
def __checkSpecGraphSaving(self):
|
|
2488
|
def __checkSpecGraphSaving(self):
|
|
2482
|
|
|
2489
|
|
|
2483
|
enable = False
|
|
2490
|
enable = False
|
|
2484
|
|
|
2491
|
|
|
2485
|
if self.specGraphSaveSpectra.checkState():
|
|
2492
|
if self.specGraphSaveSpectra.checkState():
|
|
2486
|
enable = True
|
|
2493
|
enable = True
|
|
2487
|
|
|
2494
|
|
|
2488
|
if self.specGraphSaveCross.checkState():
|
|
2495
|
if self.specGraphSaveCross.checkState():
|
|
2489
|
enable = True
|
|
2496
|
enable = True
|
|
2490
|
|
|
2497
|
|
|
2491
|
if self.specGraphSaveRTIplot.checkState():
|
|
2498
|
if self.specGraphSaveRTIplot.checkState():
|
|
2492
|
enable = True
|
|
2499
|
enable = True
|
|
2493
|
|
|
2500
|
|
|
2494
|
if self.specGraphSaveCoherencemap.checkState():
|
|
2501
|
if self.specGraphSaveCoherencemap.checkState():
|
|
2495
|
enable = True
|
|
2502
|
enable = True
|
|
2496
|
|
|
2503
|
|
|
2497
|
if self.specGraphSavePowerprofile.checkState():
|
|
2504
|
if self.specGraphSavePowerprofile.checkState():
|
|
2498
|
enable = True
|
|
2505
|
enable = True
|
|
2499
|
|
|
2506
|
|
|
2500
|
if self.specGraphSaveRTInoise.checkState():
|
|
2507
|
if self.specGraphSaveRTInoise.checkState():
|
|
2501
|
enable = True
|
|
2508
|
enable = True
|
|
2502
|
|
|
2509
|
|
|
2503
|
self.specGraphPath.setEnabled(enable)
|
|
2510
|
self.specGraphPath.setEnabled(enable)
|
|
2504
|
self.specGraphPrefix.setEnabled(enable)
|
|
2511
|
self.specGraphPrefix.setEnabled(enable)
|
|
2505
|
self.specGraphToolPath.setEnabled(enable)
|
|
2512
|
self.specGraphToolPath.setEnabled(enable)
|
|
2506
|
|
|
2513
|
|
|
2507
|
self.specGgraphftpratio.setEnabled(enable)
|
|
2514
|
self.specGgraphftpratio.setEnabled(enable)
|
|
2508
|
|
|
2515
|
|
|
2509
|
def __checkSpecGraphFTP(self):
|
|
2516
|
def __checkSpecGraphFTP(self):
|
|
2510
|
|
|
2517
|
|
|
2511
|
enable = False
|
|
2518
|
enable = False
|
|
2512
|
|
|
2519
|
|
|
2513
|
if self.specGraphftpSpectra.checkState():
|
|
2520
|
if self.specGraphftpSpectra.checkState():
|
|
2514
|
enable = True
|
|
2521
|
enable = True
|
|
2515
|
|
|
2522
|
|
|
2516
|
if self.specGraphftpCross.checkState():
|
|
2523
|
if self.specGraphftpCross.checkState():
|
|
2517
|
enable = True
|
|
2524
|
enable = True
|
|
2518
|
|
|
2525
|
|
|
2519
|
if self.specGraphftpRTIplot.checkState():
|
|
2526
|
if self.specGraphftpRTIplot.checkState():
|
|
2520
|
enable = True
|
|
2527
|
enable = True
|
|
2521
|
|
|
2528
|
|
|
2522
|
if self.specGraphftpCoherencemap.checkState():
|
|
2529
|
if self.specGraphftpCoherencemap.checkState():
|
|
2523
|
enable = True
|
|
2530
|
enable = True
|
|
2524
|
|
|
2531
|
|
|
2525
|
if self.specGraphftpPowerprofile.checkState():
|
|
2532
|
if self.specGraphftpPowerprofile.checkState():
|
|
2526
|
enable = True
|
|
2533
|
enable = True
|
|
2527
|
|
|
2534
|
|
|
2528
|
if self.specGraphftpRTInoise.checkState():
|
|
2535
|
if self.specGraphftpRTInoise.checkState():
|
|
2529
|
enable = True
|
|
2536
|
enable = True
|
|
2530
|
|
|
2537
|
|
|
2531
|
# self.specGgraphftpratio.setEnabled(enable)
|
|
2538
|
# self.specGgraphftpratio.setEnabled(enable)
|
|
2532
|
|
|
2539
|
|
|
2533
|
def __checkSpecGraphFilters(self):
|
|
2540
|
def __checkSpecGraphFilters(self):
|
|
2534
|
|
|
2541
|
|
|
2535
|
freq = False
|
|
2542
|
freq = False
|
|
2536
|
height = False
|
|
2543
|
height = False
|
|
2537
|
db = False
|
|
2544
|
db = False
|
|
2538
|
timerange = False
|
|
2545
|
timerange = False
|
|
2539
|
magnitud = False
|
|
2546
|
magnitud = False
|
|
2540
|
phase = False
|
|
2547
|
phase = False
|
|
2541
|
channelList = False
|
|
2548
|
channelList = False
|
|
2542
|
|
|
2549
|
|
|
2543
|
if self.specGraphCebSpectraplot.checkState():
|
|
2550
|
if self.specGraphCebSpectraplot.checkState():
|
|
2544
|
freq = True
|
|
2551
|
freq = True
|
|
2545
|
height = True
|
|
2552
|
height = True
|
|
2546
|
db = True
|
|
2553
|
db = True
|
|
2547
|
channelList = True
|
|
2554
|
channelList = True
|
|
2548
|
|
|
2555
|
|
|
2549
|
if self.specGraphCebCrossSpectraplot.checkState():
|
|
2556
|
if self.specGraphCebCrossSpectraplot.checkState():
|
|
2550
|
freq = True
|
|
2557
|
freq = True
|
|
2551
|
height = True
|
|
2558
|
height = True
|
|
2552
|
db = True
|
|
2559
|
db = True
|
|
2553
|
magnitud = True
|
|
2560
|
magnitud = True
|
|
2554
|
phase = True
|
|
2561
|
phase = True
|
|
2555
|
|
|
2562
|
|
|
2556
|
if self.specGraphCebRTIplot.checkState():
|
|
2563
|
if self.specGraphCebRTIplot.checkState():
|
|
2557
|
height = True
|
|
2564
|
height = True
|
|
2558
|
db = True
|
|
2565
|
db = True
|
|
2559
|
timerange = True
|
|
2566
|
timerange = True
|
|
2560
|
channelList = True
|
|
2567
|
channelList = True
|
|
2561
|
|
|
2568
|
|
|
2562
|
if self.specGraphCebCoherencmap.checkState():
|
|
2569
|
if self.specGraphCebCoherencmap.checkState():
|
|
2563
|
height = True
|
|
2570
|
height = True
|
|
2564
|
timerange = True
|
|
2571
|
timerange = True
|
|
2565
|
magnitud = True
|
|
2572
|
magnitud = True
|
|
2566
|
phase = True
|
|
2573
|
phase = True
|
|
2567
|
|
|
2574
|
|
|
2568
|
if self.specGraphPowerprofile.checkState():
|
|
2575
|
if self.specGraphPowerprofile.checkState():
|
|
2569
|
height = True
|
|
2576
|
height = True
|
|
2570
|
db = True
|
|
2577
|
db = True
|
|
2571
|
channelList = True
|
|
2578
|
channelList = True
|
|
2572
|
|
|
2579
|
|
|
2573
|
if self.specGraphCebRTInoise.checkState():
|
|
2580
|
if self.specGraphCebRTInoise.checkState():
|
|
2574
|
db = True
|
|
2581
|
db = True
|
|
2575
|
timerange = True
|
|
2582
|
timerange = True
|
|
2576
|
channelList = True
|
|
2583
|
channelList = True
|
|
2577
|
|
|
2584
|
|
|
2578
|
|
|
2585
|
|
|
2579
|
self.specGgraphFreq.setEnabled(freq)
|
|
2586
|
self.specGgraphFreq.setEnabled(freq)
|
|
2580
|
self.specGgraphHeight.setEnabled(height)
|
|
2587
|
self.specGgraphHeight.setEnabled(height)
|
|
2581
|
self.specGgraphDbsrange.setEnabled(db)
|
|
2588
|
self.specGgraphDbsrange.setEnabled(db)
|
|
2582
|
self.specGgraphTminTmax.setEnabled(timerange)
|
|
2589
|
self.specGgraphTminTmax.setEnabled(timerange)
|
|
|
|
|
2590
|
self.specGgraphTimeRange.setEnabled(timerange)
|
|
2583
|
|
|
2591
|
|
|
2584
|
self.specGgraphmagnitud.setEnabled(magnitud)
|
|
2592
|
self.specGgraphmagnitud.setEnabled(magnitud)
|
|
2585
|
self.specGgraphPhase.setEnabled(phase)
|
|
2593
|
self.specGgraphPhase.setEnabled(phase)
|
|
2586
|
self.specGgraphChannelList.setEnabled(channelList)
|
|
2594
|
self.specGgraphChannelList.setEnabled(channelList)
|
|
2587
|
|
|
2595
|
|
|
2588
|
def __getParmsFromProjectWindow(self):
|
|
2596
|
def __getParmsFromProjectWindow(self):
|
|
2589
|
"""
|
|
2597
|
"""
|
|
2590
|
Check Inputs Project:
|
|
2598
|
Check Inputs Project:
|
|
2591
|
- project_name
|
|
2599
|
- project_name
|
|
2592
|
- datatype
|
|
2600
|
- datatype
|
|
2593
|
- ext
|
|
2601
|
- ext
|
|
2594
|
- data_path
|
|
2602
|
- data_path
|
|
2595
|
- readmode
|
|
2603
|
- readmode
|
|
2596
|
- delay
|
|
2604
|
- delay
|
|
2597
|
- set
|
|
2605
|
- set
|
|
2598
|
- walk
|
|
2606
|
- walk
|
|
2599
|
"""
|
|
2607
|
"""
|
|
2600
|
parms_ok = True
|
|
2608
|
parms_ok = True
|
|
2601
|
|
|
2609
|
|
|
2602
|
project_name = str(self.proName.text())
|
|
2610
|
project_name = str(self.proName.text())
|
|
2603
|
|
|
2611
|
|
|
2604
|
if project_name == '' or project_name == None:
|
|
2612
|
if project_name == '' or project_name == None:
|
|
2605
|
outputstr = "Enter a project Name"
|
|
2613
|
outputstr = "Enter a project Name"
|
|
2606
|
self.console.append(outputstr)
|
|
2614
|
self.console.append(outputstr)
|
|
2607
|
parms_ok = False
|
|
2615
|
parms_ok = False
|
|
2608
|
project_name = None
|
|
2616
|
project_name = None
|
|
2609
|
|
|
2617
|
|
|
2610
|
description = str(self.proDescription.toPlainText())
|
|
2618
|
description = str(self.proDescription.toPlainText())
|
|
2611
|
|
|
2619
|
|
|
2612
|
datatype = str(self.proComDataType.currentText())
|
|
2620
|
datatype = str(self.proComDataType.currentText())
|
|
2613
|
|
|
2621
|
|
|
2614
|
ext = str(self.proDataType.text())
|
|
2622
|
ext = str(self.proDataType.text())
|
|
2615
|
|
|
2623
|
|
|
2616
|
dpath = str(self.proDataPath.text())
|
|
2624
|
dpath = str(self.proDataPath.text())
|
|
2617
|
|
|
2625
|
|
|
2618
|
if dpath == '':
|
|
2626
|
if dpath == '':
|
|
2619
|
outputstr = 'Datapath is empty'
|
|
2627
|
outputstr = 'Datapath is empty'
|
|
2620
|
self.console.append(outputstr)
|
|
2628
|
self.console.append(outputstr)
|
|
2621
|
parms_ok = False
|
|
2629
|
parms_ok = False
|
|
2622
|
dpath = None
|
|
2630
|
dpath = None
|
|
2623
|
|
|
2631
|
|
|
2624
|
if dpath != None:
|
|
2632
|
if dpath != None:
|
|
2625
|
if not os.path.isdir(dpath):
|
|
2633
|
if not os.path.isdir(dpath):
|
|
2626
|
outputstr = 'Datapath (%s) does not exist' % dpath
|
|
2634
|
outputstr = 'Datapath (%s) does not exist' % dpath
|
|
2627
|
self.console.append(outputstr)
|
|
2635
|
self.console.append(outputstr)
|
|
2628
|
parms_ok = False
|
|
2636
|
parms_ok = False
|
|
2629
|
dpath = None
|
|
2637
|
dpath = None
|
|
2630
|
|
|
2638
|
|
|
2631
|
online = int(self.proComReadMode.currentIndex())
|
|
2639
|
online = int(self.proComReadMode.currentIndex())
|
|
2632
|
|
|
2640
|
|
|
2633
|
delay = None
|
|
2641
|
delay = None
|
|
2634
|
if online==1:
|
|
2642
|
if online==1:
|
|
2635
|
try:
|
|
2643
|
try:
|
|
2636
|
delay = int(str(self.proDelay.text()))
|
|
2644
|
delay = int(str(self.proDelay.text()))
|
|
2637
|
except:
|
|
2645
|
except:
|
|
2638
|
outputstr = 'Delay value (%s) must be a integer number' %str(self.proDelay.text())
|
|
2646
|
outputstr = 'Delay value (%s) must be a integer number' %str(self.proDelay.text())
|
|
2639
|
self.console.append(outputstr)
|
|
2647
|
self.console.append(outputstr)
|
|
2640
|
parms_ok = False
|
|
2648
|
parms_ok = False
|
|
2641
|
|
|
2649
|
|
|
2642
|
|
|
2650
|
|
|
2643
|
set = None
|
|
2651
|
set = None
|
|
2644
|
value = str(self.proSet.text())
|
|
2652
|
value = str(self.proSet.text())
|
|
2645
|
try:
|
|
2653
|
try:
|
|
2646
|
set = int(value)
|
|
2654
|
set = int(value)
|
|
2647
|
except:
|
|
2655
|
except:
|
|
2648
|
pass
|
|
2656
|
pass
|
|
2649
|
|
|
2657
|
|
|
2650
|
ippKm = None
|
|
2658
|
ippKm = None
|
|
2651
|
|
|
2659
|
|
|
2652
|
value = str(self.proIPPKm.text())
|
|
2660
|
value = str(self.proIPPKm.text())
|
|
2653
|
|
|
2661
|
|
|
2654
|
try:
|
|
2662
|
try:
|
|
2655
|
ippKm = float(value)
|
|
2663
|
ippKm = float(value)
|
|
2656
|
except:
|
|
2664
|
except:
|
|
2657
|
if datatype=="USRP":
|
|
2665
|
if datatype=="USRP":
|
|
2658
|
outputstr = 'IPP value "%s" must be a float number' % str(self.proIPPKm.text())
|
|
2666
|
outputstr = 'IPP value "%s" must be a float number' % str(self.proIPPKm.text())
|
|
2659
|
self.console.append(outputstr)
|
|
2667
|
self.console.append(outputstr)
|
|
2660
|
parms_ok = False
|
|
2668
|
parms_ok = False
|
|
2661
|
|
|
2669
|
|
|
2662
|
walk = int(self.proComWalk.currentIndex())
|
|
2670
|
walk = int(self.proComWalk.currentIndex())
|
|
2663
|
expLabel = str(self.proExpLabel.text())
|
|
2671
|
expLabel = str(self.proExpLabel.text())
|
|
2664
|
|
|
2672
|
|
|
2665
|
startDate = str(self.proComStartDate.currentText()).strip()
|
|
2673
|
startDate = str(self.proComStartDate.currentText()).strip()
|
|
2666
|
endDate = str(self.proComEndDate.currentText()).strip()
|
|
2674
|
endDate = str(self.proComEndDate.currentText()).strip()
|
|
2667
|
|
|
2675
|
|
|
2668
|
if not startDate:
|
|
2676
|
if not startDate:
|
|
2669
|
parms_ok = False
|
|
2677
|
parms_ok = False
|
|
2670
|
|
|
2678
|
|
|
2671
|
if not endDate:
|
|
2679
|
if not endDate:
|
|
2672
|
parms_ok = False
|
|
2680
|
parms_ok = False
|
|
2673
|
|
|
2681
|
|
|
2674
|
# startDateList = startDate.split("/")
|
|
2682
|
# startDateList = startDate.split("/")
|
|
2675
|
# endDateList = endDate.split("/")
|
|
2683
|
# endDateList = endDate.split("/")
|
|
2676
|
#
|
|
2684
|
#
|
|
2677
|
# startDate = datetime.date(int(startDateList[0]), int(startDateList[1]), int(startDateList[2]))
|
|
2685
|
# startDate = datetime.date(int(startDateList[0]), int(startDateList[1]), int(startDateList[2]))
|
|
2678
|
# endDate = datetime.date(int(endDateList[0]), int(endDateList[1]), int(endDateList[2]))
|
|
2686
|
# endDate = datetime.date(int(endDateList[0]), int(endDateList[1]), int(endDateList[2]))
|
|
2679
|
|
|
2687
|
|
|
2680
|
startTime = self.proStartTime.time()
|
|
2688
|
startTime = self.proStartTime.time()
|
|
2681
|
endTime = self.proEndTime.time()
|
|
2689
|
endTime = self.proEndTime.time()
|
|
2682
|
|
|
2690
|
|
|
2683
|
startTime = str(startTime.toString("H:m:s"))
|
|
2691
|
startTime = str(startTime.toString("H:m:s"))
|
|
2684
|
endTime = str(endTime.toString("H:m:s"))
|
|
2692
|
endTime = str(endTime.toString("H:m:s"))
|
|
2685
|
|
|
2693
|
|
|
2686
|
projectParms = ProjectParms()
|
|
2694
|
projectParms = ProjectParms()
|
|
2687
|
|
|
2695
|
|
|
2688
|
projectParms.name = project_name
|
|
2696
|
projectParms.name = project_name
|
|
2689
|
projectParms.description = description
|
|
2697
|
projectParms.description = description
|
|
2690
|
projectParms.datatype = datatype
|
|
2698
|
projectParms.datatype = datatype
|
|
2691
|
projectParms.ext = ext
|
|
2699
|
projectParms.ext = ext
|
|
2692
|
projectParms.dpath = dpath
|
|
2700
|
projectParms.dpath = dpath
|
|
2693
|
projectParms.online = online
|
|
2701
|
projectParms.online = online
|
|
2694
|
projectParms.startDate = startDate
|
|
2702
|
projectParms.startDate = startDate
|
|
2695
|
projectParms.endDate = endDate
|
|
2703
|
projectParms.endDate = endDate
|
|
2696
|
projectParms.startTime = startTime
|
|
2704
|
projectParms.startTime = startTime
|
|
2697
|
projectParms.endTime = endTime
|
|
2705
|
projectParms.endTime = endTime
|
|
2698
|
projectParms.delay = delay
|
|
2706
|
projectParms.delay = delay
|
|
2699
|
projectParms.walk = walk
|
|
2707
|
projectParms.walk = walk
|
|
2700
|
projectParms.expLabel = expLabel
|
|
2708
|
projectParms.expLabel = expLabel
|
|
2701
|
projectParms.set = set
|
|
2709
|
projectParms.set = set
|
|
2702
|
projectParms.ippKm = ippKm
|
|
2710
|
projectParms.ippKm = ippKm
|
|
2703
|
projectParms.parmsOk = parms_ok
|
|
2711
|
projectParms.parmsOk = parms_ok
|
|
2704
|
|
|
2712
|
|
|
2705
|
return projectParms
|
|
2713
|
return projectParms
|
|
2706
|
|
|
2714
|
|
|
2707
|
|
|
2715
|
|
|
2708
|
def __getParmsFromProjectObj(self, projectObjView):
|
|
2716
|
def __getParmsFromProjectObj(self, projectObjView):
|
|
2709
|
|
|
2717
|
|
|
2710
|
parms_ok = True
|
|
2718
|
parms_ok = True
|
|
2711
|
|
|
2719
|
|
|
2712
|
project_name, description = projectObjView.name, projectObjView.description
|
|
2720
|
project_name, description = projectObjView.name, projectObjView.description
|
|
2713
|
|
|
2721
|
|
|
2714
|
readUnitObj = projectObjView.getReadUnitObj()
|
|
2722
|
readUnitObj = projectObjView.getReadUnitObj()
|
|
2715
|
datatype = readUnitObj.datatype
|
|
2723
|
datatype = readUnitObj.datatype
|
|
2716
|
|
|
2724
|
|
|
2717
|
operationObj = readUnitObj.getOperationObj(name='run')
|
|
2725
|
operationObj = readUnitObj.getOperationObj(name='run')
|
|
2718
|
|
|
2726
|
|
|
2719
|
dpath = operationObj.getParameterValue(parameterName='path')
|
|
2727
|
dpath = operationObj.getParameterValue(parameterName='path')
|
|
2720
|
startDate = operationObj.getParameterValue(parameterName='startDate')
|
|
2728
|
startDate = operationObj.getParameterValue(parameterName='startDate')
|
|
2721
|
endDate = operationObj.getParameterValue(parameterName='endDate')
|
|
2729
|
endDate = operationObj.getParameterValue(parameterName='endDate')
|
|
2722
|
|
|
2730
|
|
|
2723
|
startDate = startDate.strftime("%Y/%m/%d")
|
|
2731
|
startDate = startDate.strftime("%Y/%m/%d")
|
|
2724
|
endDate = endDate.strftime("%Y/%m/%d")
|
|
2732
|
endDate = endDate.strftime("%Y/%m/%d")
|
|
2725
|
|
|
2733
|
|
|
2726
|
startTime = operationObj.getParameterValue(parameterName='startTime')
|
|
2734
|
startTime = operationObj.getParameterValue(parameterName='startTime')
|
|
2727
|
endTime = operationObj.getParameterValue(parameterName='endTime')
|
|
2735
|
endTime = operationObj.getParameterValue(parameterName='endTime')
|
|
2728
|
|
|
2736
|
|
|
2729
|
startTime = startTime.strftime("%H:%M:%S")
|
|
2737
|
startTime = startTime.strftime("%H:%M:%S")
|
|
2730
|
endTime = endTime.strftime("%H:%M:%S")
|
|
2738
|
endTime = endTime.strftime("%H:%M:%S")
|
|
2731
|
|
|
2739
|
|
|
2732
|
online = 0
|
|
2740
|
online = 0
|
|
2733
|
try:
|
|
2741
|
try:
|
|
2734
|
online = operationObj.getParameterValue(parameterName='online')
|
|
2742
|
online = operationObj.getParameterValue(parameterName='online')
|
|
2735
|
except:
|
|
2743
|
except:
|
|
2736
|
pass
|
|
2744
|
pass
|
|
2737
|
|
|
2745
|
|
|
2738
|
delay = ''
|
|
2746
|
delay = ''
|
|
2739
|
try:
|
|
2747
|
try:
|
|
2740
|
delay = operationObj.getParameterValue(parameterName='delay')
|
|
2748
|
delay = operationObj.getParameterValue(parameterName='delay')
|
|
2741
|
except:
|
|
2749
|
except:
|
|
2742
|
pass
|
|
2750
|
pass
|
|
2743
|
|
|
2751
|
|
|
2744
|
walk = 0
|
|
2752
|
walk = 0
|
|
2745
|
try:
|
|
2753
|
try:
|
|
2746
|
walk = operationObj.getParameterValue(parameterName='walk')
|
|
2754
|
walk = operationObj.getParameterValue(parameterName='walk')
|
|
2747
|
except:
|
|
2755
|
except:
|
|
2748
|
pass
|
|
2756
|
pass
|
|
2749
|
|
|
2757
|
|
|
2750
|
set = ''
|
|
2758
|
set = ''
|
|
2751
|
try:
|
|
2759
|
try:
|
|
2752
|
set = operationObj.getParameterValue(parameterName='set')
|
|
2760
|
set = operationObj.getParameterValue(parameterName='set')
|
|
2753
|
except:
|
|
2761
|
except:
|
|
2754
|
pass
|
|
2762
|
pass
|
|
2755
|
|
|
2763
|
|
|
2756
|
expLabel = ''
|
|
2764
|
expLabel = ''
|
|
2757
|
try:
|
|
2765
|
try:
|
|
2758
|
expLabel = operationObj.getParameterValue(parameterName='expLabel')
|
|
2766
|
expLabel = operationObj.getParameterValue(parameterName='expLabel')
|
|
2759
|
except:
|
|
2767
|
except:
|
|
2760
|
pass
|
|
2768
|
pass
|
|
2761
|
|
|
2769
|
|
|
2762
|
ippKm = ''
|
|
2770
|
ippKm = ''
|
|
2763
|
if datatype.lower() == 'usrp':
|
|
2771
|
if datatype.lower() == 'usrp':
|
|
2764
|
try:
|
|
2772
|
try:
|
|
2765
|
ippKm = operationObj.getParameterValue(parameterName='ippKm')
|
|
2773
|
ippKm = operationObj.getParameterValue(parameterName='ippKm')
|
|
2766
|
except:
|
|
2774
|
except:
|
|
2767
|
pass
|
|
2775
|
pass
|
|
2768
|
|
|
2776
|
|
|
2769
|
projectParms = ProjectParms()
|
|
2777
|
projectParms = ProjectParms()
|
|
2770
|
|
|
2778
|
|
|
2771
|
projectParms.name = project_name
|
|
2779
|
projectParms.name = project_name
|
|
2772
|
projectParms.description = description
|
|
2780
|
projectParms.description = description
|
|
2773
|
projectParms.datatype = datatype
|
|
2781
|
projectParms.datatype = datatype
|
|
2774
|
projectParms.ext = None
|
|
2782
|
projectParms.ext = None
|
|
2775
|
projectParms.dpath = dpath
|
|
2783
|
projectParms.dpath = dpath
|
|
2776
|
projectParms.online = online
|
|
2784
|
projectParms.online = online
|
|
2777
|
projectParms.startDate = startDate
|
|
2785
|
projectParms.startDate = startDate
|
|
2778
|
projectParms.endDate = endDate
|
|
2786
|
projectParms.endDate = endDate
|
|
2779
|
projectParms.startTime = startTime
|
|
2787
|
projectParms.startTime = startTime
|
|
2780
|
projectParms.endTime = endTime
|
|
2788
|
projectParms.endTime = endTime
|
|
2781
|
projectParms.delay=delay
|
|
2789
|
projectParms.delay=delay
|
|
2782
|
projectParms.walk=walk
|
|
2790
|
projectParms.walk=walk
|
|
2783
|
projectParms.set=set
|
|
2791
|
projectParms.set=set
|
|
2784
|
projectParms.ippKm=ippKm
|
|
2792
|
projectParms.ippKm=ippKm
|
|
2785
|
projectParms.expLabel = expLabel
|
|
2793
|
projectParms.expLabel = expLabel
|
|
2786
|
projectParms.parmsOk=parms_ok
|
|
2794
|
projectParms.parmsOk=parms_ok
|
|
2787
|
|
|
2795
|
|
|
2788
|
return projectParms
|
|
2796
|
return projectParms
|
|
2789
|
|
|
2797
|
|
|
2790
|
def refreshProjectWindow(self, projectObjView):
|
|
2798
|
def refreshProjectWindow(self, projectObjView):
|
|
2791
|
|
|
2799
|
|
|
2792
|
self.proOk.setEnabled(False)
|
|
2800
|
self.proOk.setEnabled(False)
|
|
2793
|
|
|
2801
|
|
|
2794
|
projectParms = self.__getParmsFromProjectObj(projectObjView)
|
|
2802
|
projectParms = self.__getParmsFromProjectObj(projectObjView)
|
|
2795
|
|
|
2803
|
|
|
2796
|
index = projectParms.getDatatypeIndex()
|
|
2804
|
index = projectParms.getDatatypeIndex()
|
|
2797
|
|
|
2805
|
|
|
2798
|
self.proName.setText(projectParms.name)
|
|
2806
|
self.proName.setText(projectParms.name)
|
|
2799
|
self.proDescription.clear()
|
|
2807
|
self.proDescription.clear()
|
|
2800
|
self.proDescription.append(projectParms.description)
|
|
2808
|
self.proDescription.append(projectParms.description)
|
|
2801
|
|
|
2809
|
|
|
2802
|
self.on_proComDataType_activated(index=index)
|
|
2810
|
self.on_proComDataType_activated(index=index)
|
|
2803
|
self.proDataPath.setText(projectParms.dpath)
|
|
2811
|
self.proDataPath.setText(projectParms.dpath)
|
|
2804
|
self.proComDataType.setCurrentIndex(index)
|
|
2812
|
self.proComDataType.setCurrentIndex(index)
|
|
2805
|
self.proComReadMode.setCurrentIndex(projectParms.online)
|
|
2813
|
self.proComReadMode.setCurrentIndex(projectParms.online)
|
|
2806
|
self.proDelay.setText(str(projectParms.delay))
|
|
2814
|
self.proDelay.setText(str(projectParms.delay))
|
|
2807
|
self.proSet.setText(str(projectParms.set))
|
|
2815
|
self.proSet.setText(str(projectParms.set))
|
|
2808
|
self.proIPPKm.setText(str(projectParms.ippKm))
|
|
2816
|
self.proIPPKm.setText(str(projectParms.ippKm))
|
|
2809
|
self.proComWalk.setCurrentIndex(projectParms.walk)
|
|
2817
|
self.proComWalk.setCurrentIndex(projectParms.walk)
|
|
2810
|
self.proExpLabel.setText(str(projectParms.expLabel).strip())
|
|
2818
|
self.proExpLabel.setText(str(projectParms.expLabel).strip())
|
|
2811
|
|
|
2819
|
|
|
2812
|
self.on_proComReadMode_activated(projectParms.online)
|
|
2820
|
self.on_proComReadMode_activated(projectParms.online)
|
|
2813
|
self.on_proComWalk_activated(projectParms.walk)
|
|
2821
|
self.on_proComWalk_activated(projectParms.walk)
|
|
2814
|
|
|
2822
|
|
|
2815
|
dateList = self.loadDays(data_path = projectParms.dpath,
|
|
2823
|
dateList = self.loadDays(data_path = projectParms.dpath,
|
|
2816
|
ext = projectParms.getExt(),
|
|
2824
|
ext = projectParms.getExt(),
|
|
2817
|
walk = projectParms.walk,
|
|
2825
|
walk = projectParms.walk,
|
|
2818
|
expLabel = projectParms.expLabel)
|
|
2826
|
expLabel = projectParms.expLabel)
|
|
2819
|
|
|
2827
|
|
|
2820
|
if not dateList:
|
|
2828
|
if not dateList:
|
|
2821
|
return 0
|
|
2829
|
return 0
|
|
2822
|
|
|
2830
|
|
|
2823
|
try:
|
|
2831
|
try:
|
|
2824
|
startDateIndex = dateList.index(projectParms.startDate)
|
|
2832
|
startDateIndex = dateList.index(projectParms.startDate)
|
|
2825
|
except:
|
|
2833
|
except:
|
|
2826
|
startDateIndex = 0
|
|
2834
|
startDateIndex = 0
|
|
2827
|
|
|
2835
|
|
|
2828
|
try:
|
|
2836
|
try:
|
|
2829
|
endDateIndex = dateList.index(projectParms.endDate)
|
|
2837
|
endDateIndex = dateList.index(projectParms.endDate)
|
|
2830
|
except:
|
|
2838
|
except:
|
|
2831
|
endDateIndex = int(self.proComEndDate.count()-1)
|
|
2839
|
endDateIndex = int(self.proComEndDate.count()-1)
|
|
2832
|
|
|
2840
|
|
|
2833
|
self.proComStartDate.setCurrentIndex(startDateIndex)
|
|
2841
|
self.proComStartDate.setCurrentIndex(startDateIndex)
|
|
2834
|
self.proComEndDate.setCurrentIndex(endDateIndex)
|
|
2842
|
self.proComEndDate.setCurrentIndex(endDateIndex)
|
|
2835
|
|
|
2843
|
|
|
2836
|
startlist = projectParms.startTime.split(":")
|
|
2844
|
startlist = projectParms.startTime.split(":")
|
|
2837
|
endlist = projectParms.endTime.split(":")
|
|
2845
|
endlist = projectParms.endTime.split(":")
|
|
2838
|
|
|
2846
|
|
|
2839
|
self.time.setHMS(int(startlist[0]), int(startlist[1]), int(startlist[2]))
|
|
2847
|
self.time.setHMS(int(startlist[0]), int(startlist[1]), int(startlist[2]))
|
|
2840
|
self.proStartTime.setTime(self.time)
|
|
2848
|
self.proStartTime.setTime(self.time)
|
|
2841
|
|
|
2849
|
|
|
2842
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
2850
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
2843
|
self.proEndTime.setTime(self.time)
|
|
2851
|
self.proEndTime.setTime(self.time)
|
|
2844
|
|
|
2852
|
|
|
2845
|
self.proOk.setEnabled(True)
|
|
2853
|
self.proOk.setEnabled(True)
|
|
2846
|
|
|
2854
|
|
|
2847
|
return 1
|
|
2855
|
return 1
|
|
2848
|
|
|
2856
|
|
|
2849
|
def __refreshVoltageWindow(self, puObj):
|
|
2857
|
def __refreshVoltageWindow(self, puObj):
|
|
2850
|
|
|
2858
|
|
|
2851
|
opObj = puObj.getOperationObj(name='setRadarFrequency')
|
|
2859
|
opObj = puObj.getOperationObj(name='setRadarFrequency')
|
|
2852
|
if opObj == None:
|
|
2860
|
if opObj == None:
|
|
2853
|
self.volOpRadarfrequency.clear()
|
|
2861
|
self.volOpRadarfrequency.clear()
|
|
2854
|
self.volOpCebRadarfrequency.setCheckState(0)
|
|
2862
|
self.volOpCebRadarfrequency.setCheckState(0)
|
|
2855
|
else:
|
|
2863
|
else:
|
|
2856
|
value = opObj.getParameterValue(parameterName='frequency')
|
|
2864
|
value = opObj.getParameterValue(parameterName='frequency')
|
|
2857
|
value = str(float(value)/1e6)
|
|
2865
|
value = str(float(value)/1e6)
|
|
2858
|
self.volOpRadarfrequency.setText(value)
|
|
2866
|
self.volOpRadarfrequency.setText(value)
|
|
2859
|
self.volOpRadarfrequency.setEnabled(True)
|
|
2867
|
self.volOpRadarfrequency.setEnabled(True)
|
|
2860
|
self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked)
|
|
2868
|
self.volOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked)
|
|
2861
|
|
|
2869
|
|
|
2862
|
opObj = puObj.getOperationObj(name="selectChannels")
|
|
2870
|
opObj = puObj.getOperationObj(name="selectChannels")
|
|
2863
|
|
|
2871
|
|
|
2864
|
if opObj == None:
|
|
2872
|
if opObj == None:
|
|
2865
|
opObj = puObj.getOperationObj(name="selectChannelsByIndex")
|
|
2873
|
opObj = puObj.getOperationObj(name="selectChannelsByIndex")
|
|
2866
|
|
|
2874
|
|
|
2867
|
if opObj == None:
|
|
2875
|
if opObj == None:
|
|
2868
|
self.volOpChannel.clear()
|
|
2876
|
self.volOpChannel.clear()
|
|
2869
|
self.volOpCebChannels.setCheckState(0)
|
|
2877
|
self.volOpCebChannels.setCheckState(0)
|
|
2870
|
else:
|
|
2878
|
else:
|
|
2871
|
channelEnabled = False
|
|
2879
|
channelEnabled = False
|
|
2872
|
try:
|
|
2880
|
try:
|
|
2873
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
2881
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
2874
|
value = str(value)[1:-1]
|
|
2882
|
value = str(value)[1:-1]
|
|
2875
|
channelEnabled = True
|
|
2883
|
channelEnabled = True
|
|
2876
|
channelMode = 0
|
|
2884
|
channelMode = 0
|
|
2877
|
except:
|
|
2885
|
except:
|
|
2878
|
pass
|
|
2886
|
pass
|
|
2879
|
try:
|
|
2887
|
try:
|
|
2880
|
value = opObj.getParameterValue(parameterName='channelIndexList')
|
|
2888
|
value = opObj.getParameterValue(parameterName='channelIndexList')
|
|
2881
|
value = str(value)[1:-1]
|
|
2889
|
value = str(value)[1:-1]
|
|
2882
|
channelEnabled = True
|
|
2890
|
channelEnabled = True
|
|
2883
|
channelMode = 1
|
|
2891
|
channelMode = 1
|
|
2884
|
except:
|
|
2892
|
except:
|
|
2885
|
pass
|
|
2893
|
pass
|
|
2886
|
|
|
2894
|
|
|
2887
|
if channelEnabled:
|
|
2895
|
if channelEnabled:
|
|
2888
|
self.volOpChannel.setText(value)
|
|
2896
|
self.volOpChannel.setText(value)
|
|
2889
|
self.volOpChannel.setEnabled(True)
|
|
2897
|
self.volOpChannel.setEnabled(True)
|
|
2890
|
self.volOpCebChannels.setCheckState(QtCore.Qt.Checked)
|
|
2898
|
self.volOpCebChannels.setCheckState(QtCore.Qt.Checked)
|
|
2891
|
self.volOpComChannels.setCurrentIndex(channelMode)
|
|
2899
|
self.volOpComChannels.setCurrentIndex(channelMode)
|
|
2892
|
|
|
2900
|
|
|
2893
|
opObj = puObj.getOperationObj(name="selectHeights")
|
|
2901
|
opObj = puObj.getOperationObj(name="selectHeights")
|
|
2894
|
if opObj == None:
|
|
2902
|
if opObj == None:
|
|
2895
|
self.volOpHeights.clear()
|
|
2903
|
self.volOpHeights.clear()
|
|
2896
|
self.volOpCebHeights.setCheckState(0)
|
|
2904
|
self.volOpCebHeights.setCheckState(0)
|
|
2897
|
else:
|
|
2905
|
else:
|
|
2898
|
value1 = str(opObj.getParameterValue(parameterName='minHei'))
|
|
2906
|
value1 = str(opObj.getParameterValue(parameterName='minHei'))
|
|
2899
|
value2 = str(opObj.getParameterValue(parameterName='maxHei'))
|
|
2907
|
value2 = str(opObj.getParameterValue(parameterName='maxHei'))
|
|
2900
|
value = value1 + "," + value2
|
|
2908
|
value = value1 + "," + value2
|
|
2901
|
self.volOpHeights.setText(value)
|
|
2909
|
self.volOpHeights.setText(value)
|
|
2902
|
self.volOpHeights.setEnabled(True)
|
|
2910
|
self.volOpHeights.setEnabled(True)
|
|
2903
|
self.volOpCebHeights.setCheckState(QtCore.Qt.Checked)
|
|
2911
|
self.volOpCebHeights.setCheckState(QtCore.Qt.Checked)
|
|
2904
|
|
|
2912
|
|
|
2905
|
opObj = puObj.getOperationObj(name="filterByHeights")
|
|
2913
|
opObj = puObj.getOperationObj(name="filterByHeights")
|
|
2906
|
if opObj == None:
|
|
2914
|
if opObj == None:
|
|
2907
|
self.volOpFilter.clear()
|
|
2915
|
self.volOpFilter.clear()
|
|
2908
|
self.volOpCebFilter.setCheckState(0)
|
|
2916
|
self.volOpCebFilter.setCheckState(0)
|
|
2909
|
else:
|
|
2917
|
else:
|
|
2910
|
value = opObj.getParameterValue(parameterName='window')
|
|
2918
|
value = opObj.getParameterValue(parameterName='window')
|
|
2911
|
value = str(value)
|
|
2919
|
value = str(value)
|
|
2912
|
self.volOpFilter.setText(value)
|
|
2920
|
self.volOpFilter.setText(value)
|
|
2913
|
self.volOpFilter.setEnabled(True)
|
|
2921
|
self.volOpFilter.setEnabled(True)
|
|
2914
|
self.volOpCebFilter.setCheckState(QtCore.Qt.Checked)
|
|
2922
|
self.volOpCebFilter.setCheckState(QtCore.Qt.Checked)
|
|
2915
|
|
|
2923
|
|
|
2916
|
opObj = puObj.getOperationObj(name="ProfileSelector")
|
|
2924
|
opObj = puObj.getOperationObj(name="ProfileSelector")
|
|
2917
|
if opObj == None:
|
|
2925
|
if opObj == None:
|
|
2918
|
self.volOpProfile.clear()
|
|
2926
|
self.volOpProfile.clear()
|
|
2919
|
self.volOpCebProfile.setCheckState(0)
|
|
2927
|
self.volOpCebProfile.setCheckState(0)
|
|
2920
|
else:
|
|
2928
|
else:
|
|
2921
|
for parmObj in opObj.getParameterObjList():
|
|
2929
|
for parmObj in opObj.getParameterObjList():
|
|
2922
|
|
|
2930
|
|
|
2923
|
if parmObj.name == "profileList":
|
|
2931
|
if parmObj.name == "profileList":
|
|
2924
|
value = parmObj.getValue()
|
|
2932
|
value = parmObj.getValue()
|
|
2925
|
value = str(value)[1:-1]
|
|
2933
|
value = str(value)[1:-1]
|
|
2926
|
self.volOpProfile.setText(value)
|
|
2934
|
self.volOpProfile.setText(value)
|
|
2927
|
self.volOpProfile.setEnabled(True)
|
|
2935
|
self.volOpProfile.setEnabled(True)
|
|
2928
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2936
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2929
|
self.volOpComProfile.setCurrentIndex(0)
|
|
2937
|
self.volOpComProfile.setCurrentIndex(0)
|
|
2930
|
|
|
2938
|
|
|
2931
|
if parmObj.name == "profileRangeList":
|
|
2939
|
if parmObj.name == "profileRangeList":
|
|
2932
|
value = parmObj.getValue()
|
|
2940
|
value = parmObj.getValue()
|
|
2933
|
value = str(value)[1:-1]
|
|
2941
|
value = str(value)[1:-1]
|
|
2934
|
self.volOpProfile.setText(value)
|
|
2942
|
self.volOpProfile.setText(value)
|
|
2935
|
self.volOpProfile.setEnabled(True)
|
|
2943
|
self.volOpProfile.setEnabled(True)
|
|
2936
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2944
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2937
|
self.volOpComProfile.setCurrentIndex(1)
|
|
2945
|
self.volOpComProfile.setCurrentIndex(1)
|
|
2938
|
|
|
2946
|
|
|
2939
|
if parmObj.name == "rangeList":
|
|
2947
|
if parmObj.name == "rangeList":
|
|
2940
|
value = parmObj.getValue()
|
|
2948
|
value = parmObj.getValue()
|
|
2941
|
value = str(value)[1:-1]
|
|
2949
|
value = str(value)[1:-1]
|
|
2942
|
self.volOpProfile.setText(value)
|
|
2950
|
self.volOpProfile.setText(value)
|
|
2943
|
self.volOpProfile.setEnabled(True)
|
|
2951
|
self.volOpProfile.setEnabled(True)
|
|
2944
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2952
|
self.volOpCebProfile.setCheckState(QtCore.Qt.Checked)
|
|
2945
|
self.volOpComProfile.setCurrentIndex(2)
|
|
2953
|
self.volOpComProfile.setCurrentIndex(2)
|
|
2946
|
|
|
2954
|
|
|
2947
|
opObj = puObj.getOperationObj(name="Decoder")
|
|
2955
|
opObj = puObj.getOperationObj(name="Decoder")
|
|
2948
|
self.volOpCode.setText("")
|
|
2956
|
self.volOpCode.setText("")
|
|
2949
|
if opObj == None:
|
|
2957
|
if opObj == None:
|
|
2950
|
self.volOpCebDecodification.setCheckState(0)
|
|
2958
|
self.volOpCebDecodification.setCheckState(0)
|
|
2951
|
else:
|
|
2959
|
else:
|
|
2952
|
self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked)
|
|
2960
|
self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked)
|
|
2953
|
|
|
2961
|
|
|
2954
|
parmObj = opObj.getParameterObj('code')
|
|
2962
|
parmObj = opObj.getParameterObj('code')
|
|
2955
|
|
|
2963
|
|
|
2956
|
if parmObj == None:
|
|
2964
|
if parmObj == None:
|
|
2957
|
self.volOpComCode.setCurrentIndex(0)
|
|
2965
|
self.volOpComCode.setCurrentIndex(0)
|
|
2958
|
else:
|
|
2966
|
else:
|
|
2959
|
|
|
2967
|
|
|
2960
|
parmObj1 = opObj.getParameterObj('nCode')
|
|
2968
|
parmObj1 = opObj.getParameterObj('nCode')
|
|
2961
|
parmObj2 = opObj.getParameterObj('nBaud')
|
|
2969
|
parmObj2 = opObj.getParameterObj('nBaud')
|
|
2962
|
|
|
2970
|
|
|
2963
|
if parmObj1 == None or parmObj2 == None:
|
|
2971
|
if parmObj1 == None or parmObj2 == None:
|
|
2964
|
self.volOpComCode.setCurrentIndex(0)
|
|
2972
|
self.volOpComCode.setCurrentIndex(0)
|
|
2965
|
else:
|
|
2973
|
else:
|
|
2966
|
code = ast.literal_eval(str(parmObj.getValue()))
|
|
2974
|
code = ast.literal_eval(str(parmObj.getValue()))
|
|
2967
|
nCode = parmObj1.getValue()
|
|
2975
|
nCode = parmObj1.getValue()
|
|
2968
|
nBaud = parmObj2.getValue()
|
|
2976
|
nBaud = parmObj2.getValue()
|
|
2969
|
|
|
2977
|
|
|
2970
|
code = numpy.asarray(code).reshape((nCode, nBaud)).tolist()
|
|
2978
|
code = numpy.asarray(code).reshape((nCode, nBaud)).tolist()
|
|
2971
|
|
|
2979
|
|
|
2972
|
#User defined by default
|
|
2980
|
#User defined by default
|
|
2973
|
self.volOpComCode.setCurrentIndex(13)
|
|
2981
|
self.volOpComCode.setCurrentIndex(13)
|
|
2974
|
self.volOpCode.setText(str(code))
|
|
2982
|
self.volOpCode.setText(str(code))
|
|
2975
|
|
|
2983
|
|
|
2976
|
if nCode == 1:
|
|
2984
|
if nCode == 1:
|
|
2977
|
if nBaud == 3:
|
|
2985
|
if nBaud == 3:
|
|
2978
|
self.volOpComCode.setCurrentIndex(1)
|
|
2986
|
self.volOpComCode.setCurrentIndex(1)
|
|
2979
|
if nBaud == 4:
|
|
2987
|
if nBaud == 4:
|
|
2980
|
self.volOpComCode.setCurrentIndex(2)
|
|
2988
|
self.volOpComCode.setCurrentIndex(2)
|
|
2981
|
if nBaud == 5:
|
|
2989
|
if nBaud == 5:
|
|
2982
|
self.volOpComCode.setCurrentIndex(3)
|
|
2990
|
self.volOpComCode.setCurrentIndex(3)
|
|
2983
|
if nBaud == 7:
|
|
2991
|
if nBaud == 7:
|
|
2984
|
self.volOpComCode.setCurrentIndex(4)
|
|
2992
|
self.volOpComCode.setCurrentIndex(4)
|
|
2985
|
if nBaud == 11:
|
|
2993
|
if nBaud == 11:
|
|
2986
|
self.volOpComCode.setCurrentIndex(5)
|
|
2994
|
self.volOpComCode.setCurrentIndex(5)
|
|
2987
|
if nBaud == 13:
|
|
2995
|
if nBaud == 13:
|
|
2988
|
self.volOpComCode.setCurrentIndex(6)
|
|
2996
|
self.volOpComCode.setCurrentIndex(6)
|
|
2989
|
|
|
2997
|
|
|
2990
|
if nCode == 2:
|
|
2998
|
if nCode == 2:
|
|
2991
|
if nBaud == 3:
|
|
2999
|
if nBaud == 3:
|
|
2992
|
self.volOpComCode.setCurrentIndex(7)
|
|
3000
|
self.volOpComCode.setCurrentIndex(7)
|
|
2993
|
if nBaud == 4:
|
|
3001
|
if nBaud == 4:
|
|
2994
|
self.volOpComCode.setCurrentIndex(8)
|
|
3002
|
self.volOpComCode.setCurrentIndex(8)
|
|
2995
|
if nBaud == 5:
|
|
3003
|
if nBaud == 5:
|
|
2996
|
self.volOpComCode.setCurrentIndex(9)
|
|
3004
|
self.volOpComCode.setCurrentIndex(9)
|
|
2997
|
if nBaud == 7:
|
|
3005
|
if nBaud == 7:
|
|
2998
|
self.volOpComCode.setCurrentIndex(10)
|
|
3006
|
self.volOpComCode.setCurrentIndex(10)
|
|
2999
|
if nBaud == 11:
|
|
3007
|
if nBaud == 11:
|
|
3000
|
self.volOpComCode.setCurrentIndex(11)
|
|
3008
|
self.volOpComCode.setCurrentIndex(11)
|
|
3001
|
if nBaud == 13:
|
|
3009
|
if nBaud == 13:
|
|
3002
|
self.volOpComCode.setCurrentIndex(12)
|
|
3010
|
self.volOpComCode.setCurrentIndex(12)
|
|
3003
|
|
|
3011
|
|
|
3004
|
|
|
3012
|
|
|
3005
|
opObj = puObj.getOperationObj(name="deFlip")
|
|
3013
|
opObj = puObj.getOperationObj(name="deFlip")
|
|
3006
|
if opObj == None:
|
|
3014
|
if opObj == None:
|
|
3007
|
self.volOpFlip.clear()
|
|
3015
|
self.volOpFlip.clear()
|
|
3008
|
self.volOpFlip.setEnabled(False)
|
|
3016
|
self.volOpFlip.setEnabled(False)
|
|
3009
|
self.volOpCebFlip.setCheckState(0)
|
|
3017
|
self.volOpCebFlip.setCheckState(0)
|
|
3010
|
else:
|
|
3018
|
else:
|
|
3011
|
try:
|
|
3019
|
try:
|
|
3012
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3020
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3013
|
value = str(value)[1:-1]
|
|
3021
|
value = str(value)[1:-1]
|
|
3014
|
except:
|
|
3022
|
except:
|
|
3015
|
value = ""
|
|
3023
|
value = ""
|
|
3016
|
|
|
3024
|
|
|
3017
|
self.volOpFlip.setText(value)
|
|
3025
|
self.volOpFlip.setText(value)
|
|
3018
|
self.volOpFlip.setEnabled(True)
|
|
3026
|
self.volOpFlip.setEnabled(True)
|
|
3019
|
self.volOpCebFlip.setCheckState(QtCore.Qt.Checked)
|
|
3027
|
self.volOpCebFlip.setCheckState(QtCore.Qt.Checked)
|
|
3020
|
|
|
3028
|
|
|
3021
|
opObj = puObj.getOperationObj(name="CohInt")
|
|
3029
|
opObj = puObj.getOperationObj(name="CohInt")
|
|
3022
|
if opObj == None:
|
|
3030
|
if opObj == None:
|
|
3023
|
self.volOpCohInt.clear()
|
|
3031
|
self.volOpCohInt.clear()
|
|
3024
|
self.volOpCebCohInt.setCheckState(0)
|
|
3032
|
self.volOpCebCohInt.setCheckState(0)
|
|
3025
|
else:
|
|
3033
|
else:
|
|
3026
|
value = opObj.getParameterValue(parameterName='n')
|
|
3034
|
value = opObj.getParameterValue(parameterName='n')
|
|
3027
|
self.volOpCohInt.setText(str(value))
|
|
3035
|
self.volOpCohInt.setText(str(value))
|
|
3028
|
self.volOpCohInt.setEnabled(True)
|
|
3036
|
self.volOpCohInt.setEnabled(True)
|
|
3029
|
self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked)
|
|
3037
|
self.volOpCebCohInt.setCheckState(QtCore.Qt.Checked)
|
|
3030
|
|
|
3038
|
|
|
3031
|
opObj = puObj.getOperationObj(name='Scope')
|
|
3039
|
opObj = puObj.getOperationObj(name='Scope')
|
|
3032
|
if opObj == None:
|
|
3040
|
if opObj == None:
|
|
3033
|
self.volGraphCebshow.setCheckState(0)
|
|
3041
|
self.volGraphCebshow.setCheckState(0)
|
|
3034
|
else:
|
|
3042
|
else:
|
|
3035
|
self.volGraphCebshow.setCheckState(QtCore.Qt.Checked)
|
|
3043
|
self.volGraphCebshow.setCheckState(QtCore.Qt.Checked)
|
|
3036
|
|
|
3044
|
|
|
3037
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3045
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3038
|
|
|
3046
|
|
|
3039
|
if parmObj == None:
|
|
3047
|
if parmObj == None:
|
|
3040
|
self.volGraphChannelList.clear()
|
|
3048
|
self.volGraphChannelList.clear()
|
|
3041
|
else:
|
|
3049
|
else:
|
|
3042
|
value = parmObj.getValue()
|
|
3050
|
value = parmObj.getValue()
|
|
3043
|
value = str(value)
|
|
3051
|
value = str(value)
|
|
3044
|
self.volGraphChannelList.setText(value)
|
|
3052
|
self.volGraphChannelList.setText(value)
|
|
3045
|
# self.volOpChannel.setEnabled(True)
|
|
3053
|
# self.volOpChannel.setEnabled(True)
|
|
3046
|
|
|
3054
|
|
|
3047
|
parmObj1 = opObj.getParameterObj(parameterName='ymin')
|
|
3055
|
parmObj1 = opObj.getParameterObj(parameterName='ymin')
|
|
3048
|
parmObj2 = opObj.getParameterObj(parameterName='ymax')
|
|
3056
|
parmObj2 = opObj.getParameterObj(parameterName='ymax')
|
|
3049
|
|
|
3057
|
|
|
3050
|
if parmObj1 == None or parmObj2 ==None:
|
|
3058
|
if parmObj1 == None or parmObj2 ==None:
|
|
3051
|
self.volGraphIntensityRange.clear()
|
|
3059
|
self.volGraphIntensityRange.clear()
|
|
3052
|
else:
|
|
3060
|
else:
|
|
3053
|
value1 = parmObj1.getValue()
|
|
3061
|
value1 = parmObj1.getValue()
|
|
3054
|
value1 = str(value1)
|
|
3062
|
value1 = str(value1)
|
|
3055
|
value2 = parmObj2.getValue()
|
|
3063
|
value2 = parmObj2.getValue()
|
|
3056
|
value2 = str(value2)
|
|
3064
|
value2 = str(value2)
|
|
3057
|
value = value1 + "," + value2
|
|
3065
|
value = value1 + "," + value2
|
|
3058
|
self.volGraphIntensityRange.setText(value)
|
|
3066
|
self.volGraphIntensityRange.setText(value)
|
|
3059
|
|
|
3067
|
|
|
3060
|
parmObj1 = opObj.getParameterObj(parameterName='xmin')
|
|
3068
|
parmObj1 = opObj.getParameterObj(parameterName='xmin')
|
|
3061
|
parmObj2 = opObj.getParameterObj(parameterName='xmax')
|
|
3069
|
parmObj2 = opObj.getParameterObj(parameterName='xmax')
|
|
3062
|
|
|
3070
|
|
|
3063
|
if parmObj1 == None or parmObj2 ==None:
|
|
3071
|
if parmObj1 == None or parmObj2 ==None:
|
|
3064
|
self.volGraphHeightrange.clear()
|
|
3072
|
self.volGraphHeightrange.clear()
|
|
3065
|
else:
|
|
3073
|
else:
|
|
3066
|
value1 = parmObj1.getValue()
|
|
3074
|
value1 = parmObj1.getValue()
|
|
3067
|
value1 = str(value1)
|
|
3075
|
value1 = str(value1)
|
|
3068
|
value2 = parmObj2.getValue()
|
|
3076
|
value2 = parmObj2.getValue()
|
|
3069
|
value2 = str(value2)
|
|
3077
|
value2 = str(value2)
|
|
3070
|
value = value1 + "," + value2
|
|
3078
|
value = value1 + "," + value2
|
|
3071
|
value2 = str(value2)
|
|
3079
|
value2 = str(value2)
|
|
3072
|
self.volGraphHeightrange.setText(value)
|
|
3080
|
self.volGraphHeightrange.setText(value)
|
|
3073
|
|
|
3081
|
|
|
3074
|
parmObj = opObj.getParameterObj(parameterName='type')
|
|
3082
|
parmObj = opObj.getParameterObj(parameterName='type')
|
|
3075
|
|
|
3083
|
|
|
3076
|
if parmObj == None:
|
|
3084
|
if parmObj == None:
|
|
3077
|
self.volComScopeType.setCurrentIndex(0)
|
|
3085
|
self.volComScopeType.setCurrentIndex(0)
|
|
3078
|
else:
|
|
3086
|
else:
|
|
3079
|
value = parmObj.getValue()
|
|
3087
|
value = parmObj.getValue()
|
|
3080
|
if value == "iq":
|
|
3088
|
if value == "iq":
|
|
3081
|
self.volComScopeType.setCurrentIndex(0)
|
|
3089
|
self.volComScopeType.setCurrentIndex(0)
|
|
3082
|
if value == "power":
|
|
3090
|
if value == "power":
|
|
3083
|
self.volComScopeType.setCurrentIndex(1)
|
|
3091
|
self.volComScopeType.setCurrentIndex(1)
|
|
3084
|
|
|
3092
|
|
|
3085
|
parmObj = opObj.getParameterObj(parameterName='save')
|
|
3093
|
parmObj = opObj.getParameterObj(parameterName='save')
|
|
3086
|
|
|
3094
|
|
|
3087
|
if parmObj == None:
|
|
3095
|
if parmObj == None:
|
|
3088
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked)
|
|
3096
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked)
|
|
3089
|
else:
|
|
3097
|
else:
|
|
3090
|
value = parmObj.getValue()
|
|
3098
|
value = parmObj.getValue()
|
|
3091
|
if value:
|
|
3099
|
if value:
|
|
3092
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Checked)
|
|
3100
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Checked)
|
|
3093
|
else:
|
|
3101
|
else:
|
|
3094
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked)
|
|
3102
|
self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked)
|
|
3095
|
|
|
3103
|
|
|
3096
|
parmObj = opObj.getParameterObj(parameterName='figpath')
|
|
3104
|
parmObj = opObj.getParameterObj(parameterName='figpath')
|
|
3097
|
if parmObj == None:
|
|
3105
|
if parmObj == None:
|
|
3098
|
self.volGraphPath.clear()
|
|
3106
|
self.volGraphPath.clear()
|
|
3099
|
else:
|
|
3107
|
else:
|
|
3100
|
value = parmObj.getValue()
|
|
3108
|
value = parmObj.getValue()
|
|
3101
|
path = str(value)
|
|
3109
|
path = str(value)
|
|
3102
|
self.volGraphPath.setText(path)
|
|
3110
|
self.volGraphPath.setText(path)
|
|
3103
|
|
|
3111
|
|
|
3104
|
parmObj = opObj.getParameterObj(parameterName='figfile')
|
|
3112
|
parmObj = opObj.getParameterObj(parameterName='figfile')
|
|
3105
|
if parmObj == None:
|
|
3113
|
if parmObj == None:
|
|
3106
|
self.volGraphPrefix.clear()
|
|
3114
|
self.volGraphPrefix.clear()
|
|
3107
|
else:
|
|
3115
|
else:
|
|
3108
|
value = parmObj.getValue()
|
|
3116
|
value = parmObj.getValue()
|
|
3109
|
figfile = str(value)
|
|
3117
|
figfile = str(value)
|
|
3110
|
self.volGraphPrefix.setText(figfile)
|
|
3118
|
self.volGraphPrefix.setText(figfile)
|
|
3111
|
|
|
3119
|
|
|
3112
|
# outputVoltageWrite
|
|
3120
|
# outputVoltageWrite
|
|
3113
|
opObj = puObj.getOperationObj(name='VoltageWriter')
|
|
3121
|
opObj = puObj.getOperationObj(name='VoltageWriter')
|
|
3114
|
|
|
3122
|
|
|
3115
|
if opObj == None:
|
|
3123
|
if opObj == None:
|
|
3116
|
self.volOutputPath.clear()
|
|
3124
|
self.volOutputPath.clear()
|
|
3117
|
self.volOutputblocksperfile.clear()
|
|
3125
|
self.volOutputblocksperfile.clear()
|
|
3118
|
self.volOutputprofilesperblock.clear()
|
|
3126
|
self.volOutputprofilesperblock.clear()
|
|
3119
|
else:
|
|
3127
|
else:
|
|
3120
|
parmObj = opObj.getParameterObj(parameterName='path')
|
|
3128
|
parmObj = opObj.getParameterObj(parameterName='path')
|
|
3121
|
if parmObj == None:
|
|
3129
|
if parmObj == None:
|
|
3122
|
self.volOutputPath.clear()
|
|
3130
|
self.volOutputPath.clear()
|
|
3123
|
else:
|
|
3131
|
else:
|
|
3124
|
value = parmObj.getValue()
|
|
3132
|
value = parmObj.getValue()
|
|
3125
|
path = str(value)
|
|
3133
|
path = str(value)
|
|
3126
|
self.volOutputPath.setText(path)
|
|
3134
|
self.volOutputPath.setText(path)
|
|
3127
|
|
|
3135
|
|
|
3128
|
parmObj = opObj.getParameterObj(parameterName='blocksPerFile')
|
|
3136
|
parmObj = opObj.getParameterObj(parameterName='blocksPerFile')
|
|
3129
|
if parmObj == None:
|
|
3137
|
if parmObj == None:
|
|
3130
|
self.volOutputblocksperfile.clear()
|
|
3138
|
self.volOutputblocksperfile.clear()
|
|
3131
|
else:
|
|
3139
|
else:
|
|
3132
|
value = parmObj.getValue()
|
|
3140
|
value = parmObj.getValue()
|
|
3133
|
blocksperfile = str(value)
|
|
3141
|
blocksperfile = str(value)
|
|
3134
|
self.volOutputblocksperfile.setText(blocksperfile)
|
|
3142
|
self.volOutputblocksperfile.setText(blocksperfile)
|
|
3135
|
|
|
3143
|
|
|
3136
|
parmObj = opObj.getParameterObj(parameterName='profilesPerBlock')
|
|
3144
|
parmObj = opObj.getParameterObj(parameterName='profilesPerBlock')
|
|
3137
|
if parmObj == None:
|
|
3145
|
if parmObj == None:
|
|
3138
|
self.volOutputprofilesperblock.clear()
|
|
3146
|
self.volOutputprofilesperblock.clear()
|
|
3139
|
else:
|
|
3147
|
else:
|
|
3140
|
value = parmObj.getValue()
|
|
3148
|
value = parmObj.getValue()
|
|
3141
|
profilesPerBlock = str(value)
|
|
3149
|
profilesPerBlock = str(value)
|
|
3142
|
self.volOutputprofilesperblock.setText(profilesPerBlock)
|
|
3150
|
self.volOutputprofilesperblock.setText(profilesPerBlock)
|
|
3143
|
|
|
3151
|
|
|
3144
|
return
|
|
3152
|
return
|
|
3145
|
|
|
3153
|
|
|
3146
|
def __refreshSpectraWindow(self, puObj):
|
|
3154
|
def __refreshSpectraWindow(self, puObj):
|
|
3147
|
|
|
3155
|
|
|
3148
|
inputId = puObj.getInputId()
|
|
3156
|
inputId = puObj.getInputId()
|
|
3149
|
inputPUObj = self.__puObjDict[inputId]
|
|
3157
|
inputPUObj = self.__puObjDict[inputId]
|
|
3150
|
|
|
3158
|
|
|
3151
|
if inputPUObj.datatype == 'Voltage':
|
|
3159
|
if inputPUObj.datatype == 'Voltage':
|
|
3152
|
self.specOpnFFTpoints.setEnabled(True)
|
|
3160
|
self.specOpnFFTpoints.setEnabled(True)
|
|
3153
|
self.specOpProfiles.setEnabled(True)
|
|
3161
|
self.specOpProfiles.setEnabled(True)
|
|
3154
|
self.specOpippFactor.setEnabled(True)
|
|
3162
|
self.specOpippFactor.setEnabled(True)
|
|
3155
|
else:
|
|
3163
|
else:
|
|
3156
|
self.specOpnFFTpoints.setEnabled(False)
|
|
3164
|
self.specOpnFFTpoints.setEnabled(False)
|
|
3157
|
self.specOpProfiles.setEnabled(False)
|
|
3165
|
self.specOpProfiles.setEnabled(False)
|
|
3158
|
self.specOpippFactor.setEnabled(False)
|
|
3166
|
self.specOpippFactor.setEnabled(False)
|
|
3159
|
|
|
3167
|
|
|
3160
|
opObj = puObj.getOperationObj(name='setRadarFrequency')
|
|
3168
|
opObj = puObj.getOperationObj(name='setRadarFrequency')
|
|
3161
|
if opObj == None:
|
|
3169
|
if opObj == None:
|
|
3162
|
self.specOpRadarfrequency.clear()
|
|
3170
|
self.specOpRadarfrequency.clear()
|
|
3163
|
self.specOpCebRadarfrequency.setCheckState(0)
|
|
3171
|
self.specOpCebRadarfrequency.setCheckState(0)
|
|
3164
|
else:
|
|
3172
|
else:
|
|
3165
|
value = opObj.getParameterValue(parameterName='frequency')
|
|
3173
|
value = opObj.getParameterValue(parameterName='frequency')
|
|
3166
|
value = str(float(value)/1e6)
|
|
3174
|
value = str(float(value)/1e6)
|
|
3167
|
self.specOpRadarfrequency.setText(value)
|
|
3175
|
self.specOpRadarfrequency.setText(value)
|
|
3168
|
self.specOpRadarfrequency.setEnabled(True)
|
|
3176
|
self.specOpRadarfrequency.setEnabled(True)
|
|
3169
|
self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked)
|
|
3177
|
self.specOpCebRadarfrequency.setCheckState(QtCore.Qt.Checked)
|
|
3170
|
|
|
3178
|
|
|
3171
|
opObj = puObj.getOperationObj(name="run")
|
|
3179
|
opObj = puObj.getOperationObj(name="run")
|
|
3172
|
if opObj == None:
|
|
3180
|
if opObj == None:
|
|
3173
|
self.specOpnFFTpoints.clear()
|
|
3181
|
self.specOpnFFTpoints.clear()
|
|
3174
|
self.specOpProfiles.clear()
|
|
3182
|
self.specOpProfiles.clear()
|
|
3175
|
self.specOpippFactor.clear()
|
|
3183
|
self.specOpippFactor.clear()
|
|
3176
|
else:
|
|
3184
|
else:
|
|
3177
|
parmObj = opObj.getParameterObj(parameterName='nFFTPoints')
|
|
3185
|
parmObj = opObj.getParameterObj(parameterName='nFFTPoints')
|
|
3178
|
if parmObj == None:
|
|
3186
|
if parmObj == None:
|
|
3179
|
self.specOpnFFTpoints.clear()
|
|
3187
|
self.specOpnFFTpoints.clear()
|
|
3180
|
else:
|
|
3188
|
else:
|
|
3181
|
self.specOpnFFTpoints.setEnabled(True)
|
|
3189
|
self.specOpnFFTpoints.setEnabled(True)
|
|
3182
|
value = opObj.getParameterValue(parameterName='nFFTPoints')
|
|
3190
|
value = opObj.getParameterValue(parameterName='nFFTPoints')
|
|
3183
|
self.specOpnFFTpoints.setText(str(value))
|
|
3191
|
self.specOpnFFTpoints.setText(str(value))
|
|
3184
|
|
|
3192
|
|
|
3185
|
parmObj = opObj.getParameterObj(parameterName='nProfiles')
|
|
3193
|
parmObj = opObj.getParameterObj(parameterName='nProfiles')
|
|
3186
|
if parmObj == None:
|
|
3194
|
if parmObj == None:
|
|
3187
|
self.specOpProfiles.clear()
|
|
3195
|
self.specOpProfiles.clear()
|
|
3188
|
else:
|
|
3196
|
else:
|
|
3189
|
self.specOpProfiles.setEnabled(True)
|
|
3197
|
self.specOpProfiles.setEnabled(True)
|
|
3190
|
value = opObj.getParameterValue(parameterName='nProfiles')
|
|
3198
|
value = opObj.getParameterValue(parameterName='nProfiles')
|
|
3191
|
self.specOpProfiles.setText(str(value))
|
|
3199
|
self.specOpProfiles.setText(str(value))
|
|
3192
|
|
|
3200
|
|
|
3193
|
parmObj = opObj.getParameterObj(parameterName='ippFactor')
|
|
3201
|
parmObj = opObj.getParameterObj(parameterName='ippFactor')
|
|
3194
|
if parmObj == None:
|
|
3202
|
if parmObj == None:
|
|
3195
|
self.specOpippFactor.clear()
|
|
3203
|
self.specOpippFactor.clear()
|
|
3196
|
else:
|
|
3204
|
else:
|
|
3197
|
self.specOpippFactor.setEnabled(True)
|
|
3205
|
self.specOpippFactor.setEnabled(True)
|
|
3198
|
value = opObj.getParameterValue(parameterName='ippFactor')
|
|
3206
|
value = opObj.getParameterValue(parameterName='ippFactor')
|
|
3199
|
self.specOpippFactor.setText(str(value))
|
|
3207
|
self.specOpippFactor.setText(str(value))
|
|
3200
|
|
|
3208
|
|
|
3201
|
opObj = puObj.getOperationObj(name="run")
|
|
3209
|
opObj = puObj.getOperationObj(name="run")
|
|
3202
|
if opObj == None:
|
|
3210
|
if opObj == None:
|
|
3203
|
self.specOppairsList.clear()
|
|
3211
|
self.specOppairsList.clear()
|
|
3204
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
3212
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
3205
|
else:
|
|
3213
|
else:
|
|
3206
|
parmObj = opObj.getParameterObj(parameterName='pairsList')
|
|
3214
|
parmObj = opObj.getParameterObj(parameterName='pairsList')
|
|
3207
|
if parmObj == None:
|
|
3215
|
if parmObj == None:
|
|
3208
|
self.specOppairsList.clear()
|
|
3216
|
self.specOppairsList.clear()
|
|
3209
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
3217
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
3210
|
else:
|
|
3218
|
else:
|
|
3211
|
value = opObj.getParameterValue(parameterName='pairsList')
|
|
3219
|
value = opObj.getParameterValue(parameterName='pairsList')
|
|
3212
|
value = str(value)[1:-1]
|
|
3220
|
value = str(value)[1:-1]
|
|
3213
|
self.specOppairsList.setText(str(value))
|
|
3221
|
self.specOppairsList.setText(str(value))
|
|
3214
|
self.specOppairsList.setEnabled(True)
|
|
3222
|
self.specOppairsList.setEnabled(True)
|
|
3215
|
self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3223
|
self.specOpCebCrossSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3216
|
|
|
3224
|
|
|
3217
|
opObj = puObj.getOperationObj(name="selectChannels")
|
|
3225
|
opObj = puObj.getOperationObj(name="selectChannels")
|
|
3218
|
|
|
3226
|
|
|
3219
|
if opObj == None:
|
|
3227
|
if opObj == None:
|
|
3220
|
opObj = puObj.getOperationObj(name="selectChannelsByIndex")
|
|
3228
|
opObj = puObj.getOperationObj(name="selectChannelsByIndex")
|
|
3221
|
|
|
3229
|
|
|
3222
|
if opObj == None:
|
|
3230
|
if opObj == None:
|
|
3223
|
self.specOpChannel.clear()
|
|
3231
|
self.specOpChannel.clear()
|
|
3224
|
self.specOpCebChannel.setCheckState(0)
|
|
3232
|
self.specOpCebChannel.setCheckState(0)
|
|
3225
|
else:
|
|
3233
|
else:
|
|
3226
|
channelEnabled = False
|
|
3234
|
channelEnabled = False
|
|
3227
|
try:
|
|
3235
|
try:
|
|
3228
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3236
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3229
|
value = str(value)[1:-1]
|
|
3237
|
value = str(value)[1:-1]
|
|
3230
|
channelEnabled = True
|
|
3238
|
channelEnabled = True
|
|
3231
|
channelMode = 0
|
|
3239
|
channelMode = 0
|
|
3232
|
except:
|
|
3240
|
except:
|
|
3233
|
pass
|
|
3241
|
pass
|
|
3234
|
try:
|
|
3242
|
try:
|
|
3235
|
value = opObj.getParameterValue(parameterName='channelIndexList')
|
|
3243
|
value = opObj.getParameterValue(parameterName='channelIndexList')
|
|
3236
|
value = str(value)[1:-1]
|
|
3244
|
value = str(value)[1:-1]
|
|
3237
|
channelEnabled = True
|
|
3245
|
channelEnabled = True
|
|
3238
|
channelMode = 1
|
|
3246
|
channelMode = 1
|
|
3239
|
except:
|
|
3247
|
except:
|
|
3240
|
pass
|
|
3248
|
pass
|
|
3241
|
|
|
3249
|
|
|
3242
|
if channelEnabled:
|
|
3250
|
if channelEnabled:
|
|
3243
|
self.specOpChannel.setText(value)
|
|
3251
|
self.specOpChannel.setText(value)
|
|
3244
|
self.specOpChannel.setEnabled(True)
|
|
3252
|
self.specOpChannel.setEnabled(True)
|
|
3245
|
self.specOpCebChannel.setCheckState(QtCore.Qt.Checked)
|
|
3253
|
self.specOpCebChannel.setCheckState(QtCore.Qt.Checked)
|
|
3246
|
self.specOpComChannel.setCurrentIndex(channelMode)
|
|
3254
|
self.specOpComChannel.setCurrentIndex(channelMode)
|
|
3247
|
|
|
3255
|
|
|
3248
|
opObj = puObj.getOperationObj(name="selectHeights")
|
|
3256
|
opObj = puObj.getOperationObj(name="selectHeights")
|
|
3249
|
if opObj == None:
|
|
3257
|
if opObj == None:
|
|
3250
|
self.specOpHeights.clear()
|
|
3258
|
self.specOpHeights.clear()
|
|
3251
|
self.specOpCebHeights.setCheckState(0)
|
|
3259
|
self.specOpCebHeights.setCheckState(0)
|
|
3252
|
else:
|
|
3260
|
else:
|
|
3253
|
value1 = int(opObj.getParameterValue(parameterName='minHei'))
|
|
3261
|
value1 = int(opObj.getParameterValue(parameterName='minHei'))
|
|
3254
|
value1 = str(value1)
|
|
3262
|
value1 = str(value1)
|
|
3255
|
value2 = int(opObj.getParameterValue(parameterName='maxHei'))
|
|
3263
|
value2 = int(opObj.getParameterValue(parameterName='maxHei'))
|
|
3256
|
value2 = str(value2)
|
|
3264
|
value2 = str(value2)
|
|
3257
|
value = value1 + "," + value2
|
|
3265
|
value = value1 + "," + value2
|
|
3258
|
self.specOpHeights.setText(value)
|
|
3266
|
self.specOpHeights.setText(value)
|
|
3259
|
self.specOpHeights.setEnabled(True)
|
|
3267
|
self.specOpHeights.setEnabled(True)
|
|
3260
|
self.specOpCebHeights.setCheckState(QtCore.Qt.Checked)
|
|
3268
|
self.specOpCebHeights.setCheckState(QtCore.Qt.Checked)
|
|
3261
|
|
|
3269
|
|
|
3262
|
opObj = puObj.getOperationObj(name="IncohInt")
|
|
3270
|
opObj = puObj.getOperationObj(name="IncohInt")
|
|
3263
|
if opObj == None:
|
|
3271
|
if opObj == None:
|
|
3264
|
self.specOpIncoherent.clear()
|
|
3272
|
self.specOpIncoherent.clear()
|
|
3265
|
self.specOpCebIncoherent.setCheckState(0)
|
|
3273
|
self.specOpCebIncoherent.setCheckState(0)
|
|
3266
|
else:
|
|
3274
|
else:
|
|
3267
|
for parmObj in opObj.getParameterObjList():
|
|
3275
|
for parmObj in opObj.getParameterObjList():
|
|
3268
|
if parmObj.name == 'timeInterval':
|
|
3276
|
if parmObj.name == 'timeInterval':
|
|
3269
|
value = opObj.getParameterValue(parameterName='timeInterval')
|
|
3277
|
value = opObj.getParameterValue(parameterName='timeInterval')
|
|
3270
|
self.specOpIncoherent.setText(str(value))
|
|
3278
|
self.specOpIncoherent.setText(str(value))
|
|
3271
|
self.specOpIncoherent.setEnabled(True)
|
|
3279
|
self.specOpIncoherent.setEnabled(True)
|
|
3272
|
self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3280
|
self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3273
|
self.specOpCobIncInt.setCurrentIndex(0)
|
|
3281
|
self.specOpCobIncInt.setCurrentIndex(0)
|
|
3274
|
|
|
3282
|
|
|
3275
|
if parmObj.name == 'n':
|
|
3283
|
if parmObj.name == 'n':
|
|
3276
|
value = opObj.getParameterValue(parameterName='n')
|
|
3284
|
value = opObj.getParameterValue(parameterName='n')
|
|
3277
|
self.specOpIncoherent.setText(str(value))
|
|
3285
|
self.specOpIncoherent.setText(str(value))
|
|
3278
|
self.specOpIncoherent.setEnabled(True)
|
|
3286
|
self.specOpIncoherent.setEnabled(True)
|
|
3279
|
self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3287
|
self.specOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3280
|
self.specOpCobIncInt.setCurrentIndex(1)
|
|
3288
|
self.specOpCobIncInt.setCurrentIndex(1)
|
|
3281
|
|
|
3289
|
|
|
3282
|
opObj = puObj.getOperationObj(name="removeDC")
|
|
3290
|
opObj = puObj.getOperationObj(name="removeDC")
|
|
3283
|
if opObj == None:
|
|
3291
|
if opObj == None:
|
|
3284
|
self.specOpCebRemoveDC.setCheckState(0)
|
|
3292
|
self.specOpCebRemoveDC.setCheckState(0)
|
|
3285
|
else:
|
|
3293
|
else:
|
|
3286
|
self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked)
|
|
3294
|
self.specOpCebRemoveDC.setCheckState(QtCore.Qt.Checked)
|
|
3287
|
|
|
3295
|
|
|
3288
|
parmObj = opObj.getParameterObj(parameterName='mode')
|
|
3296
|
parmObj = opObj.getParameterObj(parameterName='mode')
|
|
3289
|
|
|
3297
|
|
|
3290
|
value = 1
|
|
3298
|
value = 1
|
|
3291
|
if parmObj:
|
|
3299
|
if parmObj:
|
|
3292
|
value = parmObj.getValue()
|
|
3300
|
value = parmObj.getValue()
|
|
3293
|
|
|
3301
|
|
|
3294
|
if value == 1:
|
|
3302
|
if value == 1:
|
|
3295
|
self.specOpComRemoveDC.setCurrentIndex(0)
|
|
3303
|
self.specOpComRemoveDC.setCurrentIndex(0)
|
|
3296
|
elif value == 2:
|
|
3304
|
elif value == 2:
|
|
3297
|
self.specOpComRemoveDC.setCurrentIndex(1)
|
|
3305
|
self.specOpComRemoveDC.setCurrentIndex(1)
|
|
3298
|
|
|
3306
|
|
|
3299
|
opObj = puObj.getOperationObj(name="removeInterference")
|
|
3307
|
opObj = puObj.getOperationObj(name="removeInterference")
|
|
3300
|
if opObj == None:
|
|
3308
|
if opObj == None:
|
|
3301
|
self.specOpCebRemoveInt.setCheckState(0)
|
|
3309
|
self.specOpCebRemoveInt.setCheckState(0)
|
|
3302
|
else:
|
|
3310
|
else:
|
|
3303
|
self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked)
|
|
3311
|
self.specOpCebRemoveInt.setCheckState(QtCore.Qt.Checked)
|
|
3304
|
|
|
3312
|
|
|
3305
|
opObj = puObj.getOperationObj(name='getNoise')
|
|
3313
|
opObj = puObj.getOperationObj(name='getNoise')
|
|
3306
|
if opObj == None:
|
|
3314
|
if opObj == None:
|
|
3307
|
self.specOpCebgetNoise.setCheckState(0)
|
|
3315
|
self.specOpCebgetNoise.setCheckState(0)
|
|
3308
|
self.specOpgetNoise.clear()
|
|
3316
|
self.specOpgetNoise.clear()
|
|
3309
|
else:
|
|
3317
|
else:
|
|
3310
|
self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked)
|
|
3318
|
self.specOpCebgetNoise.setCheckState(QtCore.Qt.Checked)
|
|
3311
|
parmObj = opObj.getParameterObj(parameterName='minHei')
|
|
3319
|
parmObj = opObj.getParameterObj(parameterName='minHei')
|
|
3312
|
if parmObj == None:
|
|
3320
|
if parmObj == None:
|
|
3313
|
self.specOpgetNoise.clear()
|
|
3321
|
self.specOpgetNoise.clear()
|
|
3314
|
value1 = None
|
|
3322
|
value1 = None
|
|
3315
|
else:
|
|
3323
|
else:
|
|
3316
|
value1 = opObj.getParameterValue(parameterName='minHei')
|
|
3324
|
value1 = opObj.getParameterValue(parameterName='minHei')
|
|
3317
|
value1 = str(value1)
|
|
3325
|
value1 = str(value1)
|
|
3318
|
parmObj = opObj.getParameterObj(parameterName='maxHei')
|
|
3326
|
parmObj = opObj.getParameterObj(parameterName='maxHei')
|
|
3319
|
if parmObj == None:
|
|
3327
|
if parmObj == None:
|
|
3320
|
value2 = None
|
|
3328
|
value2 = None
|
|
3321
|
value = value1
|
|
3329
|
value = value1
|
|
3322
|
self.specOpgetNoise.setText(value)
|
|
3330
|
self.specOpgetNoise.setText(value)
|
|
3323
|
self.specOpgetNoise.setEnabled(True)
|
|
3331
|
self.specOpgetNoise.setEnabled(True)
|
|
3324
|
else:
|
|
3332
|
else:
|
|
3325
|
value2 = opObj.getParameterValue(parameterName='maxHei')
|
|
3333
|
value2 = opObj.getParameterValue(parameterName='maxHei')
|
|
3326
|
value2 = str(value2)
|
|
3334
|
value2 = str(value2)
|
|
3327
|
parmObj = opObj.getParameterObj(parameterName='minVel')
|
|
3335
|
parmObj = opObj.getParameterObj(parameterName='minVel')
|
|
3328
|
if parmObj == None:
|
|
3336
|
if parmObj == None:
|
|
3329
|
value3 = None
|
|
3337
|
value3 = None
|
|
3330
|
value = value1 + "," + value2
|
|
3338
|
value = value1 + "," + value2
|
|
3331
|
self.specOpgetNoise.setText(value)
|
|
3339
|
self.specOpgetNoise.setText(value)
|
|
3332
|
self.specOpgetNoise.setEnabled(True)
|
|
3340
|
self.specOpgetNoise.setEnabled(True)
|
|
3333
|
else:
|
|
3341
|
else:
|
|
3334
|
value3 = opObj.getParameterValue(parameterName='minVel')
|
|
3342
|
value3 = opObj.getParameterValue(parameterName='minVel')
|
|
3335
|
value3 = str(value3)
|
|
3343
|
value3 = str(value3)
|
|
3336
|
parmObj = opObj.getParameterObj(parameterName='maxVel')
|
|
3344
|
parmObj = opObj.getParameterObj(parameterName='maxVel')
|
|
3337
|
if parmObj == None:
|
|
3345
|
if parmObj == None:
|
|
3338
|
value4 = None
|
|
3346
|
value4 = None
|
|
3339
|
value = value1 + "," + value2 + "," + value3
|
|
3347
|
value = value1 + "," + value2 + "," + value3
|
|
3340
|
self.specOpgetNoise.setText(value)
|
|
3348
|
self.specOpgetNoise.setText(value)
|
|
3341
|
self.specOpgetNoise.setEnabled(True)
|
|
3349
|
self.specOpgetNoise.setEnabled(True)
|
|
3342
|
else:
|
|
3350
|
else:
|
|
3343
|
value4 = opObj.getParameterValue(parameterName='maxVel')
|
|
3351
|
value4 = opObj.getParameterValue(parameterName='maxVel')
|
|
3344
|
value4 = str(value4)
|
|
3352
|
value4 = str(value4)
|
|
3345
|
value = value1 + "," + value2 + "," + value3 + ',' + value4
|
|
3353
|
value = value1 + "," + value2 + "," + value3 + ',' + value4
|
|
3346
|
self.specOpgetNoise.setText(value)
|
|
3354
|
self.specOpgetNoise.setText(value)
|
|
3347
|
self.specOpgetNoise.setEnabled(True)
|
|
3355
|
self.specOpgetNoise.setEnabled(True)
|
|
3348
|
|
|
3356
|
|
|
3349
|
self.specGraphPath.clear()
|
|
3357
|
self.specGraphPath.clear()
|
|
3350
|
self.specGraphPrefix.clear()
|
|
3358
|
self.specGraphPrefix.clear()
|
|
3351
|
self.specGgraphFreq.clear()
|
|
3359
|
self.specGgraphFreq.clear()
|
|
3352
|
self.specGgraphHeight.clear()
|
|
3360
|
self.specGgraphHeight.clear()
|
|
3353
|
self.specGgraphDbsrange.clear()
|
|
3361
|
self.specGgraphDbsrange.clear()
|
|
3354
|
self.specGgraphmagnitud.clear()
|
|
3362
|
self.specGgraphmagnitud.clear()
|
|
3355
|
self.specGgraphPhase.clear()
|
|
3363
|
self.specGgraphPhase.clear()
|
|
3356
|
self.specGgraphChannelList.clear()
|
|
3364
|
self.specGgraphChannelList.clear()
|
|
3357
|
self.specGgraphTminTmax.clear()
|
|
3365
|
self.specGgraphTminTmax.clear()
|
|
3358
|
self.specGgraphTimeRange.clear()
|
|
3366
|
self.specGgraphTimeRange.clear()
|
|
3359
|
self.specGgraphftpratio.clear()
|
|
3367
|
self.specGgraphftpratio.clear()
|
|
3360
|
|
|
3368
|
|
|
3361
|
opObj = puObj.getOperationObj(name='SpectraPlot')
|
|
3369
|
opObj = puObj.getOperationObj(name='SpectraPlot')
|
|
3362
|
|
|
3370
|
|
|
3363
|
if opObj == None:
|
|
3371
|
if opObj == None:
|
|
3364
|
self.specGraphCebSpectraplot.setCheckState(0)
|
|
3372
|
self.specGraphCebSpectraplot.setCheckState(0)
|
|
3365
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
3373
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
3366
|
self.specGraphftpSpectra.setCheckState(0)
|
|
3374
|
self.specGraphftpSpectra.setCheckState(0)
|
|
3367
|
else:
|
|
3375
|
else:
|
|
3368
|
operationSpectraPlot = "Enable"
|
|
3376
|
operationSpectraPlot = "Enable"
|
|
3369
|
self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3377
|
self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3370
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3378
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3371
|
if parmObj == None:
|
|
3379
|
if parmObj == None:
|
|
3372
|
self.specGgraphChannelList.clear()
|
|
3380
|
self.specGgraphChannelList.clear()
|
|
3373
|
else:
|
|
3381
|
else:
|
|
3374
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3382
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3375
|
channelListSpectraPlot = str(value)[1:-1]
|
|
3383
|
channelListSpectraPlot = str(value)[1:-1]
|
|
3376
|
self.specGgraphChannelList.setText(channelListSpectraPlot)
|
|
3384
|
self.specGgraphChannelList.setText(channelListSpectraPlot)
|
|
3377
|
self.specGgraphChannelList.setEnabled(True)
|
|
3385
|
self.specGgraphChannelList.setEnabled(True)
|
|
3378
|
|
|
3386
|
|
|
3379
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3387
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3380
|
if parmObj == None:
|
|
3388
|
if parmObj == None:
|
|
3381
|
self.specGgraphFreq.clear()
|
|
3389
|
self.specGgraphFreq.clear()
|
|
3382
|
else:
|
|
3390
|
else:
|
|
3383
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3391
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3384
|
value1 = str(value1)
|
|
3392
|
value1 = str(value1)
|
|
3385
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3393
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3386
|
value2 = str(value2)
|
|
3394
|
value2 = str(value2)
|
|
3387
|
value = value1 + "," + value2
|
|
3395
|
value = value1 + "," + value2
|
|
3388
|
self.specGgraphFreq.setText(value)
|
|
3396
|
self.specGgraphFreq.setText(value)
|
|
3389
|
self.specGgraphFreq.setEnabled(True)
|
|
3397
|
self.specGgraphFreq.setEnabled(True)
|
|
3390
|
|
|
3398
|
|
|
3391
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3399
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3392
|
if parmObj == None:
|
|
3400
|
if parmObj == None:
|
|
3393
|
self.specGgraphHeight.clear()
|
|
3401
|
self.specGgraphHeight.clear()
|
|
3394
|
else:
|
|
3402
|
else:
|
|
3395
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3403
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3396
|
value1 = str(value1)
|
|
3404
|
value1 = str(value1)
|
|
3397
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3405
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3398
|
value2 = str(value2)
|
|
3406
|
value2 = str(value2)
|
|
3399
|
value = value1 + "," + value2
|
|
3407
|
value = value1 + "," + value2
|
|
3400
|
self.specGgraphHeight.setText(value)
|
|
3408
|
self.specGgraphHeight.setText(value)
|
|
3401
|
self.specGgraphHeight.setEnabled(True)
|
|
3409
|
self.specGgraphHeight.setEnabled(True)
|
|
3402
|
|
|
3410
|
|
|
3403
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3411
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3404
|
if parmObj == None:
|
|
3412
|
if parmObj == None:
|
|
3405
|
self.specGgraphDbsrange.clear()
|
|
3413
|
self.specGgraphDbsrange.clear()
|
|
3406
|
else:
|
|
3414
|
else:
|
|
3407
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3415
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3408
|
value1 = str(value1)
|
|
3416
|
value1 = str(value1)
|
|
3409
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3417
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3410
|
value2 = str(value2)
|
|
3418
|
value2 = str(value2)
|
|
3411
|
value = value1 + "," + value2
|
|
3419
|
value = value1 + "," + value2
|
|
3412
|
self.specGgraphDbsrange.setText(value)
|
|
3420
|
self.specGgraphDbsrange.setText(value)
|
|
3413
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3421
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3414
|
|
|
3422
|
|
|
3415
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3423
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3416
|
if parmObj == None:
|
|
3424
|
if parmObj == None:
|
|
3417
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
3425
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
3418
|
else:
|
|
3426
|
else:
|
|
3419
|
self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3427
|
self.specGraphSaveSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3420
|
|
|
3428
|
|
|
3421
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3429
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3422
|
if parmObj == None:
|
|
3430
|
if parmObj == None:
|
|
3423
|
self.specGraphftpSpectra.setCheckState(0)
|
|
3431
|
self.specGraphftpSpectra.setCheckState(0)
|
|
3424
|
else:
|
|
3432
|
else:
|
|
3425
|
self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3433
|
self.specGraphftpSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3426
|
|
|
3434
|
|
|
3427
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3435
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3428
|
if parmObj:
|
|
3436
|
if parmObj:
|
|
3429
|
value = parmObj.getValue()
|
|
3437
|
value = parmObj.getValue()
|
|
3430
|
self.specGraphPath.setText(value)
|
|
3438
|
self.specGraphPath.setText(value)
|
|
3431
|
|
|
3439
|
|
|
3432
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3440
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3433
|
if parmObj:
|
|
3441
|
if parmObj:
|
|
3434
|
value = parmObj.getValue()
|
|
3442
|
value = parmObj.getValue()
|
|
3435
|
self.specGgraphftpratio.setText(str(value))
|
|
3443
|
self.specGgraphftpratio.setText(str(value))
|
|
3436
|
|
|
3444
|
|
|
3437
|
opObj = puObj.getOperationObj(name='CrossSpectraPlot')
|
|
3445
|
opObj = puObj.getOperationObj(name='CrossSpectraPlot')
|
|
3438
|
|
|
3446
|
|
|
3439
|
if opObj == None:
|
|
3447
|
if opObj == None:
|
|
3440
|
self.specGraphCebCrossSpectraplot.setCheckState(0)
|
|
3448
|
self.specGraphCebCrossSpectraplot.setCheckState(0)
|
|
3441
|
self.specGraphSaveCross.setCheckState(0)
|
|
3449
|
self.specGraphSaveCross.setCheckState(0)
|
|
3442
|
self.specGraphftpCross.setCheckState(0)
|
|
3450
|
self.specGraphftpCross.setCheckState(0)
|
|
3443
|
else:
|
|
3451
|
else:
|
|
3444
|
operationCrossSpectraPlot = "Enable"
|
|
3452
|
operationCrossSpectraPlot = "Enable"
|
|
3445
|
self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3453
|
self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3446
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3454
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3447
|
if parmObj == None:
|
|
3455
|
if parmObj == None:
|
|
3448
|
self.specGgraphFreq.clear()
|
|
3456
|
self.specGgraphFreq.clear()
|
|
3449
|
else:
|
|
3457
|
else:
|
|
3450
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3458
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3451
|
value1 = str(value1)
|
|
3459
|
value1 = str(value1)
|
|
3452
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3460
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3453
|
value2 = str(value2)
|
|
3461
|
value2 = str(value2)
|
|
3454
|
value = value1 + "," + value2
|
|
3462
|
value = value1 + "," + value2
|
|
3455
|
self.specGgraphFreq.setText(value)
|
|
3463
|
self.specGgraphFreq.setText(value)
|
|
3456
|
self.specGgraphFreq.setEnabled(True)
|
|
3464
|
self.specGgraphFreq.setEnabled(True)
|
|
3457
|
|
|
3465
|
|
|
3458
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3466
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3459
|
if parmObj == None:
|
|
3467
|
if parmObj == None:
|
|
3460
|
self.specGgraphHeight.clear()
|
|
3468
|
self.specGgraphHeight.clear()
|
|
3461
|
else:
|
|
3469
|
else:
|
|
3462
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3470
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3463
|
value1 = str(value1)
|
|
3471
|
value1 = str(value1)
|
|
3464
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3472
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3465
|
value2 = str(value2)
|
|
3473
|
value2 = str(value2)
|
|
3466
|
value = value1 + "," + value2
|
|
3474
|
value = value1 + "," + value2
|
|
3467
|
self.specGgraphHeight.setText(value)
|
|
3475
|
self.specGgraphHeight.setText(value)
|
|
3468
|
self.specGgraphHeight.setEnabled(True)
|
|
3476
|
self.specGgraphHeight.setEnabled(True)
|
|
3469
|
|
|
3477
|
|
|
3470
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3478
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3471
|
if parmObj == None:
|
|
3479
|
if parmObj == None:
|
|
3472
|
self.specGgraphDbsrange.clear()
|
|
3480
|
self.specGgraphDbsrange.clear()
|
|
3473
|
else:
|
|
3481
|
else:
|
|
3474
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3482
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3475
|
value1 = str(value1)
|
|
3483
|
value1 = str(value1)
|
|
3476
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3484
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3477
|
value2 = str(value2)
|
|
3485
|
value2 = str(value2)
|
|
3478
|
value = value1 + "," + value2
|
|
3486
|
value = value1 + "," + value2
|
|
3479
|
self.specGgraphDbsrange.setText(value)
|
|
3487
|
self.specGgraphDbsrange.setText(value)
|
|
3480
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3488
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3481
|
|
|
3489
|
|
|
3482
|
parmObj = opObj.getParameterObj(parameterName='coh_min')
|
|
3490
|
parmObj = opObj.getParameterObj(parameterName='coh_min')
|
|
3483
|
if parmObj == None:
|
|
3491
|
if parmObj == None:
|
|
3484
|
self.specGgraphmagnitud.clear()
|
|
3492
|
self.specGgraphmagnitud.clear()
|
|
3485
|
else:
|
|
3493
|
else:
|
|
3486
|
value1 = opObj.getParameterValue(parameterName='coh_min')
|
|
3494
|
value1 = opObj.getParameterValue(parameterName='coh_min')
|
|
3487
|
value1 = str(value1)
|
|
3495
|
value1 = str(value1)
|
|
3488
|
value2 = opObj.getParameterValue(parameterName='coh_max')
|
|
3496
|
value2 = opObj.getParameterValue(parameterName='coh_max')
|
|
3489
|
value2 = str(value2)
|
|
3497
|
value2 = str(value2)
|
|
3490
|
value = value1 + "," + value2
|
|
3498
|
value = value1 + "," + value2
|
|
3491
|
self.specGgraphmagnitud.setText(value)
|
|
3499
|
self.specGgraphmagnitud.setText(value)
|
|
3492
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3500
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3493
|
|
|
3501
|
|
|
3494
|
parmObj = opObj.getParameterObj(parameterName='phase_min')
|
|
3502
|
parmObj = opObj.getParameterObj(parameterName='phase_min')
|
|
3495
|
if parmObj == None:
|
|
3503
|
if parmObj == None:
|
|
3496
|
self.specGgraphPhase.clear()
|
|
3504
|
self.specGgraphPhase.clear()
|
|
3497
|
else:
|
|
3505
|
else:
|
|
3498
|
value1 = opObj.getParameterValue(parameterName='phase_min')
|
|
3506
|
value1 = opObj.getParameterValue(parameterName='phase_min')
|
|
3499
|
value1 = str(value1)
|
|
3507
|
value1 = str(value1)
|
|
3500
|
value2 = opObj.getParameterValue(parameterName='phase_max')
|
|
3508
|
value2 = opObj.getParameterValue(parameterName='phase_max')
|
|
3501
|
value2 = str(value2)
|
|
3509
|
value2 = str(value2)
|
|
3502
|
value = value1 + "," + value2
|
|
3510
|
value = value1 + "," + value2
|
|
3503
|
self.specGgraphPhase.setText(value)
|
|
3511
|
self.specGgraphPhase.setText(value)
|
|
3504
|
self.specGgraphPhase.setEnabled(True)
|
|
3512
|
self.specGgraphPhase.setEnabled(True)
|
|
3505
|
|
|
3513
|
|
|
3506
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3514
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3507
|
if parmObj == None:
|
|
3515
|
if parmObj == None:
|
|
3508
|
self.specGraphSaveCross.setCheckState(0)
|
|
3516
|
self.specGraphSaveCross.setCheckState(0)
|
|
3509
|
else:
|
|
3517
|
else:
|
|
3510
|
self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked)
|
|
3518
|
self.specGraphSaveCross.setCheckState(QtCore.Qt.Checked)
|
|
3511
|
|
|
3519
|
|
|
3512
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3520
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3513
|
if parmObj == None:
|
|
3521
|
if parmObj == None:
|
|
3514
|
self.specGraphftpCross.setCheckState(0)
|
|
3522
|
self.specGraphftpCross.setCheckState(0)
|
|
3515
|
else:
|
|
3523
|
else:
|
|
3516
|
self.specGraphftpCross.setCheckState(QtCore.Qt.Checked)
|
|
3524
|
self.specGraphftpCross.setCheckState(QtCore.Qt.Checked)
|
|
3517
|
|
|
3525
|
|
|
3518
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3526
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3519
|
if parmObj:
|
|
3527
|
if parmObj:
|
|
3520
|
value = parmObj.getValue()
|
|
3528
|
value = parmObj.getValue()
|
|
3521
|
self.specGraphPath.setText(value)
|
|
3529
|
self.specGraphPath.setText(value)
|
|
3522
|
|
|
3530
|
|
|
3523
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3531
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3524
|
if parmObj:
|
|
3532
|
if parmObj:
|
|
3525
|
value = parmObj.getValue()
|
|
3533
|
value = parmObj.getValue()
|
|
3526
|
self.specGgraphftpratio.setText(str(value))
|
|
3534
|
self.specGgraphftpratio.setText(str(value))
|
|
3527
|
|
|
3535
|
|
|
3528
|
opObj = puObj.getOperationObj(name='RTIPlot')
|
|
3536
|
opObj = puObj.getOperationObj(name='RTIPlot')
|
|
3529
|
|
|
3537
|
|
|
3530
|
if opObj == None:
|
|
3538
|
if opObj == None:
|
|
3531
|
self.specGraphCebRTIplot.setCheckState(0)
|
|
3539
|
self.specGraphCebRTIplot.setCheckState(0)
|
|
3532
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
3540
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
3533
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
3541
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
3534
|
else:
|
|
3542
|
else:
|
|
3535
|
self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3543
|
self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3536
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3544
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3537
|
if parmObj == None:
|
|
3545
|
if parmObj == None:
|
|
3538
|
self.specGgraphChannelList.clear()
|
|
3546
|
self.specGgraphChannelList.clear()
|
|
3539
|
else:
|
|
3547
|
else:
|
|
3540
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3548
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3541
|
channelListRTIPlot = str(value)[1:-1]
|
|
3549
|
channelListRTIPlot = str(value)[1:-1]
|
|
3542
|
self.specGgraphChannelList.setText(channelListRTIPlot)
|
|
3550
|
self.specGgraphChannelList.setText(channelListRTIPlot)
|
|
3543
|
self.specGgraphChannelList.setEnabled(True)
|
|
3551
|
self.specGgraphChannelList.setEnabled(True)
|
|
3544
|
|
|
3552
|
|
|
3545
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3553
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3546
|
if parmObj == None:
|
|
3554
|
if parmObj == None:
|
|
3547
|
self.specGgraphTminTmax.clear()
|
|
3555
|
self.specGgraphTminTmax.clear()
|
|
3548
|
else:
|
|
3556
|
else:
|
|
3549
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3557
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3550
|
value1 = str(value1)
|
|
3558
|
value1 = str(value1)
|
|
3551
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3559
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3552
|
value2 = str(value2)
|
|
3560
|
value2 = str(value2)
|
|
3553
|
value = value1 + "," + value2
|
|
3561
|
value = value1 + "," + value2
|
|
3554
|
self.specGgraphTminTmax.setText(value)
|
|
3562
|
self.specGgraphTminTmax.setText(value)
|
|
3555
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3563
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3556
|
|
|
3564
|
|
|
3557
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3565
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3558
|
if parmObj == None:
|
|
3566
|
if parmObj == None:
|
|
3559
|
self.specGgraphTimeRange.clear()
|
|
3567
|
self.specGgraphTimeRange.clear()
|
|
3560
|
else:
|
|
3568
|
else:
|
|
3561
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3569
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3562
|
value1 = str(value1)
|
|
3570
|
value1 = str(value1)
|
|
3563
|
self.specGgraphTimeRange.setText(value1)
|
|
3571
|
self.specGgraphTimeRange.setText(value1)
|
|
3564
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3572
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3565
|
|
|
3573
|
|
|
3566
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3574
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3567
|
if parmObj == None:
|
|
3575
|
if parmObj == None:
|
|
3568
|
self.specGgraphHeight.clear()
|
|
3576
|
self.specGgraphHeight.clear()
|
|
3569
|
else:
|
|
3577
|
else:
|
|
3570
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3578
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3571
|
value1 = str(value1)
|
|
3579
|
value1 = str(value1)
|
|
3572
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3580
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3573
|
value2 = str(value2)
|
|
3581
|
value2 = str(value2)
|
|
3574
|
value = value1 + "," + value2
|
|
3582
|
value = value1 + "," + value2
|
|
3575
|
self.specGgraphHeight.setText(value)
|
|
3583
|
self.specGgraphHeight.setText(value)
|
|
3576
|
self.specGgraphHeight.setEnabled(True)
|
|
3584
|
self.specGgraphHeight.setEnabled(True)
|
|
3577
|
|
|
3585
|
|
|
3578
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3586
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3579
|
if parmObj == None:
|
|
3587
|
if parmObj == None:
|
|
3580
|
self.specGgraphDbsrange.clear()
|
|
3588
|
self.specGgraphDbsrange.clear()
|
|
3581
|
else:
|
|
3589
|
else:
|
|
3582
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3590
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3583
|
value1 = str(value1)
|
|
3591
|
value1 = str(value1)
|
|
3584
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3592
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3585
|
value2 = str(value2)
|
|
3593
|
value2 = str(value2)
|
|
3586
|
value = value1 + "," + value2
|
|
3594
|
value = value1 + "," + value2
|
|
3587
|
self.specGgraphDbsrange.setText(value)
|
|
3595
|
self.specGgraphDbsrange.setText(value)
|
|
3588
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3596
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3589
|
|
|
3597
|
|
|
3590
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3598
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3591
|
if parmObj == None:
|
|
3599
|
if parmObj == None:
|
|
3592
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
3600
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
3593
|
else:
|
|
3601
|
else:
|
|
3594
|
self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3602
|
self.specGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3595
|
|
|
3603
|
|
|
3596
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3604
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3597
|
if parmObj == None:
|
|
3605
|
if parmObj == None:
|
|
3598
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
3606
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
3599
|
else:
|
|
3607
|
else:
|
|
3600
|
self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3608
|
self.specGraphftpRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3601
|
|
|
3609
|
|
|
3602
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3610
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3603
|
if parmObj:
|
|
3611
|
if parmObj:
|
|
3604
|
value = parmObj.getValue()
|
|
3612
|
value = parmObj.getValue()
|
|
3605
|
self.specGraphPath.setText(value)
|
|
3613
|
self.specGraphPath.setText(value)
|
|
3606
|
|
|
3614
|
|
|
3607
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3615
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3608
|
if parmObj:
|
|
3616
|
if parmObj:
|
|
3609
|
value = parmObj.getValue()
|
|
3617
|
value = parmObj.getValue()
|
|
3610
|
self.specGgraphftpratio.setText(str(value))
|
|
3618
|
self.specGgraphftpratio.setText(str(value))
|
|
3611
|
|
|
3619
|
|
|
3612
|
opObj = puObj.getOperationObj(name='CoherenceMap')
|
|
3620
|
opObj = puObj.getOperationObj(name='CoherenceMap')
|
|
3613
|
|
|
3621
|
|
|
3614
|
if opObj == None:
|
|
3622
|
if opObj == None:
|
|
3615
|
self.specGraphCebCoherencmap.setCheckState(0)
|
|
3623
|
self.specGraphCebCoherencmap.setCheckState(0)
|
|
3616
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
3624
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
3617
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
3625
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
3618
|
else:
|
|
3626
|
else:
|
|
3619
|
operationCoherenceMap = "Enable"
|
|
3627
|
operationCoherenceMap = "Enable"
|
|
3620
|
self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked)
|
|
3628
|
self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked)
|
|
3621
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3629
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3622
|
if parmObj == None:
|
|
3630
|
if parmObj == None:
|
|
3623
|
self.specGgraphTminTmax.clear()
|
|
3631
|
self.specGgraphTminTmax.clear()
|
|
3624
|
else:
|
|
3632
|
else:
|
|
3625
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3633
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3626
|
value1 = str(value1)
|
|
3634
|
value1 = str(value1)
|
|
3627
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3635
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3628
|
value2 = str(value2)
|
|
3636
|
value2 = str(value2)
|
|
3629
|
value = value1 + "," + value2
|
|
3637
|
value = value1 + "," + value2
|
|
3630
|
self.specGgraphTminTmax.setText(value)
|
|
3638
|
self.specGgraphTminTmax.setText(value)
|
|
3631
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3639
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3632
|
|
|
3640
|
|
|
3633
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3641
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3634
|
if parmObj == None:
|
|
3642
|
if parmObj == None:
|
|
3635
|
self.specGgraphTimeRange.clear()
|
|
3643
|
self.specGgraphTimeRange.clear()
|
|
3636
|
else:
|
|
3644
|
else:
|
|
3637
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3645
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3638
|
value1 = str(value1)
|
|
3646
|
value1 = str(value1)
|
|
3639
|
self.specGgraphTimeRange.setText(value1)
|
|
3647
|
self.specGgraphTimeRange.setText(value1)
|
|
3640
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3648
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3641
|
|
|
3649
|
|
|
3642
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3650
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3643
|
if parmObj == None:
|
|
3651
|
if parmObj == None:
|
|
3644
|
self.specGgraphHeight.clear()
|
|
3652
|
self.specGgraphHeight.clear()
|
|
3645
|
else:
|
|
3653
|
else:
|
|
3646
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3654
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3647
|
value1 = str(value1)
|
|
3655
|
value1 = str(value1)
|
|
3648
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3656
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3649
|
value2 = str(value2)
|
|
3657
|
value2 = str(value2)
|
|
3650
|
value = value1 + "," + value2
|
|
3658
|
value = value1 + "," + value2
|
|
3651
|
self.specGgraphHeight.setText(value)
|
|
3659
|
self.specGgraphHeight.setText(value)
|
|
3652
|
self.specGgraphHeight.setEnabled(True)
|
|
3660
|
self.specGgraphHeight.setEnabled(True)
|
|
3653
|
|
|
3661
|
|
|
3654
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3662
|
parmObj = opObj.getParameterObj(parameterName='zmin')
|
|
3655
|
if parmObj == None:
|
|
3663
|
if parmObj == None:
|
|
3656
|
self.specGgraphmagnitud.clear()
|
|
3664
|
self.specGgraphmagnitud.clear()
|
|
3657
|
else:
|
|
3665
|
else:
|
|
3658
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3666
|
value1 = opObj.getParameterValue(parameterName='zmin')
|
|
3659
|
value1 = str(value1)
|
|
3667
|
value1 = str(value1)
|
|
3660
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3668
|
value2 = opObj.getParameterValue(parameterName='zmax')
|
|
3661
|
value2 = str(value2)
|
|
3669
|
value2 = str(value2)
|
|
3662
|
value = value1 + "," + value2
|
|
3670
|
value = value1 + "," + value2
|
|
3663
|
self.specGgraphmagnitud.setText(value)
|
|
3671
|
self.specGgraphmagnitud.setText(value)
|
|
3664
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3672
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3665
|
|
|
3673
|
|
|
3666
|
parmObj = opObj.getParameterObj(parameterName='coh_min')
|
|
3674
|
parmObj = opObj.getParameterObj(parameterName='coh_min')
|
|
3667
|
if parmObj == None:
|
|
3675
|
if parmObj == None:
|
|
3668
|
self.specGgraphmagnitud.clear()
|
|
3676
|
self.specGgraphmagnitud.clear()
|
|
3669
|
else:
|
|
3677
|
else:
|
|
3670
|
value1 = opObj.getParameterValue(parameterName='coh_min')
|
|
3678
|
value1 = opObj.getParameterValue(parameterName='coh_min')
|
|
3671
|
value1 = str(value1)
|
|
3679
|
value1 = str(value1)
|
|
3672
|
value2 = opObj.getParameterValue(parameterName='coh_max')
|
|
3680
|
value2 = opObj.getParameterValue(parameterName='coh_max')
|
|
3673
|
value2 = str(value2)
|
|
3681
|
value2 = str(value2)
|
|
3674
|
value = value1 + "," + value2
|
|
3682
|
value = value1 + "," + value2
|
|
3675
|
self.specGgraphmagnitud.setText(value)
|
|
3683
|
self.specGgraphmagnitud.setText(value)
|
|
3676
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3684
|
self.specGgraphmagnitud.setEnabled(True)
|
|
3677
|
|
|
3685
|
|
|
3678
|
parmObj = opObj.getParameterObj(parameterName='phase_min')
|
|
3686
|
parmObj = opObj.getParameterObj(parameterName='phase_min')
|
|
3679
|
if parmObj == None:
|
|
3687
|
if parmObj == None:
|
|
3680
|
self.specGgraphPhase.clear()
|
|
3688
|
self.specGgraphPhase.clear()
|
|
3681
|
else:
|
|
3689
|
else:
|
|
3682
|
value1 = opObj.getParameterValue(parameterName='phase_min')
|
|
3690
|
value1 = opObj.getParameterValue(parameterName='phase_min')
|
|
3683
|
value1 = str(value1)
|
|
3691
|
value1 = str(value1)
|
|
3684
|
value2 = opObj.getParameterValue(parameterName='phase_max')
|
|
3692
|
value2 = opObj.getParameterValue(parameterName='phase_max')
|
|
3685
|
value2 = str(value2)
|
|
3693
|
value2 = str(value2)
|
|
3686
|
value = value1 + "," + value2
|
|
3694
|
value = value1 + "," + value2
|
|
3687
|
self.specGgraphPhase.setText(value)
|
|
3695
|
self.specGgraphPhase.setText(value)
|
|
3688
|
self.specGgraphPhase.setEnabled(True)
|
|
3696
|
self.specGgraphPhase.setEnabled(True)
|
|
3689
|
|
|
3697
|
|
|
3690
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3698
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3691
|
if parmObj == None:
|
|
3699
|
if parmObj == None:
|
|
3692
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
3700
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
3693
|
else:
|
|
3701
|
else:
|
|
3694
|
self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked)
|
|
3702
|
self.specGraphSaveCoherencemap.setCheckState(QtCore.Qt.Checked)
|
|
3695
|
|
|
3703
|
|
|
3696
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3704
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3697
|
if parmObj == None:
|
|
3705
|
if parmObj == None:
|
|
3698
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
3706
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
3699
|
else:
|
|
3707
|
else:
|
|
3700
|
self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked)
|
|
3708
|
self.specGraphftpCoherencemap.setCheckState(QtCore.Qt.Checked)
|
|
3701
|
|
|
3709
|
|
|
3702
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3710
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3703
|
if parmObj:
|
|
3711
|
if parmObj:
|
|
3704
|
value = parmObj.getValue()
|
|
3712
|
value = parmObj.getValue()
|
|
3705
|
self.specGraphPath.setText(value)
|
|
3713
|
self.specGraphPath.setText(value)
|
|
3706
|
|
|
3714
|
|
|
3707
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3715
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3708
|
if parmObj:
|
|
3716
|
if parmObj:
|
|
3709
|
value = parmObj.getValue()
|
|
3717
|
value = parmObj.getValue()
|
|
3710
|
self.specGgraphftpratio.setText(str(value))
|
|
3718
|
self.specGgraphftpratio.setText(str(value))
|
|
3711
|
|
|
3719
|
|
|
3712
|
opObj = puObj.getOperationObj(name='PowerProfilePlot')
|
|
3720
|
opObj = puObj.getOperationObj(name='PowerProfilePlot')
|
|
3713
|
|
|
3721
|
|
|
3714
|
if opObj == None:
|
|
3722
|
if opObj == None:
|
|
3715
|
self.specGraphPowerprofile.setCheckState(0)
|
|
3723
|
self.specGraphPowerprofile.setCheckState(0)
|
|
3716
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
3724
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
3717
|
self.specGraphftpPowerprofile.setCheckState(0)
|
|
3725
|
self.specGraphftpPowerprofile.setCheckState(0)
|
|
3718
|
operationPowerProfilePlot = "Disabled"
|
|
3726
|
operationPowerProfilePlot = "Disabled"
|
|
3719
|
channelList = None
|
|
3727
|
channelList = None
|
|
3720
|
freq_vel = None
|
|
3728
|
freq_vel = None
|
|
3721
|
heightsrange = None
|
|
3729
|
heightsrange = None
|
|
3722
|
else:
|
|
3730
|
else:
|
|
3723
|
operationPowerProfilePlot = "Enable"
|
|
3731
|
operationPowerProfilePlot = "Enable"
|
|
3724
|
self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3732
|
self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3725
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3733
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3726
|
if parmObj == None:
|
|
3734
|
if parmObj == None:
|
|
3727
|
self.specGgraphDbsrange.clear()
|
|
3735
|
self.specGgraphDbsrange.clear()
|
|
3728
|
else:
|
|
3736
|
else:
|
|
3729
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3737
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3730
|
value1 = str(value1)
|
|
3738
|
value1 = str(value1)
|
|
3731
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3739
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3732
|
value2 = str(value2)
|
|
3740
|
value2 = str(value2)
|
|
3733
|
value = value1 + "," + value2
|
|
3741
|
value = value1 + "," + value2
|
|
3734
|
self.specGgraphDbsrange.setText(value)
|
|
3742
|
self.specGgraphDbsrange.setText(value)
|
|
3735
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3743
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3736
|
|
|
3744
|
|
|
3737
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3745
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3738
|
if parmObj == None:
|
|
3746
|
if parmObj == None:
|
|
3739
|
self.specGgraphHeight.clear()
|
|
3747
|
self.specGgraphHeight.clear()
|
|
3740
|
else:
|
|
3748
|
else:
|
|
3741
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3749
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3742
|
value1 = str(value1)
|
|
3750
|
value1 = str(value1)
|
|
3743
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3751
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3744
|
value2 = str(value2)
|
|
3752
|
value2 = str(value2)
|
|
3745
|
value = value1 + "," + value2
|
|
3753
|
value = value1 + "," + value2
|
|
3746
|
self.specGgraphHeight.setText(value)
|
|
3754
|
self.specGgraphHeight.setText(value)
|
|
3747
|
self.specGgraphHeight.setEnabled(True)
|
|
3755
|
self.specGgraphHeight.setEnabled(True)
|
|
3748
|
|
|
3756
|
|
|
3749
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3757
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3750
|
if parmObj == None:
|
|
3758
|
if parmObj == None:
|
|
3751
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
3759
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
3752
|
else:
|
|
3760
|
else:
|
|
3753
|
self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3761
|
self.specGraphSavePowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3754
|
|
|
3762
|
|
|
3755
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3763
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3756
|
if parmObj == None:
|
|
3764
|
if parmObj == None:
|
|
3757
|
self.specGraphftpPowerprofile.setCheckState(0)
|
|
3765
|
self.specGraphftpPowerprofile.setCheckState(0)
|
|
3758
|
else:
|
|
3766
|
else:
|
|
3759
|
self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3767
|
self.specGraphftpPowerprofile.setCheckState(QtCore.Qt.Checked)
|
|
3760
|
|
|
3768
|
|
|
3761
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3769
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3762
|
if parmObj:
|
|
3770
|
if parmObj:
|
|
3763
|
value = parmObj.getValue()
|
|
3771
|
value = parmObj.getValue()
|
|
3764
|
self.specGraphPath.setText(value)
|
|
3772
|
self.specGraphPath.setText(value)
|
|
3765
|
|
|
3773
|
|
|
3766
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3774
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3767
|
if parmObj:
|
|
3775
|
if parmObj:
|
|
3768
|
value = parmObj.getValue()
|
|
3776
|
value = parmObj.getValue()
|
|
3769
|
self.specGgraphftpratio.setText(str(value))
|
|
3777
|
self.specGgraphftpratio.setText(str(value))
|
|
3770
|
|
|
3778
|
|
|
3771
|
opObj = puObj.getOperationObj(name='Noise')
|
|
3779
|
opObj = puObj.getOperationObj(name='Noise')
|
|
3772
|
|
|
3780
|
|
|
3773
|
if opObj == None:
|
|
3781
|
if opObj == None:
|
|
3774
|
self.specGraphCebRTInoise.setCheckState(0)
|
|
3782
|
self.specGraphCebRTInoise.setCheckState(0)
|
|
3775
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
3783
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
3776
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
3784
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
3777
|
else:
|
|
3785
|
else:
|
|
3778
|
self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3786
|
self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3779
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3787
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3780
|
if parmObj == None:
|
|
3788
|
if parmObj == None:
|
|
3781
|
self.specGgraphChannelList.clear()
|
|
3789
|
self.specGgraphChannelList.clear()
|
|
3782
|
else:
|
|
3790
|
else:
|
|
3783
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3791
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3784
|
channelListRTINoise = str(value)[1:-1]
|
|
3792
|
channelListRTINoise = str(value)[1:-1]
|
|
3785
|
self.specGgraphChannelList.setText(channelListRTINoise)
|
|
3793
|
self.specGgraphChannelList.setText(channelListRTINoise)
|
|
3786
|
self.specGgraphChannelList.setEnabled(True)
|
|
3794
|
self.specGgraphChannelList.setEnabled(True)
|
|
3787
|
|
|
3795
|
|
|
3788
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3796
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3789
|
if parmObj == None:
|
|
3797
|
if parmObj == None:
|
|
3790
|
self.specGgraphTminTmax.clear()
|
|
3798
|
self.specGgraphTminTmax.clear()
|
|
3791
|
else:
|
|
3799
|
else:
|
|
3792
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3800
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3793
|
value1 = str(value1)
|
|
3801
|
value1 = str(value1)
|
|
3794
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3802
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3795
|
value2 = str(value2)
|
|
3803
|
value2 = str(value2)
|
|
3796
|
value = value1 + "," + value2
|
|
3804
|
value = value1 + "," + value2
|
|
3797
|
self.specGgraphTminTmax.setText(value)
|
|
3805
|
self.specGgraphTminTmax.setText(value)
|
|
3798
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3806
|
self.specGgraphTminTmax.setEnabled(True)
|
|
3799
|
|
|
3807
|
|
|
3800
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3808
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3801
|
if parmObj == None:
|
|
3809
|
if parmObj == None:
|
|
3802
|
self.specGgraphTimeRange.clear()
|
|
3810
|
self.specGgraphTimeRange.clear()
|
|
3803
|
else:
|
|
3811
|
else:
|
|
3804
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3812
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3805
|
value1 = str(value1)
|
|
3813
|
value1 = str(value1)
|
|
3806
|
self.specGgraphTimeRange.setText(value1)
|
|
3814
|
self.specGgraphTimeRange.setText(value1)
|
|
3807
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3815
|
self.specGgraphTimeRange.setEnabled(True)
|
|
3808
|
|
|
3816
|
|
|
3809
|
|
|
3817
|
|
|
3810
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3818
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3811
|
if parmObj == None:
|
|
3819
|
if parmObj == None:
|
|
3812
|
self.specGgraphDbsrange.clear()
|
|
3820
|
self.specGgraphDbsrange.clear()
|
|
3813
|
else:
|
|
3821
|
else:
|
|
3814
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3822
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3815
|
value1 = str(value1)
|
|
3823
|
value1 = str(value1)
|
|
3816
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3824
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3817
|
value2 = str(value2)
|
|
3825
|
value2 = str(value2)
|
|
3818
|
value = value1 + "," + value2
|
|
3826
|
value = value1 + "," + value2
|
|
3819
|
self.specGgraphDbsrange.setText(value)
|
|
3827
|
self.specGgraphDbsrange.setText(value)
|
|
3820
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3828
|
self.specGgraphDbsrange.setEnabled(True)
|
|
3821
|
|
|
3829
|
|
|
3822
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3830
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3823
|
if parmObj == None:
|
|
3831
|
if parmObj == None:
|
|
3824
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
3832
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
3825
|
else:
|
|
3833
|
else:
|
|
3826
|
self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3834
|
self.specGraphSaveRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3827
|
|
|
3835
|
|
|
3828
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3836
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3829
|
if parmObj == None:
|
|
3837
|
if parmObj == None:
|
|
3830
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
3838
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
3831
|
else:
|
|
3839
|
else:
|
|
3832
|
self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3840
|
self.specGraphftpRTInoise.setCheckState(QtCore.Qt.Checked)
|
|
3833
|
|
|
3841
|
|
|
3834
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3842
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3835
|
if parmObj:
|
|
3843
|
if parmObj:
|
|
3836
|
value = parmObj.getValue()
|
|
3844
|
value = parmObj.getValue()
|
|
3837
|
self.specGraphPath.setText(value)
|
|
3845
|
self.specGraphPath.setText(value)
|
|
3838
|
|
|
3846
|
|
|
3839
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3847
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3840
|
if parmObj:
|
|
3848
|
if parmObj:
|
|
3841
|
value = parmObj.getValue()
|
|
3849
|
value = parmObj.getValue()
|
|
3842
|
self.specGgraphftpratio.setText(str(value))
|
|
3850
|
self.specGgraphftpratio.setText(str(value))
|
|
3843
|
|
|
3851
|
|
|
3844
|
opObj = puObj.getOperationObj(name='SpectraWriter')
|
|
3852
|
opObj = puObj.getOperationObj(name='SpectraWriter')
|
|
3845
|
if opObj == None:
|
|
3853
|
if opObj == None:
|
|
3846
|
self.specOutputPath.clear()
|
|
3854
|
self.specOutputPath.clear()
|
|
3847
|
self.specOutputblocksperfile.clear()
|
|
3855
|
self.specOutputblocksperfile.clear()
|
|
3848
|
else:
|
|
3856
|
else:
|
|
3849
|
value = opObj.getParameterObj(parameterName='path')
|
|
3857
|
value = opObj.getParameterObj(parameterName='path')
|
|
3850
|
if value == None:
|
|
3858
|
if value == None:
|
|
3851
|
self.specOutputPath.clear()
|
|
3859
|
self.specOutputPath.clear()
|
|
3852
|
else:
|
|
3860
|
else:
|
|
3853
|
value = opObj.getParameterValue(parameterName='path')
|
|
3861
|
value = opObj.getParameterValue(parameterName='path')
|
|
3854
|
path = str(value)
|
|
3862
|
path = str(value)
|
|
3855
|
self.specOutputPath.setText(path)
|
|
3863
|
self.specOutputPath.setText(path)
|
|
3856
|
value = opObj.getParameterObj(parameterName='blocksPerFile')
|
|
3864
|
value = opObj.getParameterObj(parameterName='blocksPerFile')
|
|
3857
|
if value == None:
|
|
3865
|
if value == None:
|
|
3858
|
self.specOutputblocksperfile.clear()
|
|
3866
|
self.specOutputblocksperfile.clear()
|
|
3859
|
else:
|
|
3867
|
else:
|
|
3860
|
value = opObj.getParameterValue(parameterName='blocksPerFile')
|
|
3868
|
value = opObj.getParameterValue(parameterName='blocksPerFile')
|
|
3861
|
blocksperfile = str(value)
|
|
3869
|
blocksperfile = str(value)
|
|
3862
|
self.specOutputblocksperfile.setText(blocksperfile)
|
|
3870
|
self.specOutputblocksperfile.setText(blocksperfile)
|
|
3863
|
|
|
3871
|
|
|
3864
|
return
|
|
3872
|
return
|
|
3865
|
|
|
3873
|
|
|
3866
|
def __refreshSpectraHeisWindow(self, puObj):
|
|
3874
|
def __refreshSpectraHeisWindow(self, puObj):
|
|
3867
|
|
|
3875
|
|
|
3868
|
opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis")
|
|
3876
|
opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis")
|
|
3869
|
if opObj == None:
|
|
3877
|
if opObj == None:
|
|
3870
|
self.specHeisOpIncoherent.clear()
|
|
3878
|
self.specHeisOpIncoherent.clear()
|
|
3871
|
self.specHeisOpCebIncoherent.setCheckState(0)
|
|
3879
|
self.specHeisOpCebIncoherent.setCheckState(0)
|
|
3872
|
else:
|
|
3880
|
else:
|
|
3873
|
for parmObj in opObj.getParameterObjList():
|
|
3881
|
for parmObj in opObj.getParameterObjList():
|
|
3874
|
if parmObj.name == 'timeInterval':
|
|
3882
|
if parmObj.name == 'timeInterval':
|
|
3875
|
value = opObj.getParameterValue(parameterName='timeInterval')
|
|
3883
|
value = opObj.getParameterValue(parameterName='timeInterval')
|
|
3876
|
self.specHeisOpIncoherent.setText(str(value))
|
|
3884
|
self.specHeisOpIncoherent.setText(str(value))
|
|
3877
|
self.specHeisOpIncoherent.setEnabled(True)
|
|
3885
|
self.specHeisOpIncoherent.setEnabled(True)
|
|
3878
|
self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3886
|
self.specHeisOpCebIncoherent.setCheckState(QtCore.Qt.Checked)
|
|
3879
|
self.specHeisOpCobIncInt.setCurrentIndex(0)
|
|
3887
|
self.specHeisOpCobIncInt.setCurrentIndex(0)
|
|
3880
|
|
|
3888
|
|
|
3881
|
# SpectraHeis Graph
|
|
3889
|
# SpectraHeis Graph
|
|
3882
|
|
|
3890
|
|
|
3883
|
self.specHeisGgraphXminXmax.clear()
|
|
3891
|
self.specHeisGgraphXminXmax.clear()
|
|
3884
|
self.specHeisGgraphYminYmax.clear()
|
|
3892
|
self.specHeisGgraphYminYmax.clear()
|
|
3885
|
|
|
3893
|
|
|
3886
|
self.specHeisGgraphChannelList.clear()
|
|
3894
|
self.specHeisGgraphChannelList.clear()
|
|
3887
|
self.specHeisGgraphTminTmax.clear()
|
|
3895
|
self.specHeisGgraphTminTmax.clear()
|
|
3888
|
self.specHeisGgraphTimeRange.clear()
|
|
3896
|
self.specHeisGgraphTimeRange.clear()
|
|
3889
|
self.specHeisGgraphftpratio.clear()
|
|
3897
|
self.specHeisGgraphftpratio.clear()
|
|
3890
|
|
|
3898
|
|
|
3891
|
opObj = puObj.getOperationObj(name='SpectraHeisScope')
|
|
3899
|
opObj = puObj.getOperationObj(name='SpectraHeisScope')
|
|
3892
|
if opObj == None:
|
|
3900
|
if opObj == None:
|
|
3893
|
self.specHeisGraphCebSpectraplot.setCheckState(0)
|
|
3901
|
self.specHeisGraphCebSpectraplot.setCheckState(0)
|
|
3894
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
3902
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
3895
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
3903
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
3896
|
else:
|
|
3904
|
else:
|
|
3897
|
operationSpectraHeisScope = "Enable"
|
|
3905
|
operationSpectraHeisScope = "Enable"
|
|
3898
|
self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3906
|
self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked)
|
|
3899
|
|
|
3907
|
|
|
3900
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3908
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3901
|
if parmObj == None:
|
|
3909
|
if parmObj == None:
|
|
3902
|
self.specHeisGgraphChannelList.clear()
|
|
3910
|
self.specHeisGgraphChannelList.clear()
|
|
3903
|
else:
|
|
3911
|
else:
|
|
3904
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3912
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3905
|
channelListSpectraHeisScope = str(value)[1:-1]
|
|
3913
|
channelListSpectraHeisScope = str(value)[1:-1]
|
|
3906
|
self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope)
|
|
3914
|
self.specHeisGgraphChannelList.setText(channelListSpectraHeisScope)
|
|
3907
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
3915
|
self.specHeisGgraphChannelList.setEnabled(True)
|
|
3908
|
|
|
3916
|
|
|
3909
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3917
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3910
|
if parmObj == None:
|
|
3918
|
if parmObj == None:
|
|
3911
|
self.specHeisGgraphXminXmax.clear()
|
|
3919
|
self.specHeisGgraphXminXmax.clear()
|
|
3912
|
else:
|
|
3920
|
else:
|
|
3913
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3921
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3914
|
value1 = str(value1)
|
|
3922
|
value1 = str(value1)
|
|
3915
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3923
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3916
|
value2 = str(value2)
|
|
3924
|
value2 = str(value2)
|
|
3917
|
value = value1 + "," + value2
|
|
3925
|
value = value1 + "," + value2
|
|
3918
|
self.specHeisGgraphXminXmax.setText(value)
|
|
3926
|
self.specHeisGgraphXminXmax.setText(value)
|
|
3919
|
self.specHeisGgraphXminXmax.setEnabled(True)
|
|
3927
|
self.specHeisGgraphXminXmax.setEnabled(True)
|
|
3920
|
|
|
3928
|
|
|
3921
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3929
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3922
|
if parmObj == None:
|
|
3930
|
if parmObj == None:
|
|
3923
|
self.specHeisGgraphYminYmax.clear()
|
|
3931
|
self.specHeisGgraphYminYmax.clear()
|
|
3924
|
else:
|
|
3932
|
else:
|
|
3925
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3933
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3926
|
value1 = str(value1)
|
|
3934
|
value1 = str(value1)
|
|
3927
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3935
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
3928
|
value2 = str(value2)
|
|
3936
|
value2 = str(value2)
|
|
3929
|
value = value1 + "," + value2
|
|
3937
|
value = value1 + "," + value2
|
|
3930
|
self.specHeisGgraphYminYmax.setText(value)
|
|
3938
|
self.specHeisGgraphYminYmax.setText(value)
|
|
3931
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
3939
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
3932
|
|
|
3940
|
|
|
3933
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3941
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
3934
|
if parmObj == None:
|
|
3942
|
if parmObj == None:
|
|
3935
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
3943
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
3936
|
else:
|
|
3944
|
else:
|
|
3937
|
self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3945
|
self.specHeisGraphSaveSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3938
|
|
|
3946
|
|
|
3939
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3947
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
3940
|
if parmObj == None:
|
|
3948
|
if parmObj == None:
|
|
3941
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
3949
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
3942
|
else:
|
|
3950
|
else:
|
|
3943
|
self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3951
|
self.specHeisGraphftpSpectra.setCheckState(QtCore.Qt.Checked)
|
|
3944
|
|
|
3952
|
|
|
3945
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3953
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
3946
|
if parmObj:
|
|
3954
|
if parmObj:
|
|
3947
|
value = parmObj.getValue()
|
|
3955
|
value = parmObj.getValue()
|
|
3948
|
self.specHeisGraphPath.setText(value)
|
|
3956
|
self.specHeisGraphPath.setText(value)
|
|
3949
|
|
|
3957
|
|
|
3950
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3958
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
3951
|
if parmObj:
|
|
3959
|
if parmObj:
|
|
3952
|
value = parmObj.getValue()
|
|
3960
|
value = parmObj.getValue()
|
|
3953
|
self.specHeisGgraphftpratio.setText(str(value))
|
|
3961
|
self.specHeisGgraphftpratio.setText(str(value))
|
|
3954
|
|
|
3962
|
|
|
3955
|
opObj = puObj.getOperationObj(name='RTIfromSpectraHeis')
|
|
3963
|
opObj = puObj.getOperationObj(name='RTIfromSpectraHeis')
|
|
3956
|
|
|
3964
|
|
|
3957
|
if opObj == None:
|
|
3965
|
if opObj == None:
|
|
3958
|
self.specHeisGraphCebRTIplot.setCheckState(0)
|
|
3966
|
self.specHeisGraphCebRTIplot.setCheckState(0)
|
|
3959
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
3967
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
3960
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
3968
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
3961
|
else:
|
|
3969
|
else:
|
|
3962
|
self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3970
|
self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
3963
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3971
|
parmObj = opObj.getParameterObj(parameterName='channelList')
|
|
3964
|
if parmObj == None:
|
|
3972
|
if parmObj == None:
|
|
3965
|
self.specHeisGgraphChannelList.clear()
|
|
3973
|
self.specHeisGgraphChannelList.clear()
|
|
3966
|
else:
|
|
3974
|
else:
|
|
3967
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3975
|
value = opObj.getParameterValue(parameterName='channelList')
|
|
3968
|
channelListRTIPlot = str(value)[1:-1]
|
|
3976
|
channelListRTIPlot = str(value)[1:-1]
|
|
3969
|
self.specGgraphChannelList.setText(channelListRTIPlot)
|
|
3977
|
self.specGgraphChannelList.setText(channelListRTIPlot)
|
|
3970
|
self.specGgraphChannelList.setEnabled(True)
|
|
3978
|
self.specGgraphChannelList.setEnabled(True)
|
|
3971
|
|
|
3979
|
|
|
3972
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3980
|
parmObj = opObj.getParameterObj(parameterName='xmin')
|
|
3973
|
if parmObj == None:
|
|
3981
|
if parmObj == None:
|
|
3974
|
self.specHeisGgraphTminTmax.clear()
|
|
3982
|
self.specHeisGgraphTminTmax.clear()
|
|
3975
|
else:
|
|
3983
|
else:
|
|
3976
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3984
|
value1 = opObj.getParameterValue(parameterName='xmin')
|
|
3977
|
value1 = str(value1)
|
|
3985
|
value1 = str(value1)
|
|
3978
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3986
|
value2 = opObj.getParameterValue(parameterName='xmax')
|
|
3979
|
value2 = str(value2)
|
|
3987
|
value2 = str(value2)
|
|
3980
|
value = value1 + "," + value2
|
|
3988
|
value = value1 + "," + value2
|
|
3981
|
self.specHeisGgraphTminTmax.setText(value)
|
|
3989
|
self.specHeisGgraphTminTmax.setText(value)
|
|
3982
|
self.specHeisGgraphTminTmax.setEnabled(True)
|
|
3990
|
self.specHeisGgraphTminTmax.setEnabled(True)
|
|
3983
|
|
|
3991
|
|
|
3984
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3992
|
parmObj = opObj.getParameterObj(parameterName='timerange')
|
|
3985
|
if parmObj == None:
|
|
3993
|
if parmObj == None:
|
|
3986
|
self.specGgraphTimeRange.clear()
|
|
3994
|
self.specGgraphTimeRange.clear()
|
|
3987
|
else:
|
|
3995
|
else:
|
|
3988
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3996
|
value1 = opObj.getParameterValue(parameterName='timerange')
|
|
3989
|
value1 = str(value1)
|
|
3997
|
value1 = str(value1)
|
|
3990
|
self.specHeisGgraphTimeRange.setText(value1)
|
|
3998
|
self.specHeisGgraphTimeRange.setText(value1)
|
|
3991
|
self.specHeisGgraphTimeRange.setEnabled(True)
|
|
3999
|
self.specHeisGgraphTimeRange.setEnabled(True)
|
|
3992
|
|
|
4000
|
|
|
3993
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
4001
|
parmObj = opObj.getParameterObj(parameterName='ymin')
|
|
3994
|
if parmObj == None:
|
|
4002
|
if parmObj == None:
|
|
3995
|
self.specHeisGgraphYminYmax.clear()
|
|
4003
|
self.specHeisGgraphYminYmax.clear()
|
|
3996
|
else:
|
|
4004
|
else:
|
|
3997
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
4005
|
value1 = opObj.getParameterValue(parameterName='ymin')
|
|
3998
|
value1 = str(value1)
|
|
4006
|
value1 = str(value1)
|
|
3999
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
4007
|
value2 = opObj.getParameterValue(parameterName='ymax')
|
|
4000
|
value2 = str(value2)
|
|
4008
|
value2 = str(value2)
|
|
4001
|
value = value1 + "," + value2
|
|
4009
|
value = value1 + "," + value2
|
|
4002
|
self.specHeisGgraphYminYmax.setText(value)
|
|
4010
|
self.specHeisGgraphYminYmax.setText(value)
|
|
4003
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
4011
|
self.specHeisGgraphYminYmax.setEnabled(True)
|
|
4004
|
|
|
4012
|
|
|
4005
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
4013
|
parmObj = opObj.getParameterObj(parameterName="save")
|
|
4006
|
if parmObj == None:
|
|
4014
|
if parmObj == None:
|
|
4007
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
4015
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
4008
|
else:
|
|
4016
|
else:
|
|
4009
|
self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
4017
|
self.specHeisGraphSaveRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
4010
|
|
|
4018
|
|
|
4011
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
4019
|
parmObj = opObj.getParameterObj(parameterName="ftp")
|
|
4012
|
if parmObj == None:
|
|
4020
|
if parmObj == None:
|
|
4013
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
4021
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
4014
|
else:
|
|
4022
|
else:
|
|
4015
|
self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
4023
|
self.specHeisGraphftpRTIplot.setCheckState(QtCore.Qt.Checked)
|
|
4016
|
|
|
4024
|
|
|
4017
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
4025
|
parmObj = opObj.getParameterObj(parameterName="figpath")
|
|
4018
|
if parmObj:
|
|
4026
|
if parmObj:
|
|
4019
|
value = parmObj.getValue()
|
|
4027
|
value = parmObj.getValue()
|
|
4020
|
self.specHeisGraphPath.setText(value)
|
|
4028
|
self.specHeisGraphPath.setText(value)
|
|
4021
|
|
|
4029
|
|
|
4022
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
4030
|
parmObj = opObj.getParameterObj(parameterName="wr_period")
|
|
4023
|
if parmObj:
|
|
4031
|
if parmObj:
|
|
4024
|
value = parmObj.getValue()
|
|
4032
|
value = parmObj.getValue()
|
|
4025
|
self.specHeisGgraphftpratio.setText(str(value))
|
|
4033
|
self.specHeisGgraphftpratio.setText(str(value))
|
|
4026
|
|
|
4034
|
|
|
4027
|
# outputSpectraHeisWrite
|
|
4035
|
# outputSpectraHeisWrite
|
|
4028
|
opObj = puObj.getOperationObj(name='FitsWriter')
|
|
4036
|
opObj = puObj.getOperationObj(name='FitsWriter')
|
|
4029
|
if opObj == None:
|
|
4037
|
if opObj == None:
|
|
4030
|
self.specHeisOutputPath.clear()
|
|
4038
|
self.specHeisOutputPath.clear()
|
|
4031
|
self.specHeisOutputblocksperfile.clear()
|
|
4039
|
self.specHeisOutputblocksperfile.clear()
|
|
4032
|
self.specHeisOutputMetada.clear()
|
|
4040
|
self.specHeisOutputMetada.clear()
|
|
4033
|
else:
|
|
4041
|
else:
|
|
4034
|
value = opObj.getParameterObj(parameterName='path')
|
|
4042
|
value = opObj.getParameterObj(parameterName='path')
|
|
4035
|
if value == None:
|
|
4043
|
if value == None:
|
|
4036
|
self.specHeisOutputPath.clear()
|
|
4044
|
self.specHeisOutputPath.clear()
|
|
4037
|
else:
|
|
4045
|
else:
|
|
4038
|
value = opObj.getParameterValue(parameterName='path')
|
|
4046
|
value = opObj.getParameterValue(parameterName='path')
|
|
4039
|
path = str(value)
|
|
4047
|
path = str(value)
|
|
4040
|
self.specHeisOutputPath.setText(path)
|
|
4048
|
self.specHeisOutputPath.setText(path)
|
|
4041
|
value = opObj.getParameterObj(parameterName='dataBlocksPerFile')
|
|
4049
|
value = opObj.getParameterObj(parameterName='dataBlocksPerFile')
|
|
4042
|
if value == None:
|
|
4050
|
if value == None:
|
|
4043
|
self.specHeisOutputblocksperfile.clear()
|
|
4051
|
self.specHeisOutputblocksperfile.clear()
|
|
4044
|
else:
|
|
4052
|
else:
|
|
4045
|
value = opObj.getParameterValue(parameterName='dataBlocksPerFile')
|
|
4053
|
value = opObj.getParameterValue(parameterName='dataBlocksPerFile')
|
|
4046
|
blocksperfile = str(value)
|
|
4054
|
blocksperfile = str(value)
|
|
4047
|
self.specHeisOutputblocksperfile.setText(blocksperfile)
|
|
4055
|
self.specHeisOutputblocksperfile.setText(blocksperfile)
|
|
4048
|
value = opObj.getParameterObj(parameterName='metadatafile')
|
|
4056
|
value = opObj.getParameterObj(parameterName='metadatafile')
|
|
4049
|
if value == None:
|
|
4057
|
if value == None:
|
|
4050
|
self.specHeisOutputMetada.clear()
|
|
4058
|
self.specHeisOutputMetada.clear()
|
|
4051
|
else:
|
|
4059
|
else:
|
|
4052
|
value = opObj.getParameterValue(parameterName='metadatafile')
|
|
4060
|
value = opObj.getParameterValue(parameterName='metadatafile')
|
|
4053
|
metadata_file = str(value)
|
|
4061
|
metadata_file = str(value)
|
|
4054
|
self.specHeisOutputMetada.setText(metadata_file)
|
|
4062
|
self.specHeisOutputMetada.setText(metadata_file)
|
|
4055
|
|
|
4063
|
|
|
4056
|
return
|
|
4064
|
return
|
|
4057
|
|
|
4065
|
|
|
4058
|
def __refreshCorrelationWindow(self, puObj):
|
|
4066
|
def __refreshCorrelationWindow(self, puObj):
|
|
4059
|
pass
|
|
4067
|
pass
|
|
4060
|
|
|
4068
|
|
|
4061
|
def refreshPUWindow(self, puObj):
|
|
4069
|
def refreshPUWindow(self, puObj):
|
|
4062
|
|
|
4070
|
|
|
4063
|
if puObj.datatype == 'Voltage':
|
|
4071
|
if puObj.datatype == 'Voltage':
|
|
4064
|
self.__refreshVoltageWindow(puObj)
|
|
4072
|
self.__refreshVoltageWindow(puObj)
|
|
4065
|
|
|
4073
|
|
|
4066
|
if puObj.datatype == 'Spectra':
|
|
4074
|
if puObj.datatype == 'Spectra':
|
|
4067
|
self.__refreshSpectraWindow(puObj)
|
|
4075
|
self.__refreshSpectraWindow(puObj)
|
|
4068
|
|
|
4076
|
|
|
4069
|
if puObj.datatype == 'SpectraHeis':
|
|
4077
|
if puObj.datatype == 'SpectraHeis':
|
|
4070
|
self.__refreshSpectraHeisWindow(puObj)
|
|
4078
|
self.__refreshSpectraHeisWindow(puObj)
|
|
4071
|
|
|
4079
|
|
|
4072
|
def refreshProjectProperties(self, projectObjView):
|
|
4080
|
def refreshProjectProperties(self, projectObjView):
|
|
4073
|
|
|
4081
|
|
|
4074
|
propertyBuffObj = PropertyBuffer()
|
|
4082
|
propertyBuffObj = PropertyBuffer()
|
|
4075
|
name = projectObjView.name
|
|
4083
|
name = projectObjView.name
|
|
4076
|
|
|
4084
|
|
|
4077
|
propertyBuffObj.append("Properties", "Name", projectObjView.name),
|
|
4085
|
propertyBuffObj.append("Properties", "Name", projectObjView.name),
|
|
4078
|
propertyBuffObj.append("Properties", "Description", projectObjView.description)
|
|
4086
|
propertyBuffObj.append("Properties", "Description", projectObjView.description)
|
|
4079
|
propertyBuffObj.append("Properties", "Workspace", self.pathWorkSpace)
|
|
4087
|
propertyBuffObj.append("Properties", "Workspace", self.pathWorkSpace)
|
|
4080
|
|
|
4088
|
|
|
4081
|
readUnitObj = projectObjView.getReadUnitObj()
|
|
4089
|
readUnitObj = projectObjView.getReadUnitObj()
|
|
4082
|
runOperationObj = readUnitObj.getOperationObj(name='run')
|
|
4090
|
runOperationObj = readUnitObj.getOperationObj(name='run')
|
|
4083
|
|
|
4091
|
|
|
4084
|
for thisParmObj in runOperationObj.getParameterObjList():
|
|
4092
|
for thisParmObj in runOperationObj.getParameterObjList():
|
|
4085
|
propertyBuffObj.append("Reading parms", thisParmObj.name, str(thisParmObj.getValue()))
|
|
4093
|
propertyBuffObj.append("Reading parms", thisParmObj.name, str(thisParmObj.getValue()))
|
|
4086
|
|
|
4094
|
|
|
4087
|
propertiesModel = propertyBuffObj.getPropertyModel()
|
|
4095
|
propertiesModel = propertyBuffObj.getPropertyModel()
|
|
4088
|
|
|
4096
|
|
|
4089
|
self.treeProjectProperties.setModel(propertiesModel)
|
|
4097
|
self.treeProjectProperties.setModel(propertiesModel)
|
|
4090
|
self.treeProjectProperties.expandAll()
|
|
4098
|
self.treeProjectProperties.expandAll()
|
|
4091
|
self.treeProjectProperties.resizeColumnToContents(0)
|
|
4099
|
self.treeProjectProperties.resizeColumnToContents(0)
|
|
4092
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4100
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4093
|
|
|
4101
|
|
|
4094
|
def refreshPUProperties(self, puObjView):
|
|
4102
|
def refreshPUProperties(self, puObjView):
|
|
4095
|
|
|
4103
|
|
|
4096
|
############ FTP CONFIG ################################
|
|
4104
|
############ FTP CONFIG ################################
|
|
4097
|
#Deleting FTP Conf. This processing unit have not got any
|
|
4105
|
#Deleting FTP Conf. This processing unit have not got any
|
|
4098
|
#FTP configuration by default
|
|
4106
|
#FTP configuration by default
|
|
4099
|
if puObjView.id in self.__puLocalFolder2FTP.keys():
|
|
4107
|
if puObjView.id in self.__puLocalFolder2FTP.keys():
|
|
4100
|
self.__puLocalFolder2FTP.pop(puObjView.id)
|
|
4108
|
self.__puLocalFolder2FTP.pop(puObjView.id)
|
|
4101
|
########################################################
|
|
4109
|
########################################################
|
|
4102
|
|
|
4110
|
|
|
4103
|
propertyBuffObj = PropertyBuffer()
|
|
4111
|
propertyBuffObj = PropertyBuffer()
|
|
4104
|
|
|
4112
|
|
|
4105
|
for thisOp in puObjView.getOperationObjList():
|
|
4113
|
for thisOp in puObjView.getOperationObjList():
|
|
4106
|
|
|
4114
|
|
|
4107
|
operationName = thisOp.name
|
|
4115
|
operationName = thisOp.name
|
|
4108
|
|
|
4116
|
|
|
4109
|
if operationName == 'run':
|
|
4117
|
if operationName == 'run':
|
|
4110
|
operationName = 'Properties'
|
|
4118
|
operationName = 'Properties'
|
|
4111
|
|
|
4119
|
|
|
4112
|
else:
|
|
4120
|
else:
|
|
4113
|
if not thisOp.getParameterObjList():
|
|
4121
|
if not thisOp.getParameterObjList():
|
|
4114
|
propertyBuffObj.append(operationName, '--', '--')
|
|
4122
|
propertyBuffObj.append(operationName, '--', '--')
|
|
4115
|
continue
|
|
4123
|
continue
|
|
4116
|
|
|
4124
|
|
|
4117
|
for thisParmObj in thisOp.getParameterObjList():
|
|
4125
|
for thisParmObj in thisOp.getParameterObjList():
|
|
4118
|
propertyBuffObj.append(operationName, thisParmObj.name, str(thisParmObj.getValue()))
|
|
4126
|
propertyBuffObj.append(operationName, thisParmObj.name, str(thisParmObj.getValue()))
|
|
4119
|
|
|
4127
|
|
|
4120
|
############ FTP CONFIG ################################
|
|
4128
|
############ FTP CONFIG ################################
|
|
4121
|
if thisParmObj.name == "ftp_wei" and thisParmObj.getValue():
|
|
4129
|
if thisParmObj.name == "ftp_wei" and thisParmObj.getValue():
|
|
4122
|
value = thisParmObj.getValue()
|
|
4130
|
value = thisParmObj.getValue()
|
|
4123
|
self.temporalFTP.ftp_wei = value
|
|
4131
|
self.temporalFTP.ftp_wei = value
|
|
4124
|
|
|
4132
|
|
|
4125
|
if thisParmObj.name == "exp_code" and thisParmObj.getValue():
|
|
4133
|
if thisParmObj.name == "exp_code" and thisParmObj.getValue():
|
|
4126
|
value = thisParmObj.getValue()
|
|
4134
|
value = thisParmObj.getValue()
|
|
4127
|
self.temporalFTP.exp_code = value
|
|
4135
|
self.temporalFTP.exp_code = value
|
|
4128
|
|
|
4136
|
|
|
4129
|
if thisParmObj.name == "sub_exp_code" and thisParmObj.getValue():
|
|
4137
|
if thisParmObj.name == "sub_exp_code" and thisParmObj.getValue():
|
|
4130
|
value = thisParmObj.getValue()
|
|
4138
|
value = thisParmObj.getValue()
|
|
4131
|
self.temporalFTP.sub_exp_code = value
|
|
4139
|
self.temporalFTP.sub_exp_code = value
|
|
4132
|
|
|
4140
|
|
|
4133
|
if thisParmObj.name == "plot_pos" and thisParmObj.getValue():
|
|
4141
|
if thisParmObj.name == "plot_pos" and thisParmObj.getValue():
|
|
4134
|
value = thisParmObj.getValue()
|
|
4142
|
value = thisParmObj.getValue()
|
|
4135
|
self.temporalFTP.plot_pos = value
|
|
4143
|
self.temporalFTP.plot_pos = value
|
|
4136
|
|
|
4144
|
|
|
4137
|
if thisParmObj.name == 'ftp' and thisParmObj.getValue():
|
|
4145
|
if thisParmObj.name == 'ftp' and thisParmObj.getValue():
|
|
4138
|
figpathObj = thisOp.getParameterObj('figpath')
|
|
4146
|
figpathObj = thisOp.getParameterObj('figpath')
|
|
4139
|
if figpathObj:
|
|
4147
|
if figpathObj:
|
|
4140
|
self.__puLocalFolder2FTP[puObjView.id] = figpathObj.getValue()
|
|
4148
|
self.__puLocalFolder2FTP[puObjView.id] = figpathObj.getValue()
|
|
4141
|
|
|
4149
|
|
|
4142
|
########################################################
|
|
4150
|
########################################################
|
|
4143
|
|
|
4151
|
|
|
4144
|
propertiesModel = propertyBuffObj.getPropertyModel()
|
|
4152
|
propertiesModel = propertyBuffObj.getPropertyModel()
|
|
4145
|
|
|
4153
|
|
|
4146
|
self.treeProjectProperties.setModel(propertiesModel)
|
|
4154
|
self.treeProjectProperties.setModel(propertiesModel)
|
|
4147
|
self.treeProjectProperties.expandAll()
|
|
4155
|
self.treeProjectProperties.expandAll()
|
|
4148
|
self.treeProjectProperties.resizeColumnToContents(0)
|
|
4156
|
self.treeProjectProperties.resizeColumnToContents(0)
|
|
4149
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4157
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4150
|
|
|
4158
|
|
|
4151
|
def refreshGraphicsId(self):
|
|
4159
|
def refreshGraphicsId(self):
|
|
4152
|
|
|
4160
|
|
|
4153
|
projectObj = self.getSelectedProjectObj()
|
|
4161
|
projectObj = self.getSelectedProjectObj()
|
|
4154
|
|
|
4162
|
|
|
4155
|
if not projectObj:
|
|
4163
|
if not projectObj:
|
|
4156
|
return
|
|
4164
|
return
|
|
4157
|
|
|
4165
|
|
|
4158
|
for idPU, puObj in projectObj.procUnitConfObjDict.items():
|
|
4166
|
for idPU, puObj in projectObj.procUnitConfObjDict.items():
|
|
4159
|
|
|
4167
|
|
|
4160
|
for opObj in puObj.getOperationObjList():
|
|
4168
|
for opObj in puObj.getOperationObjList():
|
|
4161
|
|
|
4169
|
|
|
4162
|
if opObj.name not in ('Scope', 'SpectraPlot', 'CrossSpectraPlot', 'RTIPlot', 'CoherenceMap', 'PowerProfilePlot', 'Noise', 'SpectraHeisScope', 'RTIfromSpectraHeis'):
|
|
4170
|
if opObj.name not in ('Scope', 'SpectraPlot', 'CrossSpectraPlot', 'RTIPlot', 'CoherenceMap', 'PowerProfilePlot', 'Noise', 'SpectraHeisScope', 'RTIfromSpectraHeis'):
|
|
4163
|
continue
|
|
4171
|
continue
|
|
4164
|
|
|
4172
|
|
|
4165
|
opObj.changeParameter(name='id', value=opObj.id, format='int')
|
|
4173
|
opObj.changeParameter(name='id', value=opObj.id, format='int')
|
|
4166
|
|
|
4174
|
|
|
4167
|
def on_click(self, index):
|
|
4175
|
def on_click(self, index):
|
|
4168
|
|
|
4176
|
|
|
4169
|
self._disable_save_button()
|
|
4177
|
self._disable_save_button()
|
|
4170
|
self._disable_play_button()
|
|
4178
|
self._disable_play_button()
|
|
4171
|
|
|
4179
|
|
|
4172
|
self.console.clear()
|
|
4180
|
self.console.clear()
|
|
4173
|
|
|
4181
|
|
|
4174
|
self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index)
|
|
4182
|
self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index)
|
|
4175
|
|
|
4183
|
|
|
4176
|
projectObjView = self.getSelectedProjectObj()
|
|
4184
|
projectObjView = self.getSelectedProjectObj()
|
|
4177
|
|
|
4185
|
|
|
4178
|
if not projectObjView:
|
|
4186
|
if not projectObjView:
|
|
4179
|
return
|
|
4187
|
return
|
|
4180
|
|
|
4188
|
|
|
4181
|
self.create = False
|
|
4189
|
self.create = False
|
|
4182
|
selectedObjView = self.getSelectedItemObj()
|
|
4190
|
selectedObjView = self.getSelectedItemObj()
|
|
4183
|
|
|
4191
|
|
|
4184
|
self.refreshProjectWindow(projectObjView)
|
|
4192
|
self.refreshProjectWindow(projectObjView)
|
|
4185
|
self.refreshProjectProperties(projectObjView)
|
|
4193
|
self.refreshProjectProperties(projectObjView)
|
|
4186
|
|
|
4194
|
|
|
4187
|
#A project has been selected
|
|
4195
|
#A project has been selected
|
|
4188
|
if projectObjView == selectedObjView:
|
|
4196
|
if projectObjView == selectedObjView:
|
|
4189
|
|
|
4197
|
|
|
4190
|
self.tabProject.setEnabled(True)
|
|
4198
|
self.tabProject.setEnabled(True)
|
|
4191
|
self.tabVoltage.setEnabled(False)
|
|
4199
|
self.tabVoltage.setEnabled(False)
|
|
4192
|
self.tabSpectra.setEnabled(False)
|
|
4200
|
self.tabSpectra.setEnabled(False)
|
|
4193
|
self.tabCorrelation.setEnabled(False)
|
|
4201
|
self.tabCorrelation.setEnabled(False)
|
|
4194
|
self.tabSpectraHeis.setEnabled(False)
|
|
4202
|
self.tabSpectraHeis.setEnabled(False)
|
|
4195
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
4203
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
4196
|
|
|
4204
|
|
|
4197
|
if self.dateList:
|
|
4205
|
if self.dateList:
|
|
4198
|
self._enable_save_button()
|
|
4206
|
self._enable_save_button()
|
|
4199
|
self._enable_play_button()
|
|
4207
|
self._enable_play_button()
|
|
4200
|
|
|
4208
|
|
|
4201
|
return
|
|
4209
|
return
|
|
4202
|
|
|
4210
|
|
|
4203
|
#A processing unit has been selected
|
|
4211
|
#A processing unit has been selected
|
|
4204
|
voltEnable = False
|
|
4212
|
voltEnable = False
|
|
4205
|
specEnable = False
|
|
4213
|
specEnable = False
|
|
4206
|
corrEnable = False
|
|
4214
|
corrEnable = False
|
|
4207
|
specHeisEnable = False
|
|
4215
|
specHeisEnable = False
|
|
4208
|
tabSelected = self.tabProject
|
|
4216
|
tabSelected = self.tabProject
|
|
4209
|
|
|
4217
|
|
|
4210
|
puObj = selectedObjView
|
|
4218
|
puObj = selectedObjView
|
|
4211
|
|
|
4219
|
|
|
4212
|
self.refreshPUWindow(puObj)
|
|
4220
|
self.refreshPUWindow(puObj)
|
|
4213
|
self.refreshPUProperties(puObj)
|
|
4221
|
self.refreshPUProperties(puObj)
|
|
4214
|
self.showtabPUCreated(puObj.datatype)
|
|
4222
|
self.showtabPUCreated(puObj.datatype)
|
|
4215
|
|
|
4223
|
|
|
4216
|
if self.dateList:
|
|
4224
|
if self.dateList:
|
|
4217
|
self._enable_save_button()
|
|
4225
|
self._enable_save_button()
|
|
4218
|
self._enable_play_button()
|
|
4226
|
self._enable_play_button()
|
|
4219
|
|
|
4227
|
|
|
4220
|
def on_right_click(self, pos):
|
|
4228
|
def on_right_click(self, pos):
|
|
4221
|
|
|
4229
|
|
|
4222
|
self.menu = QtGui.QMenu()
|
|
4230
|
self.menu = QtGui.QMenu()
|
|
4223
|
quitAction0 = self.menu.addAction("Create a New Project")
|
|
4231
|
quitAction0 = self.menu.addAction("Create a New Project")
|
|
4224
|
quitAction1 = self.menu.addAction("Create a New Processing Unit")
|
|
4232
|
quitAction1 = self.menu.addAction("Create a New Processing Unit")
|
|
4225
|
quitAction2 = self.menu.addAction("Delete Item")
|
|
4233
|
quitAction2 = self.menu.addAction("Delete Item")
|
|
4226
|
quitAction3 = self.menu.addAction("Quit")
|
|
4234
|
quitAction3 = self.menu.addAction("Quit")
|
|
4227
|
|
|
4235
|
|
|
4228
|
if len(self.__itemTreeDict) == 0:
|
|
4236
|
if len(self.__itemTreeDict) == 0:
|
|
4229
|
quitAction2.setEnabled(False)
|
|
4237
|
quitAction2.setEnabled(False)
|
|
4230
|
else:
|
|
4238
|
else:
|
|
4231
|
quitAction2.setEnabled(True)
|
|
4239
|
quitAction2.setEnabled(True)
|
|
4232
|
|
|
4240
|
|
|
4233
|
action = self.menu.exec_(self.mapToGlobal(pos))
|
|
4241
|
action = self.menu.exec_(self.mapToGlobal(pos))
|
|
4234
|
|
|
4242
|
|
|
4235
|
if action == quitAction0:
|
|
4243
|
if action == quitAction0:
|
|
4236
|
self. setInputsProject_View()
|
|
4244
|
self. setInputsProject_View()
|
|
4237
|
self.create = True
|
|
4245
|
self.create = True
|
|
4238
|
|
|
4246
|
|
|
4239
|
if action == quitAction1:
|
|
4247
|
if action == quitAction1:
|
|
4240
|
if len(self.__projectObjDict) == 0:
|
|
4248
|
if len(self.__projectObjDict) == 0:
|
|
4241
|
outputstr = "You need to create a Project before adding a Processing Unit"
|
|
4249
|
outputstr = "You need to create a Project before adding a Processing Unit"
|
|
4242
|
self.console.clear()
|
|
4250
|
self.console.clear()
|
|
4243
|
self.console.append(outputstr)
|
|
4251
|
self.console.append(outputstr)
|
|
4244
|
return 0
|
|
4252
|
return 0
|
|
4245
|
else:
|
|
4253
|
else:
|
|
4246
|
self.addPUWindow()
|
|
4254
|
self.addPUWindow()
|
|
4247
|
self.console.clear()
|
|
4255
|
self.console.clear()
|
|
4248
|
self.console.append("Please, Choose the type of Processing Unit")
|
|
4256
|
self.console.append("Please, Choose the type of Processing Unit")
|
|
4249
|
# self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage")
|
|
4257
|
# self.console.append("If your Datatype is rawdata, you will start with processing unit Type Voltage")
|
|
4250
|
# self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation")
|
|
4258
|
# self.console.append("If your Datatype is pdata, you will choose between processing unit Type Spectra or Correlation")
|
|
4251
|
# self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis")
|
|
4259
|
# self.console.append("If your Datatype is fits, you will start with processing unit Type SpectraHeis")
|
|
4252
|
|
|
4260
|
|
|
4253
|
if action == quitAction2:
|
|
4261
|
if action == quitAction2:
|
|
4254
|
index = self.selectedItemTree
|
|
4262
|
index = self.selectedItemTree
|
|
4255
|
try:
|
|
4263
|
try:
|
|
4256
|
index.parent()
|
|
4264
|
index.parent()
|
|
4257
|
except:
|
|
4265
|
except:
|
|
4258
|
self.console.append('Please, first at all select a Project or Processing Unit')
|
|
4266
|
self.console.append('Please, first at all select a Project or Processing Unit')
|
|
4259
|
return 0
|
|
4267
|
return 0
|
|
4260
|
# print index.parent(),index
|
|
4268
|
# print index.parent(),index
|
|
4261
|
if index.parent() == None:
|
|
4269
|
if index.parent() == None:
|
|
4262
|
self.projectExplorerModel.removeRow(index.row())
|
|
4270
|
self.projectExplorerModel.removeRow(index.row())
|
|
4263
|
else:
|
|
4271
|
else:
|
|
4264
|
index.parent().removeRow(index.row())
|
|
4272
|
index.parent().removeRow(index.row())
|
|
4265
|
self.removeItemTreeFromProject()
|
|
4273
|
self.removeItemTreeFromProject()
|
|
4266
|
self.console.clear()
|
|
4274
|
self.console.clear()
|
|
4267
|
# for i in self.projectExplorerTree.selectionModel().selection().indexes():
|
|
4275
|
# for i in self.projectExplorerTree.selectionModel().selection().indexes():
|
|
4268
|
# print i.row()
|
|
4276
|
# print i.row()
|
|
4269
|
|
|
4277
|
|
|
4270
|
if action == quitAction3:
|
|
4278
|
if action == quitAction3:
|
|
4271
|
self.close()
|
|
4279
|
self.close()
|
|
4272
|
return 0
|
|
4280
|
return 0
|
|
4273
|
|
|
4281
|
|
|
4274
|
def createProjectView(self, id):
|
|
4282
|
def createProjectView(self, id):
|
|
4275
|
|
|
4283
|
|
|
4276
|
# project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow()
|
|
4284
|
# project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow()
|
|
4277
|
id = str(id)
|
|
4285
|
id = str(id)
|
|
4278
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4286
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4279
|
|
|
4287
|
|
|
4280
|
if not projectParms.isValid():
|
|
4288
|
if not projectParms.isValid():
|
|
4281
|
return None
|
|
4289
|
return None
|
|
4282
|
|
|
4290
|
|
|
4283
|
projectObjView = Project()
|
|
4291
|
projectObjView = Project()
|
|
4284
|
projectObjView.setup(id=id, name=projectParms.name, description=projectParms.description)
|
|
4292
|
projectObjView.setup(id=id, name=projectParms.name, description=projectParms.description)
|
|
4285
|
|
|
4293
|
|
|
4286
|
self.__projectObjDict[id] = projectObjView
|
|
4294
|
self.__projectObjDict[id] = projectObjView
|
|
4287
|
self.addProject2ProjectExplorer(id=id, name=projectObjView.name)
|
|
4295
|
self.addProject2ProjectExplorer(id=id, name=projectObjView.name)
|
|
4288
|
|
|
4296
|
|
|
4289
|
return projectObjView
|
|
4297
|
return projectObjView
|
|
4290
|
|
|
4298
|
|
|
4291
|
def updateProjectView(self):
|
|
4299
|
def updateProjectView(self):
|
|
4292
|
|
|
4300
|
|
|
4293
|
# project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow()
|
|
4301
|
# project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow()
|
|
4294
|
|
|
4302
|
|
|
4295
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4303
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4296
|
|
|
4304
|
|
|
4297
|
if not projectParms.isValid():
|
|
4305
|
if not projectParms.isValid():
|
|
4298
|
return None
|
|
4306
|
return None
|
|
4299
|
|
|
4307
|
|
|
4300
|
projectObjView = self.getSelectedProjectObj()
|
|
4308
|
projectObjView = self.getSelectedProjectObj()
|
|
4301
|
|
|
4309
|
|
|
4302
|
if not projectObjView:
|
|
4310
|
if not projectObjView:
|
|
4303
|
self.console.append("Please select a project before update it")
|
|
4311
|
self.console.append("Please select a project before update it")
|
|
4304
|
return None
|
|
4312
|
return None
|
|
4305
|
|
|
4313
|
|
|
4306
|
projectObjView.update(name=projectParms.name, description=projectParms.description)
|
|
4314
|
projectObjView.update(name=projectParms.name, description=projectParms.description)
|
|
4307
|
|
|
4315
|
|
|
4308
|
return projectObjView
|
|
4316
|
return projectObjView
|
|
4309
|
|
|
4317
|
|
|
4310
|
def createReadUnitView(self, projectObjView, idReadUnit=None):
|
|
4318
|
def createReadUnitView(self, projectObjView, idReadUnit=None):
|
|
4311
|
|
|
4319
|
|
|
4312
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4320
|
projectParms = self.__getParmsFromProjectWindow()
|
|
4313
|
|
|
4321
|
|
|
4314
|
if not projectParms.isValid():
|
|
4322
|
if not projectParms.isValid():
|
|
4315
|
return None
|
|
4323
|
return None
|
|
4316
|
|
|
4324
|
|
|
4317
|
if projectParms.datatype in ("Voltage", "Spectra", "Fits"):
|
|
4325
|
if projectParms.datatype in ("Voltage", "Spectra", "Fits"):
|
|
4318
|
readUnitConfObj = projectObjView.addReadUnit(id=idReadUnit,
|
|
4326
|
readUnitConfObj = projectObjView.addReadUnit(id=idReadUnit,
|
|
4319
|
datatype=projectParms.datatype,
|
|
4327
|
datatype=projectParms.datatype,
|
|
4320
|
path=projectParms.dpath,
|
|
4328
|
path=projectParms.dpath,
|
|
4321
|
startDate=projectParms.startDate,
|
|
4329
|
startDate=projectParms.startDate,
|
|
4322
|
endDate=projectParms.endDate,
|
|
4330
|
endDate=projectParms.endDate,
|
|
4323
|
startTime=projectParms.startTime,
|
|
4331
|
startTime=projectParms.startTime,
|
|
4324
|
endTime=projectParms.endTime,
|
|
4332
|
endTime=projectParms.endTime,
|
|
4325
|
online=projectParms.online,
|
|
4333
|
online=projectParms.online,
|
|
4326
|
walk=projectParms.walk
|
|
4334
|
walk=projectParms.walk
|
|
4327
|
)
|
|
4335
|
)
|
|
4328
|
|
|
4336
|
|
|
4329
|
if projectParms.set:
|
|
4337
|
if projectParms.set:
|
|
4330
|
readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int")
|
|
4338
|
readUnitConfObj.addParameter(name="set", value=projectParms.set, format="int")
|
|
4331
|
|
|
4339
|
|
|
4332
|
if projectParms.delay:
|
|
4340
|
if projectParms.delay:
|
|
4333
|
readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int")
|
|
4341
|
readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int")
|
|
4334
|
|
|
4342
|
|
|
4335
|
if projectParms.expLabel:
|
|
4343
|
if projectParms.expLabel:
|
|
4336
|
readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel)
|
|
4344
|
readUnitConfObj.addParameter(name="expLabel", value=projectParms.expLabel)
|
|
4337
|
|
|
4345
|
|
|
4338
|
readUnitConfObj.addOperation(name="printInfo")
|
|
4346
|
readUnitConfObj.addOperation(name="printInfo")
|
|
4339
|
|
|
4347
|
|
|
4340
|
if projectParms.datatype == "USRP":
|
|
4348
|
if projectParms.datatype == "USRP":
|
|
4341
|
readUnitConfObj = projectObjView.addReadUnit(id=idReadUnit,
|
|
4349
|
readUnitConfObj = projectObjView.addReadUnit(id=idReadUnit,
|
|
4342
|
datatype=projectParms.datatype,
|
|
4350
|
datatype=projectParms.datatype,
|
|
4343
|
path=projectParms.dpath,
|
|
4351
|
path=projectParms.dpath,
|
|
4344
|
startDate=projectParms.startDate,
|
|
4352
|
startDate=projectParms.startDate,
|
|
4345
|
endDate=projectParms.endDate,
|
|
4353
|
endDate=projectParms.endDate,
|
|
4346
|
startTime=projectParms.startTime,
|
|
4354
|
startTime=projectParms.startTime,
|
|
4347
|
endTime=projectParms.endTime,
|
|
4355
|
endTime=projectParms.endTime,
|
|
4348
|
online=projectParms.online,
|
|
4356
|
online=projectParms.online,
|
|
4349
|
ippKm=projectParms.ippKm
|
|
4357
|
ippKm=projectParms.ippKm
|
|
4350
|
)
|
|
4358
|
)
|
|
4351
|
|
|
4359
|
|
|
4352
|
if projectParms.delay:
|
|
4360
|
if projectParms.delay:
|
|
4353
|
readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int")
|
|
4361
|
readUnitConfObj.addParameter(name="delay", value=projectParms.delay, format="int")
|
|
4354
|
|
|
4362
|
|
|
4355
|
return readUnitConfObj
|
|
4363
|
return readUnitConfObj
|
|
4356
|
|
|
4364
|
|
|
4357
|
def updateReadUnitView(self, projectObjView, idReadUnit):
|
|
4365
|
def updateReadUnitView(self, projectObjView, idReadUnit):
|
|
4358
|
|
|
4366
|
|
|
4359
|
projectObjView.removeProcUnit(idReadUnit)
|
|
4367
|
projectObjView.removeProcUnit(idReadUnit)
|
|
4360
|
|
|
4368
|
|
|
4361
|
readUnitConfObj = self.createReadUnitView(projectObjView, idReadUnit)
|
|
4369
|
readUnitConfObj = self.createReadUnitView(projectObjView, idReadUnit)
|
|
4362
|
|
|
4370
|
|
|
4363
|
return readUnitConfObj
|
|
4371
|
return readUnitConfObj
|
|
4364
|
|
|
4372
|
|
|
4365
|
def createProcUnitView(self, projectObjView, datatype, inputId):
|
|
4373
|
def createProcUnitView(self, projectObjView, datatype, inputId):
|
|
4366
|
|
|
4374
|
|
|
4367
|
procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId)
|
|
4375
|
procUnitConfObj = projectObjView.addProcUnit(datatype=datatype, inputId=inputId)
|
|
4368
|
|
|
4376
|
|
|
4369
|
self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj
|
|
4377
|
self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj
|
|
4370
|
|
|
4378
|
|
|
4371
|
return procUnitConfObj
|
|
4379
|
return procUnitConfObj
|
|
4372
|
|
|
4380
|
|
|
4373
|
def updateProcUnitView(self, id):
|
|
4381
|
def updateProcUnitView(self, id):
|
|
4374
|
|
|
4382
|
|
|
4375
|
pass
|
|
4383
|
pass
|
|
4376
|
|
|
4384
|
|
|
4377
|
def addPUWindow(self):
|
|
4385
|
def addPUWindow(self):
|
|
4378
|
|
|
4386
|
|
|
4379
|
self.configUPWindowObj = UnitProcessWindow(self)
|
|
4387
|
self.configUPWindowObj = UnitProcessWindow(self)
|
|
4380
|
fatherObj = self.getSelectedItemObj()
|
|
4388
|
fatherObj = self.getSelectedItemObj()
|
|
4381
|
try:
|
|
4389
|
try:
|
|
4382
|
fatherObj.getElementName()
|
|
4390
|
fatherObj.getElementName()
|
|
4383
|
except:
|
|
4391
|
except:
|
|
4384
|
self.console.append("First left click on Project or Processing Unit")
|
|
4392
|
self.console.append("First left click on Project or Processing Unit")
|
|
4385
|
return 0
|
|
4393
|
return 0
|
|
4386
|
|
|
4394
|
|
|
4387
|
if fatherObj.getElementName() == 'Project':
|
|
4395
|
if fatherObj.getElementName() == 'Project':
|
|
4388
|
readUnitConfObj = fatherObj.getReadUnitObj()
|
|
4396
|
readUnitConfObj = fatherObj.getReadUnitObj()
|
|
4389
|
self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype)
|
|
4397
|
self.configUPWindowObj.dataTypeProject = str(readUnitConfObj.datatype)
|
|
4390
|
|
|
4398
|
|
|
4391
|
self.configUPWindowObj.getfromWindowList.append(fatherObj)
|
|
4399
|
self.configUPWindowObj.getfromWindowList.append(fatherObj)
|
|
4392
|
self.configUPWindowObj.loadTotalList()
|
|
4400
|
self.configUPWindowObj.loadTotalList()
|
|
4393
|
self.configUPWindowObj.show()
|
|
4401
|
self.configUPWindowObj.show()
|
|
4394
|
self.configUPWindowObj.closed.connect(self.createPUWindow)
|
|
4402
|
self.configUPWindowObj.closed.connect(self.createPUWindow)
|
|
4395
|
|
|
4403
|
|
|
4396
|
def createPUWindow(self):
|
|
4404
|
def createPUWindow(self):
|
|
4397
|
|
|
4405
|
|
|
4398
|
if not self.configUPWindowObj.create:
|
|
4406
|
if not self.configUPWindowObj.create:
|
|
4399
|
return
|
|
4407
|
return
|
|
4400
|
|
|
4408
|
|
|
4401
|
fatherObj = self.configUPWindowObj.getFromWindow
|
|
4409
|
fatherObj = self.configUPWindowObj.getFromWindow
|
|
4402
|
datatype = self.configUPWindowObj.typeofUP
|
|
4410
|
datatype = self.configUPWindowObj.typeofUP
|
|
4403
|
|
|
4411
|
|
|
4404
|
if fatherObj.getElementName() == 'Project':
|
|
4412
|
if fatherObj.getElementName() == 'Project':
|
|
4405
|
inputId = fatherObj.getReadUnitId()
|
|
4413
|
inputId = fatherObj.getReadUnitId()
|
|
4406
|
projectObjView = fatherObj
|
|
4414
|
projectObjView = fatherObj
|
|
4407
|
else:
|
|
4415
|
else:
|
|
4408
|
inputId = fatherObj.getId()
|
|
4416
|
inputId = fatherObj.getId()
|
|
4409
|
projectObjView = self.getSelectedProjectObj()
|
|
4417
|
projectObjView = self.getSelectedProjectObj()
|
|
4410
|
|
|
4418
|
|
|
4411
|
if not projectObjView:
|
|
4419
|
if not projectObjView:
|
|
4412
|
return
|
|
4420
|
return
|
|
4413
|
|
|
4421
|
|
|
4414
|
puObj = self.createProcUnitView(projectObjView, datatype, inputId)
|
|
4422
|
puObj = self.createProcUnitView(projectObjView, datatype, inputId)
|
|
4415
|
|
|
4423
|
|
|
4416
|
self.addPU2ProjectExplorer(puObj)
|
|
4424
|
self.addPU2ProjectExplorer(puObj)
|
|
4417
|
|
|
4425
|
|
|
4418
|
self.showtabPUCreated(datatype)
|
|
4426
|
self.showtabPUCreated(datatype)
|
|
4419
|
|
|
4427
|
|
|
4420
|
self.clearPUWindow(datatype)
|
|
4428
|
self.clearPUWindow(datatype)
|
|
4421
|
|
|
4429
|
|
|
4422
|
self.showPUinitView()
|
|
4430
|
self.showPUinitView()
|
|
4423
|
|
|
4431
|
|
|
4424
|
def addFTPConf2Operation(self, puObj, opObj):
|
|
4432
|
def addFTPConf2Operation(self, puObj, opObj):
|
|
4425
|
|
|
4433
|
|
|
4426
|
if not self.temporalFTP.create:
|
|
4434
|
if not self.temporalFTP.create:
|
|
4427
|
self.temporalFTP.setwithoutconfiguration()
|
|
4435
|
self.temporalFTP.setwithoutconfiguration()
|
|
4428
|
|
|
4436
|
|
|
4429
|
# opObj.addParameter(name='server', value=self.temporalFTP.server, format='str')
|
|
4437
|
# opObj.addParameter(name='server', value=self.temporalFTP.server, format='str')
|
|
4430
|
# opObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str')
|
|
4438
|
# opObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str')
|
|
4431
|
# opObj.addParameter(name='username', value=self.temporalFTP.username, format='str')
|
|
4439
|
# opObj.addParameter(name='username', value=self.temporalFTP.username, format='str')
|
|
4432
|
# opObj.addParameter(name='password', value=self.temporalFTP.password, format='str')
|
|
4440
|
# opObj.addParameter(name='password', value=self.temporalFTP.password, format='str')
|
|
4433
|
|
|
4441
|
|
|
4434
|
if self.temporalFTP.ftp_wei:
|
|
4442
|
if self.temporalFTP.ftp_wei:
|
|
4435
|
opObj.addParameter(name='ftp_wei', value=int(self.temporalFTP.ftp_wei), format='int')
|
|
4443
|
opObj.addParameter(name='ftp_wei', value=int(self.temporalFTP.ftp_wei), format='int')
|
|
4436
|
if self.temporalFTP.exp_code:
|
|
4444
|
if self.temporalFTP.exp_code:
|
|
4437
|
opObj.addParameter(name='exp_code', value=int(self.temporalFTP.exp_code), format='int')
|
|
4445
|
opObj.addParameter(name='exp_code', value=int(self.temporalFTP.exp_code), format='int')
|
|
4438
|
if self.temporalFTP.sub_exp_code:
|
|
4446
|
if self.temporalFTP.sub_exp_code:
|
|
4439
|
opObj.addParameter(name='sub_exp_code', value=int(self.temporalFTP.sub_exp_code), format='int')
|
|
4447
|
opObj.addParameter(name='sub_exp_code', value=int(self.temporalFTP.sub_exp_code), format='int')
|
|
4440
|
if self.temporalFTP.plot_pos:
|
|
4448
|
if self.temporalFTP.plot_pos:
|
|
4441
|
opObj.addParameter(name='plot_pos', value=int(self.temporalFTP.plot_pos), format='int')
|
|
4449
|
opObj.addParameter(name='plot_pos', value=int(self.temporalFTP.plot_pos), format='int')
|
|
4442
|
|
|
4450
|
|
|
4443
|
# def __checkFTPProcUnit(self, projectObj, localfolder):
|
|
4451
|
# def __checkFTPProcUnit(self, projectObj, localfolder):
|
|
4444
|
#
|
|
4452
|
#
|
|
4445
|
# puId = None
|
|
4453
|
# puId = None
|
|
4446
|
# puObj = None
|
|
4454
|
# puObj = None
|
|
4447
|
#
|
|
4455
|
#
|
|
4448
|
# for thisPuId, thisPuObj in projectObj.procUnitItems():
|
|
4456
|
# for thisPuId, thisPuObj in projectObj.procUnitItems():
|
|
4449
|
#
|
|
4457
|
#
|
|
4450
|
# if not thisPuObj.name == "SendToServer":
|
|
4458
|
# if not thisPuObj.name == "SendToServer":
|
|
4451
|
# continue
|
|
4459
|
# continue
|
|
4452
|
#
|
|
4460
|
#
|
|
4453
|
# opObj = thisPuObj.getOperationObj(name='run')
|
|
4461
|
# opObj = thisPuObj.getOperationObj(name='run')
|
|
4454
|
#
|
|
4462
|
#
|
|
4455
|
# parmObj = opObj.getParameterObj('localfolder')
|
|
4463
|
# parmObj = opObj.getParameterObj('localfolder')
|
|
4456
|
#
|
|
4464
|
#
|
|
4457
|
# #localfolder parameter should always be set, if it is not set then ProcUnit should be removed
|
|
4465
|
# #localfolder parameter should always be set, if it is not set then ProcUnit should be removed
|
|
4458
|
# if not parmObj:
|
|
4466
|
# if not parmObj:
|
|
4459
|
# projectObj.removeProcUnit(thisPuId)
|
|
4467
|
# projectObj.removeProcUnit(thisPuId)
|
|
4460
|
# continue
|
|
4468
|
# continue
|
|
4461
|
#
|
|
4469
|
#
|
|
4462
|
# thisLocalfolder = parmObj.getValue()
|
|
4470
|
# thisLocalfolder = parmObj.getValue()
|
|
4463
|
#
|
|
4471
|
#
|
|
4464
|
# if localfolder != thisLocalfolder:
|
|
4472
|
# if localfolder != thisLocalfolder:
|
|
4465
|
# continue
|
|
4473
|
# continue
|
|
4466
|
#
|
|
4474
|
#
|
|
4467
|
# puId = thisPuId
|
|
4475
|
# puId = thisPuId
|
|
4468
|
# puObj = thisPuObj
|
|
4476
|
# puObj = thisPuObj
|
|
4469
|
# break
|
|
4477
|
# break
|
|
4470
|
#
|
|
4478
|
#
|
|
4471
|
# return puObj
|
|
4479
|
# return puObj
|
|
4472
|
|
|
4480
|
|
|
4473
|
def createFTPProcUnitView(self):
|
|
4481
|
def createFTPProcUnitView(self):
|
|
4474
|
|
|
4482
|
|
|
4475
|
if not self.temporalFTP.create:
|
|
4483
|
if not self.temporalFTP.create:
|
|
4476
|
self.temporalFTP.setwithoutconfiguration()
|
|
4484
|
self.temporalFTP.setwithoutconfiguration()
|
|
4477
|
|
|
4485
|
|
|
4478
|
projectObj = self.getSelectedProjectObj()
|
|
4486
|
projectObj = self.getSelectedProjectObj()
|
|
4479
|
|
|
4487
|
|
|
4480
|
if not projectObj:
|
|
4488
|
if not projectObj:
|
|
4481
|
return
|
|
4489
|
return
|
|
4482
|
|
|
4490
|
|
|
4483
|
self.removeAllFTPProcUnitView(projectObj)
|
|
4491
|
self.removeAllFTPProcUnitView(projectObj)
|
|
4484
|
|
|
4492
|
|
|
4485
|
if not self.__puLocalFolder2FTP:
|
|
4493
|
if not self.__puLocalFolder2FTP:
|
|
4486
|
return
|
|
4494
|
return
|
|
4487
|
|
|
4495
|
|
|
4488
|
folderList = ",".join(self.__puLocalFolder2FTP.values())
|
|
4496
|
folderList = ",".join(self.__puLocalFolder2FTP.values())
|
|
4489
|
|
|
4497
|
|
|
4490
|
procUnitConfObj = projectObj.addProcUnit(name="SendToServer")
|
|
4498
|
procUnitConfObj = projectObj.addProcUnit(name="SendToServer")
|
|
4491
|
|
|
4499
|
|
|
4492
|
procUnitConfObj.addParameter(name='server', value=self.temporalFTP.server, format='str')
|
|
4500
|
procUnitConfObj.addParameter(name='server', value=self.temporalFTP.server, format='str')
|
|
4493
|
procUnitConfObj.addParameter(name='username', value=self.temporalFTP.username, format='str')
|
|
4501
|
procUnitConfObj.addParameter(name='username', value=self.temporalFTP.username, format='str')
|
|
4494
|
procUnitConfObj.addParameter(name='password', value=self.temporalFTP.password, format='str')
|
|
4502
|
procUnitConfObj.addParameter(name='password', value=self.temporalFTP.password, format='str')
|
|
4495
|
procUnitConfObj.addParameter(name='localfolder', value=folderList, format='list')
|
|
4503
|
procUnitConfObj.addParameter(name='localfolder', value=folderList, format='list')
|
|
4496
|
procUnitConfObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str')
|
|
4504
|
procUnitConfObj.addParameter(name='remotefolder', value=self.temporalFTP.remotefolder, format='str')
|
|
4497
|
procUnitConfObj.addParameter(name='ext', value=self.temporalFTP.extension, format='str')
|
|
4505
|
procUnitConfObj.addParameter(name='ext', value=self.temporalFTP.extension, format='str')
|
|
4498
|
procUnitConfObj.addParameter(name='period', value=self.temporalFTP.period, format='int')
|
|
4506
|
procUnitConfObj.addParameter(name='period', value=self.temporalFTP.period, format='int')
|
|
4499
|
procUnitConfObj.addParameter(name='protocol', value=self.temporalFTP.protocol, format='str')
|
|
4507
|
procUnitConfObj.addParameter(name='protocol', value=self.temporalFTP.protocol, format='str')
|
|
4500
|
|
|
4508
|
|
|
4501
|
procUnitConfObj.addParameter(name='ftp_wei', value=self.temporalFTP.ftp_wei, format='int')
|
|
4509
|
procUnitConfObj.addParameter(name='ftp_wei', value=self.temporalFTP.ftp_wei, format='int')
|
|
4502
|
procUnitConfObj.addParameter(name='exp_code', value=self.temporalFTP.exp_code, format='int')
|
|
4510
|
procUnitConfObj.addParameter(name='exp_code', value=self.temporalFTP.exp_code, format='int')
|
|
4503
|
procUnitConfObj.addParameter(name='sub_exp_code', value=self.temporalFTP.sub_exp_code, format='int')
|
|
4511
|
procUnitConfObj.addParameter(name='sub_exp_code', value=self.temporalFTP.sub_exp_code, format='int')
|
|
4504
|
procUnitConfObj.addParameter(name='plot_pos', value=self.temporalFTP.plot_pos, format='int')
|
|
4512
|
procUnitConfObj.addParameter(name='plot_pos', value=self.temporalFTP.plot_pos, format='int')
|
|
4505
|
|
|
4513
|
|
|
4506
|
self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj
|
|
4514
|
self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj
|
|
4507
|
|
|
4515
|
|
|
4508
|
def removeAllFTPProcUnitView(self, projectObj):
|
|
4516
|
def removeAllFTPProcUnitView(self, projectObj):
|
|
4509
|
|
|
4517
|
|
|
4510
|
for thisPuId, thisPuObj in projectObj.procUnitItems():
|
|
4518
|
for thisPuId, thisPuObj in projectObj.procUnitItems():
|
|
4511
|
|
|
4519
|
|
|
4512
|
if not thisPuObj.name == "SendToServer":
|
|
4520
|
if not thisPuObj.name == "SendToServer":
|
|
4513
|
continue
|
|
4521
|
continue
|
|
4514
|
|
|
4522
|
|
|
4515
|
projectObj.removeProcUnit(thisPuId)
|
|
4523
|
projectObj.removeProcUnit(thisPuId)
|
|
4516
|
|
|
4524
|
|
|
4517
|
if thisPuId not in self.__puObjDict.keys():
|
|
4525
|
if thisPuId not in self.__puObjDict.keys():
|
|
4518
|
continue
|
|
4526
|
continue
|
|
4519
|
|
|
4527
|
|
|
4520
|
self.__puObjDict.pop(thisPuId)
|
|
4528
|
self.__puObjDict.pop(thisPuId)
|
|
4521
|
|
|
4529
|
|
|
4522
|
def showPUinitView(self):
|
|
4530
|
def showPUinitView(self):
|
|
4523
|
|
|
4531
|
|
|
4524
|
self.propertiesModel = TreeModel()
|
|
4532
|
self.propertiesModel = TreeModel()
|
|
4525
|
self.propertiesModel.initPUVoltageView()
|
|
4533
|
self.propertiesModel.initPUVoltageView()
|
|
4526
|
self.treeProjectProperties.setModel(self.propertiesModel)
|
|
4534
|
self.treeProjectProperties.setModel(self.propertiesModel)
|
|
4527
|
self.treeProjectProperties.expandAll()
|
|
4535
|
self.treeProjectProperties.expandAll()
|
|
4528
|
self.treeProjectProperties.allColumnsShowFocus()
|
|
4536
|
self.treeProjectProperties.allColumnsShowFocus()
|
|
4529
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4537
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
4530
|
|
|
4538
|
|
|
4531
|
def saveFTPFromOpObj(self, operationObj):
|
|
4539
|
def saveFTPFromOpObj(self, operationObj):
|
|
4532
|
|
|
4540
|
|
|
4533
|
if operationObj.name != "SendByFTP":
|
|
4541
|
if operationObj.name != "SendByFTP":
|
|
4534
|
return
|
|
4542
|
return
|
|
4535
|
|
|
4543
|
|
|
4536
|
server = operationObj.getParameterValue("server")
|
|
4544
|
server = operationObj.getParameterValue("server")
|
|
4537
|
username = operationObj.getParameterValue("username")
|
|
4545
|
username = operationObj.getParameterValue("username")
|
|
4538
|
password = operationObj.getParameterValue("password")
|
|
4546
|
password = operationObj.getParameterValue("password")
|
|
4539
|
localfolder = operationObj.getParameterValue("localfolder")
|
|
4547
|
localfolder = operationObj.getParameterValue("localfolder")
|
|
4540
|
remotefolder = operationObj.getParameterValue("remotefolder")
|
|
4548
|
remotefolder = operationObj.getParameterValue("remotefolder")
|
|
4541
|
ext = operationObj.getParameterValue("ext")
|
|
4549
|
ext = operationObj.getParameterValue("ext")
|
|
4542
|
period = operationObj.getParameterValue("period")
|
|
4550
|
period = operationObj.getParameterValue("period")
|
|
4543
|
|
|
4551
|
|
|
4544
|
self.temporalFTP.save(server=server,
|
|
4552
|
self.temporalFTP.save(server=server,
|
|
4545
|
remotefolder=remotefolder,
|
|
4553
|
remotefolder=remotefolder,
|
|
4546
|
username=username,
|
|
4554
|
username=username,
|
|
4547
|
password=password,
|
|
4555
|
password=password,
|
|
4548
|
localfolder=localfolder,
|
|
4556
|
localfolder=localfolder,
|
|
4549
|
extension=ext)
|
|
4557
|
extension=ext)
|
|
4550
|
|
|
4558
|
|
|
4551
|
return
|
|
4559
|
return
|
|
4552
|
|
|
4560
|
|
|
4553
|
def saveFTPFromProcUnitObj(self, puObj):
|
|
4561
|
def saveFTPFromProcUnitObj(self, puObj):
|
|
4554
|
|
|
4562
|
|
|
4555
|
opObj = puObj.getOperationObj(name="run")
|
|
4563
|
opObj = puObj.getOperationObj(name="run")
|
|
4556
|
|
|
4564
|
|
|
4557
|
parmObj = opObj.getParameterObj(parameterName="server")
|
|
4565
|
parmObj = opObj.getParameterObj(parameterName="server")
|
|
4558
|
if parmObj == None:
|
|
4566
|
if parmObj == None:
|
|
4559
|
server = 'jro-app.igp.gob.pe'
|
|
4567
|
server = 'jro-app.igp.gob.pe'
|
|
4560
|
else:
|
|
4568
|
else:
|
|
4561
|
server = parmObj.getValue()
|
|
4569
|
server = parmObj.getValue()
|
|
4562
|
|
|
4570
|
|
|
4563
|
parmObj = opObj.getParameterObj(parameterName="remotefolder")
|
|
4571
|
parmObj = opObj.getParameterObj(parameterName="remotefolder")
|
|
4564
|
if parmObj == None:
|
|
4572
|
if parmObj == None:
|
|
4565
|
remotefolder = '/home/wmaster/graficos'
|
|
4573
|
remotefolder = '/home/wmaster/graficos'
|
|
4566
|
else:
|
|
4574
|
else:
|
|
4567
|
remotefolder = parmObj.getValue()
|
|
4575
|
remotefolder = parmObj.getValue()
|
|
4568
|
|
|
4576
|
|
|
4569
|
parmObj = opObj.getParameterObj(parameterName="username")
|
|
4577
|
parmObj = opObj.getParameterObj(parameterName="username")
|
|
4570
|
if parmObj == None:
|
|
4578
|
if parmObj == None:
|
|
4571
|
username = 'wmaster'
|
|
4579
|
username = 'wmaster'
|
|
4572
|
else:
|
|
4580
|
else:
|
|
4573
|
username = parmObj.getValue()
|
|
4581
|
username = parmObj.getValue()
|
|
4574
|
|
|
4582
|
|
|
4575
|
parmObj = opObj.getParameterObj(parameterName="password")
|
|
4583
|
parmObj = opObj.getParameterObj(parameterName="password")
|
|
4576
|
if parmObj == None:
|
|
4584
|
if parmObj == None:
|
|
4577
|
password = 'mst2010vhf'
|
|
4585
|
password = 'mst2010vhf'
|
|
4578
|
else:
|
|
4586
|
else:
|
|
4579
|
password = parmObj.getValue()
|
|
4587
|
password = parmObj.getValue()
|
|
4580
|
|
|
4588
|
|
|
4581
|
parmObj = opObj.getParameterObj(parameterName="ftp_wei")
|
|
4589
|
parmObj = opObj.getParameterObj(parameterName="ftp_wei")
|
|
4582
|
if parmObj == None:
|
|
4590
|
if parmObj == None:
|
|
4583
|
ftp_wei = 0
|
|
4591
|
ftp_wei = 0
|
|
4584
|
else:
|
|
4592
|
else:
|
|
4585
|
ftp_wei = parmObj.getValue()
|
|
4593
|
ftp_wei = parmObj.getValue()
|
|
4586
|
|
|
4594
|
|
|
4587
|
parmObj = opObj.getParameterObj(parameterName="exp_code")
|
|
4595
|
parmObj = opObj.getParameterObj(parameterName="exp_code")
|
|
4588
|
if parmObj == None:
|
|
4596
|
if parmObj == None:
|
|
4589
|
exp_code = 0
|
|
4597
|
exp_code = 0
|
|
4590
|
else:
|
|
4598
|
else:
|
|
4591
|
exp_code = parmObj.getValue()
|
|
4599
|
exp_code = parmObj.getValue()
|
|
4592
|
|
|
4600
|
|
|
4593
|
parmObj = opObj.getParameterObj(parameterName="sub_exp_code")
|
|
4601
|
parmObj = opObj.getParameterObj(parameterName="sub_exp_code")
|
|
4594
|
if parmObj == None:
|
|
4602
|
if parmObj == None:
|
|
4595
|
sub_exp_code = 0
|
|
4603
|
sub_exp_code = 0
|
|
4596
|
else:
|
|
4604
|
else:
|
|
4597
|
sub_exp_code = parmObj.getValue()
|
|
4605
|
sub_exp_code = parmObj.getValue()
|
|
4598
|
|
|
4606
|
|
|
4599
|
parmObj = opObj.getParameterObj(parameterName="plot_pos")
|
|
4607
|
parmObj = opObj.getParameterObj(parameterName="plot_pos")
|
|
4600
|
if parmObj == None:
|
|
4608
|
if parmObj == None:
|
|
4601
|
plot_pos = 0
|
|
4609
|
plot_pos = 0
|
|
4602
|
else:
|
|
4610
|
else:
|
|
4603
|
plot_pos = parmObj.getValue()
|
|
4611
|
plot_pos = parmObj.getValue()
|
|
4604
|
|
|
4612
|
|
|
4605
|
parmObj = opObj.getParameterObj(parameterName="localfolder")
|
|
4613
|
parmObj = opObj.getParameterObj(parameterName="localfolder")
|
|
4606
|
if parmObj == None:
|
|
4614
|
if parmObj == None:
|
|
4607
|
localfolder = None
|
|
4615
|
localfolder = None
|
|
4608
|
else:
|
|
4616
|
else:
|
|
4609
|
localfolder = parmObj.getValue()
|
|
4617
|
localfolder = parmObj.getValue()
|
|
4610
|
|
|
4618
|
|
|
4611
|
parmObj = opObj.getParameterObj(parameterName="ext")
|
|
4619
|
parmObj = opObj.getParameterObj(parameterName="ext")
|
|
4612
|
if parmObj == None:
|
|
4620
|
if parmObj == None:
|
|
4613
|
extension = '.png'
|
|
4621
|
extension = '.png'
|
|
4614
|
else:
|
|
4622
|
else:
|
|
4615
|
extension = parmObj.getValue()
|
|
4623
|
extension = parmObj.getValue()
|
|
4616
|
|
|
4624
|
|
|
4617
|
self.temporalFTP.save(server=server,
|
|
4625
|
self.temporalFTP.save(server=server,
|
|
4618
|
remotefolder=remotefolder,
|
|
4626
|
remotefolder=remotefolder,
|
|
4619
|
username=username,
|
|
4627
|
username=username,
|
|
4620
|
password=password,
|
|
4628
|
password=password,
|
|
4621
|
ftp_wei=ftp_wei,
|
|
4629
|
ftp_wei=ftp_wei,
|
|
4622
|
exp_code=exp_code,
|
|
4630
|
exp_code=exp_code,
|
|
4623
|
sub_exp_code=sub_exp_code,
|
|
4631
|
sub_exp_code=sub_exp_code,
|
|
4624
|
plot_pos=plot_pos,
|
|
4632
|
plot_pos=plot_pos,
|
|
4625
|
localfolder=localfolder,
|
|
4633
|
localfolder=localfolder,
|
|
4626
|
extension=extension)
|
|
4634
|
extension=extension)
|
|
4627
|
|
|
4635
|
|
|
4628
|
def addProject2ProjectExplorer(self, id, name):
|
|
4636
|
def addProject2ProjectExplorer(self, id, name):
|
|
4629
|
|
|
4637
|
|
|
4630
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4638
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4631
|
|
|
4639
|
|
|
4632
|
parentItem = self.projectExplorerModel.invisibleRootItem()
|
|
4640
|
parentItem = self.projectExplorerModel.invisibleRootItem()
|
|
4633
|
parentItem.appendRow(itemTree)
|
|
4641
|
parentItem.appendRow(itemTree)
|
|
4634
|
|
|
4642
|
|
|
4635
|
self.projectExplorerTree.setCurrentIndex(itemTree.index())
|
|
4643
|
self.projectExplorerTree.setCurrentIndex(itemTree.index())
|
|
4636
|
|
|
4644
|
|
|
4637
|
self.selectedItemTree = itemTree
|
|
4645
|
self.selectedItemTree = itemTree
|
|
4638
|
|
|
4646
|
|
|
4639
|
self.__itemTreeDict[id] = itemTree
|
|
4647
|
self.__itemTreeDict[id] = itemTree
|
|
4640
|
|
|
4648
|
|
|
4641
|
def addPU2ProjectExplorer(self, puObj):
|
|
4649
|
def addPU2ProjectExplorer(self, puObj):
|
|
4642
|
|
|
4650
|
|
|
4643
|
id, name = puObj.id, puObj.datatype
|
|
4651
|
id, name = puObj.id, puObj.datatype
|
|
4644
|
|
|
4652
|
|
|
4645
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4653
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4646
|
|
|
4654
|
|
|
4647
|
parentItem = self.selectedItemTree
|
|
4655
|
parentItem = self.selectedItemTree
|
|
4648
|
parentItem.appendRow(itemTree)
|
|
4656
|
parentItem.appendRow(itemTree)
|
|
4649
|
self.projectExplorerTree.expandAll()
|
|
4657
|
self.projectExplorerTree.expandAll()
|
|
4650
|
|
|
4658
|
|
|
4651
|
self.projectExplorerTree.setCurrentIndex(itemTree.index())
|
|
4659
|
self.projectExplorerTree.setCurrentIndex(itemTree.index())
|
|
4652
|
|
|
4660
|
|
|
4653
|
self.selectedItemTree = itemTree
|
|
4661
|
self.selectedItemTree = itemTree
|
|
4654
|
|
|
4662
|
|
|
4655
|
self.__itemTreeDict[id] = itemTree
|
|
4663
|
self.__itemTreeDict[id] = itemTree
|
|
4656
|
|
|
4664
|
|
|
4657
|
def addPU2PELoadXML(self, puObj):
|
|
4665
|
def addPU2PELoadXML(self, puObj):
|
|
4658
|
|
|
4666
|
|
|
4659
|
id, name, inputId = puObj.id, puObj.datatype, puObj.inputId
|
|
4667
|
id, name, inputId = puObj.id, puObj.datatype, puObj.inputId
|
|
4660
|
|
|
4668
|
|
|
4661
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4669
|
itemTree = QtGui.QStandardItem(QtCore.QString(str(name)))
|
|
4662
|
|
|
4670
|
|
|
4663
|
if self.__itemTreeDict.has_key(inputId):
|
|
4671
|
if self.__itemTreeDict.has_key(inputId):
|
|
4664
|
parentItem = self.__itemTreeDict[inputId]
|
|
4672
|
parentItem = self.__itemTreeDict[inputId]
|
|
4665
|
else:
|
|
4673
|
else:
|
|
4666
|
#If parent is a Reader object
|
|
4674
|
#If parent is a Reader object
|
|
4667
|
parentItem = self.__itemTreeDict[id[:-1]]
|
|
4675
|
parentItem = self.__itemTreeDict[id[:-1]]
|
|
4668
|
|
|
4676
|
|
|
4669
|
parentItem.appendRow(itemTree)
|
|
4677
|
parentItem.appendRow(itemTree)
|
|
4670
|
self.projectExplorerTree.expandAll()
|
|
4678
|
self.projectExplorerTree.expandAll()
|
|
4671
|
parentItem = itemTree
|
|
4679
|
parentItem = itemTree
|
|
4672
|
self.projectExplorerTree.setCurrentIndex(parentItem.index())
|
|
4680
|
self.projectExplorerTree.setCurrentIndex(parentItem.index())
|
|
4673
|
|
|
4681
|
|
|
4674
|
self.__itemTreeDict[id] = itemTree
|
|
4682
|
self.__itemTreeDict[id] = itemTree
|
|
4675
|
self.selectedItemTree = itemTree
|
|
4683
|
self.selectedItemTree = itemTree
|
|
4676
|
|
|
4684
|
|
|
4677
|
def getSelectedProjectObj(self):
|
|
4685
|
def getSelectedProjectObj(self):
|
|
4678
|
"""
|
|
4686
|
"""
|
|
4679
|
Return the current project object selected. If a processing unit is
|
|
4687
|
Return the current project object selected. If a processing unit is
|
|
4680
|
actually selected this function returns associated project.
|
|
4688
|
actually selected this function returns associated project.
|
|
4681
|
|
|
4689
|
|
|
4682
|
None if any project or processing unit is selected
|
|
4690
|
None if any project or processing unit is selected
|
|
4683
|
"""
|
|
4691
|
"""
|
|
4684
|
for key in self.__itemTreeDict.keys():
|
|
4692
|
for key in self.__itemTreeDict.keys():
|
|
4685
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
4693
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
4686
|
continue
|
|
4694
|
continue
|
|
4687
|
|
|
4695
|
|
|
4688
|
if self.__projectObjDict.has_key(key):
|
|
4696
|
if self.__projectObjDict.has_key(key):
|
|
4689
|
projectObj = self.__projectObjDict[key]
|
|
4697
|
projectObj = self.__projectObjDict[key]
|
|
4690
|
return projectObj
|
|
4698
|
return projectObj
|
|
4691
|
|
|
4699
|
|
|
4692
|
puObj = self.__puObjDict[key]
|
|
4700
|
puObj = self.__puObjDict[key]
|
|
4693
|
|
|
4701
|
|
|
4694
|
if puObj.parentId == None:
|
|
4702
|
if puObj.parentId == None:
|
|
4695
|
projectId = puObj.getId()[0]
|
|
4703
|
projectId = puObj.getId()[0]
|
|
4696
|
else:
|
|
4704
|
else:
|
|
4697
|
projectId = puObj.parentId
|
|
4705
|
projectId = puObj.parentId
|
|
4698
|
|
|
4706
|
|
|
4699
|
projectObj = self.__projectObjDict[projectId]
|
|
4707
|
projectObj = self.__projectObjDict[projectId]
|
|
4700
|
return projectObj
|
|
4708
|
return projectObj
|
|
4701
|
|
|
4709
|
|
|
4702
|
return None
|
|
4710
|
return None
|
|
4703
|
|
|
4711
|
|
|
4704
|
def getSelectedItemObj(self):
|
|
4712
|
def getSelectedItemObj(self):
|
|
4705
|
"""
|
|
4713
|
"""
|
|
4706
|
Return the current project or processing unit object selected
|
|
4714
|
Return the current project or processing unit object selected
|
|
4707
|
|
|
4715
|
|
|
4708
|
None if any project or processing unit is selected
|
|
4716
|
None if any project or processing unit is selected
|
|
4709
|
"""
|
|
4717
|
"""
|
|
4710
|
for key in self.__itemTreeDict.keys():
|
|
4718
|
for key in self.__itemTreeDict.keys():
|
|
4711
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
4719
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
4712
|
continue
|
|
4720
|
continue
|
|
4713
|
|
|
4721
|
|
|
4714
|
if self.__projectObjDict.has_key(key) == True:
|
|
4722
|
if self.__projectObjDict.has_key(key) == True:
|
|
4715
|
fatherObj = self.__projectObjDict[key]
|
|
4723
|
fatherObj = self.__projectObjDict[key]
|
|
4716
|
else:
|
|
4724
|
else:
|
|
4717
|
fatherObj = self.__puObjDict[key]
|
|
4725
|
fatherObj = self.__puObjDict[key]
|
|
4718
|
|
|
4726
|
|
|
4719
|
return fatherObj
|
|
4727
|
return fatherObj
|
|
4720
|
|
|
4728
|
|
|
4721
|
return None
|
|
4729
|
return None
|
|
4722
|
|
|
4730
|
|
|
4723
|
def _WarningWindow(self, text, information):
|
|
4731
|
def _WarningWindow(self, text, information):
|
|
4724
|
|
|
4732
|
|
|
4725
|
msgBox = QtGui.QMessageBox()
|
|
4733
|
msgBox = QtGui.QMessageBox()
|
|
4726
|
msgBox.setText(text)
|
|
4734
|
msgBox.setText(text)
|
|
4727
|
msgBox.setInformativeText(information)
|
|
4735
|
msgBox.setInformativeText(information)
|
|
4728
|
msgBox.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel)
|
|
4736
|
msgBox.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel)
|
|
4729
|
msgBox.setDefaultButton(QtGui.QMessageBox.Ok)
|
|
4737
|
msgBox.setDefaultButton(QtGui.QMessageBox.Ok)
|
|
4730
|
ret = msgBox.exec_()
|
|
4738
|
ret = msgBox.exec_()
|
|
4731
|
|
|
4739
|
|
|
4732
|
answer = False
|
|
4740
|
answer = False
|
|
4733
|
|
|
4741
|
|
|
4734
|
if ret == QtGui.QMessageBox.Ok:
|
|
4742
|
if ret == QtGui.QMessageBox.Ok:
|
|
4735
|
answer = True
|
|
4743
|
answer = True
|
|
4736
|
|
|
4744
|
|
|
4737
|
return answer
|
|
4745
|
return answer
|
|
4738
|
|
|
4746
|
|
|
4739
|
def __getNewProjectId(self):
|
|
4747
|
def __getNewProjectId(self):
|
|
4740
|
|
|
4748
|
|
|
4741
|
loadProject = False
|
|
4749
|
loadProject = False
|
|
4742
|
|
|
4750
|
|
|
4743
|
for thisId in range(1,10):
|
|
4751
|
for thisId in range(1,10):
|
|
4744
|
newId = str(thisId)
|
|
4752
|
newId = str(thisId)
|
|
4745
|
if newId in self.__projectObjDict.keys():
|
|
4753
|
if newId in self.__projectObjDict.keys():
|
|
4746
|
continue
|
|
4754
|
continue
|
|
4747
|
|
|
4755
|
|
|
4748
|
loadProject = True
|
|
4756
|
loadProject = True
|
|
4749
|
projectId = newId
|
|
4757
|
projectId = newId
|
|
4750
|
break
|
|
4758
|
break
|
|
4751
|
|
|
4759
|
|
|
4752
|
if not loadProject:
|
|
4760
|
if not loadProject:
|
|
4753
|
self.console.clear()
|
|
4761
|
self.console.clear()
|
|
4754
|
self.console.append("The maximum number of projects has been loaded, a new project can not be loaded")
|
|
4762
|
self.console.append("The maximum number of projects has been loaded, a new project can not be loaded")
|
|
4755
|
return None
|
|
4763
|
return None
|
|
4756
|
|
|
4764
|
|
|
4757
|
return projectId
|
|
4765
|
return projectId
|
|
4758
|
|
|
4766
|
|
|
4759
|
def openProject(self):
|
|
4767
|
def openProject(self):
|
|
4760
|
|
|
4768
|
|
|
4761
|
self._disable_save_button()
|
|
4769
|
self._disable_save_button()
|
|
4762
|
self._disable_play_button()
|
|
4770
|
self._disable_play_button()
|
|
4763
|
|
|
4771
|
|
|
4764
|
self.console.clear()
|
|
4772
|
self.console.clear()
|
|
4765
|
|
|
4773
|
|
|
4766
|
self.frame_2.setEnabled(True)
|
|
4774
|
self.frame_2.setEnabled(True)
|
|
4767
|
|
|
4775
|
|
|
4768
|
# print self.dir
|
|
4776
|
# print self.dir
|
|
4769
|
filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open a project file", self.pathWorkSpace, self.tr("Html Files (*.xml)")))
|
|
4777
|
filename = str(QtGui.QFileDialog.getOpenFileName(self, "Open a project file", self.pathWorkSpace, self.tr("Html Files (*.xml)")))
|
|
4770
|
|
|
4778
|
|
|
4771
|
projectObjLoad = Project()
|
|
4779
|
projectObjLoad = Project()
|
|
4772
|
|
|
4780
|
|
|
4773
|
if not projectObjLoad.readXml(filename):
|
|
4781
|
if not projectObjLoad.readXml(filename):
|
|
4774
|
self.console.append("The selected xml file could not be loaded ...")
|
|
4782
|
self.console.append("The selected xml file could not be loaded ...")
|
|
4775
|
return 0
|
|
4783
|
return 0
|
|
4776
|
|
|
4784
|
|
|
4777
|
self.create = False
|
|
4785
|
self.create = False
|
|
4778
|
self.refreshProjectWindow(projectObjLoad)
|
|
4786
|
self.refreshProjectWindow(projectObjLoad)
|
|
4779
|
self.refreshProjectProperties(projectObjLoad)
|
|
4787
|
self.refreshProjectProperties(projectObjLoad)
|
|
4780
|
|
|
4788
|
|
|
4781
|
projectId = projectObjLoad.id
|
|
4789
|
projectId = projectObjLoad.id
|
|
4782
|
|
|
4790
|
|
|
4783
|
if projectId in self.__projectObjDict.keys():
|
|
4791
|
if projectId in self.__projectObjDict.keys():
|
|
4784
|
|
|
4792
|
|
|
4785
|
projectId = self.__getNewProjectId()
|
|
4793
|
projectId = self.__getNewProjectId()
|
|
4786
|
|
|
4794
|
|
|
4787
|
if not projectId:
|
|
4795
|
if not projectId:
|
|
4788
|
return 0
|
|
4796
|
return 0
|
|
4789
|
|
|
4797
|
|
|
4790
|
projectObjLoad.updateId(projectId)
|
|
4798
|
projectObjLoad.updateId(projectId)
|
|
4791
|
|
|
4799
|
|
|
4792
|
self.__projectObjDict[projectId] = projectObjLoad
|
|
4800
|
self.__projectObjDict[projectId] = projectObjLoad
|
|
4793
|
|
|
4801
|
|
|
4794
|
self.addProject2ProjectExplorer(id=projectId, name=projectObjLoad.name)
|
|
4802
|
self.addProject2ProjectExplorer(id=projectId, name=projectObjLoad.name)
|
|
4795
|
|
|
4803
|
|
|
4796
|
self.tabWidgetProject.setEnabled(True)
|
|
4804
|
self.tabWidgetProject.setEnabled(True)
|
|
4797
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
4805
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
4798
|
# Disable tabProject after finish the creation
|
|
4806
|
# Disable tabProject after finish the creation
|
|
4799
|
self.tabProject.setEnabled(True)
|
|
4807
|
self.tabProject.setEnabled(True)
|
|
4800
|
puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0]))
|
|
4808
|
puObjorderList = OrderedDict(sorted(projectObjLoad.procUnitConfObjDict.items(), key=lambda x: x[0]))
|
|
4801
|
|
|
4809
|
|
|
4802
|
for puId, puObj in puObjorderList.items():
|
|
4810
|
for puId, puObj in puObjorderList.items():
|
|
4803
|
|
|
4811
|
|
|
4804
|
self.__puObjDict[puId] = puObj
|
|
4812
|
self.__puObjDict[puId] = puObj
|
|
4805
|
|
|
4813
|
|
|
4806
|
if puObj.name == "SendToServer":
|
|
4814
|
if puObj.name == "SendToServer":
|
|
4807
|
self.saveFTPFromProcUnitObj(puObj)
|
|
4815
|
self.saveFTPFromProcUnitObj(puObj)
|
|
4808
|
|
|
4816
|
|
|
4809
|
############## COMPATIBLE WITH OLD VERSIONS ################
|
|
4817
|
############## COMPATIBLE WITH OLD VERSIONS ################
|
|
4810
|
operationObj = puObj.getOperationObj("SendByFTP")
|
|
4818
|
operationObj = puObj.getOperationObj("SendByFTP")
|
|
4811
|
|
|
4819
|
|
|
4812
|
if operationObj:
|
|
4820
|
if operationObj:
|
|
4813
|
self.saveFTPFromOpObj(operationObj)
|
|
4821
|
self.saveFTPFromOpObj(operationObj)
|
|
4814
|
############################################################
|
|
4822
|
############################################################
|
|
4815
|
|
|
4823
|
|
|
4816
|
if puObj.inputId == '0':
|
|
4824
|
if puObj.inputId == '0':
|
|
4817
|
continue
|
|
4825
|
continue
|
|
4818
|
|
|
4826
|
|
|
4819
|
self.addPU2PELoadXML(puObj)
|
|
4827
|
self.addPU2PELoadXML(puObj)
|
|
4820
|
|
|
4828
|
|
|
4821
|
self.refreshPUWindow(puObj)
|
|
4829
|
self.refreshPUWindow(puObj)
|
|
4822
|
self.refreshPUProperties(puObj)
|
|
4830
|
self.refreshPUProperties(puObj)
|
|
4823
|
self.showtabPUCreated(datatype=puObj.datatype)
|
|
4831
|
self.showtabPUCreated(datatype=puObj.datatype)
|
|
4824
|
|
|
4832
|
|
|
4825
|
# self.console.clear()
|
|
4833
|
# self.console.clear()
|
|
4826
|
self.console.append("\nThe selected xml file has been loaded successfully")
|
|
4834
|
self.console.append("\nThe selected xml file has been loaded successfully")
|
|
4827
|
|
|
4835
|
|
|
4828
|
if self.dateList:
|
|
4836
|
if self.dateList:
|
|
4829
|
self._disable_save_button()
|
|
4837
|
self._disable_save_button()
|
|
4830
|
self._enable_play_button()
|
|
4838
|
self._enable_play_button()
|
|
4831
|
|
|
4839
|
|
|
4832
|
def create_updating_timer(self):
|
|
4840
|
def create_updating_timer(self):
|
|
4833
|
|
|
4841
|
|
|
4834
|
self.comm_data_timer = QtCore.QTimer(self)
|
|
4842
|
self.comm_data_timer = QtCore.QTimer(self)
|
|
4835
|
self.comm_data_timer.timeout.connect(self.on_comm_updating_timer)
|
|
4843
|
self.comm_data_timer.timeout.connect(self.on_comm_updating_timer)
|
|
4836
|
self.comm_data_timer.start(1000)
|
|
4844
|
self.comm_data_timer.start(1000)
|
|
4837
|
|
|
4845
|
|
|
4838
|
def on_comm_updating_timer(self):
|
|
4846
|
def on_comm_updating_timer(self):
|
|
4839
|
# Verifica si algun proceso ha sido inicializado y sigue ejecutandose
|
|
4847
|
# Verifica si algun proceso ha sido inicializado y sigue ejecutandose
|
|
4840
|
# Si el proceso se ha parado actualizar el GUI (stopProject)
|
|
4848
|
# Si el proceso se ha parado actualizar el GUI (stopProject)
|
|
4841
|
if not self.threadStarted:
|
|
4849
|
if not self.threadStarted:
|
|
4842
|
return
|
|
4850
|
return
|
|
4843
|
|
|
4851
|
|
|
4844
|
if self.controllerThread.isFinished():
|
|
4852
|
if self.controllerThread.isFinished():
|
|
4845
|
self.stopProject()
|
|
4853
|
self.stopProject()
|
|
4846
|
return
|
|
4854
|
return
|
|
4847
|
|
|
4855
|
|
|
4848
|
def use_plotmanager(self, controllerThread):
|
|
4856
|
def use_plotmanager(self, controllerThread):
|
|
4849
|
|
|
4857
|
|
|
4850
|
self.plotManager = controllerThread.useExternalPlotter()
|
|
4858
|
self.plotManager = controllerThread.useExternalPlotter()
|
|
4851
|
|
|
4859
|
|
|
4852
|
self.plot_timer = QtCore.QTimer()
|
|
4860
|
self.plot_timer = QtCore.QTimer()
|
|
4853
|
self.plot_timer.timeout.connect(self.on_plotmanager_timer)
|
|
4861
|
self.plot_timer.timeout.connect(self.on_plotmanager_timer)
|
|
4854
|
self.plot_timer.start(10)
|
|
4862
|
self.plot_timer.start(10)
|
|
4855
|
|
|
4863
|
|
|
4856
|
def on_plotmanager_timer(self):
|
|
4864
|
def on_plotmanager_timer(self):
|
|
4857
|
|
|
4865
|
|
|
4858
|
if not self.plotManager:
|
|
4866
|
if not self.plotManager:
|
|
4859
|
return
|
|
4867
|
return
|
|
4860
|
|
|
4868
|
|
|
4861
|
self.plotManager.run()
|
|
4869
|
self.plotManager.run()
|
|
4862
|
|
|
4870
|
|
|
4863
|
if self.plotManager.isErrorDetected():
|
|
4871
|
if self.plotManager.isErrorDetected():
|
|
4864
|
self.stopProject()
|
|
4872
|
self.stopProject()
|
|
4865
|
return
|
|
4873
|
return
|
|
4866
|
|
|
4874
|
|
|
4867
|
def playProject(self, ext=".xml", save=1):
|
|
4875
|
def playProject(self, ext=".xml", save=1):
|
|
4868
|
|
|
4876
|
|
|
4869
|
self._disable_play_button()
|
|
4877
|
self._disable_play_button()
|
|
4870
|
self._disable_save_button()
|
|
4878
|
self._disable_save_button()
|
|
4871
|
|
|
4879
|
|
|
4872
|
if self.controllerThread:
|
|
4880
|
if self.controllerThread:
|
|
4873
|
if self.controllerThread.isRunning():
|
|
4881
|
if self.controllerThread.isRunning():
|
|
4874
|
self.console.append("There is already another process running")
|
|
4882
|
self.console.append("There is already another process running")
|
|
4875
|
self._enable_stop_button()
|
|
4883
|
self._enable_stop_button()
|
|
4876
|
return
|
|
4884
|
return
|
|
4877
|
|
|
4885
|
|
|
4878
|
if not self.dateList:
|
|
4886
|
if not self.dateList:
|
|
4879
|
self.console.append("No data found, check datapath")
|
|
4887
|
self.console.append("No data found, check datapath")
|
|
4880
|
|
|
4888
|
|
|
4881
|
projectObj = self.getSelectedProjectObj()
|
|
4889
|
projectObj = self.getSelectedProjectObj()
|
|
4882
|
|
|
4890
|
|
|
4883
|
if not projectObj:
|
|
4891
|
if not projectObj:
|
|
4884
|
self.console.append("Please, select a project to start it")
|
|
4892
|
self.console.append("Please, select a project to start it")
|
|
4885
|
return
|
|
4893
|
return
|
|
4886
|
|
|
4894
|
|
|
4887
|
if save:
|
|
4895
|
if save:
|
|
4888
|
filename = self.saveProject()
|
|
4896
|
filename = self.saveProject()
|
|
4889
|
if filename == None:
|
|
4897
|
if filename == None:
|
|
4890
|
self.console.append("Process not initialized.")
|
|
4898
|
self.console.append("Process not initialized.")
|
|
4891
|
return
|
|
4899
|
return
|
|
4892
|
else:
|
|
4900
|
else:
|
|
4893
|
filename = TEMPORAL_FILE
|
|
4901
|
filename = TEMPORAL_FILE
|
|
4894
|
projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) )
|
|
4902
|
projectObj.writeXml( os.path.join(self.pathWorkSpace,filename) )
|
|
4895
|
|
|
4903
|
|
|
4896
|
self.console.clear()
|
|
4904
|
self.console.clear()
|
|
4897
|
self.console.append("Please wait...")
|
|
4905
|
self.console.append("Please wait...")
|
|
4898
|
|
|
4906
|
|
|
4899
|
self.controllerThread = ControllerThread()
|
|
4907
|
self.controllerThread = ControllerThread()
|
|
4900
|
self.controllerThread.readXml(filename)
|
|
4908
|
self.controllerThread.readXml(filename)
|
|
4901
|
|
|
4909
|
|
|
4902
|
self.use_plotmanager(self.controllerThread)
|
|
4910
|
self.use_plotmanager(self.controllerThread)
|
|
4903
|
|
|
4911
|
|
|
4904
|
self.console.clear()
|
|
4912
|
self.console.clear()
|
|
4905
|
|
|
4913
|
|
|
4906
|
self.controllerThread.start()
|
|
4914
|
self.controllerThread.start()
|
|
4907
|
|
|
4915
|
|
|
4908
|
sleep(0.5)
|
|
4916
|
sleep(0.5)
|
|
4909
|
|
|
4917
|
|
|
4910
|
|
|
4918
|
|
|
4911
|
self.threadStarted = True
|
|
4919
|
self.threadStarted = True
|
|
4912
|
|
|
4920
|
|
|
4913
|
self._disable_play_button()
|
|
4921
|
self._disable_play_button()
|
|
4914
|
self._disable_save_button()
|
|
4922
|
self._disable_save_button()
|
|
4915
|
self._enable_stop_button()
|
|
4923
|
self._enable_stop_button()
|
|
4916
|
|
|
4924
|
|
|
4917
|
def stopProject(self):
|
|
4925
|
def stopProject(self):
|
|
4918
|
|
|
4926
|
|
|
4919
|
self.threadStarted = False
|
|
4927
|
self.threadStarted = False
|
|
4920
|
self.controllerThread.stop()
|
|
4928
|
self.controllerThread.stop()
|
|
4921
|
self.plot_timer.stop()
|
|
4929
|
self.plot_timer.stop()
|
|
4922
|
|
|
4930
|
|
|
4923
|
self.plotManager.join()
|
|
4931
|
self.plotManager.join()
|
|
4924
|
self.plotManager = None
|
|
4932
|
self.plotManager = None
|
|
4925
|
|
|
4933
|
|
|
4926
|
while self.controllerThread.isRunning():
|
|
4934
|
while self.controllerThread.isRunning():
|
|
4927
|
sleep(0.5)
|
|
4935
|
sleep(0.5)
|
|
4928
|
|
|
4936
|
|
|
4929
|
self._disable_stop_button()
|
|
4937
|
self._disable_stop_button()
|
|
4930
|
self._enable_play_button()
|
|
4938
|
self._enable_play_button()
|
|
4931
|
|
|
4939
|
|
|
4932
|
def pauseProject(self):
|
|
4940
|
def pauseProject(self):
|
|
4933
|
|
|
4941
|
|
|
4934
|
# self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True))
|
|
4942
|
# self.commCtrlPThread.cmd_q.put(ProcessCommand(ProcessCommand.PAUSE, data=True))
|
|
4935
|
paused = self.controllerThread.pause()
|
|
4943
|
paused = self.controllerThread.pause()
|
|
4936
|
|
|
4944
|
|
|
4937
|
self.changePauseIcon(paused)
|
|
4945
|
self.changePauseIcon(paused)
|
|
4938
|
|
|
4946
|
|
|
4939
|
def saveProject(self, filename=None):
|
|
4947
|
def saveProject(self, filename=None):
|
|
4940
|
|
|
4948
|
|
|
4941
|
self._disable_save_button()
|
|
4949
|
self._disable_save_button()
|
|
4942
|
self._disable_play_button()
|
|
4950
|
self._disable_play_button()
|
|
4943
|
|
|
4951
|
|
|
4944
|
projectObj = self.getSelectedProjectObj()
|
|
4952
|
projectObj = self.getSelectedProjectObj()
|
|
4945
|
|
|
4953
|
|
|
4946
|
if not projectObj:
|
|
4954
|
if not projectObj:
|
|
4947
|
|
|
4955
|
|
|
4948
|
if self.create:
|
|
4956
|
if self.create:
|
|
4949
|
self.console.append("Please press Ok before save it")
|
|
4957
|
self.console.append("Please press Ok before save it")
|
|
4950
|
else:
|
|
4958
|
else:
|
|
4951
|
self.console.append("Please select a project before save it")
|
|
4959
|
self.console.append("Please select a project before save it")
|
|
4952
|
return
|
|
4960
|
return
|
|
4953
|
|
|
4961
|
|
|
4954
|
self.refreshGraphicsId()
|
|
4962
|
self.refreshGraphicsId()
|
|
4955
|
|
|
4963
|
|
|
4956
|
sts = True
|
|
4964
|
sts = True
|
|
4957
|
selectedItemObj = self.getSelectedItemObj()
|
|
4965
|
selectedItemObj = self.getSelectedItemObj()
|
|
4958
|
|
|
4966
|
|
|
4959
|
#A Processing Unit has been selected
|
|
4967
|
#A Processing Unit has been selected
|
|
4960
|
if projectObj == selectedItemObj:
|
|
4968
|
if projectObj == selectedItemObj:
|
|
4961
|
if not self.on_proOk_clicked():
|
|
4969
|
if not self.on_proOk_clicked():
|
|
4962
|
return None
|
|
4970
|
return None
|
|
4963
|
|
|
4971
|
|
|
4964
|
#A Processing Unit has been selected
|
|
4972
|
#A Processing Unit has been selected
|
|
4965
|
if projectObj != selectedItemObj:
|
|
4973
|
if projectObj != selectedItemObj:
|
|
4966
|
puObj = selectedItemObj
|
|
4974
|
puObj = selectedItemObj
|
|
4967
|
|
|
4975
|
|
|
4968
|
if puObj.name == 'VoltageProc':
|
|
4976
|
if puObj.name == 'VoltageProc':
|
|
4969
|
sts = self.on_volOpOk_clicked()
|
|
4977
|
sts = self.on_volOpOk_clicked()
|
|
4970
|
if puObj.name == 'SpectraProc':
|
|
4978
|
if puObj.name == 'SpectraProc':
|
|
4971
|
sts = self.on_specOpOk_clicked()
|
|
4979
|
sts = self.on_specOpOk_clicked()
|
|
4972
|
if puObj.name == 'SpectraHeisProc':
|
|
4980
|
if puObj.name == 'SpectraHeisProc':
|
|
4973
|
sts = self.on_specHeisOpOk_clicked()
|
|
4981
|
sts = self.on_specHeisOpOk_clicked()
|
|
4974
|
|
|
4982
|
|
|
4975
|
if not sts:
|
|
4983
|
if not sts:
|
|
4976
|
return None
|
|
4984
|
return None
|
|
4977
|
|
|
4985
|
|
|
4978
|
self.createFTPProcUnitView()
|
|
4986
|
self.createFTPProcUnitView()
|
|
4979
|
|
|
4987
|
|
|
4980
|
if not filename:
|
|
4988
|
if not filename:
|
|
4981
|
filename = os.path.join( str(self.pathWorkSpace), "%s%s" %(str(projectObj.name), '.xml') )
|
|
4989
|
filename = os.path.join( str(self.pathWorkSpace), "%s%s" %(str(projectObj.name), '.xml') )
|
|
4982
|
|
|
4990
|
|
|
4983
|
projectObj.writeXml(filename)
|
|
4991
|
projectObj.writeXml(filename)
|
|
4984
|
self.console.clear()
|
|
4992
|
self.console.clear()
|
|
4985
|
self.console.append("Project saved")
|
|
4993
|
self.console.append("Project saved")
|
|
4986
|
self.console.append("Press Play button to start data processing ...")
|
|
4994
|
self.console.append("Press Play button to start data processing ...")
|
|
4987
|
|
|
4995
|
|
|
4988
|
self._disable_save_button()
|
|
4996
|
self._disable_save_button()
|
|
4989
|
self._enable_play_button()
|
|
4997
|
self._enable_play_button()
|
|
4990
|
|
|
4998
|
|
|
4991
|
return filename
|
|
4999
|
return filename
|
|
4992
|
|
|
5000
|
|
|
4993
|
def removeItemTreeFromProject(self):
|
|
5001
|
def removeItemTreeFromProject(self):
|
|
4994
|
"""
|
|
5002
|
"""
|
|
4995
|
Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol
|
|
5003
|
Metodo para eliminar el proyecto en el dictionario de proyectos y en el dictionario de vista de arbol
|
|
4996
|
"""
|
|
5004
|
"""
|
|
4997
|
for key in self.__itemTreeDict.keys():
|
|
5005
|
for key in self.__itemTreeDict.keys():
|
|
4998
|
|
|
5006
|
|
|
4999
|
#Check again because an item can delete multiple items (childs)
|
|
5007
|
#Check again because an item can delete multiple items (childs)
|
|
5000
|
if key not in self.__itemTreeDict.keys():
|
|
5008
|
if key not in self.__itemTreeDict.keys():
|
|
5001
|
continue
|
|
5009
|
continue
|
|
5002
|
|
|
5010
|
|
|
5003
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
5011
|
if self.__itemTreeDict[key] != self.selectedItemTree:
|
|
5004
|
continue
|
|
5012
|
continue
|
|
5005
|
|
|
5013
|
|
|
5006
|
if self.__projectObjDict.has_key(key) == True:
|
|
5014
|
if self.__projectObjDict.has_key(key) == True:
|
|
5007
|
|
|
5015
|
|
|
5008
|
del self.__projectObjDict[key]
|
|
5016
|
del self.__projectObjDict[key]
|
|
5009
|
del self.__itemTreeDict[key]
|
|
5017
|
del self.__itemTreeDict[key]
|
|
5010
|
|
|
5018
|
|
|
5011
|
else:
|
|
5019
|
else:
|
|
5012
|
puObj = self.__puObjDict[key]
|
|
5020
|
puObj = self.__puObjDict[key]
|
|
5013
|
idProjectParent = puObj.parentId
|
|
5021
|
idProjectParent = puObj.parentId
|
|
5014
|
projectObj = self.__projectObjDict[idProjectParent]
|
|
5022
|
projectObj = self.__projectObjDict[idProjectParent]
|
|
5015
|
|
|
5023
|
|
|
5016
|
del self.__puObjDict[key]
|
|
5024
|
del self.__puObjDict[key]
|
|
5017
|
del self.__itemTreeDict[key]
|
|
5025
|
del self.__itemTreeDict[key]
|
|
5018
|
del projectObj.procUnitConfObjDict[key]
|
|
5026
|
del projectObj.procUnitConfObjDict[key]
|
|
5019
|
|
|
5027
|
|
|
5020
|
for key in projectObj.procUnitConfObjDict.keys():
|
|
5028
|
for key in projectObj.procUnitConfObjDict.keys():
|
|
5021
|
if projectObj.procUnitConfObjDict[key].inputId != puObj.getId():
|
|
5029
|
if projectObj.procUnitConfObjDict[key].inputId != puObj.getId():
|
|
5022
|
continue
|
|
5030
|
continue
|
|
5023
|
del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()]
|
|
5031
|
del self.__puObjDict[projectObj.procUnitConfObjDict[key].getId()]
|
|
5024
|
del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()]
|
|
5032
|
del self.__itemTreeDict[projectObj.procUnitConfObjDict[key].getId()]
|
|
5025
|
del projectObj.procUnitConfObjDict[key]
|
|
5033
|
del projectObj.procUnitConfObjDict[key]
|
|
5026
|
# print projectObj.procUnitConfObjDict
|
|
5034
|
# print projectObj.procUnitConfObjDict
|
|
5027
|
# print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict
|
|
5035
|
# print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict
|
|
5028
|
|
|
5036
|
|
|
5029
|
def setInputsProject_View(self):
|
|
5037
|
def setInputsProject_View(self):
|
|
5030
|
|
|
5038
|
|
|
5031
|
self.tabWidgetProject.setEnabled(True)
|
|
5039
|
self.tabWidgetProject.setEnabled(True)
|
|
5032
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
5040
|
self.tabWidgetProject.setCurrentWidget(self.tabProject)
|
|
5033
|
self.tabProject.setEnabled(True)
|
|
5041
|
self.tabProject.setEnabled(True)
|
|
5034
|
self.frame_2.setEnabled(False)
|
|
5042
|
self.frame_2.setEnabled(False)
|
|
5035
|
self.proName.clear()
|
|
5043
|
self.proName.clear()
|
|
5036
|
self.proName.setFocus()
|
|
5044
|
self.proName.setFocus()
|
|
5037
|
self.proName.setSelection(0, 0)
|
|
5045
|
self.proName.setSelection(0, 0)
|
|
5038
|
self.proName.setCursorPosition(0)
|
|
5046
|
self.proName.setCursorPosition(0)
|
|
5039
|
self.proDataType.setText('.r')
|
|
5047
|
self.proDataType.setText('.r')
|
|
5040
|
self.proDataPath.clear()
|
|
5048
|
self.proDataPath.clear()
|
|
5041
|
self.proComDataType.clear()
|
|
5049
|
self.proComDataType.clear()
|
|
5042
|
self.proComDataType.addItem("Voltage")
|
|
5050
|
self.proComDataType.addItem("Voltage")
|
|
5043
|
self.proComDataType.addItem("Spectra")
|
|
5051
|
self.proComDataType.addItem("Spectra")
|
|
5044
|
self.proComDataType.addItem("Fits")
|
|
5052
|
self.proComDataType.addItem("Fits")
|
|
5045
|
self.proComDataType.addItem("USRP")
|
|
5053
|
self.proComDataType.addItem("USRP")
|
|
5046
|
|
|
5054
|
|
|
5047
|
self.proComStartDate.clear()
|
|
5055
|
self.proComStartDate.clear()
|
|
5048
|
self.proComEndDate.clear()
|
|
5056
|
self.proComEndDate.clear()
|
|
5049
|
|
|
5057
|
|
|
5050
|
startTime = "00:00:00"
|
|
5058
|
startTime = "00:00:00"
|
|
5051
|
endTime = "23:59:59"
|
|
5059
|
endTime = "23:59:59"
|
|
5052
|
starlist = startTime.split(":")
|
|
5060
|
starlist = startTime.split(":")
|
|
5053
|
endlist = endTime.split(":")
|
|
5061
|
endlist = endTime.split(":")
|
|
5054
|
self.proDelay.setText("60")
|
|
5062
|
self.proDelay.setText("60")
|
|
5055
|
self.proSet.setText("")
|
|
5063
|
self.proSet.setText("")
|
|
5056
|
|
|
5064
|
|
|
5057
|
self.labelSet.show()
|
|
5065
|
self.labelSet.show()
|
|
5058
|
self.proSet.show()
|
|
5066
|
self.proSet.show()
|
|
5059
|
|
|
5067
|
|
|
5060
|
self.labelIPPKm.hide()
|
|
5068
|
self.labelIPPKm.hide()
|
|
5061
|
self.proIPPKm.hide()
|
|
5069
|
self.proIPPKm.hide()
|
|
5062
|
|
|
5070
|
|
|
5063
|
self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2]))
|
|
5071
|
self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2]))
|
|
5064
|
self.proStartTime.setTime(self.time)
|
|
5072
|
self.proStartTime.setTime(self.time)
|
|
5065
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
5073
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
5066
|
self.proEndTime.setTime(self.time)
|
|
5074
|
self.proEndTime.setTime(self.time)
|
|
5067
|
self.proDescription.clear()
|
|
5075
|
self.proDescription.clear()
|
|
5068
|
self.proOk.setEnabled(False)
|
|
5076
|
self.proOk.setEnabled(False)
|
|
5069
|
# self.console.append("Please, Write a name Project")
|
|
5077
|
# self.console.append("Please, Write a name Project")
|
|
5070
|
# self.console.append("Introduce Project Parameters")DC
|
|
5078
|
# self.console.append("Introduce Project Parameters")DC
|
|
5071
|
# self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)")
|
|
5079
|
# self.console.append("Select data type Voltage( .rawdata) or Spectra(.pdata)")
|
|
5072
|
|
|
5080
|
|
|
5073
|
def clearPUWindow(self, datatype):
|
|
5081
|
def clearPUWindow(self, datatype):
|
|
5074
|
|
|
5082
|
|
|
5075
|
projectObjView = self.getSelectedProjectObj()
|
|
5083
|
projectObjView = self.getSelectedProjectObj()
|
|
5076
|
|
|
5084
|
|
|
5077
|
if not projectObjView:
|
|
5085
|
if not projectObjView:
|
|
5078
|
return
|
|
5086
|
return
|
|
5079
|
|
|
5087
|
|
|
5080
|
puObj = self.getSelectedItemObj()
|
|
5088
|
puObj = self.getSelectedItemObj()
|
|
5081
|
inputId = puObj.getInputId()
|
|
5089
|
inputId = puObj.getInputId()
|
|
5082
|
inputPUObj = projectObjView.getProcUnitObj(inputId)
|
|
5090
|
inputPUObj = projectObjView.getProcUnitObj(inputId)
|
|
5083
|
|
|
5091
|
|
|
5084
|
if datatype == 'Voltage':
|
|
5092
|
if datatype == 'Voltage':
|
|
5085
|
self.volOpComChannels.setEnabled(False)
|
|
5093
|
self.volOpComChannels.setEnabled(False)
|
|
5086
|
self.volOpComHeights.setEnabled(False)
|
|
5094
|
self.volOpComHeights.setEnabled(False)
|
|
5087
|
self.volOpFilter.setEnabled(False)
|
|
5095
|
self.volOpFilter.setEnabled(False)
|
|
5088
|
self.volOpComProfile.setEnabled(False)
|
|
5096
|
self.volOpComProfile.setEnabled(False)
|
|
5089
|
self.volOpComCode.setEnabled(False)
|
|
5097
|
self.volOpComCode.setEnabled(False)
|
|
5090
|
self.volOpCohInt.setEnabled(False)
|
|
5098
|
self.volOpCohInt.setEnabled(False)
|
|
5091
|
self.volOpChannel.setEnabled(False)
|
|
5099
|
self.volOpChannel.setEnabled(False)
|
|
5092
|
self.volOpHeights.setEnabled(False)
|
|
5100
|
self.volOpHeights.setEnabled(False)
|
|
5093
|
self.volOpProfile.setEnabled(False)
|
|
5101
|
self.volOpProfile.setEnabled(False)
|
|
5094
|
self.volOpRadarfrequency.setEnabled(False)
|
|
5102
|
self.volOpRadarfrequency.setEnabled(False)
|
|
5095
|
self.volOpCebChannels.setCheckState(0)
|
|
5103
|
self.volOpCebChannels.setCheckState(0)
|
|
5096
|
self.volOpCebRadarfrequency.setCheckState(0)
|
|
5104
|
self.volOpCebRadarfrequency.setCheckState(0)
|
|
5097
|
self.volOpCebHeights.setCheckState(0)
|
|
5105
|
self.volOpCebHeights.setCheckState(0)
|
|
5098
|
self.volOpCebFilter.setCheckState(0)
|
|
5106
|
self.volOpCebFilter.setCheckState(0)
|
|
5099
|
self.volOpCebProfile.setCheckState(0)
|
|
5107
|
self.volOpCebProfile.setCheckState(0)
|
|
5100
|
self.volOpCebDecodification.setCheckState(0)
|
|
5108
|
self.volOpCebDecodification.setCheckState(0)
|
|
5101
|
self.volOpCebCohInt.setCheckState(0)
|
|
5109
|
self.volOpCebCohInt.setCheckState(0)
|
|
5102
|
|
|
5110
|
|
|
5103
|
self.volOpChannel.clear()
|
|
5111
|
self.volOpChannel.clear()
|
|
5104
|
self.volOpHeights.clear()
|
|
5112
|
self.volOpHeights.clear()
|
|
5105
|
self.volOpProfile.clear()
|
|
5113
|
self.volOpProfile.clear()
|
|
5106
|
self.volOpFilter.clear()
|
|
5114
|
self.volOpFilter.clear()
|
|
5107
|
self.volOpCohInt.clear()
|
|
5115
|
self.volOpCohInt.clear()
|
|
5108
|
self.volOpRadarfrequency.clear()
|
|
5116
|
self.volOpRadarfrequency.clear()
|
|
5109
|
|
|
5117
|
|
|
5110
|
if datatype == 'Spectra':
|
|
5118
|
if datatype == 'Spectra':
|
|
5111
|
|
|
5119
|
|
|
5112
|
if inputPUObj.datatype == 'Spectra':
|
|
5120
|
if inputPUObj.datatype == 'Spectra':
|
|
5113
|
self.specOpnFFTpoints.setEnabled(False)
|
|
5121
|
self.specOpnFFTpoints.setEnabled(False)
|
|
5114
|
self.specOpProfiles.setEnabled(False)
|
|
5122
|
self.specOpProfiles.setEnabled(False)
|
|
5115
|
self.specOpippFactor.setEnabled(False)
|
|
5123
|
self.specOpippFactor.setEnabled(False)
|
|
5116
|
else:
|
|
5124
|
else:
|
|
5117
|
self.specOpnFFTpoints.setEnabled(True)
|
|
5125
|
self.specOpnFFTpoints.setEnabled(True)
|
|
5118
|
self.specOpProfiles.setEnabled(True)
|
|
5126
|
self.specOpProfiles.setEnabled(True)
|
|
5119
|
self.specOpippFactor.setEnabled(True)
|
|
5127
|
self.specOpippFactor.setEnabled(True)
|
|
5120
|
|
|
5128
|
|
|
5121
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
5129
|
self.specOpCebCrossSpectra.setCheckState(0)
|
|
5122
|
self.specOpCebChannel.setCheckState(0)
|
|
5130
|
self.specOpCebChannel.setCheckState(0)
|
|
5123
|
self.specOpCebHeights.setCheckState(0)
|
|
5131
|
self.specOpCebHeights.setCheckState(0)
|
|
5124
|
self.specOpCebIncoherent.setCheckState(0)
|
|
5132
|
self.specOpCebIncoherent.setCheckState(0)
|
|
5125
|
self.specOpCebRemoveDC.setCheckState(0)
|
|
5133
|
self.specOpCebRemoveDC.setCheckState(0)
|
|
5126
|
self.specOpCebRemoveInt.setCheckState(0)
|
|
5134
|
self.specOpCebRemoveInt.setCheckState(0)
|
|
5127
|
self.specOpCebgetNoise.setCheckState(0)
|
|
5135
|
self.specOpCebgetNoise.setCheckState(0)
|
|
5128
|
self.specOpCebRadarfrequency.setCheckState(0)
|
|
5136
|
self.specOpCebRadarfrequency.setCheckState(0)
|
|
5129
|
|
|
5137
|
|
|
5130
|
self.specOpRadarfrequency.setEnabled(False)
|
|
5138
|
self.specOpRadarfrequency.setEnabled(False)
|
|
5131
|
self.specOppairsList.setEnabled(False)
|
|
5139
|
self.specOppairsList.setEnabled(False)
|
|
5132
|
self.specOpChannel.setEnabled(False)
|
|
5140
|
self.specOpChannel.setEnabled(False)
|
|
5133
|
self.specOpHeights.setEnabled(False)
|
|
5141
|
self.specOpHeights.setEnabled(False)
|
|
5134
|
self.specOpIncoherent.setEnabled(False)
|
|
5142
|
self.specOpIncoherent.setEnabled(False)
|
|
5135
|
self.specOpgetNoise.setEnabled(False)
|
|
5143
|
self.specOpgetNoise.setEnabled(False)
|
|
5136
|
|
|
5144
|
|
|
5137
|
self.specOpRadarfrequency.clear()
|
|
5145
|
self.specOpRadarfrequency.clear()
|
|
5138
|
self.specOpnFFTpoints.clear()
|
|
5146
|
self.specOpnFFTpoints.clear()
|
|
5139
|
self.specOpProfiles.clear()
|
|
5147
|
self.specOpProfiles.clear()
|
|
5140
|
self.specOpippFactor.clear
|
|
5148
|
self.specOpippFactor.clear
|
|
5141
|
self.specOppairsList.clear()
|
|
5149
|
self.specOppairsList.clear()
|
|
5142
|
self.specOpChannel.clear()
|
|
5150
|
self.specOpChannel.clear()
|
|
5143
|
self.specOpHeights.clear()
|
|
5151
|
self.specOpHeights.clear()
|
|
5144
|
self.specOpIncoherent.clear()
|
|
5152
|
self.specOpIncoherent.clear()
|
|
5145
|
self.specOpgetNoise.clear()
|
|
5153
|
self.specOpgetNoise.clear()
|
|
5146
|
|
|
5154
|
|
|
5147
|
self.specGraphCebSpectraplot.setCheckState(0)
|
|
5155
|
self.specGraphCebSpectraplot.setCheckState(0)
|
|
5148
|
self.specGraphCebCrossSpectraplot.setCheckState(0)
|
|
5156
|
self.specGraphCebCrossSpectraplot.setCheckState(0)
|
|
5149
|
self.specGraphCebRTIplot.setCheckState(0)
|
|
5157
|
self.specGraphCebRTIplot.setCheckState(0)
|
|
5150
|
self.specGraphCebRTInoise.setCheckState(0)
|
|
5158
|
self.specGraphCebRTInoise.setCheckState(0)
|
|
5151
|
self.specGraphCebCoherencmap.setCheckState(0)
|
|
5159
|
self.specGraphCebCoherencmap.setCheckState(0)
|
|
5152
|
self.specGraphPowerprofile.setCheckState(0)
|
|
5160
|
self.specGraphPowerprofile.setCheckState(0)
|
|
5153
|
|
|
5161
|
|
|
5154
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
5162
|
self.specGraphSaveSpectra.setCheckState(0)
|
|
5155
|
self.specGraphSaveCross.setCheckState(0)
|
|
5163
|
self.specGraphSaveCross.setCheckState(0)
|
|
5156
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
5164
|
self.specGraphSaveRTIplot.setCheckState(0)
|
|
5157
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
5165
|
self.specGraphSaveRTInoise.setCheckState(0)
|
|
5158
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
5166
|
self.specGraphSaveCoherencemap.setCheckState(0)
|
|
5159
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
5167
|
self.specGraphSavePowerprofile.setCheckState(0)
|
|
5160
|
|
|
5168
|
|
|
5161
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
5169
|
self.specGraphftpRTIplot.setCheckState(0)
|
|
5162
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
5170
|
self.specGraphftpRTInoise.setCheckState(0)
|
|
5163
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
5171
|
self.specGraphftpCoherencemap.setCheckState(0)
|
|
5164
|
|
|
5172
|
|
|
5165
|
self.specGraphPath.clear()
|
|
5173
|
self.specGraphPath.clear()
|
|
5166
|
self.specGraphPrefix.clear()
|
|
5174
|
self.specGraphPrefix.clear()
|
|
5167
|
|
|
5175
|
|
|
5168
|
self.specGgraphftpratio.clear()
|
|
5176
|
self.specGgraphftpratio.clear()
|
|
5169
|
|
|
5177
|
|
|
5170
|
self.specGgraphChannelList.clear()
|
|
5178
|
self.specGgraphChannelList.clear()
|
|
5171
|
self.specGgraphFreq.clear()
|
|
5179
|
self.specGgraphFreq.clear()
|
|
5172
|
self.specGgraphHeight.clear()
|
|
5180
|
self.specGgraphHeight.clear()
|
|
5173
|
self.specGgraphDbsrange.clear()
|
|
5181
|
self.specGgraphDbsrange.clear()
|
|
5174
|
self.specGgraphmagnitud.clear()
|
|
5182
|
self.specGgraphmagnitud.clear()
|
|
5175
|
self.specGgraphTminTmax.clear()
|
|
5183
|
self.specGgraphTminTmax.clear()
|
|
5176
|
self.specGgraphTimeRange.clear()
|
|
5184
|
self.specGgraphTimeRange.clear()
|
|
5177
|
|
|
5185
|
|
|
5178
|
if datatype == 'SpectraHeis':
|
|
5186
|
if datatype == 'SpectraHeis':
|
|
5179
|
self.specHeisOpCebIncoherent.setCheckState(0)
|
|
5187
|
self.specHeisOpCebIncoherent.setCheckState(0)
|
|
5180
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
5188
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
5181
|
self.specHeisOpIncoherent.clear()
|
|
5189
|
self.specHeisOpIncoherent.clear()
|
|
5182
|
|
|
5190
|
|
|
5183
|
self.specHeisGraphCebSpectraplot.setCheckState(0)
|
|
5191
|
self.specHeisGraphCebSpectraplot.setCheckState(0)
|
|
5184
|
self.specHeisGraphCebRTIplot.setCheckState(0)
|
|
5192
|
self.specHeisGraphCebRTIplot.setCheckState(0)
|
|
5185
|
|
|
5193
|
|
|
5186
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
5194
|
self.specHeisGraphSaveSpectra.setCheckState(0)
|
|
5187
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
5195
|
self.specHeisGraphSaveRTIplot.setCheckState(0)
|
|
5188
|
|
|
5196
|
|
|
5189
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
5197
|
self.specHeisGraphftpSpectra.setCheckState(0)
|
|
5190
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
5198
|
self.specHeisGraphftpRTIplot.setCheckState(0)
|
|
5191
|
|
|
5199
|
|
|
5192
|
self.specHeisGraphPath.clear()
|
|
5200
|
self.specHeisGraphPath.clear()
|
|
5193
|
self.specHeisGraphPrefix.clear()
|
|
5201
|
self.specHeisGraphPrefix.clear()
|
|
5194
|
self.specHeisGgraphChannelList.clear()
|
|
5202
|
self.specHeisGgraphChannelList.clear()
|
|
5195
|
self.specHeisGgraphXminXmax.clear()
|
|
5203
|
self.specHeisGgraphXminXmax.clear()
|
|
5196
|
self.specHeisGgraphYminYmax.clear()
|
|
5204
|
self.specHeisGgraphYminYmax.clear()
|
|
5197
|
self.specHeisGgraphTminTmax.clear()
|
|
5205
|
self.specHeisGgraphTminTmax.clear()
|
|
5198
|
self.specHeisGgraphTimeRange.clear()
|
|
5206
|
self.specHeisGgraphTimeRange.clear()
|
|
5199
|
self.specHeisGgraphftpratio.clear()
|
|
5207
|
self.specHeisGgraphftpratio.clear()
|
|
5200
|
|
|
5208
|
|
|
5201
|
def showtabPUCreated(self, datatype):
|
|
5209
|
def showtabPUCreated(self, datatype):
|
|
5202
|
|
|
5210
|
|
|
5203
|
if datatype == "Voltage":
|
|
5211
|
if datatype == "Voltage":
|
|
5204
|
self.tabVoltage.setEnabled(True)
|
|
5212
|
self.tabVoltage.setEnabled(True)
|
|
5205
|
self.tabProject.setEnabled(False)
|
|
5213
|
self.tabProject.setEnabled(False)
|
|
5206
|
self.tabSpectra.setEnabled(False)
|
|
5214
|
self.tabSpectra.setEnabled(False)
|
|
5207
|
self.tabCorrelation.setEnabled(False)
|
|
5215
|
self.tabCorrelation.setEnabled(False)
|
|
5208
|
self.tabSpectraHeis.setEnabled(False)
|
|
5216
|
self.tabSpectraHeis.setEnabled(False)
|
|
5209
|
self.tabWidgetProject.setCurrentWidget(self.tabVoltage)
|
|
5217
|
self.tabWidgetProject.setCurrentWidget(self.tabVoltage)
|
|
5210
|
|
|
5218
|
|
|
5211
|
if datatype == "Spectra":
|
|
5219
|
if datatype == "Spectra":
|
|
5212
|
self.tabVoltage.setEnabled(False)
|
|
5220
|
self.tabVoltage.setEnabled(False)
|
|
5213
|
self.tabProject.setEnabled(False)
|
|
5221
|
self.tabProject.setEnabled(False)
|
|
5214
|
self.tabSpectra.setEnabled(True)
|
|
5222
|
self.tabSpectra.setEnabled(True)
|
|
5215
|
self.tabCorrelation.setEnabled(False)
|
|
5223
|
self.tabCorrelation.setEnabled(False)
|
|
5216
|
self.tabSpectraHeis.setEnabled(False)
|
|
5224
|
self.tabSpectraHeis.setEnabled(False)
|
|
5217
|
self.tabWidgetProject.setCurrentWidget(self.tabSpectra)
|
|
5225
|
self.tabWidgetProject.setCurrentWidget(self.tabSpectra)
|
|
5218
|
|
|
5226
|
|
|
5219
|
if datatype == "SpectraHeis":
|
|
5227
|
if datatype == "SpectraHeis":
|
|
5220
|
self.tabVoltage.setEnabled(False)
|
|
5228
|
self.tabVoltage.setEnabled(False)
|
|
5221
|
self.tabProject.setEnabled(False)
|
|
5229
|
self.tabProject.setEnabled(False)
|
|
5222
|
self.tabSpectra.setEnabled(False)
|
|
5230
|
self.tabSpectra.setEnabled(False)
|
|
5223
|
self.tabCorrelation.setEnabled(False)
|
|
5231
|
self.tabCorrelation.setEnabled(False)
|
|
5224
|
self.tabSpectraHeis.setEnabled(True)
|
|
5232
|
self.tabSpectraHeis.setEnabled(True)
|
|
5225
|
self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis)
|
|
5233
|
self.tabWidgetProject.setCurrentWidget(self.tabSpectraHeis)
|
|
5226
|
|
|
5234
|
|
|
5227
|
def checkInputsProject(self):
|
|
5235
|
def checkInputsProject(self):
|
|
5228
|
"""
|
|
5236
|
"""
|
|
5229
|
Check Inputs Project:
|
|
5237
|
Check Inputs Project:
|
|
5230
|
- project_name
|
|
5238
|
- project_name
|
|
5231
|
- datatype
|
|
5239
|
- datatype
|
|
5232
|
- ext
|
|
5240
|
- ext
|
|
5233
|
- data_path
|
|
5241
|
- data_path
|
|
5234
|
- readmode
|
|
5242
|
- readmode
|
|
5235
|
- delay
|
|
5243
|
- delay
|
|
5236
|
- set
|
|
5244
|
- set
|
|
5237
|
- walk
|
|
5245
|
- walk
|
|
5238
|
"""
|
|
5246
|
"""
|
|
5239
|
parms_ok = True
|
|
5247
|
parms_ok = True
|
|
5240
|
project_name = str(self.proName.text())
|
|
5248
|
project_name = str(self.proName.text())
|
|
5241
|
if project_name == '' or project_name == None:
|
|
5249
|
if project_name == '' or project_name == None:
|
|
5242
|
outputstr = "Enter the Project Name"
|
|
5250
|
outputstr = "Enter the Project Name"
|
|
5243
|
self.console.append(outputstr)
|
|
5251
|
self.console.append(outputstr)
|
|
5244
|
parms_ok = False
|
|
5252
|
parms_ok = False
|
|
5245
|
project_name = None
|
|
5253
|
project_name = None
|
|
5246
|
|
|
5254
|
|
|
5247
|
datatype = str(self.proComDataType.currentText())
|
|
5255
|
datatype = str(self.proComDataType.currentText())
|
|
5248
|
if not(datatype in ['Voltage', 'Spectra', 'Fits', 'USRP']):
|
|
5256
|
if not(datatype in ['Voltage', 'Spectra', 'Fits', 'USRP']):
|
|
5249
|
outputstr = 'datatype = %s, this must be either Voltage, Spectra, SpectraHeis or USRP' % datatype
|
|
5257
|
outputstr = 'datatype = %s, this must be either Voltage, Spectra, SpectraHeis or USRP' % datatype
|
|
5250
|
self.console.append(outputstr)
|
|
5258
|
self.console.append(outputstr)
|
|
5251
|
parms_ok = False
|
|
5259
|
parms_ok = False
|
|
5252
|
datatype = None
|
|
5260
|
datatype = None
|
|
5253
|
|
|
5261
|
|
|
5254
|
ext = str(self.proDataType.text())
|
|
5262
|
ext = str(self.proDataType.text())
|
|
5255
|
if not(ext in ['.r', '.pdata', '.fits', '.hdf5']):
|
|
5263
|
if not(ext in ['.r', '.pdata', '.fits', '.hdf5']):
|
|
5256
|
outputstr = "extension files must be .r , .pdata, .fits or .hdf5"
|
|
5264
|
outputstr = "extension files must be .r , .pdata, .fits or .hdf5"
|
|
5257
|
self.console.append(outputstr)
|
|
5265
|
self.console.append(outputstr)
|
|
5258
|
parms_ok = False
|
|
5266
|
parms_ok = False
|
|
5259
|
ext = None
|
|
5267
|
ext = None
|
|
5260
|
|
|
5268
|
|
|
5261
|
data_path = str(self.proDataPath.text())
|
|
5269
|
data_path = str(self.proDataPath.text())
|
|
5262
|
|
|
5270
|
|
|
5263
|
if data_path == '':
|
|
5271
|
if data_path == '':
|
|
5264
|
outputstr = 'Datapath is empty'
|
|
5272
|
outputstr = 'Datapath is empty'
|
|
5265
|
self.console.append(outputstr)
|
|
5273
|
self.console.append(outputstr)
|
|
5266
|
parms_ok = False
|
|
5274
|
parms_ok = False
|
|
5267
|
data_path = None
|
|
5275
|
data_path = None
|
|
5268
|
|
|
5276
|
|
|
5269
|
if data_path != None:
|
|
5277
|
if data_path != None:
|
|
5270
|
if not os.path.isdir(data_path):
|
|
5278
|
if not os.path.isdir(data_path):
|
|
5271
|
outputstr = 'Datapath:%s does not exist' % data_path
|
|
5279
|
outputstr = 'Datapath:%s does not exist' % data_path
|
|
5272
|
self.console.append(outputstr)
|
|
5280
|
self.console.append(outputstr)
|
|
5273
|
parms_ok = False
|
|
5281
|
parms_ok = False
|
|
5274
|
data_path = None
|
|
5282
|
data_path = None
|
|
5275
|
|
|
5283
|
|
|
5276
|
read_mode = str(self.proComReadMode.currentText())
|
|
5284
|
read_mode = str(self.proComReadMode.currentText())
|
|
5277
|
if not(read_mode in ['Online', 'Offline']):
|
|
5285
|
if not(read_mode in ['Online', 'Offline']):
|
|
5278
|
outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode
|
|
5286
|
outputstr = 'Read Mode: %s, this must be either Online or Offline' % read_mode
|
|
5279
|
self.console.append(outputstr)
|
|
5287
|
self.console.append(outputstr)
|
|
5280
|
parms_ok = False
|
|
5288
|
parms_ok = False
|
|
5281
|
read_mode = None
|
|
5289
|
read_mode = None
|
|
5282
|
|
|
5290
|
|
|
5283
|
delay = None
|
|
5291
|
delay = None
|
|
5284
|
if read_mode == "Online":
|
|
5292
|
if read_mode == "Online":
|
|
5285
|
parms_ok = False
|
|
5293
|
parms_ok = False
|
|
5286
|
try:
|
|
5294
|
try:
|
|
5287
|
delay = int(str(self.proDelay.text()))
|
|
5295
|
delay = int(str(self.proDelay.text()))
|
|
5288
|
parms_ok = True
|
|
5296
|
parms_ok = True
|
|
5289
|
except:
|
|
5297
|
except:
|
|
5290
|
outputstr = 'Delay: %s, this must be a integer number' % str(self.proDelay.text())
|
|
5298
|
outputstr = 'Delay: %s, this must be a integer number' % str(self.proDelay.text())
|
|
5291
|
self.console.append(outputstr)
|
|
5299
|
self.console.append(outputstr)
|
|
5292
|
|
|
5300
|
|
|
5293
|
try:
|
|
5301
|
try:
|
|
5294
|
set = int(str(self.proSet.text()))
|
|
5302
|
set = int(str(self.proSet.text()))
|
|
5295
|
except:
|
|
5303
|
except:
|
|
5296
|
# outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text())
|
|
5304
|
# outputstr = 'Set: %s, this must be a integer number' % str(self.proName.text())
|
|
5297
|
# self.console.append(outputstr)
|
|
5305
|
# self.console.append(outputstr)
|
|
5298
|
# parms_ok = False
|
|
5306
|
# parms_ok = False
|
|
5299
|
set = None
|
|
5307
|
set = None
|
|
5300
|
|
|
5308
|
|
|
5301
|
walk = int(self.proComWalk.currentIndex())
|
|
5309
|
walk = int(self.proComWalk.currentIndex())
|
|
5302
|
expLabel = str(self.proExpLabel.text())
|
|
5310
|
expLabel = str(self.proExpLabel.text())
|
|
5303
|
|
|
5311
|
|
|
5304
|
return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel
|
|
5312
|
return parms_ok, project_name, datatype, ext, data_path, read_mode, delay, walk, set, expLabel
|
|
5305
|
|
|
5313
|
|
|
5306
|
def checkInputsPUSave(self, datatype):
|
|
5314
|
def checkInputsPUSave(self, datatype):
|
|
5307
|
"""
|
|
5315
|
"""
|
|
5308
|
Check Inputs Spectra Save:
|
|
5316
|
Check Inputs Spectra Save:
|
|
5309
|
- path
|
|
5317
|
- path
|
|
5310
|
- blocks Per File
|
|
5318
|
- blocks Per File
|
|
5311
|
- sufix
|
|
5319
|
- sufix
|
|
5312
|
- dataformat
|
|
5320
|
- dataformat
|
|
5313
|
"""
|
|
5321
|
"""
|
|
5314
|
parms_ok = True
|
|
5322
|
parms_ok = True
|
|
5315
|
|
|
5323
|
|
|
5316
|
if datatype == "Voltage":
|
|
5324
|
if datatype == "Voltage":
|
|
5317
|
output_path = str(self.volOutputPath.text())
|
|
5325
|
output_path = str(self.volOutputPath.text())
|
|
5318
|
blocksperfile = str(self.volOutputblocksperfile.text())
|
|
5326
|
blocksperfile = str(self.volOutputblocksperfile.text())
|
|
5319
|
profilesperblock = str(self.volOutputprofilesperblock.text())
|
|
5327
|
profilesperblock = str(self.volOutputprofilesperblock.text())
|
|
5320
|
|
|
5328
|
|
|
5321
|
if datatype == "Spectra":
|
|
5329
|
if datatype == "Spectra":
|
|
5322
|
output_path = str(self.specOutputPath.text())
|
|
5330
|
output_path = str(self.specOutputPath.text())
|
|
5323
|
blocksperfile = str(self.specOutputblocksperfile.text())
|
|
5331
|
blocksperfile = str(self.specOutputblocksperfile.text())
|
|
5324
|
profilesperblock = 0
|
|
5332
|
profilesperblock = 0
|
|
5325
|
|
|
5333
|
|
|
5326
|
if datatype == "SpectraHeis":
|
|
5334
|
if datatype == "SpectraHeis":
|
|
5327
|
output_path = str(self.specHeisOutputPath.text())
|
|
5335
|
output_path = str(self.specHeisOutputPath.text())
|
|
5328
|
blocksperfile = str(self.specHeisOutputblocksperfile.text())
|
|
5336
|
blocksperfile = str(self.specHeisOutputblocksperfile.text())
|
|
5329
|
metadata_file = str(self.specHeisOutputMetada.text())
|
|
5337
|
metadata_file = str(self.specHeisOutputMetada.text())
|
|
5330
|
|
|
5338
|
|
|
5331
|
message = ''
|
|
5339
|
message = ''
|
|
5332
|
|
|
5340
|
|
|
5333
|
if not os.path.isdir(output_path):
|
|
5341
|
if not os.path.isdir(output_path):
|
|
5334
|
message += 'OutputPath:%s does not exist\n' % output_path
|
|
5342
|
message += 'OutputPath:%s does not exist\n' % output_path
|
|
5335
|
parms_ok = False
|
|
5343
|
parms_ok = False
|
|
5336
|
|
|
5344
|
|
|
5337
|
try:
|
|
5345
|
try:
|
|
5338
|
profilesperblock = int(profilesperblock)
|
|
5346
|
profilesperblock = int(profilesperblock)
|
|
5339
|
except:
|
|
5347
|
except:
|
|
5340
|
if datatype == "Voltage":
|
|
5348
|
if datatype == "Voltage":
|
|
5341
|
message += 'Profilesperblock: %s, this must be a integer number\n' % str(self.volOutputprofilesperblock.text())
|
|
5349
|
message += 'Profilesperblock: %s, this must be a integer number\n' % str(self.volOutputprofilesperblock.text())
|
|
5342
|
parms_ok = False
|
|
5350
|
parms_ok = False
|
|
5343
|
profilesperblock = None
|
|
5351
|
profilesperblock = None
|
|
5344
|
|
|
5352
|
|
|
5345
|
try:
|
|
5353
|
try:
|
|
5346
|
blocksperfile = int(blocksperfile)
|
|
5354
|
blocksperfile = int(blocksperfile)
|
|
5347
|
except:
|
|
5355
|
except:
|
|
5348
|
if datatype == "Voltage":
|
|
5356
|
if datatype == "Voltage":
|
|
5349
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.volOutputblocksperfile.text())
|
|
5357
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.volOutputblocksperfile.text())
|
|
5350
|
elif datatype == "Spectra":
|
|
5358
|
elif datatype == "Spectra":
|
|
5351
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specOutputblocksperfile.text())
|
|
5359
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specOutputblocksperfile.text())
|
|
5352
|
elif datatype == "SpectraHeis":
|
|
5360
|
elif datatype == "SpectraHeis":
|
|
5353
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specHeisOutputblocksperfile.text())
|
|
5361
|
message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specHeisOutputblocksperfile.text())
|
|
5354
|
|
|
5362
|
|
|
5355
|
parms_ok = False
|
|
5363
|
parms_ok = False
|
|
5356
|
blocksperfile = None
|
|
5364
|
blocksperfile = None
|
|
5357
|
|
|
5365
|
|
|
5358
|
if datatype == "SpectraHeis":
|
|
5366
|
if datatype == "SpectraHeis":
|
|
5359
|
if metadata_file != '':
|
|
5367
|
if metadata_file != '':
|
|
5360
|
if not os.path.isfile(metadata_file):
|
|
5368
|
if not os.path.isfile(metadata_file):
|
|
5361
|
message += 'Metadata file %s does not exist\n' % metadata_file
|
|
5369
|
message += 'Metadata file %s does not exist\n' % metadata_file
|
|
5362
|
parms_ok = False
|
|
5370
|
parms_ok = False
|
|
5363
|
|
|
5371
|
|
|
5364
|
if str.strip(output_path) != '':
|
|
5372
|
if str.strip(output_path) != '':
|
|
5365
|
self.console.append(message)
|
|
5373
|
self.console.append(message)
|
|
5366
|
|
|
5374
|
|
|
5367
|
if datatype == "Voltage":
|
|
5375
|
if datatype == "Voltage":
|
|
5368
|
return parms_ok, output_path, blocksperfile, profilesperblock
|
|
5376
|
return parms_ok, output_path, blocksperfile, profilesperblock
|
|
5369
|
|
|
5377
|
|
|
5370
|
|
|
5378
|
|
|
5371
|
if datatype == "Spectra":
|
|
5379
|
if datatype == "Spectra":
|
|
5372
|
return parms_ok, output_path, blocksperfile, profilesperblock
|
|
5380
|
return parms_ok, output_path, blocksperfile, profilesperblock
|
|
5373
|
|
|
5381
|
|
|
5374
|
|
|
5382
|
|
|
5375
|
if datatype == "SpectraHeis":
|
|
5383
|
if datatype == "SpectraHeis":
|
|
5376
|
return parms_ok, output_path, blocksperfile, metadata_file
|
|
5384
|
return parms_ok, output_path, blocksperfile, metadata_file
|
|
5377
|
|
|
5385
|
|
|
5378
|
def findDatafiles(self, data_path, ext, walk, expLabel=''):
|
|
5386
|
def findDatafiles(self, data_path, ext, walk, expLabel=''):
|
|
5379
|
|
|
5387
|
|
|
5380
|
dateList = []
|
|
5388
|
dateList = []
|
|
5381
|
fileList = []
|
|
5389
|
fileList = []
|
|
5382
|
|
|
5390
|
|
|
5383
|
if ext == ".r":
|
|
5391
|
if ext == ".r":
|
|
5384
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5392
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5385
|
|
|
5393
|
|
|
5386
|
readerObj = JRODataReader()
|
|
5394
|
readerObj = JRODataReader()
|
|
5387
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5395
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5388
|
expLabel=expLabel,
|
|
5396
|
expLabel=expLabel,
|
|
5389
|
ext=ext,
|
|
5397
|
ext=ext,
|
|
5390
|
walk=walk)
|
|
5398
|
walk=walk)
|
|
5391
|
|
|
5399
|
|
|
5392
|
if ext == ".pdata":
|
|
5400
|
if ext == ".pdata":
|
|
5393
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5401
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5394
|
|
|
5402
|
|
|
5395
|
readerObj = JRODataReader()
|
|
5403
|
readerObj = JRODataReader()
|
|
5396
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5404
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5397
|
expLabel=expLabel,
|
|
5405
|
expLabel=expLabel,
|
|
5398
|
ext=ext,
|
|
5406
|
ext=ext,
|
|
5399
|
walk=walk)
|
|
5407
|
walk=walk)
|
|
5400
|
|
|
5408
|
|
|
5401
|
if ext == ".fits":
|
|
5409
|
if ext == ".fits":
|
|
5402
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5410
|
from schainpy.model.io.jroIO_base import JRODataReader
|
|
5403
|
|
|
5411
|
|
|
5404
|
readerObj = JRODataReader()
|
|
5412
|
readerObj = JRODataReader()
|
|
5405
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5413
|
dateList = readerObj.findDatafiles(path=data_path,
|
|
5406
|
expLabel=expLabel,
|
|
5414
|
expLabel=expLabel,
|
|
5407
|
ext=ext,
|
|
5415
|
ext=ext,
|
|
5408
|
walk=walk)
|
|
5416
|
walk=walk)
|
|
5409
|
|
|
5417
|
|
|
5410
|
if ext == ".hdf5":
|
|
5418
|
if ext == ".hdf5":
|
|
5411
|
from schainpy.model.io.jroIO_usrp import USRPReader
|
|
5419
|
from schainpy.model.io.jroIO_usrp import USRPReader
|
|
5412
|
|
|
5420
|
|
|
5413
|
readerObj = USRPReader()
|
|
5421
|
readerObj = USRPReader()
|
|
5414
|
dateList = readerObj.findDatafiles(path=data_path)
|
|
5422
|
dateList = readerObj.findDatafiles(path=data_path)
|
|
5415
|
|
|
5423
|
|
|
5416
|
return dateList
|
|
5424
|
return dateList
|
|
5417
|
|
|
5425
|
|
|
5418
|
def loadDays(self, data_path, ext, walk, expLabel=''):
|
|
5426
|
def loadDays(self, data_path, ext, walk, expLabel=''):
|
|
5419
|
"""
|
|
5427
|
"""
|
|
5420
|
Method to loads day
|
|
5428
|
Method to loads day
|
|
5421
|
"""
|
|
5429
|
"""
|
|
5422
|
# self._disable_save_button()
|
|
5430
|
# self._disable_save_button()
|
|
5423
|
# self._disable_play_button()
|
|
5431
|
# self._disable_play_button()
|
|
5424
|
# self.proOk.setEnabled(False)
|
|
5432
|
# self.proOk.setEnabled(False)
|
|
5425
|
|
|
5433
|
|
|
5426
|
self.proComStartDate.clear()
|
|
5434
|
self.proComStartDate.clear()
|
|
5427
|
self.proComEndDate.clear()
|
|
5435
|
self.proComEndDate.clear()
|
|
5428
|
|
|
5436
|
|
|
5429
|
self.dateList = []
|
|
5437
|
self.dateList = []
|
|
5430
|
|
|
5438
|
|
|
5431
|
if not data_path:
|
|
5439
|
if not data_path:
|
|
5432
|
self.console.append("Datapath has not been set")
|
|
5440
|
self.console.append("Datapath has not been set")
|
|
5433
|
return []
|
|
5441
|
return []
|
|
5434
|
|
|
5442
|
|
|
5435
|
if not os.path.isdir(data_path):
|
|
5443
|
if not os.path.isdir(data_path):
|
|
5436
|
self.console.append("Directory %s does not exist" %data_path)
|
|
5444
|
self.console.append("Directory %s does not exist" %data_path)
|
|
5437
|
return []
|
|
5445
|
return []
|
|
5438
|
|
|
5446
|
|
|
5439
|
self.dataPath = data_path
|
|
5447
|
self.dataPath = data_path
|
|
5440
|
|
|
5448
|
|
|
5441
|
dateList = self.findDatafiles(data_path, ext=ext, walk=walk, expLabel=expLabel)
|
|
5449
|
dateList = self.findDatafiles(data_path, ext=ext, walk=walk, expLabel=expLabel)
|
|
5442
|
|
|
5450
|
|
|
5443
|
if not dateList:
|
|
5451
|
if not dateList:
|
|
5444
|
# self.console.clear()
|
|
5452
|
# self.console.clear()
|
|
5445
|
if walk:
|
|
5453
|
if walk:
|
|
5446
|
if expLabel:
|
|
5454
|
if expLabel:
|
|
5447
|
outputstr = "No files (*%s) were found on %s/DOYPATH/%s" % (ext, data_path, expLabel)
|
|
5455
|
outputstr = "No files (*%s) were found on %s/DOYPATH/%s" % (ext, data_path, expLabel)
|
|
5448
|
else:
|
|
5456
|
else:
|
|
5449
|
outputstr = "No files (*%s) were found on %s" % (ext, data_path)
|
|
5457
|
outputstr = "No files (*%s) were found on %s" % (ext, data_path)
|
|
5450
|
else:
|
|
5458
|
else:
|
|
5451
|
outputstr = "No files (*%s) were found on %s" % (ext, data_path)
|
|
5459
|
outputstr = "No files (*%s) were found on %s" % (ext, data_path)
|
|
5452
|
|
|
5460
|
|
|
5453
|
self.console.append(outputstr)
|
|
5461
|
self.console.append(outputstr)
|
|
5454
|
return []
|
|
5462
|
return []
|
|
5455
|
|
|
5463
|
|
|
5456
|
dateStrList = []
|
|
5464
|
dateStrList = []
|
|
5457
|
for thisDate in dateList:
|
|
5465
|
for thisDate in dateList:
|
|
5458
|
dateStr = thisDate.strftime("%Y/%m/%d")
|
|
5466
|
dateStr = thisDate.strftime("%Y/%m/%d")
|
|
5459
|
|
|
5467
|
|
|
5460
|
self.proComStartDate.addItem(dateStr)
|
|
5468
|
self.proComStartDate.addItem(dateStr)
|
|
5461
|
self.proComEndDate.addItem(dateStr)
|
|
5469
|
self.proComEndDate.addItem(dateStr)
|
|
5462
|
dateStrList.append(dateStr)
|
|
5470
|
dateStrList.append(dateStr)
|
|
5463
|
|
|
5471
|
|
|
5464
|
self.proComStartDate.setCurrentIndex(0)
|
|
5472
|
self.proComStartDate.setCurrentIndex(0)
|
|
5465
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1)
|
|
5473
|
self.proComEndDate.setCurrentIndex(self.proComEndDate.count() - 1)
|
|
5466
|
|
|
5474
|
|
|
5467
|
self.dateList = dateStrList
|
|
5475
|
self.dateList = dateStrList
|
|
5468
|
|
|
5476
|
|
|
5469
|
self.console.clear()
|
|
5477
|
self.console.clear()
|
|
5470
|
self.console.append("Successful load")
|
|
5478
|
self.console.append("Successful load")
|
|
5471
|
|
|
5479
|
|
|
5472
|
# self.proOk.setEnabled(True)
|
|
5480
|
# self.proOk.setEnabled(True)
|
|
5473
|
# self._enable_play_button()
|
|
5481
|
# self._enable_play_button()
|
|
5474
|
# self._enable_save_button()
|
|
5482
|
# self._enable_save_button()
|
|
5475
|
|
|
5483
|
|
|
5476
|
return self.dateList
|
|
5484
|
return self.dateList
|
|
5477
|
|
|
5485
|
|
|
5478
|
def setWorkSpaceGUI(self, pathWorkSpace=None):
|
|
5486
|
def setWorkSpaceGUI(self, pathWorkSpace=None):
|
|
5479
|
|
|
5487
|
|
|
5480
|
if pathWorkSpace == None:
|
|
5488
|
if pathWorkSpace == None:
|
|
5481
|
home = os.path.expanduser("~")
|
|
5489
|
home = os.path.expanduser("~")
|
|
5482
|
pathWorkSpace = os.path.join(home,'schain_workspace')
|
|
5490
|
pathWorkSpace = os.path.join(home,'schain_workspace')
|
|
5483
|
|
|
5491
|
|
|
5484
|
self.pathWorkSpace = pathWorkSpace
|
|
5492
|
self.pathWorkSpace = pathWorkSpace
|
|
5485
|
|
|
5493
|
|
|
5486
|
"""
|
|
5494
|
"""
|
|
5487
|
Comandos Usados en Console
|
|
5495
|
Comandos Usados en Console
|
|
5488
|
"""
|
|
5496
|
"""
|
|
5489
|
def __del__(self):
|
|
5497
|
def __del__(self):
|
|
5490
|
sys.stdout = sys.__stdout__
|
|
5498
|
sys.stdout = sys.__stdout__
|
|
5491
|
sys.stderr = sys.__stderr__
|
|
5499
|
sys.stderr = sys.__stderr__
|
|
5492
|
|
|
5500
|
|
|
5493
|
def normalOutputWritten(self, text):
|
|
5501
|
def normalOutputWritten(self, text):
|
|
5494
|
color_black = QtGui.QColor(0,0,0)
|
|
5502
|
color_black = QtGui.QColor(0,0,0)
|
|
5495
|
self.console.setTextColor(color_black)
|
|
5503
|
self.console.setTextColor(color_black)
|
|
5496
|
self.console.append(text)
|
|
5504
|
self.console.append(text)
|
|
5497
|
|
|
5505
|
|
|
5498
|
def errorOutputWritten(self, text):
|
|
5506
|
def errorOutputWritten(self, text):
|
|
5499
|
color_red = QtGui.QColor(255,0,0)
|
|
5507
|
color_red = QtGui.QColor(255,0,0)
|
|
5500
|
color_black = QtGui.QColor(0,0,0)
|
|
5508
|
color_black = QtGui.QColor(0,0,0)
|
|
5501
|
|
|
5509
|
|
|
5502
|
self.console.setTextColor(color_red)
|
|
5510
|
self.console.setTextColor(color_red)
|
|
5503
|
self.console.append(text)
|
|
5511
|
self.console.append(text)
|
|
5504
|
self.console.setTextColor(color_black)
|
|
5512
|
self.console.setTextColor(color_black)
|
|
5505
|
|
|
5513
|
|
|
5506
|
def _enable_save_button(self):
|
|
5514
|
def _enable_save_button(self):
|
|
5507
|
|
|
5515
|
|
|
5508
|
self.actionSaveToolbar.setEnabled(True)
|
|
5516
|
self.actionSaveToolbar.setEnabled(True)
|
|
5509
|
self.actionSave.setEnabled(True)
|
|
5517
|
self.actionSave.setEnabled(True)
|
|
5510
|
|
|
5518
|
|
|
5511
|
def _disable_save_button(self):
|
|
5519
|
def _disable_save_button(self):
|
|
5512
|
|
|
5520
|
|
|
5513
|
self.actionSaveToolbar.setEnabled(False)
|
|
5521
|
self.actionSaveToolbar.setEnabled(False)
|
|
5514
|
self.actionSave.setEnabled(False)
|
|
5522
|
self.actionSave.setEnabled(False)
|
|
5515
|
|
|
5523
|
|
|
5516
|
def _enable_play_button(self):
|
|
5524
|
def _enable_play_button(self):
|
|
5517
|
|
|
5525
|
|
|
5518
|
if self.controllerThread:
|
|
5526
|
if self.controllerThread:
|
|
5519
|
if self.controllerThread.isRunning():
|
|
5527
|
if self.controllerThread.isRunning():
|
|
5520
|
return
|
|
5528
|
return
|
|
5521
|
|
|
5529
|
|
|
5522
|
self.actionStart.setEnabled(True)
|
|
5530
|
self.actionStart.setEnabled(True)
|
|
5523
|
self.actionStarToolbar.setEnabled(True)
|
|
5531
|
self.actionStarToolbar.setEnabled(True)
|
|
5524
|
|
|
5532
|
|
|
5525
|
self.changeStartIcon(started=False)
|
|
5533
|
self.changeStartIcon(started=False)
|
|
5526
|
|
|
5534
|
|
|
5527
|
def _disable_play_button(self):
|
|
5535
|
def _disable_play_button(self):
|
|
5528
|
|
|
5536
|
|
|
5529
|
self.actionStart.setEnabled(False)
|
|
5537
|
self.actionStart.setEnabled(False)
|
|
5530
|
self.actionStarToolbar.setEnabled(False)
|
|
5538
|
self.actionStarToolbar.setEnabled(False)
|
|
5531
|
|
|
5539
|
|
|
5532
|
self.changeStartIcon(started=True)
|
|
5540
|
self.changeStartIcon(started=True)
|
|
5533
|
|
|
5541
|
|
|
5534
|
def _enable_stop_button(self):
|
|
5542
|
def _enable_stop_button(self):
|
|
5535
|
|
|
5543
|
|
|
5536
|
self.actionPause.setEnabled(True)
|
|
5544
|
self.actionPause.setEnabled(True)
|
|
5537
|
self.actionStop.setEnabled(True)
|
|
5545
|
self.actionStop.setEnabled(True)
|
|
5538
|
|
|
5546
|
|
|
5539
|
self.actionPauseToolbar.setEnabled(True)
|
|
5547
|
self.actionPauseToolbar.setEnabled(True)
|
|
5540
|
self.actionStopToolbar.setEnabled(True)
|
|
5548
|
self.actionStopToolbar.setEnabled(True)
|
|
5541
|
|
|
5549
|
|
|
5542
|
self.changePauseIcon(paused=False)
|
|
5550
|
self.changePauseIcon(paused=False)
|
|
5543
|
self.changeStopIcon(started=True)
|
|
5551
|
self.changeStopIcon(started=True)
|
|
5544
|
|
|
5552
|
|
|
5545
|
def _disable_stop_button(self):
|
|
5553
|
def _disable_stop_button(self):
|
|
5546
|
|
|
5554
|
|
|
5547
|
self.actionPause.setEnabled(False)
|
|
5555
|
self.actionPause.setEnabled(False)
|
|
5548
|
self.actionStop.setEnabled(False)
|
|
5556
|
self.actionStop.setEnabled(False)
|
|
5549
|
|
|
5557
|
|
|
5550
|
self.actionPauseToolbar.setEnabled(False)
|
|
5558
|
self.actionPauseToolbar.setEnabled(False)
|
|
5551
|
self.actionStopToolbar.setEnabled(False)
|
|
5559
|
self.actionStopToolbar.setEnabled(False)
|
|
5552
|
|
|
5560
|
|
|
5553
|
self.changePauseIcon(paused=False)
|
|
5561
|
self.changePauseIcon(paused=False)
|
|
5554
|
self.changeStopIcon(started=False)
|
|
5562
|
self.changeStopIcon(started=False)
|
|
5555
|
|
|
5563
|
|
|
5556
|
def setGUIStatus(self):
|
|
5564
|
def setGUIStatus(self):
|
|
5557
|
|
|
5565
|
|
|
5558
|
self.setWindowTitle("ROJ-Signal Chain")
|
|
5566
|
self.setWindowTitle("ROJ-Signal Chain")
|
|
5559
|
self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"logo.png") ))
|
|
5567
|
self.setWindowIcon(QtGui.QIcon( os.path.join(FIGURES_PATH,"logo.png") ))
|
|
5560
|
|
|
5568
|
|
|
5561
|
self.tabWidgetProject.setEnabled(False)
|
|
5569
|
self.tabWidgetProject.setEnabled(False)
|
|
5562
|
self.tabVoltage.setEnabled(False)
|
|
5570
|
self.tabVoltage.setEnabled(False)
|
|
5563
|
self.tabSpectra.setEnabled(False)
|
|
5571
|
self.tabSpectra.setEnabled(False)
|
|
5564
|
self.tabCorrelation.setEnabled(False)
|
|
5572
|
self.tabCorrelation.setEnabled(False)
|
|
5565
|
self.frame_2.setEnabled(False)
|
|
5573
|
self.frame_2.setEnabled(False)
|
|
5566
|
|
|
5574
|
|
|
5567
|
self.actionCreate.setShortcut('Ctrl+N')
|
|
5575
|
self.actionCreate.setShortcut('Ctrl+N')
|
|
5568
|
self.actionOpen.setShortcut('Ctrl+O')
|
|
5576
|
self.actionOpen.setShortcut('Ctrl+O')
|
|
5569
|
self.actionSave.setShortcut('Ctrl+S')
|
|
5577
|
self.actionSave.setShortcut('Ctrl+S')
|
|
5570
|
self.actionClose.setShortcut('Ctrl+X')
|
|
5578
|
self.actionClose.setShortcut('Ctrl+X')
|
|
5571
|
|
|
5579
|
|
|
5572
|
self.actionStart.setShortcut('Ctrl+1')
|
|
5580
|
self.actionStart.setShortcut('Ctrl+1')
|
|
5573
|
self.actionPause.setShortcut('Ctrl+2')
|
|
5581
|
self.actionPause.setShortcut('Ctrl+2')
|
|
5574
|
self.actionStop.setShortcut('Ctrl+3')
|
|
5582
|
self.actionStop.setShortcut('Ctrl+3')
|
|
5575
|
|
|
5583
|
|
|
5576
|
self.actionFTP.setShortcut('Ctrl+F')
|
|
5584
|
self.actionFTP.setShortcut('Ctrl+F')
|
|
5577
|
|
|
5585
|
|
|
5578
|
self.actionStart.setEnabled(False)
|
|
5586
|
self.actionStart.setEnabled(False)
|
|
5579
|
self.actionPause.setEnabled(False)
|
|
5587
|
self.actionPause.setEnabled(False)
|
|
5580
|
self.actionStop.setEnabled(False)
|
|
5588
|
self.actionStop.setEnabled(False)
|
|
5581
|
|
|
5589
|
|
|
5582
|
self.actionStarToolbar.setEnabled(False)
|
|
5590
|
self.actionStarToolbar.setEnabled(False)
|
|
5583
|
self.actionPauseToolbar.setEnabled(False)
|
|
5591
|
self.actionPauseToolbar.setEnabled(False)
|
|
5584
|
self.actionStopToolbar.setEnabled(False)
|
|
5592
|
self.actionStopToolbar.setEnabled(False)
|
|
5585
|
|
|
5593
|
|
|
5586
|
self.proName.clear()
|
|
5594
|
self.proName.clear()
|
|
5587
|
self.proDataPath.setText('')
|
|
5595
|
self.proDataPath.setText('')
|
|
5588
|
self.console.setReadOnly(True)
|
|
5596
|
self.console.setReadOnly(True)
|
|
5589
|
self.console.append("Welcome to Signal Chain\n\n")
|
|
5597
|
self.console.append("Welcome to Signal Chain\n\n")
|
|
5590
|
self.console.append("Open a project or Create a new one\n")
|
|
5598
|
self.console.append("Open a project or Create a new one\n")
|
|
5591
|
self.proStartTime.setDisplayFormat("hh:mm:ss")
|
|
5599
|
self.proStartTime.setDisplayFormat("hh:mm:ss")
|
|
5592
|
self.proDataType.setEnabled(False)
|
|
5600
|
self.proDataType.setEnabled(False)
|
|
5593
|
self.time = QtCore.QTime()
|
|
5601
|
self.time = QtCore.QTime()
|
|
5594
|
self.proEndTime.setDisplayFormat("hh:mm:ss")
|
|
5602
|
self.proEndTime.setDisplayFormat("hh:mm:ss")
|
|
5595
|
startTime = "00:00:00"
|
|
5603
|
startTime = "00:00:00"
|
|
5596
|
endTime = "23:59:59"
|
|
5604
|
endTime = "23:59:59"
|
|
5597
|
starlist = startTime.split(":")
|
|
5605
|
starlist = startTime.split(":")
|
|
5598
|
endlist = endTime.split(":")
|
|
5606
|
endlist = endTime.split(":")
|
|
5599
|
self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2]))
|
|
5607
|
self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2]))
|
|
5600
|
self.proStartTime.setTime(self.time)
|
|
5608
|
self.proStartTime.setTime(self.time)
|
|
5601
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
5609
|
self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2]))
|
|
5602
|
self.proEndTime.setTime(self.time)
|
|
5610
|
self.proEndTime.setTime(self.time)
|
|
5603
|
self.proOk.setEnabled(False)
|
|
5611
|
self.proOk.setEnabled(False)
|
|
5604
|
# set model Project Explorer
|
|
5612
|
# set model Project Explorer
|
|
5605
|
self.projectExplorerModel = QtGui.QStandardItemModel()
|
|
5613
|
self.projectExplorerModel = QtGui.QStandardItemModel()
|
|
5606
|
self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",))
|
|
5614
|
self.projectExplorerModel.setHorizontalHeaderLabels(("Project Explorer",))
|
|
5607
|
layout = QtGui.QVBoxLayout()
|
|
5615
|
layout = QtGui.QVBoxLayout()
|
|
5608
|
layout.addWidget(self.projectExplorerTree)
|
|
5616
|
layout.addWidget(self.projectExplorerTree)
|
|
5609
|
self.projectExplorerTree.setModel(self.projectExplorerModel)
|
|
5617
|
self.projectExplorerTree.setModel(self.projectExplorerModel)
|
|
5610
|
self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
|
5618
|
self.projectExplorerTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
|
5611
|
self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click)
|
|
5619
|
self.projectExplorerTree.customContextMenuRequested.connect(self.on_right_click)
|
|
5612
|
self.projectExplorerTree.clicked.connect(self.on_click)
|
|
5620
|
self.projectExplorerTree.clicked.connect(self.on_click)
|
|
5613
|
self.projectExplorerTree.expandAll()
|
|
5621
|
self.projectExplorerTree.expandAll()
|
|
5614
|
# set model Project Properties
|
|
5622
|
# set model Project Properties
|
|
5615
|
|
|
5623
|
|
|
5616
|
self.propertiesModel = TreeModel()
|
|
5624
|
self.propertiesModel = TreeModel()
|
|
5617
|
self.propertiesModel.initProjectView()
|
|
5625
|
self.propertiesModel.initProjectView()
|
|
5618
|
self.treeProjectProperties.setModel(self.propertiesModel)
|
|
5626
|
self.treeProjectProperties.setModel(self.propertiesModel)
|
|
5619
|
self.treeProjectProperties.expandAll()
|
|
5627
|
self.treeProjectProperties.expandAll()
|
|
5620
|
self.treeProjectProperties.allColumnsShowFocus()
|
|
5628
|
self.treeProjectProperties.allColumnsShowFocus()
|
|
5621
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
5629
|
self.treeProjectProperties.resizeColumnToContents(1)
|
|
5622
|
|
|
5630
|
|
|
5623
|
# set Project
|
|
5631
|
# set Project
|
|
5624
|
self.pronTxs.setEnabled(False)
|
|
5632
|
self.pronTxs.setEnabled(False)
|
|
5625
|
self.proComByBlock.setEnabled(False)
|
|
5633
|
self.proComByBlock.setEnabled(False)
|
|
5626
|
self.proExpLabel.setEnabled(False)
|
|
5634
|
self.proExpLabel.setEnabled(False)
|
|
5627
|
self.proDelay.setEnabled(False)
|
|
5635
|
self.proDelay.setEnabled(False)
|
|
5628
|
self.proSet.setEnabled(True)
|
|
5636
|
self.proSet.setEnabled(True)
|
|
5629
|
self.proDataType.setReadOnly(True)
|
|
5637
|
self.proDataType.setReadOnly(True)
|
|
5630
|
|
|
5638
|
|
|
5631
|
# set Operation Voltage
|
|
5639
|
# set Operation Voltage
|
|
5632
|
self.volOpComChannels.setEnabled(False)
|
|
5640
|
self.volOpComChannels.setEnabled(False)
|
|
5633
|
self.volOpComHeights.setEnabled(False)
|
|
5641
|
self.volOpComHeights.setEnabled(False)
|
|
5634
|
self.volOpFilter.setEnabled(False)
|
|
5642
|
self.volOpFilter.setEnabled(False)
|
|
5635
|
self.volOpComProfile.setEnabled(False)
|
|
5643
|
self.volOpComProfile.setEnabled(False)
|
|
5636
|
self.volOpComCode.setEnabled(False)
|
|
5644
|
self.volOpComCode.setEnabled(False)
|
|
5637
|
self.volOpFlip.setEnabled(False)
|
|
5645
|
self.volOpFlip.setEnabled(False)
|
|
5638
|
self.volOpCohInt.setEnabled(False)
|
|
5646
|
self.volOpCohInt.setEnabled(False)
|
|
5639
|
self.volOpRadarfrequency.setEnabled(False)
|
|
5647
|
self.volOpRadarfrequency.setEnabled(False)
|
|
5640
|
|
|
5648
|
|
|
5641
|
self.volOpChannel.setEnabled(False)
|
|
5649
|
self.volOpChannel.setEnabled(False)
|
|
5642
|
self.volOpHeights.setEnabled(False)
|
|
5650
|
self.volOpHeights.setEnabled(False)
|
|
5643
|
self.volOpProfile.setEnabled(False)
|
|
5651
|
self.volOpProfile.setEnabled(False)
|
|
5644
|
self.volOpComMode.setEnabled(False)
|
|
5652
|
self.volOpComMode.setEnabled(False)
|
|
5645
|
|
|
5653
|
|
|
5646
|
self.volOpReshaper.setEnabled(False)
|
|
5654
|
self.volOpReshaper.setEnabled(False)
|
|
5647
|
self.volOpAdjustHei.setEnabled(False)
|
|
5655
|
self.volOpAdjustHei.setEnabled(False)
|
|
5648
|
|
|
5656
|
|
|
5649
|
self.volOpCebReshaper.setEnabled(False)
|
|
5657
|
self.volOpCebReshaper.setEnabled(False)
|
|
5650
|
self.volOpCebAdjustHei.setEnabled(False)
|
|
5658
|
self.volOpCebAdjustHei.setEnabled(False)
|
|
5651
|
|
|
5659
|
|
|
5652
|
self.volGraphPath.setEnabled(False)
|
|
5660
|
self.volGraphPath.setEnabled(False)
|
|
5653
|
self.volGraphPrefix.setEnabled(False)
|
|
5661
|
self.volGraphPrefix.setEnabled(False)
|
|
5654
|
self.volGraphToolPath.setEnabled(False)
|
|
5662
|
self.volGraphToolPath.setEnabled(False)
|
|
5655
|
|
|
5663
|
|
|
5656
|
# set Graph Voltage
|
|
5664
|
# set Graph Voltage
|
|
5657
|
self.volGraphChannelList.setEnabled(False)
|
|
5665
|
self.volGraphChannelList.setEnabled(False)
|
|
5658
|
self.volGraphIntensityRange.setEnabled(False)
|
|
5666
|
self.volGraphIntensityRange.setEnabled(False)
|
|
5659
|
self.volGraphHeightrange.setEnabled(False)
|
|
5667
|
self.volGraphHeightrange.setEnabled(False)
|
|
5660
|
|
|
5668
|
|
|
5661
|
# set Operation Spectra
|
|
5669
|
# set Operation Spectra
|
|
5662
|
self.specOpnFFTpoints.setEnabled(False)
|
|
5670
|
self.specOpnFFTpoints.setEnabled(False)
|
|
5663
|
self.specOpProfiles.setEnabled(False)
|
|
5671
|
self.specOpProfiles.setEnabled(False)
|
|
5664
|
self.specOpippFactor.setEnabled(False)
|
|
5672
|
self.specOpippFactor.setEnabled(False)
|
|
5665
|
self.specOppairsList.setEnabled(False)
|
|
5673
|
self.specOppairsList.setEnabled(False)
|
|
5666
|
|
|
5674
|
|
|
5667
|
self.specOpComCrossSpectra.setEnabled(False)
|
|
5675
|
self.specOpComCrossSpectra.setEnabled(False)
|
|
5668
|
self.specOpComChannel.setEnabled(False)
|
|
5676
|
self.specOpComChannel.setEnabled(False)
|
|
5669
|
self.specOpComHeights.setEnabled(False)
|
|
5677
|
self.specOpComHeights.setEnabled(False)
|
|
5670
|
self.specOpIncoherent.setEnabled(False)
|
|
5678
|
self.specOpIncoherent.setEnabled(False)
|
|
5671
|
self.specOpgetNoise.setEnabled(False)
|
|
5679
|
self.specOpgetNoise.setEnabled(False)
|
|
5672
|
self.specOpRadarfrequency.setEnabled(False)
|
|
5680
|
self.specOpRadarfrequency.setEnabled(False)
|
|
5673
|
|
|
5681
|
|
|
5674
|
|
|
5682
|
|
|
5675
|
self.specOpChannel.setEnabled(False)
|
|
5683
|
self.specOpChannel.setEnabled(False)
|
|
5676
|
self.specOpHeights.setEnabled(False)
|
|
5684
|
self.specOpHeights.setEnabled(False)
|
|
5677
|
# set Graph Spectra
|
|
5685
|
# set Graph Spectra
|
|
5678
|
self.specGgraphChannelList.setEnabled(False)
|
|
5686
|
self.specGgraphChannelList.setEnabled(False)
|
|
5679
|
self.specGgraphFreq.setEnabled(False)
|
|
5687
|
self.specGgraphFreq.setEnabled(False)
|
|
5680
|
self.specGgraphHeight.setEnabled(False)
|
|
5688
|
self.specGgraphHeight.setEnabled(False)
|
|
5681
|
self.specGgraphDbsrange.setEnabled(False)
|
|
5689
|
self.specGgraphDbsrange.setEnabled(False)
|
|
5682
|
self.specGgraphmagnitud.setEnabled(False)
|
|
5690
|
self.specGgraphmagnitud.setEnabled(False)
|
|
5683
|
self.specGgraphTminTmax.setEnabled(False)
|
|
5691
|
self.specGgraphTminTmax.setEnabled(False)
|
|
5684
|
self.specGgraphTimeRange.setEnabled(False)
|
|
5692
|
self.specGgraphTimeRange.setEnabled(False)
|
|
5685
|
self.specGraphPath.setEnabled(False)
|
|
5693
|
self.specGraphPath.setEnabled(False)
|
|
5686
|
self.specGraphToolPath.setEnabled(False)
|
|
5694
|
self.specGraphToolPath.setEnabled(False)
|
|
5687
|
self.specGraphPrefix.setEnabled(False)
|
|
5695
|
self.specGraphPrefix.setEnabled(False)
|
|
5688
|
|
|
5696
|
|
|
5689
|
self.specGgraphftpratio.setEnabled(False)
|
|
5697
|
self.specGgraphftpratio.setEnabled(False)
|
|
5690
|
# set Operation SpectraHeis
|
|
5698
|
# set Operation SpectraHeis
|
|
5691
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
5699
|
self.specHeisOpIncoherent.setEnabled(False)
|
|
5692
|
self.specHeisOpCobIncInt.setEnabled(False)
|
|
5700
|
self.specHeisOpCobIncInt.setEnabled(False)
|
|
5693
|
# set Graph SpectraHeis
|
|
5701
|
# set Graph SpectraHeis
|
|
5694
|
self.specHeisGgraphChannelList.setEnabled(False)
|
|
5702
|
self.specHeisGgraphChannelList.setEnabled(False)
|
|
5695
|
self.specHeisGgraphXminXmax.setEnabled(False)
|
|
5703
|
self.specHeisGgraphXminXmax.setEnabled(False)
|
|
5696
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
5704
|
self.specHeisGgraphYminYmax.setEnabled(False)
|
|
5697
|
self.specHeisGgraphTminTmax.setEnabled(False)
|
|
5705
|
self.specHeisGgraphTminTmax.setEnabled(False)
|
|
5698
|
self.specHeisGgraphTimeRange.setEnabled(False)
|
|
5706
|
self.specHeisGgraphTimeRange.setEnabled(False)
|
|
5699
|
self.specHeisGgraphftpratio.setEnabled(False)
|
|
5707
|
self.specHeisGgraphftpratio.setEnabled(False)
|
|
5700
|
self.specHeisGraphPath.setEnabled(False)
|
|
5708
|
self.specHeisGraphPath.setEnabled(False)
|
|
5701
|
self.specHeisGraphPrefix.setEnabled(False)
|
|
5709
|
self.specHeisGraphPrefix.setEnabled(False)
|
|
5702
|
self.specHeisGraphToolPath.setEnabled(False)
|
|
5710
|
self.specHeisGraphToolPath.setEnabled(False)
|
|
5703
|
|
|
5711
|
|
|
5704
|
self.proComWalk.setCurrentIndex(0)
|
|
5712
|
self.proComWalk.setCurrentIndex(0)
|
|
5705
|
|
|
5713
|
|
|
5706
|
# tool tip gui
|
|
5714
|
# tool tip gui
|
|
5707
|
QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
|
|
5715
|
QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
|
|
5708
|
self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process')
|
|
5716
|
self.projectExplorerTree.setToolTip('Right clik to add Project or Unit Process')
|
|
5709
|
# tool tip gui project
|
|
5717
|
# tool tip gui project
|
|
5710
|
|
|
5718
|
|
|
5711
|
# tool tip gui volOp
|
|
5719
|
# tool tip gui volOp
|
|
5712
|
# self.volOpChannel.setToolTip('Example: 1,2,3,4,5')
|
|
5720
|
# self.volOpChannel.setToolTip('Example: 1,2,3,4,5')
|
|
5713
|
# self.volOpHeights.setToolTip('Example: 90,180')
|
|
5721
|
# self.volOpHeights.setToolTip('Example: 90,180')
|
|
5714
|
# self.volOpFilter.setToolTip('Example: 2')
|
|
5722
|
# self.volOpFilter.setToolTip('Example: 2')
|
|
5715
|
# self.volOpProfile.setToolTip('Example:0,127')
|
|
5723
|
# self.volOpProfile.setToolTip('Example:0,127')
|
|
5716
|
# self.volOpCohInt.setToolTip('Example: 128')
|
|
5724
|
# self.volOpCohInt.setToolTip('Example: 128')
|
|
5717
|
# self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
|
|
5725
|
# self.volOpFlip.setToolTip('ChannelList where flip will be applied. Example: 0,2,3')
|
|
5718
|
# self.volOpOk.setToolTip('If you have finished, please Ok ')
|
|
5726
|
# self.volOpOk.setToolTip('If you have finished, please Ok ')
|
|
5719
|
# # tool tip gui volGraph
|
|
5727
|
# # tool tip gui volGraph
|
|
5720
|
# self.volGraphIntensityRange.setToolTip('Height range. Example: 50,100')
|
|
5728
|
# self.volGraphIntensityRange.setToolTip('Height range. Example: 50,100')
|
|
5721
|
# self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
|
|
5729
|
# self.volGraphHeightrange.setToolTip('Amplitude. Example: 0,10000')
|
|
5722
|
# tool tip gui specOp
|
|
5730
|
# tool tip gui specOp
|
|
5723
|
# self.specOpnFFTpoints.setToolTip('Example: 128')
|
|
5731
|
# self.specOpnFFTpoints.setToolTip('Example: 128')
|
|
5724
|
# self.specOpProfiles.setToolTip('Example: 128')
|
|
5732
|
# self.specOpProfiles.setToolTip('Example: 128')
|
|
5725
|
# self.specOpippFactor.setToolTip('Example:1.0')
|
|
5733
|
# self.specOpippFactor.setToolTip('Example:1.0')
|
|
5726
|
# self.specOpIncoherent.setToolTip('Example: 10')
|
|
5734
|
# self.specOpIncoherent.setToolTip('Example: 10')
|
|
5727
|
# self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)')
|
|
5735
|
# self.specOpgetNoise.setToolTip('Example:20,180,30,120 (minHei,maxHei,minVel,maxVel)')
|
|
5728
|
#
|
|
5736
|
#
|
|
5729
|
# self.specOpChannel.setToolTip('Example: 0,1,2,3')
|
|
5737
|
# self.specOpChannel.setToolTip('Example: 0,1,2,3')
|
|
5730
|
# self.specOpHeights.setToolTip('Example: 90,180')
|
|
5738
|
# self.specOpHeights.setToolTip('Example: 90,180')
|
|
5731
|
# self.specOppairsList.setToolTip('Example: (0,1),(2,3)')
|
|
5739
|
# self.specOppairsList.setToolTip('Example: (0,1),(2,3)')
|
|
5732
|
# # tool tip gui specGraph
|
|
5740
|
# # tool tip gui specGraph
|
|
5733
|
#
|
|
5741
|
#
|
|
5734
|
# self.specGgraphChannelList.setToolTip('Example: 0,3,4')
|
|
5742
|
# self.specGgraphChannelList.setToolTip('Example: 0,3,4')
|
|
5735
|
# self.specGgraphFreq.setToolTip('Example: -20,20')
|
|
5743
|
# self.specGgraphFreq.setToolTip('Example: -20,20')
|
|
5736
|
# self.specGgraphHeight.setToolTip('Example: 100,400')
|
|
5744
|
# self.specGgraphHeight.setToolTip('Example: 100,400')
|
|
5737
|
# self.specGgraphDbsrange.setToolTip('Example: 30,170')
|
|
5745
|
# self.specGgraphDbsrange.setToolTip('Example: 30,170')
|
|
5738
|
#
|
|
5746
|
#
|
|
5739
|
# self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME')
|
|
5747
|
# self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME')
|
|
5740
|
#
|
|
5748
|
#
|
|
5741
|
#
|
|
5749
|
#
|
|
5742
|
# self.specHeisOpIncoherent.setToolTip('Example: 10')
|
|
5750
|
# self.specHeisOpIncoherent.setToolTip('Example: 10')
|
|
5743
|
#
|
|
5751
|
#
|
|
5744
|
# self.specHeisGgraphChannelList.setToolTip('Example: 0,2,3')
|
|
5752
|
# self.specHeisGgraphChannelList.setToolTip('Example: 0,2,3')
|
|
5745
|
# self.specHeisGgraphXminXmax.setToolTip('Example (Hz): -1000, 1000')
|
|
5753
|
# self.specHeisGgraphXminXmax.setToolTip('Example (Hz): -1000, 1000')
|
|
5746
|
# self.specHeisGgraphYminYmax.setToolTip('Example (dB): 5, 35')
|
|
5754
|
# self.specHeisGgraphYminYmax.setToolTip('Example (dB): 5, 35')
|
|
5747
|
# self.specHeisGgraphTminTmax.setToolTip('Example (hours): 0, 24')
|
|
5755
|
# self.specHeisGgraphTminTmax.setToolTip('Example (hours): 0, 24')
|
|
5748
|
# self.specHeisGgraphTimeRange.setToolTip('Example (hours): 8')
|
|
5756
|
# self.specHeisGgraphTimeRange.setToolTip('Example (hours): 8')
|
|
5749
|
|
|
5757
|
|
|
5750
|
self.labelSet.show()
|
|
5758
|
self.labelSet.show()
|
|
5751
|
self.proSet.show()
|
|
5759
|
self.proSet.show()
|
|
5752
|
|
|
5760
|
|
|
5753
|
self.labelIPPKm.hide()
|
|
5761
|
self.labelIPPKm.hide()
|
|
5754
|
self.proIPPKm.hide()
|
|
5762
|
self.proIPPKm.hide()
|
|
5755
|
|
|
5763
|
|
|
5756
|
sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten)
|
|
5764
|
sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten)
|
|
5757
|
# sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten)
|
|
5765
|
# sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten)
|
|
5758
|
|
|
5766
|
|
|
5759
|
|
|
5767
|
|
|
5760
|
class UnitProcessWindow(QMainWindow, Ui_UnitProcess):
|
|
5768
|
class UnitProcessWindow(QMainWindow, Ui_UnitProcess):
|
|
5761
|
"""
|
|
5769
|
"""
|
|
5762
|
Class documentation goes here.
|
|
5770
|
Class documentation goes here.
|
|
5763
|
"""
|
|
5771
|
"""
|
|
5764
|
closed = pyqtSignal()
|
|
5772
|
closed = pyqtSignal()
|
|
5765
|
create = False
|
|
5773
|
create = False
|
|
5766
|
|
|
5774
|
|
|
5767
|
def __init__(self, parent=None):
|
|
5775
|
def __init__(self, parent=None):
|
|
5768
|
"""
|
|
5776
|
"""
|
|
5769
|
Constructor
|
|
5777
|
Constructor
|
|
5770
|
"""
|
|
5778
|
"""
|
|
5771
|
QMainWindow.__init__(self, parent)
|
|
5779
|
QMainWindow.__init__(self, parent)
|
|
5772
|
self.setupUi(self)
|
|
5780
|
self.setupUi(self)
|
|
5773
|
self.getFromWindow = None
|
|
5781
|
self.getFromWindow = None
|
|
5774
|
self.getfromWindowList = []
|
|
5782
|
self.getfromWindowList = []
|
|
5775
|
self.dataTypeProject = None
|
|
5783
|
self.dataTypeProject = None
|
|
5776
|
|
|
5784
|
|
|
5777
|
self.listUP = None
|
|
5785
|
self.listUP = None
|
|
5778
|
|
|
5786
|
|
|
5779
|
@pyqtSignature("")
|
|
5787
|
@pyqtSignature("")
|
|
5780
|
def on_unitPokbut_clicked(self):
|
|
5788
|
def on_unitPokbut_clicked(self):
|
|
5781
|
"""
|
|
5789
|
"""
|
|
5782
|
Slot documentation goes here.
|
|
5790
|
Slot documentation goes here.
|
|
5783
|
"""
|
|
5791
|
"""
|
|
5784
|
self.create = True
|
|
5792
|
self.create = True
|
|
5785
|
self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())]
|
|
5793
|
self.getFromWindow = self.getfromWindowList[int(self.comboInputBox.currentIndex())]
|
|
5786
|
# self.nameofUP= str(self.nameUptxt.text())
|
|
5794
|
# self.nameofUP= str(self.nameUptxt.text())
|
|
5787
|
self.typeofUP = str(self.comboTypeBox.currentText())
|
|
5795
|
self.typeofUP = str(self.comboTypeBox.currentText())
|
|
5788
|
self.close()
|
|
5796
|
self.close()
|
|
5789
|
|
|
5797
|
|
|
5790
|
|
|
5798
|
|
|
5791
|
@pyqtSignature("")
|
|
5799
|
@pyqtSignature("")
|
|
5792
|
def on_unitPcancelbut_clicked(self):
|
|
5800
|
def on_unitPcancelbut_clicked(self):
|
|
5793
|
"""
|
|
5801
|
"""
|
|
5794
|
Slot documentation goes here.
|
|
5802
|
Slot documentation goes here.
|
|
5795
|
"""
|
|
5803
|
"""
|
|
5796
|
self.create = False
|
|
5804
|
self.create = False
|
|
5797
|
self.close()
|
|
5805
|
self.close()
|
|
5798
|
|
|
5806
|
|
|
5799
|
def loadTotalList(self):
|
|
5807
|
def loadTotalList(self):
|
|
5800
|
self.comboInputBox.clear()
|
|
5808
|
self.comboInputBox.clear()
|
|
5801
|
for i in self.getfromWindowList:
|
|
5809
|
for i in self.getfromWindowList:
|
|
5802
|
|
|
5810
|
|
|
5803
|
name = i.getElementName()
|
|
5811
|
name = i.getElementName()
|
|
5804
|
if name == 'Project':
|
|
5812
|
if name == 'Project':
|
|
5805
|
id = i.id
|
|
5813
|
id = i.id
|
|
5806
|
name = i.name
|
|
5814
|
name = i.name
|
|
5807
|
if self.dataTypeProject == 'Voltage':
|
|
5815
|
if self.dataTypeProject == 'Voltage':
|
|
5808
|
self.comboTypeBox.clear()
|
|
5816
|
self.comboTypeBox.clear()
|
|
5809
|
self.comboTypeBox.addItem("Voltage")
|
|
5817
|
self.comboTypeBox.addItem("Voltage")
|
|
5810
|
|
|
5818
|
|
|
5811
|
if self.dataTypeProject == 'Spectra':
|
|
5819
|
if self.dataTypeProject == 'Spectra':
|
|
5812
|
self.comboTypeBox.clear()
|
|
5820
|
self.comboTypeBox.clear()
|
|
5813
|
self.comboTypeBox.addItem("Spectra")
|
|
5821
|
self.comboTypeBox.addItem("Spectra")
|
|
5814
|
self.comboTypeBox.addItem("Correlation")
|
|
5822
|
self.comboTypeBox.addItem("Correlation")
|
|
5815
|
if self.dataTypeProject == 'Fits':
|
|
5823
|
if self.dataTypeProject == 'Fits':
|
|
5816
|
self.comboTypeBox.clear()
|
|
5824
|
self.comboTypeBox.clear()
|
|
5817
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5825
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5818
|
|
|
5826
|
|
|
5819
|
|
|
5827
|
|
|
5820
|
if name == 'ProcUnit':
|
|
5828
|
if name == 'ProcUnit':
|
|
5821
|
id = int(i.id) - 1
|
|
5829
|
id = int(i.id) - 1
|
|
5822
|
name = i.datatype
|
|
5830
|
name = i.datatype
|
|
5823
|
if name == 'Voltage':
|
|
5831
|
if name == 'Voltage':
|
|
5824
|
self.comboTypeBox.clear()
|
|
5832
|
self.comboTypeBox.clear()
|
|
5825
|
self.comboTypeBox.addItem("Spectra")
|
|
5833
|
self.comboTypeBox.addItem("Spectra")
|
|
5826
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5834
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5827
|
self.comboTypeBox.addItem("Correlation")
|
|
5835
|
self.comboTypeBox.addItem("Correlation")
|
|
5828
|
if name == 'Spectra':
|
|
5836
|
if name == 'Spectra':
|
|
5829
|
self.comboTypeBox.clear()
|
|
5837
|
self.comboTypeBox.clear()
|
|
5830
|
self.comboTypeBox.addItem("Spectra")
|
|
5838
|
self.comboTypeBox.addItem("Spectra")
|
|
5831
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5839
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5832
|
self.comboTypeBox.addItem("Correlation")
|
|
5840
|
self.comboTypeBox.addItem("Correlation")
|
|
5833
|
if name == 'SpectraHeis':
|
|
5841
|
if name == 'SpectraHeis':
|
|
5834
|
self.comboTypeBox.clear()
|
|
5842
|
self.comboTypeBox.clear()
|
|
5835
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5843
|
self.comboTypeBox.addItem("SpectraHeis")
|
|
5836
|
|
|
5844
|
|
|
5837
|
self.comboInputBox.addItem(str(name))
|
|
5845
|
self.comboInputBox.addItem(str(name))
|
|
5838
|
# self.comboInputBox.addItem(str(name)+str(id))
|
|
5846
|
# self.comboInputBox.addItem(str(name)+str(id))
|
|
5839
|
|
|
5847
|
|
|
5840
|
def closeEvent(self, event):
|
|
5848
|
def closeEvent(self, event):
|
|
5841
|
self.closed.emit()
|
|
5849
|
self.closed.emit()
|
|
5842
|
event.accept()
|
|
5850
|
event.accept()
|
|
5843
|
|
|
5851
|
|
|
5844
|
class Ftp(QMainWindow, Ui_Ftp):
|
|
5852
|
class Ftp(QMainWindow, Ui_Ftp):
|
|
5845
|
"""
|
|
5853
|
"""
|
|
5846
|
Class documentation goes here.
|
|
5854
|
Class documentation goes here.
|
|
5847
|
"""
|
|
5855
|
"""
|
|
5848
|
create = False
|
|
5856
|
create = False
|
|
5849
|
closed = pyqtSignal()
|
|
5857
|
closed = pyqtSignal()
|
|
5850
|
server = None
|
|
5858
|
server = None
|
|
5851
|
remotefolder = None
|
|
5859
|
remotefolder = None
|
|
5852
|
username = None
|
|
5860
|
username = None
|
|
5853
|
password = None
|
|
5861
|
password = None
|
|
5854
|
ftp_wei = None
|
|
5862
|
ftp_wei = None
|
|
5855
|
exp_code = None
|
|
5863
|
exp_code = None
|
|
5856
|
sub_exp_code = None
|
|
5864
|
sub_exp_code = None
|
|
5857
|
plot_pos = None
|
|
5865
|
plot_pos = None
|
|
5858
|
|
|
5866
|
|
|
5859
|
def __init__(self, parent=None):
|
|
5867
|
def __init__(self, parent=None):
|
|
5860
|
"""
|
|
5868
|
"""
|
|
5861
|
Constructor
|
|
5869
|
Constructor
|
|
5862
|
"""
|
|
5870
|
"""
|
|
5863
|
QMainWindow.__init__(self, parent)
|
|
5871
|
QMainWindow.__init__(self, parent)
|
|
5864
|
self.setupUi(self)
|
|
5872
|
self.setupUi(self)
|
|
5865
|
self.setGUIStatus()
|
|
5873
|
self.setGUIStatus()
|
|
5866
|
|
|
5874
|
|
|
5867
|
def setGUIStatus(self):
|
|
5875
|
def setGUIStatus(self):
|
|
5868
|
self.setWindowTitle("ROJ-Signal Chain")
|
|
5876
|
self.setWindowTitle("ROJ-Signal Chain")
|
|
5869
|
self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe')
|
|
5877
|
self.serverFTP.setToolTip('Example: jro-app.igp.gob.pe')
|
|
5870
|
self.folderFTP.setToolTip('Example: /home/wmaster/graficos')
|
|
5878
|
self.folderFTP.setToolTip('Example: /home/wmaster/graficos')
|
|
5871
|
self.usernameFTP.setToolTip('Example: myusername')
|
|
5879
|
self.usernameFTP.setToolTip('Example: myusername')
|
|
5872
|
self.passwordFTP.setToolTip('Example: mypass ')
|
|
5880
|
self.passwordFTP.setToolTip('Example: mypass ')
|
|
5873
|
self.weightFTP.setToolTip('Example: 0')
|
|
5881
|
self.weightFTP.setToolTip('Example: 0')
|
|
5874
|
self.expcodeFTP.setToolTip('Example: 0')
|
|
5882
|
self.expcodeFTP.setToolTip('Example: 0')
|
|
5875
|
self.subexpFTP.setToolTip('Example: 0')
|
|
5883
|
self.subexpFTP.setToolTip('Example: 0')
|
|
5876
|
self.plotposFTP.setToolTip('Example: 0')
|
|
5884
|
self.plotposFTP.setToolTip('Example: 0')
|
|
5877
|
|
|
5885
|
|
|
5878
|
def setParmsfromTemporal(self, server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos):
|
|
5886
|
def setParmsfromTemporal(self, server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos):
|
|
5879
|
self.serverFTP.setText(str(server))
|
|
5887
|
self.serverFTP.setText(str(server))
|
|
5880
|
self.folderFTP.setText(str(remotefolder))
|
|
5888
|
self.folderFTP.setText(str(remotefolder))
|
|
5881
|
self.usernameFTP.setText(str(username))
|
|
5889
|
self.usernameFTP.setText(str(username))
|
|
5882
|
self.passwordFTP.setText(str(password))
|
|
5890
|
self.passwordFTP.setText(str(password))
|
|
5883
|
self.weightFTP.setText(str(ftp_wei))
|
|
5891
|
self.weightFTP.setText(str(ftp_wei))
|
|
5884
|
self.expcodeFTP.setText(str(exp_code))
|
|
5892
|
self.expcodeFTP.setText(str(exp_code))
|
|
5885
|
self.subexpFTP.setText(str(sub_exp_code))
|
|
5893
|
self.subexpFTP.setText(str(sub_exp_code))
|
|
5886
|
self.plotposFTP.setText(str(plot_pos))
|
|
5894
|
self.plotposFTP.setText(str(plot_pos))
|
|
5887
|
|
|
5895
|
|
|
5888
|
def getParmsFromFtpWindow(self):
|
|
5896
|
def getParmsFromFtpWindow(self):
|
|
5889
|
"""
|
|
5897
|
"""
|
|
5890
|
Return Inputs Project:
|
|
5898
|
Return Inputs Project:
|
|
5891
|
- server
|
|
5899
|
- server
|
|
5892
|
- remotefolder
|
|
5900
|
- remotefolder
|
|
5893
|
- username
|
|
5901
|
- username
|
|
5894
|
- password
|
|
5902
|
- password
|
|
5895
|
- ftp_wei
|
|
5903
|
- ftp_wei
|
|
5896
|
- exp_code
|
|
5904
|
- exp_code
|
|
5897
|
- sub_exp_code
|
|
5905
|
- sub_exp_code
|
|
5898
|
- plot_pos
|
|
5906
|
- plot_pos
|
|
5899
|
"""
|
|
5907
|
"""
|
|
5900
|
name_server_ftp = str(self.serverFTP.text())
|
|
5908
|
name_server_ftp = str(self.serverFTP.text())
|
|
5901
|
if not name_server_ftp:
|
|
5909
|
if not name_server_ftp:
|
|
5902
|
self.console.clear()
|
|
5910
|
self.console.clear()
|
|
5903
|
self.console.append("Please Write a FTP Server")
|
|
5911
|
self.console.append("Please Write a FTP Server")
|
|
5904
|
return 0
|
|
5912
|
return 0
|
|
5905
|
|
|
5913
|
|
|
5906
|
folder_server_ftp = str(self.folderFTP.text())
|
|
5914
|
folder_server_ftp = str(self.folderFTP.text())
|
|
5907
|
if not folder_server_ftp:
|
|
5915
|
if not folder_server_ftp:
|
|
5908
|
self.console.clear()
|
|
5916
|
self.console.clear()
|
|
5909
|
self.console.append("Please Write a Folder")
|
|
5917
|
self.console.append("Please Write a Folder")
|
|
5910
|
return 0
|
|
5918
|
return 0
|
|
5911
|
|
|
5919
|
|
|
5912
|
username_ftp = str(self.usernameFTP.text())
|
|
5920
|
username_ftp = str(self.usernameFTP.text())
|
|
5913
|
if not username_ftp:
|
|
5921
|
if not username_ftp:
|
|
5914
|
self.console.clear()
|
|
5922
|
self.console.clear()
|
|
5915
|
self.console.append("Please Write a User Name")
|
|
5923
|
self.console.append("Please Write a User Name")
|
|
5916
|
return 0
|
|
5924
|
return 0
|
|
5917
|
|
|
5925
|
|
|
5918
|
password_ftp = str(self.passwordFTP.text())
|
|
5926
|
password_ftp = str(self.passwordFTP.text())
|
|
5919
|
if not password_ftp:
|
|
5927
|
if not password_ftp:
|
|
5920
|
self.console.clear()
|
|
5928
|
self.console.clear()
|
|
5921
|
self.console.append("Please Write a passwordFTP")
|
|
5929
|
self.console.append("Please Write a passwordFTP")
|
|
5922
|
return 0
|
|
5930
|
return 0
|
|
5923
|
|
|
5931
|
|
|
5924
|
ftp_wei = str(self.weightFTP.text())
|
|
5932
|
ftp_wei = str(self.weightFTP.text())
|
|
5925
|
if not ftp_wei == "":
|
|
5933
|
if not ftp_wei == "":
|
|
5926
|
try:
|
|
5934
|
try:
|
|
5927
|
ftp_wei = int(self.weightFTP.text())
|
|
5935
|
ftp_wei = int(self.weightFTP.text())
|
|
5928
|
except:
|
|
5936
|
except:
|
|
5929
|
self.console.clear()
|
|
5937
|
self.console.clear()
|
|
5930
|
self.console.append("Please Write a ftp_wei number")
|
|
5938
|
self.console.append("Please Write a ftp_wei number")
|
|
5931
|
return 0
|
|
5939
|
return 0
|
|
5932
|
|
|
5940
|
|
|
5933
|
exp_code = str(self.expcodeFTP.text())
|
|
5941
|
exp_code = str(self.expcodeFTP.text())
|
|
5934
|
if not exp_code == "":
|
|
5942
|
if not exp_code == "":
|
|
5935
|
try:
|
|
5943
|
try:
|
|
5936
|
exp_code = int(self.expcodeFTP.text())
|
|
5944
|
exp_code = int(self.expcodeFTP.text())
|
|
5937
|
except:
|
|
5945
|
except:
|
|
5938
|
self.console.clear()
|
|
5946
|
self.console.clear()
|
|
5939
|
self.console.append("Please Write a exp_code number")
|
|
5947
|
self.console.append("Please Write a exp_code number")
|
|
5940
|
return 0
|
|
5948
|
return 0
|
|
5941
|
|
|
5949
|
|
|
5942
|
|
|
5950
|
|
|
5943
|
sub_exp_code = str(self.subexpFTP.text())
|
|
5951
|
sub_exp_code = str(self.subexpFTP.text())
|
|
5944
|
if not sub_exp_code == "":
|
|
5952
|
if not sub_exp_code == "":
|
|
5945
|
try:
|
|
5953
|
try:
|
|
5946
|
sub_exp_code = int(self.subexpFTP.text())
|
|
5954
|
sub_exp_code = int(self.subexpFTP.text())
|
|
5947
|
except:
|
|
5955
|
except:
|
|
5948
|
self.console.clear()
|
|
5956
|
self.console.clear()
|
|
5949
|
self.console.append("Please Write a sub_exp_code number")
|
|
5957
|
self.console.append("Please Write a sub_exp_code number")
|
|
5950
|
return 0
|
|
5958
|
return 0
|
|
5951
|
|
|
5959
|
|
|
5952
|
plot_pos = str(self.plotposFTP.text())
|
|
5960
|
plot_pos = str(self.plotposFTP.text())
|
|
5953
|
if not plot_pos == "":
|
|
5961
|
if not plot_pos == "":
|
|
5954
|
try:
|
|
5962
|
try:
|
|
5955
|
plot_pos = int(self.plotposFTP.text())
|
|
5963
|
plot_pos = int(self.plotposFTP.text())
|
|
5956
|
except:
|
|
5964
|
except:
|
|
5957
|
self.console.clear()
|
|
5965
|
self.console.clear()
|
|
5958
|
self.console.append("Please Write a plot_pos number")
|
|
5966
|
self.console.append("Please Write a plot_pos number")
|
|
5959
|
return 0
|
|
5967
|
return 0
|
|
5960
|
|
|
5968
|
|
|
5961
|
return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos
|
|
5969
|
return name_server_ftp, folder_server_ftp, username_ftp, password_ftp, ftp_wei, exp_code, sub_exp_code, plot_pos
|
|
5962
|
|
|
5970
|
|
|
5963
|
@pyqtSignature("")
|
|
5971
|
@pyqtSignature("")
|
|
5964
|
def on_ftpOkButton_clicked(self):
|
|
5972
|
def on_ftpOkButton_clicked(self):
|
|
5965
|
server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow()
|
|
5973
|
server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.getParmsFromFtpWindow()
|
|
5966
|
self.create = True
|
|
5974
|
self.create = True
|
|
5967
|
self.close()
|
|
5975
|
self.close()
|
|
5968
|
|
|
5976
|
|
|
5969
|
@pyqtSignature("")
|
|
5977
|
@pyqtSignature("")
|
|
5970
|
def on_ftpCancelButton_clicked(self):
|
|
5978
|
def on_ftpCancelButton_clicked(self):
|
|
5971
|
self.create = False
|
|
5979
|
self.create = False
|
|
5972
|
self.close()
|
|
5980
|
self.close()
|
|
5973
|
|
|
5981
|
|
|
5974
|
def closeEvent(self, event):
|
|
5982
|
def closeEvent(self, event):
|
|
5975
|
self.closed.emit()
|
|
5983
|
self.closed.emit()
|
|
5976
|
event.accept()
|
|
5984
|
event.accept()
|
|
5977
|
|
|
5985
|
|
|
5978
|
class ftpBuffer():
|
|
5986
|
class ftpBuffer():
|
|
5979
|
|
|
5987
|
|
|
5980
|
server = None
|
|
5988
|
server = None
|
|
5981
|
remotefolder = None
|
|
5989
|
remotefolder = None
|
|
5982
|
username = None
|
|
5990
|
username = None
|
|
5983
|
password = None
|
|
5991
|
password = None
|
|
5984
|
ftp_wei = None
|
|
5992
|
ftp_wei = None
|
|
5985
|
exp_code = None
|
|
5993
|
exp_code = None
|
|
5986
|
sub_exp_code = None
|
|
5994
|
sub_exp_code = None
|
|
5987
|
plot_pos = None
|
|
5995
|
plot_pos = None
|
|
5988
|
create = False
|
|
5996
|
create = False
|
|
5989
|
withoutconfig = False
|
|
5997
|
withoutconfig = False
|
|
5990
|
createforView = False
|
|
5998
|
createforView = False
|
|
5991
|
localfolder = None
|
|
5999
|
localfolder = None
|
|
5992
|
extension = None
|
|
6000
|
extension = None
|
|
5993
|
period = None
|
|
6001
|
period = None
|
|
5994
|
protocol = None
|
|
6002
|
protocol = None
|
|
5995
|
|
|
6003
|
|
|
5996
|
def __init__(self):
|
|
6004
|
def __init__(self):
|
|
5997
|
|
|
6005
|
|
|
5998
|
self.create = False
|
|
6006
|
self.create = False
|
|
5999
|
self.server = None
|
|
6007
|
self.server = None
|
|
6000
|
self.remotefolder = None
|
|
6008
|
self.remotefolder = None
|
|
6001
|
self.username = None
|
|
6009
|
self.username = None
|
|
6002
|
self.password = None
|
|
6010
|
self.password = None
|
|
6003
|
self.ftp_wei = None
|
|
6011
|
self.ftp_wei = None
|
|
6004
|
self.exp_code = None
|
|
6012
|
self.exp_code = None
|
|
6005
|
self.sub_exp_code = None
|
|
6013
|
self.sub_exp_code = None
|
|
6006
|
self.plot_pos = None
|
|
6014
|
self.plot_pos = None
|
|
6007
|
# self.create = False
|
|
6015
|
# self.create = False
|
|
6008
|
self.localfolder = None
|
|
6016
|
self.localfolder = None
|
|
6009
|
self.extension = None
|
|
6017
|
self.extension = None
|
|
6010
|
self.period = None
|
|
6018
|
self.period = None
|
|
6011
|
self.protocol = None
|
|
6019
|
self.protocol = None
|
|
6012
|
|
|
6020
|
|
|
6013
|
def setwithoutconfiguration(self):
|
|
6021
|
def setwithoutconfiguration(self):
|
|
6014
|
|
|
6022
|
|
|
6015
|
self.create = False
|
|
6023
|
self.create = False
|
|
6016
|
self.server = "jro-app.igp.gob.pe"
|
|
6024
|
self.server = "jro-app.igp.gob.pe"
|
|
6017
|
self.remotefolder = "/home/wmaster/graficos"
|
|
6025
|
self.remotefolder = "/home/wmaster/graficos"
|
|
6018
|
self.username = "wmaster"
|
|
6026
|
self.username = "wmaster"
|
|
6019
|
self.password = "mst2010vhf"
|
|
6027
|
self.password = "mst2010vhf"
|
|
6020
|
self.withoutconfig = True
|
|
6028
|
self.withoutconfig = True
|
|
6021
|
self.localfolder = './'
|
|
6029
|
self.localfolder = './'
|
|
6022
|
self.extension = '.png'
|
|
6030
|
self.extension = '.png'
|
|
6023
|
self.period = 60
|
|
6031
|
self.period = 60
|
|
6024
|
self.protocol = 'ftp'
|
|
6032
|
self.protocol = 'ftp'
|
|
6025
|
self.createforView = True
|
|
6033
|
self.createforView = True
|
|
6026
|
|
|
6034
|
|
|
6027
|
if not self.ftp_wei:
|
|
6035
|
if not self.ftp_wei:
|
|
6028
|
self.ftp_wei = 0
|
|
6036
|
self.ftp_wei = 0
|
|
6029
|
|
|
6037
|
|
|
6030
|
if not self.exp_code:
|
|
6038
|
if not self.exp_code:
|
|
6031
|
self.exp_code = 0
|
|
6039
|
self.exp_code = 0
|
|
6032
|
|
|
6040
|
|
|
6033
|
if not self.sub_exp_code:
|
|
6041
|
if not self.sub_exp_code:
|
|
6034
|
self.sub_exp_code = 0
|
|
6042
|
self.sub_exp_code = 0
|
|
6035
|
|
|
6043
|
|
|
6036
|
if not self.plot_pos:
|
|
6044
|
if not self.plot_pos:
|
|
6037
|
self.plot_pos = 0
|
|
6045
|
self.plot_pos = 0
|
|
6038
|
|
|
6046
|
|
|
6039
|
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'):
|
|
6047
|
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'):
|
|
6040
|
|
|
6048
|
|
|
6041
|
self.server = server
|
|
6049
|
self.server = server
|
|
6042
|
self.remotefolder = remotefolder
|
|
6050
|
self.remotefolder = remotefolder
|
|
6043
|
self.username = username
|
|
6051
|
self.username = username
|
|
6044
|
self.password = password
|
|
6052
|
self.password = password
|
|
6045
|
self.ftp_wei = ftp_wei
|
|
6053
|
self.ftp_wei = ftp_wei
|
|
6046
|
self.exp_code = exp_code
|
|
6054
|
self.exp_code = exp_code
|
|
6047
|
self.sub_exp_code = sub_exp_code
|
|
6055
|
self.sub_exp_code = sub_exp_code
|
|
6048
|
self.plot_pos = plot_pos
|
|
6056
|
self.plot_pos = plot_pos
|
|
6049
|
self.create = True
|
|
6057
|
self.create = True
|
|
6050
|
self.withoutconfig = False
|
|
6058
|
self.withoutconfig = False
|
|
6051
|
self.createforView = True
|
|
6059
|
self.createforView = True
|
|
6052
|
self.localfolder = localfolder
|
|
6060
|
self.localfolder = localfolder
|
|
6053
|
self.extension = extension
|
|
6061
|
self.extension = extension
|
|
6054
|
self.period = period
|
|
6062
|
self.period = period
|
|
6055
|
self.protocol = protocol
|
|
6063
|
self.protocol = protocol
|
|
6056
|
|
|
6064
|
|
|
6057
|
def recover(self):
|
|
6065
|
def recover(self):
|
|
6058
|
|
|
6066
|
|
|
6059
|
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
|
|
6067
|
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
|
|
6060
|
|
|
6068
|
|
|
6061
|
class ShowMeConsole(QtCore.QObject):
|
|
6069
|
class ShowMeConsole(QtCore.QObject):
|
|
6062
|
|
|
6070
|
|
|
6063
|
textWritten = QtCore.pyqtSignal(str)
|
|
6071
|
textWritten = QtCore.pyqtSignal(str)
|
|
6064
|
|
|
6072
|
|
|
6065
|
def write(self, text):
|
|
6073
|
def write(self, text):
|
|
6066
|
|
|
6074
|
|
|
6067
|
if len(text) == 0:
|
|
6075
|
if len(text) == 0:
|
|
6068
|
self.textWritten.emit("\n")
|
|
6076
|
self.textWritten.emit("\n")
|
|
6069
|
return
|
|
6077
|
return
|
|
6070
|
|
|
6078
|
|
|
6071
|
if text[-1] == "\n":
|
|
6079
|
if text[-1] == "\n":
|
|
6072
|
text = text[:-1]
|
|
6080
|
text = text[:-1]
|
|
6073
|
|
|
6081
|
|
|
6074
|
self.textWritten.emit(str(text))
|
|
6082
|
self.textWritten.emit(str(text))
|