@@ -44,53 +44,68 class ParameterConf(): | |||||
44 |
|
44 | |||
45 | def getValue(self): |
|
45 | def getValue(self): | |
46 |
|
46 | |||
|
47 | value = self.value | |||
|
48 | format = self.format | |||
|
49 | ||||
47 | if self.__formated_value != None: |
|
50 | if self.__formated_value != None: | |
48 |
|
51 | |||
49 | return self.__formated_value |
|
52 | return self.__formated_value | |
50 |
|
53 | |||
51 | value = self.value |
|
54 | if format == 'str': | |
52 |
|
||||
53 | if self.format == 'str': |
|
|||
54 | self.__formated_value = str(value) |
|
55 | self.__formated_value = str(value) | |
55 | return self.__formated_value |
|
56 | return self.__formated_value | |
56 |
|
57 | |||
57 | if value == '': |
|
58 | if value == '': | |
58 | raise ValueError, "%s: This parameter value is empty" %self.name |
|
59 | raise ValueError, "%s: This parameter value is empty" %self.name | |
59 |
|
60 | |||
60 |
if |
|
61 | if format == 'bool': | |
61 | value = int(value) |
|
62 | value = int(value) | |
62 |
|
63 | |||
63 |
if |
|
64 | if format == 'list': | |
64 | strList = value.split(',') |
|
65 | strList = value.split(',') | |
65 |
|
66 | |||
66 | self.__formated_value = strList |
|
67 | self.__formated_value = strList | |
67 |
|
68 | |||
68 | return self.__formated_value |
|
69 | return self.__formated_value | |
69 |
|
70 | |||
70 |
if |
|
71 | if format == 'intlist': | |
71 | """ |
|
72 | """ | |
72 | Example: |
|
73 | Example: | |
73 | value = (0,1,2) |
|
74 | value = (0,1,2) | |
74 | """ |
|
75 | """ | |
75 | intList = ast.literal_eval(value) |
|
76 | value = value.replace('(', '') | |
|
77 | value = value.replace(')', '') | |||
|
78 | ||||
|
79 | value = value.replace('[', '') | |||
|
80 | value = value.replace(']', '') | |||
|
81 | ||||
|
82 | strList = value.split(',') | |||
|
83 | intList = [int(x) for x in strList] | |||
76 |
|
84 | |||
77 | self.__formated_value = intList |
|
85 | self.__formated_value = intList | |
78 |
|
86 | |||
79 | return self.__formated_value |
|
87 | return self.__formated_value | |
80 |
|
88 | |||
81 |
if |
|
89 | if format == 'floatlist': | |
82 | """ |
|
90 | """ | |
83 | Example: |
|
91 | Example: | |
84 | value = (0.5, 1.4, 2.7) |
|
92 | value = (0.5, 1.4, 2.7) | |
85 | """ |
|
93 | """ | |
86 |
|
94 | |||
87 | floatList = ast.literal_eval(value) |
|
95 | value = value.replace('(', '') | |
|
96 | value = value.replace(')', '') | |||
|
97 | ||||
|
98 | value = value.replace('[', '') | |||
|
99 | value = value.replace(']', '') | |||
|
100 | ||||
|
101 | strList = value.split(',') | |||
|
102 | floatList = [float(x) for x in strList] | |||
88 |
|
103 | |||
89 | self.__formated_value = floatList |
|
104 | self.__formated_value = floatList | |
90 |
|
105 | |||
91 | return self.__formated_value |
|
106 | return self.__formated_value | |
92 |
|
107 | |||
93 |
if |
|
108 | if format == 'date': | |
94 | strList = value.split('/') |
|
109 | strList = value.split('/') | |
95 | intList = [int(x) for x in strList] |
|
110 | intList = [int(x) for x in strList] | |
96 | date = datetime.date(intList[0], intList[1], intList[2]) |
|
111 | date = datetime.date(intList[0], intList[1], intList[2]) | |
@@ -99,7 +114,7 class ParameterConf(): | |||||
99 |
|
114 | |||
100 | return self.__formated_value |
|
115 | return self.__formated_value | |
101 |
|
116 | |||
102 |
if |
|
117 | if format == 'time': | |
103 | strList = value.split(':') |
|
118 | strList = value.split(':') | |
104 | intList = [int(x) for x in strList] |
|
119 | intList = [int(x) for x in strList] | |
105 | time = datetime.time(intList[0], intList[1], intList[2]) |
|
120 | time = datetime.time(intList[0], intList[1], intList[2]) | |
@@ -108,30 +123,43 class ParameterConf(): | |||||
108 |
|
123 | |||
109 | return self.__formated_value |
|
124 | return self.__formated_value | |
110 |
|
125 | |||
111 |
if |
|
126 | if format == 'pairslist': | |
112 | """ |
|
127 | """ | |
113 | Example: |
|
128 | Example: | |
114 | value = (0,1),(1,2) |
|
129 | value = (0,1),(1,2) | |
115 | """ |
|
130 | """ | |
116 |
|
131 | |||
117 | pairList = ast.literal_eval(value) |
|
132 | value = value.replace('(', '') | |
|
133 | value = value.replace(')', '') | |||
|
134 | ||||
|
135 | value = value.replace('[', '') | |||
|
136 | value = value.replace(']', '') | |||
|
137 | ||||
|
138 | strList = value.split(',') | |||
|
139 | intList = [int(item) for item in strList] | |||
|
140 | pairList = [] | |||
|
141 | for i in range(len(intList)/2): | |||
|
142 | pairList.append((intList[i*2], intList[i*2 + 1])) | |||
118 |
|
143 | |||
119 | self.__formated_value = pairList |
|
144 | self.__formated_value = pairList | |
120 |
|
145 | |||
121 | return self.__formated_value |
|
146 | return self.__formated_value | |
122 |
|
147 | |||
123 |
if |
|
148 | if format == 'multilist': | |
124 | """ |
|
149 | """ | |
125 | Example: |
|
150 | Example: | |
126 | value = (0,1,2),(3,4,5) |
|
151 | value = (0,1,2),(3,4,5) | |
127 | """ |
|
152 | """ | |
128 | multiList = ast.literal_eval(value) |
|
153 | multiList = ast.literal_eval(value) | |
129 |
|
154 | |||
|
155 | if type(multiList[0]) == int: | |||
|
156 | multiList = ast.literal_eval("(" + value + ")") | |||
|
157 | ||||
130 | self.__formated_value = multiList |
|
158 | self.__formated_value = multiList | |
131 |
|
159 | |||
132 | return self.__formated_value |
|
160 | return self.__formated_value | |
133 |
|
161 | |||
134 |
format_func = eval( |
|
162 | format_func = eval(format) | |
135 |
|
163 | |||
136 | self.__formated_value = format_func(value) |
|
164 | self.__formated_value = format_func(value) | |
137 |
|
165 |
This diff has been collapsed as it changes many lines, (2814 lines changed) Show them Hide them | |||||
@@ -910,10 +910,13 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
910 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
910 | opObj.addParameter(name=name_parameter2, value=value2, format=format) | |
911 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
911 | opObj.addParameter(name=name_parameter3, value=value3, format=format) | |
912 |
|
912 | |||
913 | #---------NEW VOLTAGE PROPERTIES |
|
913 | self.console.clear() | |
|
914 | try: | |||
914 | self.refreshPUProperties(puObj) |
|
915 | self.refreshPUProperties(puObj) | |
|
916 | except: | |||
|
917 | self.console.append("Check input parameters") | |||
|
918 | return 0 | |||
915 |
|
919 | |||
916 | self.console.clear() |
|
|||
917 | self.console.append("If you want to save your project") |
|
920 | self.console.append("If you want to save your project") | |
918 | self.console.append("click on your project name in the Tree Project Explorer") |
|
921 | self.console.append("click on your project name in the Tree Project Explorer") | |
919 |
|
922 | |||
@@ -1051,134 +1054,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1051 | if p0 == 0: |
|
1054 | if p0 == 0: | |
1052 | self.specOpgetNoise.setEnabled(False) |
|
1055 | self.specOpgetNoise.setEnabled(False) | |
1053 |
|
1056 | |||
1054 |
|
||||
1055 | def refreshID(self, puObj): |
|
|||
1056 | opObj = puObj.getOperationObj(name='Scope') |
|
|||
1057 | # opObj = puObj.getOpObjfromParamValue(value="Scope") |
|
|||
1058 | if opObj == None: |
|
|||
1059 | pass |
|
|||
1060 | else: |
|
|||
1061 | name_parameter1 = 'id' |
|
|||
1062 | format1 = 'int' |
|
|||
1063 | if self.idImagscope == 0: |
|
|||
1064 | self.idImagscope = 100 |
|
|||
1065 | else: |
|
|||
1066 | self.idImagscope = self.idImagscope + 1 |
|
|||
1067 | value1 = int(self.idImagscope) |
|
|||
1068 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1069 |
|
||||
1070 | opObj = puObj.getOperationObj(name='SpectraPlot') |
|
|||
1071 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") |
|
|||
1072 | if opObj == None: |
|
|||
1073 | pass |
|
|||
1074 | else: |
|
|||
1075 | name_parameter1 = 'id' |
|
|||
1076 | format1 = 'int' |
|
|||
1077 | if self.idImagspectra == 0: |
|
|||
1078 | self.idImagspectra = 200 |
|
|||
1079 | else: |
|
|||
1080 | self.idImagspectra = self.idImagspectra + 1 |
|
|||
1081 | value1 = int(self.idImagspectra) |
|
|||
1082 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1083 |
|
||||
1084 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') |
|
|||
1085 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") |
|
|||
1086 | if opObj == None: |
|
|||
1087 | pass |
|
|||
1088 | else: |
|
|||
1089 | name_parameter1 = 'id' |
|
|||
1090 | format1 = 'int' |
|
|||
1091 | if self.idImagcross == 0: |
|
|||
1092 | self.idImagcross = 300 |
|
|||
1093 | else: |
|
|||
1094 | self.idImagcross = self.idImagcross + 1 |
|
|||
1095 | value1 = int(self.idImagcross) |
|
|||
1096 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1097 |
|
||||
1098 | opObj = puObj.getOperationObj(name='RTIPlot') |
|
|||
1099 | # opObj = puObj.getOpObjfromParamValue(value="RTIPlot") |
|
|||
1100 | if opObj == None: |
|
|||
1101 | pass |
|
|||
1102 | else: |
|
|||
1103 | name_parameter1 = 'id' |
|
|||
1104 | format1 = 'int' |
|
|||
1105 | if self.idImagrti == 0: |
|
|||
1106 | self.idImagrti = 400 |
|
|||
1107 | else: |
|
|||
1108 | self.idImagrti = self.idImagrti + 1 |
|
|||
1109 | value1 = int(self.idImagrti) |
|
|||
1110 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1111 |
|
||||
1112 | opObj = puObj.getOperationObj(name='CoherenceMap') |
|
|||
1113 | # opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") |
|
|||
1114 | if opObj == None: |
|
|||
1115 | pass |
|
|||
1116 | else: |
|
|||
1117 | name_parameter1 = 'id' |
|
|||
1118 | format1 = 'int' |
|
|||
1119 | if self.idImagcoherence == 0: |
|
|||
1120 | self.idImagcoherence = 500 |
|
|||
1121 | else: |
|
|||
1122 | self.idImagcoherence = self.idImagcoherence + 1 |
|
|||
1123 | value1 = int(self.idImagcoherence) |
|
|||
1124 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1125 |
|
||||
1126 | opObj = puObj.getOperationObj(name='PowerProfilePlot') |
|
|||
1127 | # opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") |
|
|||
1128 | if opObj == None: |
|
|||
1129 | pass |
|
|||
1130 | else: |
|
|||
1131 | name_parameter1 = 'id' |
|
|||
1132 | format1 = 'int' |
|
|||
1133 | if self.idImagpower == 0: |
|
|||
1134 | self.idImagpower = 600 |
|
|||
1135 | else: |
|
|||
1136 | self.idImagpower = self.idImagpower + 1 |
|
|||
1137 | value1 = int(self.idImagpower) |
|
|||
1138 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1139 |
|
||||
1140 | opObj = puObj.getOperationObj(name='Noise') |
|
|||
1141 | # opObj = puObj.getOpObjfromParamValue(value="Noise") |
|
|||
1142 | if opObj == None: |
|
|||
1143 | pass |
|
|||
1144 | else: |
|
|||
1145 | name_parameter1 = 'id' |
|
|||
1146 | format1 = 'int' |
|
|||
1147 | if self.idImagrtinoise == 0: |
|
|||
1148 | self.idImagrtinoise = 700 |
|
|||
1149 | else: |
|
|||
1150 | self.idImagrtinoise = self.idImagrtinoise + 1 |
|
|||
1151 | value1 = int(self.idImagrtinoise) |
|
|||
1152 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1153 |
|
||||
1154 | opObj = puObj.getOperationObj(name='SpectraHeisScope') |
|
|||
1155 | # opObj = puObj.getOpObjfromParamValue(value="SpectraHeisScope") |
|
|||
1156 | if opObj == None: |
|
|||
1157 | pass |
|
|||
1158 | else: |
|
|||
1159 | name_parameter1 = 'id' |
|
|||
1160 | format1 = 'int' |
|
|||
1161 | if self.idImagspectraHeis == 0: |
|
|||
1162 | self.idImagspectraHeis = 800 |
|
|||
1163 | else: |
|
|||
1164 | self.idImagspectraHeis = self.idImagspectraHeis + 1 |
|
|||
1165 | value1 = int(self.idImagspectraHeis) |
|
|||
1166 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1167 |
|
||||
1168 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') |
|
|||
1169 | # opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") |
|
|||
1170 | if opObj == None: |
|
|||
1171 | pass |
|
|||
1172 | else: |
|
|||
1173 | name_parameter1 = 'id' |
|
|||
1174 | format1 = 'int' |
|
|||
1175 | if self.idImagrtiHeis == 0: |
|
|||
1176 | self.idImagrtiHeis = 900 |
|
|||
1177 | else: |
|
|||
1178 | self.idImagrtiHeis = self.idImagrtiHeis + 1 |
|
|||
1179 | value1 = int(self.idImagrtiHeis) |
|
|||
1180 | opObj.changeParameter(name=name_parameter1, value=value1, format=format1) |
|
|||
1181 |
|
||||
1182 | @pyqtSignature("") |
|
1057 | @pyqtSignature("") | |
1183 | def on_specOpOk_clicked(self): |
|
1058 | def on_specOpOk_clicked(self): | |
1184 | """ |
|
1059 | """ | |
@@ -1286,6 +1161,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1286 | else: |
|
1161 | else: | |
1287 | name_operation = "selectChannelsByIndex" |
|
1162 | name_operation = "selectChannelsByIndex" | |
1288 | name_parameter = 'channelIndexList' |
|
1163 | name_parameter = 'channelIndexList' | |
|
1164 | ||||
1289 | opObj = puObj.addOperation(name=name_operation) |
|
1165 | opObj = puObj.addOperation(name=name_operation) | |
1290 | opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1166 | opObj.addParameter(name=name_parameter, value=value, format=format) | |
1291 |
|
1167 | |||
@@ -1396,94 +1272,79 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1396 | self.console.append("Get Noise Operation only accepts 4 parameters") |
|
1272 | self.console.append("Get Noise Operation only accepts 4 parameters") | |
1397 | return 0 |
|
1273 | return 0 | |
1398 |
|
1274 | |||
|
1275 | channelList = str(self.specGgraphChannelList.text()).replace(" ","") | |||
|
1276 | vel_range = str(self.specGgraphFreq.text()).replace(" ","") | |||
|
1277 | hei_range = str(self.specGgraphHeight.text()).replace(" ","") | |||
|
1278 | db_range = str(self.specGgraphDbsrange.text()).replace(" ","") | |||
|
1279 | ||||
|
1280 | trange = str(self.specGgraphTminTmax.text()).replace(" ","") | |||
|
1281 | magrange = str(self.specGgraphmagnitud.text()).replace(" ","") | |||
|
1282 | phaserange = str(self.specGgraphPhase.text()).replace(" ","") | |||
|
1283 | # timerange = str(self.specGgraphTimeRange.text()).replace(" ","") | |||
|
1284 | ||||
|
1285 | figpath = str(self.specGraphPath.text()) | |||
|
1286 | figfile = str(self.specGraphPrefix.text()).replace(" ","") | |||
|
1287 | try: | |||
|
1288 | wrperiod = int(str(self.specGgraphftpratio.text()).replace(" ","")) | |||
|
1289 | except: | |||
|
1290 | wrperiod = None | |||
|
1291 | ||||
1399 | #-----Spectra Plot----- |
|
1292 | #-----Spectra Plot----- | |
1400 | if self.specGraphCebSpectraplot.isChecked(): |
|
1293 | if self.specGraphCebSpectraplot.isChecked(): | |
1401 | name_operation = 'SpectraPlot' |
|
|||
1402 | optype = 'other' |
|
|||
1403 | name_parameter = 'type' |
|
|||
1404 | value = 'SpectraPlot' |
|
|||
1405 | format = 'str' |
|
|||
1406 | if self.idImagspectra == 0: |
|
|||
1407 | self.idImagspectra = 200 |
|
|||
1408 | else: |
|
|||
1409 | self.idImagspectra = self.idImagspectra + 1 |
|
|||
1410 | name_parameter1 = 'id' |
|
|||
1411 | value1 = int(self.idImagspectra) |
|
|||
1412 | format1 = 'int' |
|
|||
1413 |
|
1294 | |||
1414 | format = 'str' |
|
1295 | opObj = puObj.addOperation(name='SpectraPlot', optype='other') | |
1415 |
|
1296 | opObj.addParameter(name='id', value=opObj.id, format='int') | ||
1416 | channelList = self.specGgraphChannelList.text() |
|
|||
1417 | xvalue = self.specGgraphFreq.text() |
|
|||
1418 | yvalue = self.specGgraphHeight.text() |
|
|||
1419 | zvalue = self.specGgraphDbsrange.text() |
|
|||
1420 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1421 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
|||
1422 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) |
|
|||
1423 |
|
1297 | |||
1424 | if not channelList == '': |
|
1298 | if not channelList == '': | |
1425 | name_parameter = 'channelList' |
|
1299 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1426 | format = 'intlist' |
|
|||
1427 | opObj.addParameter(name=name_parameter, value=channelList, format=format) |
|
|||
1428 |
|
1300 | |||
1429 |
if not |
|
1301 | if not vel_range == '': | |
1430 |
xvalueList = |
|
1302 | xvalueList = vel_range.split(',') | |
1431 | try: |
|
1303 | try: | |
1432 | value1 = float(xvalueList[0]) |
|
1304 | value1 = float(xvalueList[0]) | |
1433 | value2 = float(xvalueList[1]) |
|
1305 | value2 = float(xvalueList[1]) | |
1434 | except: |
|
1306 | except: | |
1435 | self.console.clear() |
|
1307 | self.console.clear() | |
1436 |
|
|
1308 | self.console.append("Invalid velocity/frequency range") | |
1437 | return 0 |
|
1309 | return 0 | |
1438 |
|
|
1310 | ||
1439 | name2 = 'xmax' |
|
1311 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1440 | format = 'float' |
|
1312 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1441 | opObj.addParameter(name=name1, value=value1, format=format) |
|
1313 | ||
1442 | opObj.addParameter(name=name2, value=value2, format=format) |
|
1314 | if not hei_range == '': | |
1443 | #------specGgraphHeight--- |
|
1315 | yvalueList = hei_range.split(",") | |
1444 | if not yvalue == '': |
|
|||
1445 | yvalueList = yvalue.split(",") |
|
|||
1446 | try: |
|
1316 | try: | |
1447 | value1 = float(yvalueList[0]) |
|
1317 | value1 = float(yvalueList[0]) | |
1448 | value2 = float(yvalueList[1]) |
|
1318 | value2 = float(yvalueList[1]) | |
1449 | except: |
|
1319 | except: | |
1450 | self.console.clear() |
|
1320 | self.console.clear() | |
1451 |
|
|
1321 | self.console.append("Invalid height range") | |
1452 | return 0 |
|
1322 | return 0 | |
1453 | name1 = 'ymin' |
|
|||
1454 | name2 = 'ymax' |
|
|||
1455 | format = 'float' |
|
|||
1456 | opObj.addParameter(name=name1, value=value1, format=format) |
|
|||
1457 | opObj.addParameter(name=name2, value=value2, format=format) |
|
|||
1458 |
|
1323 | |||
1459 | if not zvalue == '': |
|
1324 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1460 | zvalueList = zvalue.split(",") |
|
1325 | opObj.addParameter(name='ymax', value=value2, format='float') | |
|
1326 | ||||
|
1327 | if not db_range == '': | |||
|
1328 | zvalueList = db_range.split(",") | |||
1461 | try: |
|
1329 | try: | |
1462 |
|
|
1330 | value1 = float(zvalueList[0]) | |
1463 |
|
|
1331 | value2 = float(zvalueList[1]) | |
1464 | except: |
|
1332 | except: | |
1465 | self.console.clear() |
|
1333 | self.console.clear() | |
1466 |
|
|
1334 | self.console.append("Invalid db range") | |
1467 | return 0 |
|
1335 | return 0 | |
1468 |
|
|
1336 | ||
1469 |
opObj.addParameter(name='zmin', value= |
|
1337 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1470 |
opObj.addParameter(name='zmax', value= |
|
1338 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1471 |
|
1339 | |||
1472 | if self.specGraphSaveSpectra.isChecked(): |
|
1340 | if self.specGraphSaveSpectra.isChecked(): | |
1473 | checkPath = True |
|
1341 | checkPath = True | |
1474 | name_parameter1 = 'save' |
|
1342 | opObj.addParameter(name='save', value=1 , format='bool') | |
1475 | name_parameter2 = 'figpath' |
|
1343 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1476 |
|
|
1344 | if figfile: | |
1477 | value1 = '1' |
|
1345 | opObj.addParameter(name='figfile', value=figfile, format='str') | |
1478 | value2 = self.specGraphPath.text() |
|
1346 | if wrperiod: | |
1479 | value3 = self.specGraphPrefix.text() |
|
1347 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |
1480 | format1 = 'bool' |
|
|||
1481 | format2 = 'str' |
|
|||
1482 | opObj.addParameter(name=name_parameter1, value=value1 , format=format1) |
|
|||
1483 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
|||
1484 | opObj.addParameter(name=name_parameter3, value=value3, format=format2) |
|
|||
1485 |
|
||||
1486 | # opObj.addParameter(name='wr_period', value='5',format='int') |
|
|||
1487 |
|
1348 | |||
1488 | if self.specGraphftpSpectra.isChecked(): |
|
1349 | if self.specGraphftpSpectra.isChecked(): | |
1489 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1350 | opObj.addParameter(name='ftp', value='1', format='int') | |
@@ -1491,322 +1352,289 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1491 | addFTP = True |
|
1352 | addFTP = True | |
1492 |
|
1353 | |||
1493 | if self.specGraphCebCrossSpectraplot.isChecked(): |
|
1354 | if self.specGraphCebCrossSpectraplot.isChecked(): | |
1494 | name_operation = 'CrossSpectraPlot' |
|
|||
1495 | optype = 'other' |
|
|||
1496 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1497 | # opObj.addParameter(name='type', value="CrossSpectraPlot", format='str') |
|
|||
1498 | opObj.addParameter(name='power_cmap', value='jet', format='str') |
|
|||
1499 | opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
|||
1500 | opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
|||
1501 |
|
||||
1502 | if self.idImagcross == 0: |
|
|||
1503 | self.idImagcross = 300 |
|
|||
1504 | else: |
|
|||
1505 | self.idImagcross = self.idImagcross + 1 |
|
|||
1506 | value1 = int(self.idImagcross) |
|
|||
1507 | channelList = self.specGgraphChannelList.text() |
|
|||
1508 | xvalue = self.specGgraphFreq.text() |
|
|||
1509 | yvalue = self.specGgraphHeight.text() |
|
|||
1510 | zvalue = self.specGgraphDbsrange.text() |
|
|||
1511 |
|
1355 | |||
|
1356 | opObj = puObj.addOperation(name='CrossSpectraPlot', optype='other') | |||
|
1357 | # opObj.addParameter(name='power_cmap', value='jet', format='str') | |||
|
1358 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') | |||
|
1359 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |||
1512 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1360 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1513 |
|
1361 | |||
1514 | if self.specGgraphChannelList.isModified(): |
|
1362 | if not vel_range == '': | |
1515 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1363 | xvalueList = vel_range.split(',') | |
|
1364 | try: | |||
|
1365 | value1 = float(xvalueList[0]) | |||
|
1366 | value2 = float(xvalueList[1]) | |||
|
1367 | except: | |||
|
1368 | self.console.clear() | |||
|
1369 | self.console.append("Invalid velocity/frequency range") | |||
|
1370 | return 0 | |||
1516 |
|
1371 | |||
1517 | if not xvalue == '': |
|
1372 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1518 | xvalueList = xvalue.split(',') |
|
1373 | opObj.addParameter(name='xmax', value=value2, format='float') | |
|
1374 | ||||
|
1375 | if not hei_range == '': | |||
|
1376 | yvalueList = hei_range.split(",") | |||
1519 | try: |
|
1377 | try: | |
1520 |
value = float( |
|
1378 | value1 = float(yvalueList[0]) | |
1521 |
value = float( |
|
1379 | value2 = float(yvalueList[1]) | |
1522 | except: |
|
1380 | except: | |
|
1381 | self.console.clear() | |||
|
1382 | self.console.append("Invalid height range") | |||
1523 | return 0 |
|
1383 | return 0 | |
1524 | format = 'float' |
|
|||
1525 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
|||
1526 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
|||
1527 |
|
1384 | |||
1528 | if not yvalue == '': |
|
1385 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1529 | yvalueList = yvalue.split(",") |
|
1386 | opObj.addParameter(name='ymax', value=value2, format='float') | |
|
1387 | ||||
|
1388 | if not db_range == '': | |||
|
1389 | zvalueList = db_range.split(",") | |||
1530 | try: |
|
1390 | try: | |
1531 |
|
|
1391 | value1 = float(zvalueList[0]) | |
1532 |
|
|
1392 | value2 = float(zvalueList[1]) | |
1533 | except: |
|
1393 | except: | |
|
1394 | self.console.clear() | |||
|
1395 | self.console.append("Invalid db range") | |||
1534 | return 0 |
|
1396 | return 0 | |
1535 | format = 'float' |
|
|||
1536 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
|||
1537 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
|||
1538 |
|
1397 | |||
|
1398 | opObj.addParameter(name='zmin', value=value1, format='float') | |||
|
1399 | opObj.addParameter(name='zmax', value=value2, format='float') | |||
1539 |
|
1400 | |||
1540 |
if not |
|
1401 | if not magrange == '': | |
1541 |
|
|
1402 | zvalueList = magrange.split(",") | |
1542 | try: |
|
1403 | try: | |
1543 |
|
|
1404 | value1 = float(zvalueList[0]) | |
1544 |
|
|
1405 | value2 = float(zvalueList[1]) | |
1545 | except: |
|
1406 | except: | |
|
1407 | self.console.clear() | |||
|
1408 | self.console.append("Invalid magnitude range") | |||
1546 | return 0 |
|
1409 | return 0 | |
1547 | opObj.addParameter(name='zmin', value=zvalueList[0], format='float') |
|
|||
1548 | opObj.addParameter(name='zmax', value=zvalueList[1], format='float') |
|
|||
1549 |
|
1410 | |||
1550 | if self.specGraphSaveCross.isChecked(): |
|
1411 | opObj.addParameter(name='coh_min', value=value1, format='float') | |
1551 | checkPath = True |
|
1412 | opObj.addParameter(name='coh_max', value=value2, format='float') | |
1552 | opObj.addParameter(name='save', value='1', format='bool') |
|
1413 | ||
1553 | opObj.addParameter(name='figpath', value=self.specGraphPath.text(), format='str') |
|
1414 | if not phaserange == '': | |
1554 |
value = |
|
1415 | zvalueList = phaserange.split(",") | |
1555 | if not value == "": |
|
|||
1556 | try: |
|
1416 | try: | |
1557 | value = str(self.specGraphPrefix.text()) |
|
1417 | value1 = float(zvalueList[0]) | |
|
1418 | value2 = float(zvalueList[1]) | |||
1558 | except: |
|
1419 | except: | |
1559 | self.console.clear() |
|
1420 | self.console.clear() | |
1560 |
|
|
1421 | self.console.append("Invalid phase range") | |
1561 | return 0 |
|
1422 | return 0 | |
1562 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1423 | ||
1563 |
|
|
1424 | opObj.addParameter(name='phase_min', value=value1, format='float') | |
|
1425 | opObj.addParameter(name='phase_max', value=value2, format='float') | |||
|
1426 | ||||
|
1427 | if self.specGraphSaveCross.isChecked(): | |||
|
1428 | checkPath = True | |||
|
1429 | opObj.addParameter(name='save', value='1', format='bool') | |||
|
1430 | opObj.addParameter(name='figpath', value=figpath, format='str') | |||
|
1431 | if figfile: | |||
|
1432 | opObj.addParameter(name='figfile', value=figfile, format='str') | |||
|
1433 | if wrperiod: | |||
|
1434 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |||
|
1435 | ||||
1564 | if self.specGraphftpCross.isChecked(): |
|
1436 | if self.specGraphftpCross.isChecked(): | |
1565 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1437 | opObj.addParameter(name='ftp', value='1', format='int') | |
1566 | self.addFTPConf2Operation(puObj, opObj) |
|
1438 | self.addFTPConf2Operation(puObj, opObj) | |
1567 | addFTP = True |
|
1439 | addFTP = True | |
1568 |
|
1440 | |||
1569 | if self.specGraphCebRTIplot.isChecked(): |
|
1441 | if self.specGraphCebRTIplot.isChecked(): | |
1570 | name_operation = 'RTIPlot' |
|
|||
1571 | optype = 'other' |
|
|||
1572 | name_parameter = 'type' |
|
|||
1573 | value = 'RTIPlot' |
|
|||
1574 | format = 'str' |
|
|||
1575 |
|
||||
1576 | if self.idImagrti == 0: |
|
|||
1577 | self.idImagrti = 400 |
|
|||
1578 | else: |
|
|||
1579 | self.idImagrti = self.idImagrti + 1 |
|
|||
1580 |
|
||||
1581 | name_parameter1 = 'id' |
|
|||
1582 | value1 = int(self.idImagrti) |
|
|||
1583 | format1 = 'int' |
|
|||
1584 |
|
||||
1585 | format = 'str' |
|
|||
1586 |
|
||||
1587 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1588 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
|||
1589 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) |
|
|||
1590 |
|
1442 | |||
1591 | channelList = self.specGgraphChannelList.text() |
|
1443 | opObj = puObj.addOperation(name='RTIPlot', optype='other') | |
1592 | xvalue = self.specGgraphTminTmax.text() |
|
1444 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1593 | yvalue = self.specGgraphHeight.text() |
|
|||
1594 | zvalue = self.specGgraphDbsrange.text() |
|
|||
1595 | timerange = self.specGgraphTimeRange.text() |
|
|||
1596 |
|
1445 | |||
1597 | if not channelList == '': |
|
1446 | if not channelList == '': | |
1598 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1447 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1599 |
|
1448 | |||
1600 |
if not |
|
1449 | if not trange == '': | |
1601 |
xvalueList = |
|
1450 | xvalueList = trange.split(',') | |
1602 | try: |
|
1451 | try: | |
1603 | value = float(xvalueList[0]) |
|
1452 | value1 = float(xvalueList[0]) | |
1604 | value = float(xvalueList[1]) |
|
1453 | value2 = float(xvalueList[1]) | |
1605 | except: |
|
1454 | except: | |
|
1455 | self.console.clear() | |||
|
1456 | self.console.append("Invalid time range") | |||
1606 | return 0 |
|
1457 | return 0 | |
1607 | format = 'float' |
|
|||
1608 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
|||
1609 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
|||
1610 |
|
1458 | |||
1611 | if not timerange == '': |
|
1459 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1612 | format = 'int' |
|
1460 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1613 | try: |
|
|||
1614 | timerange = int(timerange) |
|
|||
1615 | except: |
|
|||
1616 | return 0 |
|
|||
1617 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
|||
1618 |
|
1461 | |||
|
1462 | # if not timerange == '': | |||
|
1463 | # try: | |||
|
1464 | # timerange = float(timerange) | |||
|
1465 | # except: | |||
|
1466 | # self.console.clear() | |||
|
1467 | # self.console.append("Invalid time range") | |||
|
1468 | # return 0 | |||
|
1469 | # | |||
|
1470 | # opObj.addParameter(name='timerange', value=timerange, format='float') | |||
1619 |
|
1471 | |||
1620 |
if not |
|
1472 | if not hei_range == '': | |
1621 |
yvalueList = |
|
1473 | yvalueList = hei_range.split(",") | |
1622 | try: |
|
1474 | try: | |
1623 | value = float(yvalueList[0]) |
|
1475 | value1 = float(yvalueList[0]) | |
1624 | value = float(yvalueList[1]) |
|
1476 | value2 = float(yvalueList[1]) | |
1625 | except: |
|
1477 | except: | |
|
1478 | self.console.clear() | |||
|
1479 | self.console.append("Invalid height range") | |||
1626 | return 0 |
|
1480 | return 0 | |
1627 | format = 'float' |
|
|||
1628 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
|||
1629 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
|||
1630 |
|
1481 | |||
1631 | if not zvalue == '': |
|
1482 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1632 | zvalueList = zvalue.split(",") |
|
1483 | opObj.addParameter(name='ymax', value=value2, format='float') | |
|
1484 | ||||
|
1485 | if not db_range == '': | |||
|
1486 | zvalueList = db_range.split(",") | |||
1633 | try: |
|
1487 | try: | |
1634 | value = float(zvalueList[0]) |
|
1488 | value1 = float(zvalueList[0]) | |
1635 | value = float(zvalueList[1]) |
|
1489 | value2 = float(zvalueList[1]) | |
1636 | except: |
|
1490 | except: | |
|
1491 | self.console.clear() | |||
|
1492 | self.console.append("Invalid db range") | |||
1637 | return 0 |
|
1493 | return 0 | |
1638 |
|
|
1494 | ||
1639 |
opObj.addParameter(name='zmin', value= |
|
1495 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1640 |
opObj.addParameter(name='zmax', value= |
|
1496 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1641 |
|
1497 | |||
1642 | if self.specGraphSaveRTIplot.isChecked(): |
|
1498 | if self.specGraphSaveRTIplot.isChecked(): | |
1643 | checkPath = True |
|
1499 | checkPath = True | |
1644 | opObj.addParameter(name='save', value='1', format='bool') |
|
1500 | opObj.addParameter(name='save', value='1', format='bool') | |
1645 |
opObj.addParameter(name='figpath', value= |
|
1501 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1646 | value = self.specGraphPrefix.text() |
|
1502 | if figfile: | |
1647 | if not value == "": |
|
|||
1648 | try: |
|
|||
1649 | value = str(self.specGraphPrefix.text()) |
|
|||
1650 | except: |
|
|||
1651 | self.console.clear() |
|
|||
1652 | self.console.append("Please Write prefix") |
|
|||
1653 | return 0 |
|
|||
1654 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1503 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1504 | if wrperiod: | |||
|
1505 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |||
1655 |
|
1506 | |||
1656 | # test_ftp |
|
|||
1657 | if self.specGraphftpRTIplot.isChecked(): |
|
1507 | if self.specGraphftpRTIplot.isChecked(): | |
1658 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1508 | opObj.addParameter(name='ftp', value='1', format='int') | |
1659 | self.addFTPConf2Operation(puObj, opObj) |
|
1509 | self.addFTPConf2Operation(puObj, opObj) | |
1660 | addFTP = True |
|
1510 | addFTP = True | |
1661 |
|
1511 | |||
1662 | if self.specGraphCebCoherencmap.isChecked(): |
|
1512 | if self.specGraphCebCoherencmap.isChecked(): | |
1663 | name_operation = 'CoherenceMap' |
|
|||
1664 | optype = 'other' |
|
|||
1665 | name_parameter = 'type' |
|
|||
1666 | value = 'CoherenceMap' |
|
|||
1667 | format = 'str' |
|
|||
1668 | if self.idImagcoherence == 0: |
|
|||
1669 | self.idImagcoherence = 500 |
|
|||
1670 | else: |
|
|||
1671 | self.idImagcoherence = self.idImagcoherence + 1 |
|
|||
1672 |
|
1513 | |||
1673 | name_parameter1 = 'id' |
|
1514 | opObj = puObj.addOperation(name='CoherenceMap', optype='other') | |
1674 | value1 = int(self.idImagcoherence) |
|
|||
1675 | format1 = 'int' |
|
|||
1676 |
|
||||
1677 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1678 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
1515 | # opObj.addParameter(name=name_parameter, value=value, format=format) | |
1679 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') |
|
1516 | # opObj.addParameter(name='coherence_cmap', value='jet', format='str') | |
1680 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') |
|
1517 | # opObj.addParameter(name='phase_cmap', value='RdBu_r', format='str') | |
1681 |
opObj.addParameter(name= |
|
1518 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1682 |
|
1519 | |||
1683 | channelList = self.specGgraphChannelList.text() |
|
1520 | # if not timerange == '': | |
1684 | if not channelList == '': |
|
1521 | # try: | |
1685 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1522 | # timerange = int(timerange) | |
|
1523 | # except: | |||
|
1524 | # self.console.clear() | |||
|
1525 | # self.console.append("Invalid time range") | |||
|
1526 | # return 0 | |||
|
1527 | # | |||
|
1528 | # opObj.addParameter(name='timerange', value=timerange, format='int') | |||
1686 |
|
1529 | |||
1687 | timerange = self.specGgraphTimeRange.text() |
|
1530 | if not trange == '': | |
1688 | if not timerange == '': |
|
1531 | xvalueList = trange.split(',') | |
1689 | try: |
|
1532 | try: | |
1690 | timerange = int(timerange) |
|
1533 | value1 = float(xvalueList[0]) | |
|
1534 | value2 = float(xvalueList[1]) | |||
1691 | except: |
|
1535 | except: | |
|
1536 | self.console.clear() | |||
|
1537 | self.console.append("Invalid time range") | |||
1692 | return 0 |
|
1538 | return 0 | |
1693 | format = 'int' |
|
|||
1694 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
|||
1695 |
|
1539 | |||
1696 | xvalue = self.specGgraphTminTmax.text() |
|
1540 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1697 | if not xvalue == '': |
|
1541 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1698 | xvalueList = xvalue.split(',') |
|
1542 | ||
|
1543 | if not hei_range == '': | |||
|
1544 | yvalueList = hei_range.split(",") | |||
1699 | try: |
|
1545 | try: | |
1700 |
value = float( |
|
1546 | value1 = float(yvalueList[0]) | |
1701 |
value = float( |
|
1547 | value2 = float(yvalueList[1]) | |
1702 | except: |
|
1548 | except: | |
|
1549 | self.console.clear() | |||
|
1550 | self.console.append("Invalid height range") | |||
1703 | return 0 |
|
1551 | return 0 | |
1704 | format = 'float' |
|
|||
1705 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
|||
1706 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
|||
1707 |
|
1552 | |||
1708 | yvalue = self.specGgraphHeight.text() |
|
1553 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1709 | if not yvalue == '': |
|
1554 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1710 | yvalueList = yvalue.split(",") |
|
1555 | ||
|
1556 | if not magrange == '': | |||
|
1557 | zvalueList = magrange.split(",") | |||
1711 | try: |
|
1558 | try: | |
1712 |
value = float( |
|
1559 | value1 = float(zvalueList[0]) | |
1713 |
value = float( |
|
1560 | value2 = float(zvalueList[1]) | |
1714 | except: |
|
1561 | except: | |
|
1562 | self.console.clear() | |||
|
1563 | self.console.append("Invalid magnitude range") | |||
1715 | return 0 |
|
1564 | return 0 | |
1716 | format = 'float' |
|
|||
1717 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
|||
1718 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
|||
1719 |
|
1565 | |||
1720 | zvalue = self.specGgraphmagnitud.text() |
|
1566 | opObj.addParameter(name='zmin', value=value1, format='float') | |
1721 | if not zvalue == '': |
|
1567 | opObj.addParameter(name='zmax', value=value2, format='float') | |
1722 | zvalueList = zvalue.split(",") |
|
1568 | ||
|
1569 | if not phaserange == '': | |||
|
1570 | zvalueList = phaserange.split(",") | |||
1723 | try: |
|
1571 | try: | |
1724 | value = float(zvalueList[0]) |
|
1572 | value1 = float(zvalueList[0]) | |
1725 | value = float(zvalueList[1]) |
|
1573 | value2 = float(zvalueList[1]) | |
1726 | except: |
|
1574 | except: | |
|
1575 | self.console.clear() | |||
|
1576 | self.console.append("Invalid phase range") | |||
1727 | return 0 |
|
1577 | return 0 | |
1728 | opObj.addParameter(name='zmin', value=zvalueList[0], format='float') |
|
1578 | ||
1729 |
opObj.addParameter(name=' |
|
1579 | opObj.addParameter(name='phase_min', value=value1, format='float') | |
|
1580 | opObj.addParameter(name='phase_max', value=value2, format='float') | |||
1730 |
|
1581 | |||
1731 | if self.specGraphSaveCoherencemap.isChecked(): |
|
1582 | if self.specGraphSaveCoherencemap.isChecked(): | |
1732 | checkPath = True |
|
1583 | checkPath = True | |
1733 | opObj.addParameter(name='save', value='1', format='bool') |
|
1584 | opObj.addParameter(name='save', value='1', format='bool') | |
1734 |
opObj.addParameter(name='figpath', value= |
|
1585 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1735 | value = self.specGraphPrefix.text() |
|
1586 | if figfile: | |
1736 | if not value == "": |
|
|||
1737 | try: |
|
|||
1738 | value = str(self.specGraphPrefix.text()) |
|
|||
1739 | except: |
|
|||
1740 | self.console.clear() |
|
|||
1741 | self.console.append("Please Write prefix") |
|
|||
1742 | return 0 |
|
|||
1743 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1587 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1588 | if wrperiod: | |||
|
1589 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |||
1744 |
|
1590 | |||
1745 | # test_ftp |
|
|||
1746 | if self.specGraphftpCoherencemap.isChecked(): |
|
1591 | if self.specGraphftpCoherencemap.isChecked(): | |
1747 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1592 | opObj.addParameter(name='ftp', value='1', format='int') | |
1748 | self.addFTPConf2Operation(puObj, opObj) |
|
1593 | self.addFTPConf2Operation(puObj, opObj) | |
1749 | addFTP = True |
|
1594 | addFTP = True | |
1750 |
|
1595 | |||
1751 | if self.specGraphPowerprofile.isChecked(): |
|
1596 | if self.specGraphPowerprofile.isChecked(): | |
1752 | name_operation = 'PowerProfilePlot' |
|
|||
1753 | optype = 'other' |
|
|||
1754 | name_parameter = 'type' |
|
|||
1755 | value = 'PowerProfilePlot' |
|
|||
1756 | format = 'str' |
|
|||
1757 |
|
1597 | |||
1758 | if self.idImagpower == 0: |
|
1598 | opObj = puObj.addOperation(name='PowerProfilePlot', optype='other') | |
1759 | self.idImagpower = 600 |
|
|||
1760 | else: |
|
|||
1761 | self.idImagpower = self.idImagpower + 1 |
|
|||
1762 | value1 = int(self.idImagpower) |
|
|||
1763 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1764 | # opObj.addParameter(name=name_parameter, value=value, format='str') |
|
|||
1765 | opObj.addParameter(name='id', value=opObj.id, format='int') |
|
1599 | opObj.addParameter(name='id', value=opObj.id, format='int') | |
1766 |
|
1600 | |||
1767 | channelList = self.specGgraphChannelList.text() |
|
|||
1768 | if not channelList == '': |
|
1601 | if not channelList == '': | |
1769 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1602 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1770 |
|
1603 | |||
1771 | xvalue = self.specGgraphDbsrange.text() |
|
1604 | if not db_range == '': | |
1772 |
|
|
1605 | xvalueList = db_range.split(',') | |
1773 | xvalueList = xvalue.split(',') |
|
|||
1774 | try: |
|
1606 | try: | |
1775 | value = float(xvalueList[0]) |
|
1607 | value1 = float(xvalueList[0]) | |
1776 | value = float(xvalueList[1]) |
|
1608 | value2 = float(xvalueList[1]) | |
1777 | except: |
|
1609 | except: | |
|
1610 | self.console.clear() | |||
|
1611 | self.console.append("Invalid db range") | |||
1778 | return 0 |
|
1612 | return 0 | |
1779 | format = 'float' |
|
|||
1780 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
|||
1781 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
|||
1782 |
|
1613 | |||
1783 | yvalue = self.specGgraphHeight.text() |
|
1614 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1784 | if not yvalue == '': |
|
1615 | opObj.addParameter(name='xmax', value=value2, format='float') | |
1785 | yvalueList = yvalue.split(",") |
|
1616 | ||
|
1617 | if not hei_range == '': | |||
|
1618 | yvalueList = hei_range.split(",") | |||
1786 | try: |
|
1619 | try: | |
1787 | value = float(yvalueList[0]) |
|
1620 | value1 = float(yvalueList[0]) | |
1788 | value = float(yvalueList[1]) |
|
1621 | value2 = float(yvalueList[1]) | |
1789 | except: |
|
1622 | except: | |
|
1623 | self.console.clear() | |||
|
1624 | self.console.append("Invalid height range") | |||
1790 | return 0 |
|
1625 | return 0 | |
1791 | format = 'float' |
|
|||
1792 | opObj.addParameter(name='ymin', value=yvalueList[0], format=format) |
|
|||
1793 | opObj.addParameter(name='ymax', value=yvalueList[1], format=format) |
|
|||
1794 |
|
1626 | |||
|
1627 | opObj.addParameter(name='ymin', value=value1, format='float') | |||
|
1628 | opObj.addParameter(name='ymax', value=value2, format='float') | |||
1795 |
|
1629 | |||
1796 | if self.specGraphSavePowerprofile.isChecked(): |
|
1630 | if self.specGraphSavePowerprofile.isChecked(): | |
1797 | checkPath = True |
|
1631 | checkPath = True | |
1798 | opObj.addParameter(name='save', value='1', format='bool') |
|
1632 | opObj.addParameter(name='save', value='1', format='bool') | |
1799 |
opObj.addParameter(name='figpath', value= |
|
1633 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1800 | value = self.specGraphPrefix.text() |
|
1634 | if figfile: | |
1801 | if not value == "": |
|
|||
1802 | try: |
|
|||
1803 | value = str(self.specGraphPrefix.text()) |
|
|||
1804 | except: |
|
|||
1805 | self.console.clear() |
|
|||
1806 | self.console.append("Please Write prefix") |
|
|||
1807 | return 0 |
|
|||
1808 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1635 | opObj.addParameter(name='figfile', value=value, format='str') | |
1809 |
|
1636 | if wrperiod: | ||
|
1637 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |||
1810 |
|
1638 | |||
1811 | if self.specGraphftpPowerprofile.isChecked(): |
|
1639 | if self.specGraphftpPowerprofile.isChecked(): | |
1812 | opObj.addParameter(name='ftp', value='1', format='int') |
|
1640 | opObj.addParameter(name='ftp', value='1', format='int') | |
@@ -1815,78 +1643,57 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1815 | # rti noise |
|
1643 | # rti noise | |
1816 |
|
1644 | |||
1817 | if self.specGraphCebRTInoise.isChecked(): |
|
1645 | if self.specGraphCebRTInoise.isChecked(): | |
1818 | name_operation = 'Noise' |
|
|||
1819 | optype = 'other' |
|
|||
1820 | name_parameter = 'type' |
|
|||
1821 | value = 'Noise' |
|
|||
1822 | format = 'str' |
|
|||
1823 |
|
||||
1824 | if self.idImagrtinoise == 0: |
|
|||
1825 | self.idImagrtinoise = 700 |
|
|||
1826 | else: |
|
|||
1827 | self.idImagrtinoise = self.idImagrtinoise + 1 |
|
|||
1828 |
|
||||
1829 | name_parameter1 = 'id' |
|
|||
1830 | value1 = int(self.idImagrtinoise) |
|
|||
1831 | format1 = 'int' |
|
|||
1832 | format = 'str' |
|
|||
1833 |
|
||||
1834 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1835 | # opObj.addParameter(name=name_parameter, value=value, format=format) |
|
|||
1836 | opObj.addParameter(name=name_parameter1, value=opObj.id, format=format1) |
|
|||
1837 |
|
||||
1838 | channelList = self.specGgraphChannelList.text() |
|
|||
1839 | xvalue = self.specGgraphTminTmax.text() |
|
|||
1840 | yvalue = self.specGgraphDbsrange.text() |
|
|||
1841 | timerange = self.specGgraphTimeRange.text() |
|
|||
1842 |
|
1646 | |||
|
1647 | opObj = puObj.addOperation(name='Noise', optype='other') | |||
|
1648 | opObj.addParameter(name='id', value=opObj.id, format='int') | |||
1843 |
|
1649 | |||
1844 | if not channelList == '': |
|
1650 | if not channelList == '': | |
1845 | opObj.addParameter(name='channelList', value=channelList, format='intlist') |
|
1651 | opObj.addParameter(name='channelList', value=channelList, format='intlist') | |
1846 |
|
1652 | |||
1847 | if not timerange == '': |
|
1653 | # if not timerange == '': | |
1848 |
|
|
1654 | # try: | |
1849 | try: |
|
1655 | # timerange = float(timerange) | |
1850 | timerange = int(timerange) |
|
1656 | # except: | |
1851 | except: |
|
1657 | # self.console.clear() | |
1852 | return 0 |
|
1658 | # self.console.append("Invalid time range") | |
1853 | opObj.addParameter(name='timerange', value=timerange, format=format) |
|
1659 | # return 0 | |
|
1660 | # | |||
|
1661 | # opObj.addParameter(name='timerange', value=timerange, format='float') | |||
1854 |
|
1662 | |||
1855 |
if not |
|
1663 | if not trange == '': | |
1856 |
xvalueList = |
|
1664 | xvalueList = trange.split(',') | |
1857 | try: |
|
1665 | try: | |
1858 | value = float(xvalueList[0]) |
|
1666 | value1 = float(xvalueList[0]) | |
1859 | value = float(xvalueList[1]) |
|
1667 | value2 = float(xvalueList[1]) | |
1860 | except: |
|
1668 | except: | |
|
1669 | self.console.clear() | |||
|
1670 | self.console.append("Invalid time range") | |||
1861 | return 0 |
|
1671 | return 0 | |
1862 | format = 'float' |
|
|||
1863 | opObj.addParameter(name='xmin', value=xvalueList[0], format=format) |
|
|||
1864 | opObj.addParameter(name='xmax', value=xvalueList[1], format=format) |
|
|||
1865 |
|
1672 | |||
1866 | if not yvalue == '': |
|
1673 | opObj.addParameter(name='xmin', value=value1, format='float') | |
1867 | yvalueList = yvalue.split(",") |
|
1674 | opObj.addParameter(name='xmax', value=value2, format='float') | |
|
1675 | ||||
|
1676 | if not db_range == '': | |||
|
1677 | yvalueList = db_range.split(",") | |||
1868 | try: |
|
1678 | try: | |
1869 | value = float(yvalueList[0]) |
|
1679 | value1 = float(yvalueList[0]) | |
1870 | value = float(yvalueList[1]) |
|
1680 | value2 = float(yvalueList[1]) | |
1871 | except: |
|
1681 | except: | |
|
1682 | self.console.clear() | |||
|
1683 | self.console.append("Invalid db range") | |||
1872 | return 0 |
|
1684 | return 0 | |
1873 |
|
|
1685 | ||
1874 |
opObj.addParameter(name='ymin', value= |
|
1686 | opObj.addParameter(name='ymin', value=value1, format='float') | |
1875 |
opObj.addParameter(name='ymax', value= |
|
1687 | opObj.addParameter(name='ymax', value=value2, format='float') | |
1876 |
|
1688 | |||
1877 | if self.specGraphSaveRTInoise.isChecked(): |
|
1689 | if self.specGraphSaveRTInoise.isChecked(): | |
1878 | checkPath = True |
|
1690 | checkPath = True | |
1879 | opObj.addParameter(name='save', value='1', format='bool') |
|
1691 | opObj.addParameter(name='save', value='1', format='bool') | |
1880 |
opObj.addParameter(name='figpath', value= |
|
1692 | opObj.addParameter(name='figpath', value=figpath, format='str') | |
1881 | value = self.specGraphPrefix.text() |
|
1693 | if figfile: | |
1882 | if not value == "": |
|
|||
1883 | try: |
|
|||
1884 | value = str(self.specGraphPrefix.text()) |
|
|||
1885 | except: |
|
|||
1886 | self.console.clear() |
|
|||
1887 | self.console.append("Please Write prefix") |
|
|||
1888 | return 0 |
|
|||
1889 | opObj.addParameter(name='figfile', value=value, format='str') |
|
1694 | opObj.addParameter(name='figfile', value=value, format='str') | |
|
1695 | if wrperiod: | |||
|
1696 | opObj.addParameter(name='wr_period', value=wrperiod,format='int') | |||
1890 |
|
1697 | |||
1891 | # test_ftp |
|
1698 | # test_ftp | |
1892 | if self.specGraphftpRTInoise.isChecked(): |
|
1699 | if self.specGraphftpRTInoise.isChecked(): | |
@@ -1894,16 +1701,14 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1894 | self.addFTPConf2Operation(puObj, opObj) |
|
1701 | self.addFTPConf2Operation(puObj, opObj) | |
1895 | addFTP = True |
|
1702 | addFTP = True | |
1896 |
|
1703 | |||
1897 | localfolder = None |
|
|||
1898 | if checkPath: |
|
1704 | if checkPath: | |
1899 | localfolder = str(self.specGraphPath.text()) |
|
1705 | if not figpath: | |
1900 | if localfolder == '': |
|
|||
1901 | self.console.clear() |
|
1706 | self.console.clear() | |
1902 | self.console.append("Graphic path should be defined") |
|
1707 | self.console.append("Graphic path should be defined") | |
1903 | return 0 |
|
1708 | return 0 | |
1904 |
|
1709 | |||
1905 | if addFTP: |
|
1710 | if addFTP: | |
1906 |
if not |
|
1711 | if not figpath: | |
1907 | self.console.clear() |
|
1712 | self.console.clear() | |
1908 | self.console.append("You have to save the plots before sending them to FTP Server") |
|
1713 | self.console.append("You have to save the plots before sending them to FTP Server") | |
1909 | return 0 |
|
1714 | return 0 | |
@@ -1914,31 +1719,25 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1914 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() |
|
1719 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
1915 | self.addFTPProcUnitView(server, username, password, remotefolder, |
|
1720 | self.addFTPProcUnitView(server, username, password, remotefolder, | |
1916 | ftp_wei, exp_code, sub_exp_code, plot_pos, |
|
1721 | ftp_wei, exp_code, sub_exp_code, plot_pos, | |
1917 |
localfolder= |
|
1722 | localfolder=figpath) | |
1918 | else: |
|
1723 | else: | |
1919 | self.removeFTPProcUnitView() |
|
1724 | self.removeFTPProcUnitView() | |
1920 |
|
1725 | |||
1921 | # if something happend |
|
1726 | # if something happend | |
1922 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') |
|
1727 | parms_ok, output_path, blocksperfile, profilesperblock = self.checkInputsPUSave(datatype='Spectra') | |
1923 | if parms_ok: |
|
1728 | if parms_ok: | |
1924 |
|
|
1729 | opObj = puObj.addOperation(name='SpectraWriter', optype='other') | |
1925 | optype = 'other' |
|
1730 | opObj.addParameter(name='path', value=output_path) | |
1926 | name_parameter1 = 'path' |
|
1731 | opObj.addParameter(name='blocksPerFile', value=blocksperfile, format='int') | |
1927 | name_parameter2 = 'blocksPerFile' |
|
1732 | opObj.addParameter(name='profilesPerBlock', value=profilesperblock, format='int') | |
1928 | name_parameter3 = 'profilesPerBlock' |
|
|||
1929 | value1 = output_path |
|
|||
1930 | value2 = blocksperfile |
|
|||
1931 | value3 = profilesperblock |
|
|||
1932 | format = "int" |
|
|||
1933 |
|
||||
1934 | opObj = puObj.addOperation(name=name_operation, optype=optype) |
|
|||
1935 | opObj.addParameter(name=name_parameter1, value=value1) |
|
|||
1936 | opObj.addParameter(name=name_parameter2, value=value2, format=format) |
|
|||
1937 | opObj.addParameter(name=name_parameter3, value=value3, format=format) |
|
|||
1938 |
|
1733 | |||
|
1734 | self.console.clear() | |||
|
1735 | try: | |||
1939 | self.refreshPUProperties(puObj) |
|
1736 | self.refreshPUProperties(puObj) | |
|
1737 | except: | |||
|
1738 | self.console.append("Check input parameters") | |||
|
1739 | return 0 | |||
1940 |
|
1740 | |||
1941 | self.console.clear() |
|
|||
1942 | self.console.append("If you want to save your project") |
|
1741 | self.console.append("If you want to save your project") | |
1943 | self.console.append("click on your project name in the Tree Project Explorer") |
|
1742 | self.console.append("click on your project name in the Tree Project Explorer") | |
1944 |
|
1743 | |||
@@ -1953,187 +1752,103 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
1953 | @pyqtSignature("int") |
|
1752 | @pyqtSignature("int") | |
1954 | def on_specGraphCebSpectraplot_stateChanged(self, p0): |
|
1753 | def on_specGraphCebSpectraplot_stateChanged(self, p0): | |
1955 |
|
1754 | |||
1956 | if p0 == 2: |
|
1755 | self.__checkSpecGraphFilters() | |
1957 | self.specGgraphChannelList.setEnabled(True) |
|
|||
1958 | self.specGgraphFreq.setEnabled(True) |
|
|||
1959 | self.specGgraphHeight.setEnabled(True) |
|
|||
1960 | self.specGgraphDbsrange.setEnabled(True) |
|
|||
1961 | if p0 == 0: |
|
|||
1962 | self.specGgraphFreq.setEnabled(False) |
|
|||
1963 | self.specGgraphHeight.setEnabled(False) |
|
|||
1964 | self.specGgraphDbsrange.setEnabled(False) |
|
|||
1965 |
|
1756 | |||
1966 |
|
1757 | |||
1967 | @pyqtSignature("int") |
|
1758 | @pyqtSignature("int") | |
1968 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): |
|
1759 | def on_specGraphCebCrossSpectraplot_stateChanged(self, p0): | |
1969 |
|
1760 | |||
1970 | if p0 == 2: |
|
1761 | self.__checkSpecGraphFilters() | |
1971 | self.specGgraphFreq.setEnabled(True) |
|
|||
1972 | self.specGgraphHeight.setEnabled(True) |
|
|||
1973 | self.specGgraphDbsrange.setEnabled(True) |
|
|||
1974 | if p0 == 0: |
|
|||
1975 | self.specGgraphFreq.setEnabled(False) |
|
|||
1976 | self.specGgraphHeight.setEnabled(False) |
|
|||
1977 | self.specGgraphDbsrange.setEnabled(False) |
|
|||
1978 |
|
1762 | |||
1979 | @pyqtSignature("int") |
|
1763 | @pyqtSignature("int") | |
1980 | def on_specGraphCebRTIplot_stateChanged(self, p0): |
|
1764 | def on_specGraphCebRTIplot_stateChanged(self, p0): | |
1981 |
|
1765 | |||
1982 | if p0 == 2: |
|
1766 | self.__checkSpecGraphFilters() | |
1983 | self.specGgraphChannelList.setEnabled(True) |
|
|||
1984 | self.specGgraphTminTmax.setEnabled(True) |
|
|||
1985 | self.specGgraphHeight.setEnabled(True) |
|
|||
1986 | self.specGgraphDbsrange.setEnabled(True) |
|
|||
1987 | self.specGgraphTimeRange.setEnabled(True) |
|
|||
1988 |
|
||||
1989 | if p0 == 0: |
|
|||
1990 | self.specGgraphTminTmax.setEnabled(False) |
|
|||
1991 | self.specGgraphHeight.setEnabled(False) |
|
|||
1992 | self.specGgraphDbsrange.setEnabled(False) |
|
|||
1993 | self.specGgraphTimeRange.setEnabled(False) |
|
|||
1994 |
|
1767 | |||
1995 |
|
1768 | |||
1996 | @pyqtSignature("int") |
|
1769 | @pyqtSignature("int") | |
1997 | def on_specGraphCebRTInoise_stateChanged(self, p0): |
|
1770 | def on_specGraphCebRTInoise_stateChanged(self, p0): | |
1998 | if p0 == 2: |
|
|||
1999 | self.specGgraphChannelList.setEnabled(True) |
|
|||
2000 | self.specGgraphTminTmax.setEnabled(True) |
|
|||
2001 | self.specGgraphDbsrange.setEnabled(True) |
|
|||
2002 | self.specGgraphTimeRange.setEnabled(True) |
|
|||
2003 |
|
||||
2004 | if p0 == 0: |
|
|||
2005 | self.specGgraphTminTmax.setEnabled(False) |
|
|||
2006 | self.specGgraphDbsrange.setEnabled(False) |
|
|||
2007 | self.specGgraphTimeRange.setEnabled(False) |
|
|||
2008 |
|
||||
2009 |
|
1771 | |||
|
1772 | self.__checkSpecGraphFilters() | |||
2010 |
|
1773 | |||
2011 |
|
1774 | |||
2012 | @pyqtSignature("int") |
|
1775 | @pyqtSignature("int") | |
2013 | def on_specGraphCebCoherencmap_stateChanged(self, p0): |
|
1776 | def on_specGraphCebCoherencmap_stateChanged(self, p0): | |
2014 |
|
1777 | |||
2015 | if p0 == 2: |
|
1778 | self.__checkSpecGraphFilters() | |
2016 | self.specGgraphTminTmax.setEnabled(True) |
|
|||
2017 | self.specGgraphHeight.setEnabled(True) |
|
|||
2018 | self.specGgraphmagnitud.setEnabled(True) |
|
|||
2019 | self.specGgraphTimeRange.setEnabled(True) |
|
|||
2020 |
|
||||
2021 | if p0 == 0: |
|
|||
2022 | self.specGgraphTminTmax.setEnabled(False) |
|
|||
2023 | self.specGgraphHeight.setEnabled(False) |
|
|||
2024 | self.specGgraphmagnitud.setEnabled(False) |
|
|||
2025 | self.specGgraphTimeRange.setEnabled(False) |
|
|||
2026 |
|
||||
2027 |
|
||||
2028 |
|
||||
2029 |
|
1779 | |||
2030 | @pyqtSignature("int") |
|
1780 | @pyqtSignature("int") | |
2031 | def on_specGraphPowerprofile_stateChanged(self, p0): |
|
1781 | def on_specGraphPowerprofile_stateChanged(self, p0): | |
2032 |
|
1782 | |||
2033 | if p0 == 2: |
|
1783 | self.__checkSpecGraphFilters() | |
2034 |
|
||||
2035 | self.specGgraphHeight.setEnabled(True) |
|
|||
2036 | self.specGgraphDbsrange.setEnabled(True) |
|
|||
2037 | if p0 == 0: |
|
|||
2038 | self.specGgraphHeight.setEnabled(False) |
|
|||
2039 | self.specGgraphDbsrange.setEnabled(False) |
|
|||
2040 |
|
1784 | |||
2041 | @pyqtSignature("int") |
|
1785 | @pyqtSignature("int") | |
2042 | def on_specGraphPhase_stateChanged(self, p0): |
|
1786 | def on_specGraphPhase_stateChanged(self, p0): | |
2043 |
|
1787 | |||
2044 | if p0 == 2: |
|
1788 | self.__checkSpecGraphFilters() | |
2045 | self.specGgraphTminTmax.setEnabled(True) |
|
|||
2046 | self.specGgraphPhaserange.setEnabled(True) |
|
|||
2047 |
|
||||
2048 | if p0 == 0: |
|
|||
2049 | self.specGgraphTminTmax.setEnabled(False) |
|
|||
2050 | self.specGgraphPhaserange.setEnabled(False) |
|
|||
2051 |
|
1789 | |||
2052 | @pyqtSignature("int") |
|
1790 | @pyqtSignature("int") | |
2053 | def on_specGraphSaveSpectra_stateChanged(self, p0): |
|
1791 | def on_specGraphSaveSpectra_stateChanged(self, p0): | |
2054 | """ |
|
1792 | """ | |
2055 | """ |
|
1793 | """ | |
2056 | if p0 == 2: |
|
1794 | self.__checkSpecGraphSaving() | |
2057 | self.specGraphPath.setEnabled(True) |
|
|||
2058 | self.specGraphPrefix.setEnabled(True) |
|
|||
2059 | self.specGraphToolPath.setEnabled(True) |
|
|||
2060 | if p0 == 0: |
|
|||
2061 | self.specGraphPath.setEnabled(False) |
|
|||
2062 | self.specGraphPrefix.setEnabled(False) |
|
|||
2063 | self.specGraphToolPath.setEnabled(False) |
|
|||
2064 |
|
||||
2065 |
|
1795 | |||
2066 | @pyqtSignature("int") |
|
1796 | @pyqtSignature("int") | |
2067 | def on_specGraphSaveCross_stateChanged(self, p0): |
|
1797 | def on_specGraphSaveCross_stateChanged(self, p0): | |
2068 |
|
|
1798 | ||
2069 |
|
|
1799 | self.__checkSpecGraphSaving() | |
2070 | self.specGraphPrefix.setEnabled(True) |
|
|||
2071 | self.specGraphToolPath.setEnabled(True) |
|
|||
2072 |
|
1800 | |||
2073 | @pyqtSignature("int") |
|
1801 | @pyqtSignature("int") | |
2074 | def on_specGraphSaveRTIplot_stateChanged(self, p0): |
|
1802 | def on_specGraphSaveRTIplot_stateChanged(self, p0): | |
2075 |
|
|
1803 | ||
2076 |
|
|
1804 | self.__checkSpecGraphSaving() | |
2077 | self.specGraphPrefix.setEnabled(True) |
|
|||
2078 | self.specGraphToolPath.setEnabled(True) |
|
|||
2079 |
|
1805 | |||
2080 | @pyqtSignature("int") |
|
1806 | @pyqtSignature("int") | |
2081 | def on_specGraphSaveRTInoise_stateChanged(self, p0): |
|
1807 | def on_specGraphSaveRTInoise_stateChanged(self, p0): | |
2082 |
|
|
1808 | ||
2083 |
|
|
1809 | self.__checkSpecGraphSaving() | |
2084 | self.specGraphPrefix.setEnabled(True) |
|
|||
2085 | self.specGraphToolPath.setEnabled(True) |
|
|||
2086 |
|
1810 | |||
2087 | @pyqtSignature("int") |
|
1811 | @pyqtSignature("int") | |
2088 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): |
|
1812 | def on_specGraphSaveCoherencemap_stateChanged(self, p0): | |
2089 | if p0 == 2: |
|
|||
2090 | self.specGraphPath.setEnabled(True) |
|
|||
2091 | self.specGraphPrefix.setEnabled(True) |
|
|||
2092 | self.specGraphToolPath.setEnabled(True) |
|
|||
2093 |
|
1813 | |||
|
1814 | self.__checkSpecGraphSaving() | |||
2094 |
|
1815 | |||
2095 | @pyqtSignature("int") |
|
1816 | @pyqtSignature("int") | |
2096 | def on_specGraphSavePowerprofile_stateChanged(self, p0): |
|
1817 | def on_specGraphSavePowerprofile_stateChanged(self, p0): | |
2097 |
|
|
1818 | ||
2098 |
|
|
1819 | self.__checkSpecGraphSaving() | |
2099 | self.specGraphPrefix.setEnabled(True) |
|
|||
2100 | self.specGraphToolPath.setEnabled(True) |
|
|||
2101 |
|
1820 | |||
2102 | @pyqtSignature("int") |
|
1821 | @pyqtSignature("int") | |
2103 | def on_specGraphftpSpectra_stateChanged(self, p0): |
|
1822 | def on_specGraphftpSpectra_stateChanged(self, p0): | |
2104 | """ |
|
1823 | """ | |
2105 | """ |
|
1824 | """ | |
2106 | if p0 == 2: |
|
1825 | self.__checkSpecGraphFTP() | |
2107 | self.specGgraphftpratio.setEnabled(True) |
|
|||
2108 |
|
||||
2109 | if p0 == 0: |
|
|||
2110 | self.specGgraphftpratio.setEnabled(False) |
|
|||
2111 |
|
1826 | |||
2112 |
|
1827 | |||
2113 | @pyqtSignature("int") |
|
1828 | @pyqtSignature("int") | |
2114 | def on_specGraphftpCross_stateChanged(self, p0): |
|
1829 | def on_specGraphftpCross_stateChanged(self, p0): | |
2115 |
|
|
1830 | ||
2116 | self.specGgraphftpratio.setEnabled(True) |
|
1831 | self.__checkSpecGraphFTP() | |
2117 |
|
1832 | |||
2118 | @pyqtSignature("int") |
|
1833 | @pyqtSignature("int") | |
2119 | def on_specGraphftpRTIplot_stateChanged(self, p0): |
|
1834 | def on_specGraphftpRTIplot_stateChanged(self, p0): | |
2120 |
|
|
1835 | ||
2121 | self.specGgraphftpratio.setEnabled(True) |
|
1836 | self.__checkSpecGraphFTP() | |
2122 |
|
1837 | |||
2123 | @pyqtSignature("int") |
|
1838 | @pyqtSignature("int") | |
2124 | def on_specGraphftpRTInoise_stateChanged(self, p0): |
|
1839 | def on_specGraphftpRTInoise_stateChanged(self, p0): | |
2125 |
|
|
1840 | ||
2126 | self.specGgraphftpratio.setEnabled(True) |
|
1841 | self.__checkSpecGraphFTP() | |
2127 |
|
1842 | |||
2128 | @pyqtSignature("int") |
|
1843 | @pyqtSignature("int") | |
2129 | def on_specGraphftpCoherencemap_stateChanged(self, p0): |
|
1844 | def on_specGraphftpCoherencemap_stateChanged(self, p0): | |
2130 |
|
|
1845 | ||
2131 | self.specGgraphftpratio.setEnabled(True) |
|
1846 | self.__checkSpecGraphFTP() | |
2132 |
|
1847 | |||
2133 | @pyqtSignature("int") |
|
1848 | @pyqtSignature("int") | |
2134 | def on_specGraphftpPowerprofile_stateChanged(self, p0): |
|
1849 | def on_specGraphftpPowerprofile_stateChanged(self, p0): | |
2135 |
|
|
1850 | ||
2136 | self.specGgraphftpratio.setEnabled(True) |
|
1851 | self.__checkSpecGraphFTP() | |
2137 |
|
1852 | |||
2138 | @pyqtSignature("") |
|
1853 | @pyqtSignature("") | |
2139 | def on_specGraphToolPath_clicked(self): |
|
1854 | def on_specGraphToolPath_clicked(self): | |
@@ -2147,6 +1862,10 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2147 | return |
|
1862 | return | |
2148 |
|
1863 | |||
2149 | @pyqtSignature("") |
|
1864 | @pyqtSignature("") | |
|
1865 | def on_specGraphClear_clicked(self): | |||
|
1866 | return | |||
|
1867 | ||||
|
1868 | @pyqtSignature("") | |||
2150 | def on_specHeisGraphToolPath_clicked(self): |
|
1869 | def on_specHeisGraphToolPath_clicked(self): | |
2151 | """ |
|
1870 | """ | |
2152 | """ |
|
1871 | """ | |
@@ -2157,10 +1876,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2157 | self.console.append("Write a correct a path") |
|
1876 | self.console.append("Write a correct a path") | |
2158 | return |
|
1877 | return | |
2159 |
|
1878 | |||
2160 | @pyqtSignature("") |
|
|||
2161 | def on_specGraphClear_clicked(self): |
|
|||
2162 | self.clearspecGraph() |
|
|||
2163 |
|
||||
2164 | @pyqtSignature("int") |
|
1879 | @pyqtSignature("int") | |
2165 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): |
|
1880 | def on_specHeisOpCebIncoherent_stateChanged(self, p0): | |
2166 | """ |
|
1881 | """ | |
@@ -2408,9 +2123,13 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2408 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) |
|
2123 | opObj.addParameter(name=name_parameter2, value=value2, format=format2) | |
2409 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) |
|
2124 | opObj.addParameter(name=name_parameter3, value=value3, format=format3) | |
2410 |
|
2125 | |||
|
2126 | self.console.clear() | |||
|
2127 | try: | |||
2411 | self.refreshPUProperties(puObj) |
|
2128 | self.refreshPUProperties(puObj) | |
|
2129 | except: | |||
|
2130 | self.console.append("Check input parameters") | |||
|
2131 | return 0 | |||
2412 |
|
2132 | |||
2413 | self.console.clear() |
|
|||
2414 | self.console.append("Click on save icon ff you want to save your project") |
|
2133 | self.console.append("Click on save icon ff you want to save your project") | |
2415 |
|
2134 | |||
2416 | self.actionSaveToolbar.setEnabled(True) |
|
2135 | self.actionSaveToolbar.setEnabled(True) | |
@@ -2481,6 +2200,113 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
2481 | def on_specHeisGraphClear_clicked(self): |
|
2200 | def on_specHeisGraphClear_clicked(self): | |
2482 | pass |
|
2201 | pass | |
2483 |
|
2202 | |||
|
2203 | def __checkSpecGraphSaving(self): | |||
|
2204 | ||||
|
2205 | enable = False | |||
|
2206 | ||||
|
2207 | if self.specGraphSaveSpectra.checkState(): | |||
|
2208 | enable = True | |||
|
2209 | ||||
|
2210 | if self.specGraphSaveCross.checkState(): | |||
|
2211 | enable = True | |||
|
2212 | ||||
|
2213 | if self.specGraphSaveRTIplot.checkState(): | |||
|
2214 | enable = True | |||
|
2215 | ||||
|
2216 | if self.specGraphSaveCoherencemap.checkState(): | |||
|
2217 | enable = True | |||
|
2218 | ||||
|
2219 | if self.specGraphSavePowerprofile.checkState(): | |||
|
2220 | enable = True | |||
|
2221 | ||||
|
2222 | if self.specGraphSaveRTInoise.checkState(): | |||
|
2223 | enable = True | |||
|
2224 | ||||
|
2225 | self.specGraphPath.setEnabled(enable) | |||
|
2226 | self.specGraphPrefix.setEnabled(enable) | |||
|
2227 | self.specGraphToolPath.setEnabled(enable) | |||
|
2228 | ||||
|
2229 | self.specGgraphftpratio.setEnabled(enable) | |||
|
2230 | ||||
|
2231 | def __checkSpecGraphFTP(self): | |||
|
2232 | ||||
|
2233 | enable = False | |||
|
2234 | ||||
|
2235 | if self.specGraphftpSpectra.checkState(): | |||
|
2236 | enable = True | |||
|
2237 | ||||
|
2238 | if self.specGraphftpCross.checkState(): | |||
|
2239 | enable = True | |||
|
2240 | ||||
|
2241 | if self.specGraphftpRTIplot.checkState(): | |||
|
2242 | enable = True | |||
|
2243 | ||||
|
2244 | if self.specGraphftpCoherencemap.checkState(): | |||
|
2245 | enable = True | |||
|
2246 | ||||
|
2247 | if self.specGraphftpPowerprofile.checkState(): | |||
|
2248 | enable = True | |||
|
2249 | ||||
|
2250 | if self.specGraphftpRTInoise.checkState(): | |||
|
2251 | enable = True | |||
|
2252 | ||||
|
2253 | # self.specGgraphftpratio.setEnabled(enable) | |||
|
2254 | ||||
|
2255 | def __checkSpecGraphFilters(self): | |||
|
2256 | ||||
|
2257 | freq = False | |||
|
2258 | height = False | |||
|
2259 | db = False | |||
|
2260 | time = False | |||
|
2261 | magnitud = False | |||
|
2262 | phase = False | |||
|
2263 | channelList = False | |||
|
2264 | ||||
|
2265 | if self.specGraphCebSpectraplot.checkState(): | |||
|
2266 | freq = True | |||
|
2267 | height = True | |||
|
2268 | db = True | |||
|
2269 | channelList = True | |||
|
2270 | ||||
|
2271 | if self.specGraphCebCrossSpectraplot.checkState(): | |||
|
2272 | freq = True | |||
|
2273 | height = True | |||
|
2274 | db = True | |||
|
2275 | magnitud = True | |||
|
2276 | phase = True | |||
|
2277 | ||||
|
2278 | if self.specGraphCebRTIplot.checkState(): | |||
|
2279 | height = True | |||
|
2280 | db = True | |||
|
2281 | time = True | |||
|
2282 | channelList = True | |||
|
2283 | ||||
|
2284 | if self.specGraphCebCoherencmap.checkState(): | |||
|
2285 | height = True | |||
|
2286 | time = True | |||
|
2287 | magnitud = True | |||
|
2288 | phase = True | |||
|
2289 | ||||
|
2290 | if self.specGraphPowerprofile.checkState(): | |||
|
2291 | height = True | |||
|
2292 | db = True | |||
|
2293 | channelList = True | |||
|
2294 | ||||
|
2295 | if self.specGraphCebRTInoise.checkState(): | |||
|
2296 | db = True | |||
|
2297 | time = True | |||
|
2298 | channelList = True | |||
|
2299 | ||||
|
2300 | ||||
|
2301 | self.specGgraphFreq.setEnabled(freq) | |||
|
2302 | self.specGgraphHeight.setEnabled(height) | |||
|
2303 | self.specGgraphDbsrange.setEnabled(db) | |||
|
2304 | self.specGgraphTminTmax.setEnabled(time) | |||
|
2305 | ||||
|
2306 | self.specGgraphmagnitud.setEnabled(magnitud) | |||
|
2307 | self.specGgraphPhase.setEnabled(phase) | |||
|
2308 | self.specGgraphChannelList.setEnabled(channelList) | |||
|
2309 | ||||
2484 | def __getParmsFromProjectWindow(self): |
|
2310 | def __getParmsFromProjectWindow(self): | |
2485 | """ |
|
2311 | """ | |
2486 | Check Inputs Project: |
|
2312 | Check Inputs Project: | |
@@ -3004,6 +2830,18 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3004 |
|
2830 | |||
3005 | def __refreshSpectraWindow(self, puObj): |
|
2831 | def __refreshSpectraWindow(self, puObj): | |
3006 |
|
2832 | |||
|
2833 | inputId = puObj.getInputId() | |||
|
2834 | inputPUObj = self.__puObjDict[inputId] | |||
|
2835 | ||||
|
2836 | if inputPUObj.datatype == 'Voltage': | |||
|
2837 | self.specOpnFFTpoints.setEnabled(True) | |||
|
2838 | self.specOpProfiles.setEnabled(True) | |||
|
2839 | self.specOpippFactor.setEnabled(True) | |||
|
2840 | else: | |||
|
2841 | self.specOpnFFTpoints.setEnabled(False) | |||
|
2842 | self.specOpProfiles.setEnabled(False) | |||
|
2843 | self.specOpippFactor.setEnabled(False) | |||
|
2844 | ||||
3007 | opObj = puObj.getOperationObj(name='setRadarFrequency') |
|
2845 | opObj = puObj.getOperationObj(name='setRadarFrequency') | |
3008 | if opObj == None: |
|
2846 | if opObj == None: | |
3009 | self.specOpRadarfrequency.clear() |
|
2847 | self.specOpRadarfrequency.clear() | |
@@ -3190,12 +3028,11 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3190 | self.specOpgetNoise.setEnabled(True) |
|
3028 | self.specOpgetNoise.setEnabled(True) | |
3191 |
|
3029 | |||
3192 | opObj = puObj.getOperationObj(name='SpectraPlot') |
|
3030 | opObj = puObj.getOperationObj(name='SpectraPlot') | |
3193 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") |
|
3031 | ||
3194 | if opObj == None: |
|
3032 | if opObj == None: | |
3195 | self.specGraphCebSpectraplot.setCheckState(0) |
|
3033 | self.specGraphCebSpectraplot.setCheckState(0) | |
3196 | self.specGraphSaveSpectra.setCheckState(0) |
|
3034 | self.specGraphSaveSpectra.setCheckState(0) | |
3197 | self.specGraphftpSpectra.setCheckState(0) |
|
3035 | self.specGraphftpSpectra.setCheckState(0) | |
3198 |
|
||||
3199 | else: |
|
3036 | else: | |
3200 | operationSpectraPlot = "Enable" |
|
3037 | operationSpectraPlot = "Enable" | |
3201 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3038 | self.specGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) | |
@@ -3265,11 +3102,11 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3265 | self.specGgraphftpratio.setText(str(value)) |
|
3102 | self.specGgraphftpratio.setText(str(value)) | |
3266 |
|
3103 | |||
3267 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') |
|
3104 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') | |
3268 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") |
|
3105 | ||
3269 | if opObj == None: |
|
3106 | if opObj == None: | |
3270 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
3107 | self.specGraphCebCrossSpectraplot.setCheckState(0) | |
3271 | self.specGraphSaveCross.setCheckState(0) |
|
3108 | self.specGraphSaveCross.setCheckState(0) | |
3272 |
|
3109 | self.specGraphftpCross.setCheckState(0) | ||
3273 | else: |
|
3110 | else: | |
3274 | operationCrossSpectraPlot = "Enable" |
|
3111 | operationCrossSpectraPlot = "Enable" | |
3275 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
3112 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) | |
@@ -3309,6 +3146,30 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3309 | self.specGgraphDbsrange.setText(value) |
|
3146 | self.specGgraphDbsrange.setText(value) | |
3310 | self.specGgraphDbsrange.setEnabled(True) |
|
3147 | self.specGgraphDbsrange.setEnabled(True) | |
3311 |
|
3148 | |||
|
3149 | parmObj = opObj.getParameterObj(parameterName='coh_min') | |||
|
3150 | if parmObj == None: | |||
|
3151 | self.specGgraphmagnitud.clear() | |||
|
3152 | else: | |||
|
3153 | value1 = opObj.getParameterValue(parameterName='coh_min') | |||
|
3154 | value1 = str(value1) | |||
|
3155 | value2 = opObj.getParameterValue(parameterName='coh_max') | |||
|
3156 | value2 = str(value2) | |||
|
3157 | value = value1 + "," + value2 | |||
|
3158 | self.specGgraphmagnitud.setText(value) | |||
|
3159 | self.specGgraphmagnitud.setEnabled(True) | |||
|
3160 | ||||
|
3161 | parmObj = opObj.getParameterObj(parameterName='phase_min') | |||
|
3162 | if parmObj == None: | |||
|
3163 | self.specGgraphPhase.clear() | |||
|
3164 | else: | |||
|
3165 | value1 = opObj.getParameterValue(parameterName='phase_min') | |||
|
3166 | value1 = str(value1) | |||
|
3167 | value2 = opObj.getParameterValue(parameterName='phase_max') | |||
|
3168 | value2 = str(value2) | |||
|
3169 | value = value1 + "," + value2 | |||
|
3170 | self.specGgraphPhase.setText(value) | |||
|
3171 | self.specGgraphPhase.setEnabled(True) | |||
|
3172 | ||||
3312 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3173 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3313 | if parmObj == None: |
|
3174 | if parmObj == None: | |
3314 | self.specGraphSaveCross.setCheckState(0) |
|
3175 | self.specGraphSaveCross.setCheckState(0) | |
@@ -3416,7 +3277,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3416 | self.specGraphCebCoherencmap.setCheckState(0) |
|
3277 | self.specGraphCebCoherencmap.setCheckState(0) | |
3417 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3278 | self.specGraphSaveCoherencemap.setCheckState(0) | |
3418 | self.specGraphftpCoherencemap.setCheckState(0) |
|
3279 | self.specGraphftpCoherencemap.setCheckState(0) | |
3419 |
|
||||
3420 | else: |
|
3280 | else: | |
3421 | operationCoherenceMap = "Enable" |
|
3281 | operationCoherenceMap = "Enable" | |
3422 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
3282 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) | |
@@ -3465,6 +3325,30 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3465 | self.specGgraphmagnitud.setText(value) |
|
3325 | self.specGgraphmagnitud.setText(value) | |
3466 | self.specGgraphmagnitud.setEnabled(True) |
|
3326 | self.specGgraphmagnitud.setEnabled(True) | |
3467 |
|
3327 | |||
|
3328 | parmObj = opObj.getParameterObj(parameterName='coh_min') | |||
|
3329 | if parmObj == None: | |||
|
3330 | self.specGgraphmagnitud.clear() | |||
|
3331 | else: | |||
|
3332 | value1 = opObj.getParameterValue(parameterName='coh_min') | |||
|
3333 | value1 = str(value1) | |||
|
3334 | value2 = opObj.getParameterValue(parameterName='coh_max') | |||
|
3335 | value2 = str(value2) | |||
|
3336 | value = value1 + "," + value2 | |||
|
3337 | self.specGgraphmagnitud.setText(value) | |||
|
3338 | self.specGgraphmagnitud.setEnabled(True) | |||
|
3339 | ||||
|
3340 | parmObj = opObj.getParameterObj(parameterName='phase_min') | |||
|
3341 | if parmObj == None: | |||
|
3342 | self.specGgraphPhase.clear() | |||
|
3343 | else: | |||
|
3344 | value1 = opObj.getParameterValue(parameterName='phase_min') | |||
|
3345 | value1 = str(value1) | |||
|
3346 | value2 = opObj.getParameterValue(parameterName='phase_max') | |||
|
3347 | value2 = str(value2) | |||
|
3348 | value = value1 + "," + value2 | |||
|
3349 | self.specGgraphPhase.setText(value) | |||
|
3350 | self.specGgraphPhase.setEnabled(True) | |||
|
3351 | ||||
3468 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
3352 | parmObj = opObj.getParameterObj(parameterName="figpath") | |
3469 | if parmObj == None: |
|
3353 | if parmObj == None: | |
3470 | self.specGraphSaveCoherencemap.setCheckState(0) |
|
3354 | self.specGraphSaveCoherencemap.setCheckState(0) | |
@@ -3489,6 +3373,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3489 | if opObj == None: |
|
3373 | if opObj == None: | |
3490 | self.specGraphPowerprofile.setCheckState(0) |
|
3374 | self.specGraphPowerprofile.setCheckState(0) | |
3491 | self.specGraphSavePowerprofile.setCheckState(0) |
|
3375 | self.specGraphSavePowerprofile.setCheckState(0) | |
|
3376 | self.specGraphftpPowerprofile.setCheckState(0) | |||
3492 | operationPowerProfilePlot = "Disabled" |
|
3377 | operationPowerProfilePlot = "Disabled" | |
3493 | channelList = None |
|
3378 | channelList = None | |
3494 | freq_vel = None |
|
3379 | freq_vel = None | |
@@ -3822,15 +3707,15 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3822 | def __refreshCorrelationWindow(self, puObj): |
|
3707 | def __refreshCorrelationWindow(self, puObj): | |
3823 | pass |
|
3708 | pass | |
3824 |
|
3709 | |||
3825 |
def refreshPUWindow(self, |
|
3710 | def refreshPUWindow(self, puObj): | |
3826 |
|
3711 | |||
3827 | if datatype == 'Voltage': |
|
3712 | if puObj.datatype == 'Voltage': | |
3828 | self.__refreshVoltageWindow(puObj) |
|
3713 | self.__refreshVoltageWindow(puObj) | |
3829 |
|
3714 | |||
3830 | if datatype == 'Spectra': |
|
3715 | if puObj.datatype == 'Spectra': | |
3831 | self.__refreshSpectraWindow(puObj) |
|
3716 | self.__refreshSpectraWindow(puObj) | |
3832 |
|
3717 | |||
3833 | if datatype == 'SpectraHeis': |
|
3718 | if puObj.datatype == 'SpectraHeis': | |
3834 | self.__refreshSpectraHeisWindow(puObj) |
|
3719 | self.__refreshSpectraHeisWindow(puObj) | |
3835 |
|
3720 | |||
3836 | def refreshProjectProperties(self, projectObjView): |
|
3721 | def refreshProjectProperties(self, projectObjView): | |
@@ -3894,8 +3779,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3894 |
|
3779 | |||
3895 | def on_click(self, index): |
|
3780 | def on_click(self, index): | |
3896 |
|
3781 | |||
3897 | self.console.clear() |
|
|||
3898 |
|
||||
3899 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) |
|
3782 | self.selectedItemTree = self.projectExplorerModel.itemFromIndex(index) | |
3900 |
|
3783 | |||
3901 | projectObjView = self.getSelectedProjectObj() |
|
3784 | projectObjView = self.getSelectedProjectObj() | |
@@ -3929,50 +3812,26 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
3929 | tabSelected = self.tabProject |
|
3812 | tabSelected = self.tabProject | |
3930 |
|
3813 | |||
3931 | puObj = selectedObjView |
|
3814 | puObj = selectedObjView | |
3932 | inputId = puObj.getInputId() |
|
|||
3933 | inputPUObj = projectObjView.getProcUnitObj(inputId) |
|
|||
3934 |
|
3815 | |||
3935 | if self.selectedItemTree.text() == 'Voltage': |
|
3816 | if self.selectedItemTree.text() == 'Voltage': | |
3936 | datatype = 'Voltage' |
|
|||
3937 | self.refreshPUWindow(datatype=datatype, puObj=puObj) |
|
|||
3938 | self.refreshPUProperties(puObj) |
|
|||
3939 |
|
||||
3940 | voltEnable = True |
|
3817 | voltEnable = True | |
3941 | tabSelected = self.tabVoltage |
|
3818 | tabSelected = self.tabVoltage | |
3942 |
|
3819 | |||
3943 | if self.selectedItemTree.text() == 'Spectra': |
|
3820 | if self.selectedItemTree.text() == 'Spectra': | |
3944 |
|
||||
3945 | datatype = 'Spectra' |
|
|||
3946 |
|
||||
3947 | if inputPUObj.datatype == 'Spectra': |
|
|||
3948 | self.specOpnFFTpoints.setEnabled(False) |
|
|||
3949 | self.specOpProfiles.setEnabled(False) |
|
|||
3950 | self.specOpippFactor.setEnabled(False) |
|
|||
3951 | else: |
|
|||
3952 | self.specOpnFFTpoints.setEnabled(True) |
|
|||
3953 | self.specOpProfiles.setEnabled(True) |
|
|||
3954 | self.specOpippFactor.setEnabled(True) |
|
|||
3955 |
|
||||
3956 | self.refreshPUWindow(datatype=datatype, puObj=puObj) |
|
|||
3957 | self.refreshPUProperties(puObj) |
|
|||
3958 |
|
||||
3959 | specEnable = True |
|
3821 | specEnable = True | |
3960 | tabSelected = self.tabSpectra |
|
3822 | tabSelected = self.tabSpectra | |
3961 |
|
3823 | |||
3962 | if self.selectedItemTree.text() == 'Correlation': |
|
3824 | if self.selectedItemTree.text() == 'Correlation': | |
3963 |
|
||||
3964 | corrEnable = True |
|
3825 | corrEnable = True | |
3965 | tabSelected = self.tabCorrelation |
|
3826 | tabSelected = self.tabCorrelation | |
3966 |
|
3827 | |||
3967 | if self.selectedItemTree.text() == 'SpectraHeis': |
|
3828 | if self.selectedItemTree.text() == 'SpectraHeis': | |
3968 | datatype = 'SpectraHeis' |
|
3829 | specHeisEnable = True | |
|
3830 | tabSelected = self.tabSpectraHeis | |||
3969 |
|
3831 | |||
3970 |
|
|
3832 | self.refreshPUWindow(puObj=puObj) | |
3971 | self.refreshPUProperties(puObj) |
|
3833 | self.refreshPUProperties(puObj) | |
3972 |
|
3834 | |||
3973 | specHeisEnable = False |
|
|||
3974 | tabSelected = self.tabSpectraHeis |
|
|||
3975 |
|
||||
3976 | self.tabProject.setEnabled(False) |
|
3835 | self.tabProject.setEnabled(False) | |
3977 | self.tabVoltage.setEnabled(voltEnable) |
|
3836 | self.tabVoltage.setEnabled(voltEnable) | |
3978 | self.tabSpectra.setEnabled(specEnable) |
|
3837 | self.tabSpectra.setEnabled(specEnable) | |
@@ -4034,88 +3893,11 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4034 | self.close() |
|
3893 | self.close() | |
4035 | return 0 |
|
3894 | return 0 | |
4036 |
|
3895 | |||
4037 | def refreshProjectWindow(self, project_name, description, datatype, data_path, startDate, endDate, startTime, endTime, online, delay, set): |
|
|||
4038 |
|
||||
4039 | self.proName.setText(str(project_name)) |
|
|||
4040 |
|
||||
4041 | if datatype == 'Voltage': |
|
|||
4042 | ext = '.r' |
|
|||
4043 | value = 0 |
|
|||
4044 | elif datatype == 'Spectra': |
|
|||
4045 | ext = '.pdata' |
|
|||
4046 | value = 1 |
|
|||
4047 | elif datatype == 'Fits': |
|
|||
4048 | ext = '.fits' |
|
|||
4049 | value = 2 |
|
|||
4050 | elif datatype == 'USRP': |
|
|||
4051 | ext = '.hdf5' |
|
|||
4052 | value = 3 |
|
|||
4053 |
|
||||
4054 | self.proDataType.setText(ext) |
|
|||
4055 | self.proDataPath.setText(str(data_path)) |
|
|||
4056 | self.proComDataType.setCurrentIndex(value) |
|
|||
4057 | self.proComReadMode.setCurrentIndex(int(online)) |
|
|||
4058 | self.proDelay.setText(str(delay)) |
|
|||
4059 | self.proSet.setText(str(set)) |
|
|||
4060 | self.proComStartDate.clear() |
|
|||
4061 | self.proComEndDate.clear() |
|
|||
4062 | self.proComStartDate.addItem(str(startDate)) |
|
|||
4063 | self.proComEndDate.addItem(str(endDate)) |
|
|||
4064 | starTime = str(startTime) |
|
|||
4065 | starlist = starTime.split(":") |
|
|||
4066 | endTime = str(endTime) |
|
|||
4067 | endlist = endTime.split(":") |
|
|||
4068 | self.time.setHMS(int(starlist[0]), int(starlist[1]), int(starlist[2])) |
|
|||
4069 | self.proStartTime.setTime(self.time) |
|
|||
4070 | self.time.setHMS(int(endlist[0]), int(endlist[1]), int(endlist[2])) |
|
|||
4071 | self.proEndTime.setTime(self.time) |
|
|||
4072 | self.proDescription.clear() |
|
|||
4073 | self.proDescription.append(description) |
|
|||
4074 |
|
||||
4075 |
|
||||
4076 | def setspecGraph(self): |
|
|||
4077 |
|
||||
4078 | self.specGgraphChannelList.setEnabled(True) |
|
|||
4079 |
|
||||
4080 | def clearspecGraph(self): |
|
|||
4081 |
|
||||
4082 | self.specGgraphChannelList.clear() |
|
|||
4083 |
|
||||
4084 | def create_comm(self): |
|
|||
4085 |
|
||||
4086 | self.commCtrlPThread = CommCtrlProcessThread() |
|
|||
4087 | self.commCtrlPThread.start() |
|
|||
4088 |
|
||||
4089 | def create_updating_timer(self): |
|
3896 | def create_updating_timer(self): | |
4090 | self.comm_data_timer = QtCore.QTimer(self) |
|
3897 | self.comm_data_timer = QtCore.QTimer(self) | |
4091 | self.comm_data_timer.timeout.connect(self.on_comm_updating_timer) |
|
3898 | self.comm_data_timer.timeout.connect(self.on_comm_updating_timer) | |
4092 | self.comm_data_timer.start(1000) |
|
3899 | self.comm_data_timer.start(1000) | |
4093 |
|
3900 | |||
4094 | def create_figure(self): |
|
|||
4095 | self.queue_plot = Queue.Queue() |
|
|||
4096 | self.plotmanager = PlotManager(self.queue_plot) |
|
|||
4097 | self.plot_timer = QtCore.QTimer() |
|
|||
4098 | QtCore.QObject.connect(self.plot_timer, QtCore.SIGNAL("timeout()"), self.periodicCall) |
|
|||
4099 | self.plot_timer.start(100) |
|
|||
4100 | self.running = 1 |
|
|||
4101 |
|
||||
4102 | def periodicCall(self): |
|
|||
4103 | """ |
|
|||
4104 | Check every 100 ms if there is something new in the queue. |
|
|||
4105 | """ |
|
|||
4106 | self.plotmanager.processIncoming() |
|
|||
4107 | if not self.running: |
|
|||
4108 | app.quit() |
|
|||
4109 |
|
||||
4110 | # def on_comm_data_timer(self): |
|
|||
4111 | # # lee el data_queue y la coloca en el queue de ploteo |
|
|||
4112 | # try: |
|
|||
4113 | # reply = self.commCtrlPThread.data_q.get(block=False) |
|
|||
4114 | # self.queue_plot.put(reply.data) |
|
|||
4115 | # |
|
|||
4116 | # except Queue.Empty: |
|
|||
4117 | # pass |
|
|||
4118 |
|
||||
4119 | def createProjectView(self, id): |
|
3901 | def createProjectView(self, id): | |
4120 |
|
3902 | |||
4121 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() |
|
3903 | # project_name, description, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk, set = self.getParmsFromProjectWindow() | |
@@ -4274,1425 +4056,117 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
4274 | return |
|
4056 | return | |
4275 |
|
4057 | |||
4276 | fatherObj = self.configUPWindowObj.getFromWindow |
|
4058 | fatherObj = self.configUPWindowObj.getFromWindow | |
4277 | datatype = self.configUPWindowObj.typeofUP |
|
4059 | datatype = self.configUPWindowObj.typeofUP | |
4278 |
|
||||
4279 | if fatherObj.getElementName() == 'Project': |
|
|||
4280 | inputId = fatherObj.getReadUnitId() |
|
|||
4281 | projectObjView = fatherObj |
|
|||
4282 | else: |
|
|||
4283 | inputId = fatherObj.getId() |
|
|||
4284 | projectObjView = self.getSelectedProjectObj() |
|
|||
4285 |
|
||||
4286 | #---------------------------- |
|
|||
4287 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) |
|
|||
4288 | #---------------------------- |
|
|||
4289 | self.addPU2ProjectExplorer(id=puObj.getId(), name=datatype) |
|
|||
4290 |
|
||||
4291 | self.showtabPUCreated(datatype) |
|
|||
4292 |
|
||||
4293 | self.clearPUWindow(datatype) |
|
|||
4294 |
|
||||
4295 | self.showPUinitView() |
|
|||
4296 |
|
||||
4297 | def addFTPConf2Operation(self, puObj, opObj): |
|
|||
4298 |
|
||||
4299 | if self.temporalFTP.create: |
|
|||
4300 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() |
|
|||
4301 | else: |
|
|||
4302 | self.temporalFTP.setwithoutconfiguration() |
|
|||
4303 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() |
|
|||
4304 |
|
||||
4305 | # opObj.addParameter(name='server', value=server, format='str') |
|
|||
4306 | # opObj.addParameter(name='folder', value=remotefolder, format='str') |
|
|||
4307 | # opObj.addParameter(name='username', value=username, format='str') |
|
|||
4308 | # opObj.addParameter(name='password', value=password, format='str') |
|
|||
4309 |
|
||||
4310 | if ftp_wei: |
|
|||
4311 | opObj.addParameter(name='ftp_wei', value=int(ftp_wei), format='int') |
|
|||
4312 | if exp_code: |
|
|||
4313 | opObj.addParameter(name='exp_code', value=int(exp_code), format='int') |
|
|||
4314 | if sub_exp_code: |
|
|||
4315 | opObj.addParameter(name='sub_exp_code', value=int(sub_exp_code), format='int') |
|
|||
4316 | if plot_pos: |
|
|||
4317 | opObj.addParameter(name='plot_pos', value=int(plot_pos), format='int') |
|
|||
4318 |
|
||||
4319 | if puObj.datatype == "Spectra": |
|
|||
4320 | value = self.specGgraphftpratio.text() |
|
|||
4321 | if puObj.datatype == "SpectraHeis": |
|
|||
4322 | value = self.specHeisGgraphftpratio.text() |
|
|||
4323 |
|
||||
4324 | if not value == "": |
|
|||
4325 | try: |
|
|||
4326 | value = int(value) |
|
|||
4327 | except: |
|
|||
4328 | self.console.clear() |
|
|||
4329 | self.console.append("Please fill Ratio on the textbox") |
|
|||
4330 | return 0 |
|
|||
4331 |
|
||||
4332 | opObj.addParameter(name='wr_period', value=value, format='int') |
|
|||
4333 |
|
||||
4334 | def addFTPProcUnitView(self, server, username, password, remotefolder, |
|
|||
4335 | ftp_wei, exp_code, sub_exp_code, plot_pos, |
|
|||
4336 | localfolder='./', extension='.png', period='60', protocol='ftp'): |
|
|||
4337 |
|
||||
4338 | projectObj = self.getSelectedProjectObj() |
|
|||
4339 | procUnitConfObj = projectObj.getProcUnitObjByName(name="SendToServer") |
|
|||
4340 |
|
||||
4341 | if not procUnitConfObj: |
|
|||
4342 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") |
|
|||
4343 | else: |
|
|||
4344 | procUnitConfObj.removeOperations() |
|
|||
4345 |
|
||||
4346 | procUnitConfObj.addParameter(name='server', value=server, format='str') |
|
|||
4347 | procUnitConfObj.addParameter(name='username', value=username, format='str') |
|
|||
4348 | procUnitConfObj.addParameter(name='password', value=password, format='str') |
|
|||
4349 | procUnitConfObj.addParameter(name='localfolder', value=localfolder, format='str') |
|
|||
4350 | procUnitConfObj.addParameter(name='remotefolder', value=remotefolder, format='str') |
|
|||
4351 | procUnitConfObj.addParameter(name='ext', value=extension, format='str') |
|
|||
4352 | procUnitConfObj.addParameter(name='period', value=period, format='int') |
|
|||
4353 | procUnitConfObj.addParameter(name='protocol', value=protocol, format='str') |
|
|||
4354 |
|
||||
4355 | procUnitConfObj.addParameter(name='ftp_wei', value=ftp_wei, format='str') |
|
|||
4356 | procUnitConfObj.addParameter(name='exp_code', value=exp_code, format='str') |
|
|||
4357 | procUnitConfObj.addParameter(name='sub_exp_code', value=sub_exp_code, format='str') |
|
|||
4358 | procUnitConfObj.addParameter(name='plot_pos', value=plot_pos, format='str') |
|
|||
4359 |
|
||||
4360 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj |
|
|||
4361 |
|
||||
4362 | self.__ftpProcUnitAdded = True |
|
|||
4363 | self.__ftpProcUnitId = procUnitConfObj.getId() |
|
|||
4364 |
|
||||
4365 | def removeFTPProcUnitView(self): |
|
|||
4366 |
|
||||
4367 | projectObj = self.getSelectedProjectObj() |
|
|||
4368 | procUnitConfObj = projectObj.getProcUnitObjByName(name="SendToServer") |
|
|||
4369 |
|
||||
4370 | self.__ftpProcUnitAdded = False |
|
|||
4371 | self.__ftpProcUnitId = None |
|
|||
4372 |
|
||||
4373 | if not procUnitConfObj: |
|
|||
4374 | return |
|
|||
4375 |
|
||||
4376 | projectObj.removeProcUnit(procUnitConfObj.getId()) |
|
|||
4377 |
|
||||
4378 | if procUnitConfObj.getId() not in self.__puObjDict.keys(): |
|
|||
4379 | return |
|
|||
4380 |
|
||||
4381 | self.__puObjDict.pop(procUnitConfObj.getId()) |
|
|||
4382 |
|
||||
4383 | def bufferProject(self, caracteristica, principal, description): |
|
|||
4384 |
|
||||
4385 | self.projectProperCaracteristica.append(caracteristica) |
|
|||
4386 | self.projectProperPrincipal.append(principal) |
|
|||
4387 | self.projectProperDescripcion.append(description) |
|
|||
4388 | return self.projectProperCaracteristica, self.projectProperPrincipal, self.projectProperDescripcion |
|
|||
4389 |
|
||||
4390 |
|
||||
4391 | def showProjectProperties(self, projectObjView): |
|
|||
4392 |
|
||||
4393 | project_name, description = projectObjView.name, projectObjView.description |
|
|||
4394 |
|
||||
4395 | id = projectObjView.id |
|
|||
4396 | readUnitId = projectObjView.getReadUnitId() |
|
|||
4397 | readUnitObj = projectObjView.getProcUnitObj(readUnitId) |
|
|||
4398 | operationObj = readUnitObj.getOperationObj(name='run') |
|
|||
4399 |
|
||||
4400 |
|
||||
4401 | datatype = operationObj.getParameterValue(parameterName='datatype') |
|
|||
4402 | dpath = operationObj.getParameterValue(parameterName='path') |
|
|||
4403 | startDate = operationObj.getParameterValue(parameterName='startDate') |
|
|||
4404 | endDate = operationObj.getParameterValue(parameterName='endDate') |
|
|||
4405 | startDate = str(startDate) |
|
|||
4406 | endDate = str(endDate) |
|
|||
4407 | startDateList = startDate.split('-') |
|
|||
4408 | endDateList = endDate.split('-') |
|
|||
4409 | startDate = startDateList[0] + "/" + startDateList[1] + "/" + startDateList[2] |
|
|||
4410 | endDate = endDateList[0] + "/" + endDateList[1] + "/" + endDateList[2] |
|
|||
4411 |
|
||||
4412 | startTime = operationObj.getParameterValue(parameterName='startTime') |
|
|||
4413 | endTime = operationObj.getParameterValue(parameterName='endTime') |
|
|||
4414 | online = operationObj.getParameterValue(parameterName='online') |
|
|||
4415 | walk = operationObj.getParameterValue(parameterName='walk') |
|
|||
4416 | delay = operationObj.getParameterValue(parameterName='delay') |
|
|||
4417 | try: |
|
|||
4418 | set = operationObj.getParameterValue(parameterName='set') |
|
|||
4419 | except: |
|
|||
4420 | set = " " |
|
|||
4421 |
|
||||
4422 | if online == 0: |
|
|||
4423 | remode = "offline" |
|
|||
4424 | else: |
|
|||
4425 | remode = "online" |
|
|||
4426 |
|
||||
4427 | if walk == 0: |
|
|||
4428 | walk_str = 'On Files' |
|
|||
4429 | else: |
|
|||
4430 | walk_str = 'On Folder' |
|
|||
4431 |
|
||||
4432 | self.bufferProject("Properties", "Name", project_name), |
|
|||
4433 | self.bufferProject("Properties", "Data Path", dpath) |
|
|||
4434 | self.bufferProject("Properties", "Workspace", self.pathWorkSpace) |
|
|||
4435 | self.bufferProject("Parameters", "Read Mode ", remode) |
|
|||
4436 | self.bufferProject("Parameters", "DataType ", datatype) |
|
|||
4437 | self.bufferProject("Parameters", "Start Date", str(startDate)) |
|
|||
4438 | self.bufferProject("Parameters", "End Date ", str(endDate)) |
|
|||
4439 | self.bufferProject("Parameters", "Start Time", str(startTime)) |
|
|||
4440 | self.bufferProject("Parameters", "End Time ", str(endTime)) |
|
|||
4441 | self.bufferProject("Parameters", "Delay ", str(delay)) |
|
|||
4442 | try: |
|
|||
4443 | set = operationObj.getParameterValue(parameterName='set') |
|
|||
4444 | self.bufferProject("Parameters", "Set ", set) |
|
|||
4445 | except: |
|
|||
4446 | set = " " |
|
|||
4447 | self.bufferProject("Parameters", "Walk ", str(walk_str)) |
|
|||
4448 | self.bufferProject("Parameters", "Time zone", "Local") |
|
|||
4449 | self.bufferProject("Description", "Summary ", description) |
|
|||
4450 |
|
||||
4451 | self.propertiesModel = TreeModel() |
|
|||
4452 | self.propertiesModel.showProperties(self.projectProperCaracteristica, self.projectProperPrincipal, self.projectProperDescripcion) |
|
|||
4453 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
|||
4454 | self.treeProjectProperties.expandAll() |
|
|||
4455 | self.treeProjectProperties.resizeColumnToContents(0) |
|
|||
4456 | self.treeProjectProperties.resizeColumnToContents(1) |
|
|||
4457 |
|
||||
4458 | self.projectProperCaracteristica = [] |
|
|||
4459 | self.projectProperPrincipal = [] |
|
|||
4460 | self.projectProperDescripcion = [] |
|
|||
4461 |
|
||||
4462 | return datatype , dpath , startDate , endDate, startTime, endTime, online, delay, walk, set |
|
|||
4463 |
|
||||
4464 | def showPUinitView(self): |
|
|||
4465 | self.propertiesModel = TreeModel() |
|
|||
4466 | self.propertiesModel.initPUVoltageView() |
|
|||
4467 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
|||
4468 | self.treeProjectProperties.expandAll() |
|
|||
4469 | self.treeProjectProperties.allColumnsShowFocus() |
|
|||
4470 | self.treeProjectProperties.resizeColumnToContents(1) |
|
|||
4471 |
|
||||
4472 | def bufferVoltage(self, caracteristica, principal, description): |
|
|||
4473 | self.volProperCaracteristica.append(caracteristica) |
|
|||
4474 | self.volProperPrincipal.append(principal) |
|
|||
4475 | self.volProperDescripcion.append(description) |
|
|||
4476 | return self.volProperCaracteristica, self.volProperPrincipal, self.volProperDescripcion |
|
|||
4477 |
|
||||
4478 | def showPUVoltageProperties(self, puObj): |
|
|||
4479 |
|
||||
4480 |
|
||||
4481 | type = puObj.name |
|
|||
4482 | self.bufferVoltage("Processing Unit", "Type", type) |
|
|||
4483 |
|
||||
4484 | opObj = puObj.getOperationObj(name="setRadarFrequency") |
|
|||
4485 | if opObj == None: |
|
|||
4486 | radarfrequency = None |
|
|||
4487 | else: |
|
|||
4488 | value = opObj.getParameterValue(parameterName='frequency') |
|
|||
4489 | value = str(value) |
|
|||
4490 | radarfrequency = value |
|
|||
4491 | self.bufferVoltage("Processing Unit", "Radar Frequency", radarfrequency) |
|
|||
4492 |
|
||||
4493 | opObj = puObj.getOperationObj(name="selectChannels") |
|
|||
4494 | if opObj == None: |
|
|||
4495 | channel = None |
|
|||
4496 | else: |
|
|||
4497 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
4498 | value = str(value)#[1:-1] |
|
|||
4499 | channel = value |
|
|||
4500 | self.bufferVoltage("Processing Unit", "Select Channel", channel) |
|
|||
4501 |
|
||||
4502 | opObj = puObj.getOperationObj(name="selectChannelsByIndex") |
|
|||
4503 | if opObj == None: |
|
|||
4504 | channel = None |
|
|||
4505 | else: |
|
|||
4506 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
|||
4507 | value = str(value)#[1:-1] |
|
|||
4508 | channel = value |
|
|||
4509 | self.bufferVoltage("Processing Unit", "Select Channel by Index", channel) |
|
|||
4510 |
|
||||
4511 | opObj = puObj.getOperationObj(name="selectHeights") |
|
|||
4512 | if opObj == None: |
|
|||
4513 | heights = None |
|
|||
4514 | else: |
|
|||
4515 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
|||
4516 | value1 = str(value1) |
|
|||
4517 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
|||
4518 | value2 = str(value2) |
|
|||
4519 | value = value1 + "," + value2 |
|
|||
4520 | heights = value |
|
|||
4521 | self.bufferVoltage("Processing Unit", "Select Heights", heights) |
|
|||
4522 |
|
||||
4523 |
|
||||
4524 | opObj = puObj.getOperationObj(name="filterByHeights") |
|
|||
4525 | if opObj == None: |
|
|||
4526 | filter = None |
|
|||
4527 | else: |
|
|||
4528 | value = opObj.getParameterValue(parameterName='window') |
|
|||
4529 | value = str(value) |
|
|||
4530 | filter = value |
|
|||
4531 | self.bufferVoltage("Processing Unit", "Filter", filter) |
|
|||
4532 |
|
||||
4533 |
|
||||
4534 | opObj = puObj.getOperationObj(name="ProfileSelector") |
|
|||
4535 | if opObj == None: |
|
|||
4536 | profile = None |
|
|||
4537 | else: |
|
|||
4538 | for parmObj in opObj.getParameterObjList(): |
|
|||
4539 | if parmObj.name == "profileRangeList": |
|
|||
4540 | value = opObj.getParameterValue(parameterName='profileRangeList') |
|
|||
4541 | value = str(value)#[1:-1] |
|
|||
4542 | profile = value |
|
|||
4543 | self.bufferVoltage("Processing Unit", "Select Profile", profile) |
|
|||
4544 |
|
||||
4545 | if parmObj.name == "profileList": |
|
|||
4546 | value = opObj.getParameterValue(parameterName='profileList') |
|
|||
4547 | value = str(value)#[1:-1] |
|
|||
4548 | profile = value |
|
|||
4549 | self.bufferVoltage("Processing Unit", "Select Profile", profile) |
|
|||
4550 |
|
||||
4551 |
|
||||
4552 | opObj = puObj.getOperationObj(name="Decoder") |
|
|||
4553 | if opObj == None: |
|
|||
4554 | self.volOpCebDecodification.setCheckState(0) |
|
|||
4555 | code = None |
|
|||
4556 | mode = None |
|
|||
4557 | else: |
|
|||
4558 | self.volOpCebDecodification.setCheckState(QtCore.Qt.Checked) |
|
|||
4559 | try: |
|
|||
4560 | code = opObj.getParameterValue(parameterName='code') |
|
|||
4561 | nBaud = opObj.getParameterValue(parameterName='nBaud') |
|
|||
4562 | nCode = opObj.getParameterValue(parameterName='nCode') |
|
|||
4563 | code = numpy.array(code).reshape(nCode,nBaud) |
|
|||
4564 | except: |
|
|||
4565 | code = "Default" |
|
|||
4566 |
|
||||
4567 | self.bufferVoltage("Processing Unit", "Code", str(code).replace('\n','')) |
|
|||
4568 |
|
||||
4569 | try: |
|
|||
4570 | value = opObj.getParameterValue(parameterName='mode') |
|
|||
4571 | if int(value) == 0: |
|
|||
4572 | mode = "Time" |
|
|||
4573 | else: |
|
|||
4574 | mode = "freq" + str(value) |
|
|||
4575 | except: |
|
|||
4576 | mode = "Default" |
|
|||
4577 | self.bufferVoltage("Processing Unit", "Decoder mode", mode) |
|
|||
4578 |
|
||||
4579 | opObj = puObj.getOperationObj(name="deFlip") |
|
|||
4580 | if opObj == None: |
|
|||
4581 | value = None |
|
|||
4582 | else: |
|
|||
4583 | try: |
|
|||
4584 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
4585 | value = str(value) |
|
|||
4586 | except: |
|
|||
4587 | value = "All channels" |
|
|||
4588 |
|
||||
4589 | self.bufferVoltage("Processing Unit", "Flip", value) |
|
|||
4590 |
|
||||
4591 | opObj = puObj.getOperationObj(name="CohInt") |
|
|||
4592 | if opObj == None: |
|
|||
4593 | coherentintegration = None |
|
|||
4594 | else: |
|
|||
4595 | value = opObj.getParameterValue(parameterName='n') |
|
|||
4596 | coherentintegration = value |
|
|||
4597 | self.bufferVoltage("Processing Unit", "Coh Int", coherentintegration) |
|
|||
4598 |
|
||||
4599 |
|
||||
4600 | # graph |
|
|||
4601 | # opObj = puObj.getOperationObj(name='Plot') |
|
|||
4602 | opObj = puObj.getOperationObj(name='Scope') |
|
|||
4603 | if opObj == None: |
|
|||
4604 | self.volGraphCebshow.setCheckState(0) |
|
|||
4605 | operation = "Disabled" |
|
|||
4606 | channelList = None |
|
|||
4607 | freq_vel = None |
|
|||
4608 | heightsrange = None |
|
|||
4609 | else: |
|
|||
4610 | operation = 'Enabled' |
|
|||
4611 | self.bufferVoltage("Scope", "Operation", operation), |
|
|||
4612 | self.volGraphCebshow.setCheckState(QtCore.Qt.Checked) |
|
|||
4613 | value = opObj.getParameterObj(parameterName='channelList') |
|
|||
4614 | if value == None: |
|
|||
4615 | channelList = None |
|
|||
4616 | else: |
|
|||
4617 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
4618 | value = str(value)[1:-1] |
|
|||
4619 | channelList = value |
|
|||
4620 | self.bufferVoltage("Scope", "Channel List", channelList) |
|
|||
4621 |
|
||||
4622 |
|
||||
4623 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
4624 | if value1 == None: |
|
|||
4625 | freq_vel = None |
|
|||
4626 | else: |
|
|||
4627 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
4628 | value1 = str(value1) |
|
|||
4629 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
4630 | if value2 == None: |
|
|||
4631 | freq_vel = None |
|
|||
4632 | else: |
|
|||
4633 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
4634 | value2 = str(value2) |
|
|||
4635 | value = value1 + "," + value2 |
|
|||
4636 | freq_vel = value |
|
|||
4637 | self.bufferVoltage("Scope", "Freq/Vel", freq_vel) |
|
|||
4638 |
|
||||
4639 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
4640 | if value1 == None: |
|
|||
4641 | heightsrange = None |
|
|||
4642 | else: |
|
|||
4643 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
4644 | value1 = str(value1) |
|
|||
4645 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
4646 | if value2 == None: |
|
|||
4647 | fheightsrange = None |
|
|||
4648 | else: |
|
|||
4649 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
4650 | value2 = str(value2) |
|
|||
4651 | value = value1 + "," + value2 |
|
|||
4652 | heightsrange = value |
|
|||
4653 | self.bufferVoltage("Scope", "Height Range", heightsrange) |
|
|||
4654 |
|
||||
4655 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
4656 | if parmObj == None: |
|
|||
4657 | self.volGraphCebSave.setCheckState(QtCore.Qt.Unchecked) |
|
|||
4658 | figpath = None |
|
|||
4659 | else: |
|
|||
4660 | self.volGraphCebSave.setCheckState(QtCore.Qt.Checked) |
|
|||
4661 | value = opObj.getParameterValue(parameterName='figpath') |
|
|||
4662 | figpath = value |
|
|||
4663 | self.bufferVoltage("Scope", "Path", figpath) |
|
|||
4664 | # outputVoltageWrite |
|
|||
4665 | opObj = puObj.getOperationObj(name='VoltageWriter') |
|
|||
4666 | if opObj == None: |
|
|||
4667 | pass |
|
|||
4668 | else: |
|
|||
4669 | operation = 'Enabled' |
|
|||
4670 | self.bufferVoltage("Output", "Operation", operation) |
|
|||
4671 | value = opObj.getParameterObj(parameterName='path') |
|
|||
4672 | if value == None: |
|
|||
4673 | path = None |
|
|||
4674 | else: |
|
|||
4675 | value = opObj.getParameterValue(parameterName='path') |
|
|||
4676 | path = str(value) |
|
|||
4677 | self.bufferVoltage("Output", "Path", path) |
|
|||
4678 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
|||
4679 | if value == None: |
|
|||
4680 | blocksperfile = None |
|
|||
4681 | else: |
|
|||
4682 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
|||
4683 | blocksperfile = str(value) |
|
|||
4684 | self.bufferVoltage("Output", "BlocksPerFile", blocksperfile) |
|
|||
4685 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
|||
4686 | if value == None: |
|
|||
4687 | profilesPerBlock = None |
|
|||
4688 | else: |
|
|||
4689 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
|||
4690 | profilesPerBlock = str(value) |
|
|||
4691 | self.bufferVoltage("Output", "ProfilesPerBlock", profilesPerBlock) |
|
|||
4692 |
|
||||
4693 |
|
||||
4694 | # set model PU Properties |
|
|||
4695 |
|
||||
4696 | self.propertiesModel = TreeModel() |
|
|||
4697 | self.propertiesModel.showProperties(self.volProperCaracteristica, self.volProperPrincipal, self.volProperDescripcion) |
|
|||
4698 | self.volProperCaracteristica = [] |
|
|||
4699 | self.volProperPrincipal = [] |
|
|||
4700 | self.volProperDescripcion = [] |
|
|||
4701 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
|||
4702 | self.treeProjectProperties.expandAll() |
|
|||
4703 | self.treeProjectProperties.allColumnsShowFocus() |
|
|||
4704 | self.treeProjectProperties.resizeColumnToContents(0) |
|
|||
4705 | self.treeProjectProperties.resizeColumnToContents(1) |
|
|||
4706 |
|
||||
4707 | def bufferSpectra(self, caracteristica, principal, description): |
|
|||
4708 | self.specProperCaracteristica.append(caracteristica) |
|
|||
4709 | self.specProperPrincipal.append(principal) |
|
|||
4710 | self.specProperDescripcion.append(description) |
|
|||
4711 | return self.specProperCaracteristica, self.specProperPrincipal, self.specProperDescripcion |
|
|||
4712 |
|
||||
4713 | def showPUSpectraProperties(self, puObj): |
|
|||
4714 | type = puObj.name |
|
|||
4715 | self.bufferSpectra("Processing Unit", "Type", type) |
|
|||
4716 |
|
||||
4717 | opObj = puObj.getOperationObj(name="setRadarFrequency") |
|
|||
4718 | if opObj == None: |
|
|||
4719 | radarfrequency = None |
|
|||
4720 | else: |
|
|||
4721 | value = opObj.getParameterValue(parameterName='frequency') |
|
|||
4722 | value = str(value) |
|
|||
4723 | radarfrequency = value |
|
|||
4724 | self.bufferSpectra("Processing Unit", "Radar Frequency", radarfrequency) |
|
|||
4725 |
|
||||
4726 |
|
||||
4727 | opObj = puObj.getOperationObj(name="run") |
|
|||
4728 | if opObj == None: |
|
|||
4729 | self.specOpnFFTpoints.clear() |
|
|||
4730 | self.specOpProfiles.clear() |
|
|||
4731 | self.specOpippFactor.clear() |
|
|||
4732 | else: |
|
|||
4733 | parmObj = opObj.getParameterObj(parameterName='nProfiles') |
|
|||
4734 | if parmObj == None: |
|
|||
4735 | nProfiles = None |
|
|||
4736 | else: |
|
|||
4737 | value = opObj.getParameterValue(parameterName='nProfiles') |
|
|||
4738 | nProfiles = value |
|
|||
4739 | self.bufferSpectra("Processing Unit", "nProfiles", nProfiles) |
|
|||
4740 |
|
||||
4741 | parmObj = opObj.getParameterObj(parameterName='nFFTPoints') |
|
|||
4742 | if parmObj == None: |
|
|||
4743 | nFFTPoints = None |
|
|||
4744 | else: |
|
|||
4745 | value = opObj.getParameterValue(parameterName='nFFTPoints') |
|
|||
4746 | nFFTPoints = value |
|
|||
4747 | self.bufferSpectra("Processing Unit", "nFFTpoints", nFFTPoints) |
|
|||
4748 |
|
||||
4749 | parmObj = opObj.getParameterObj(parameterName='ippFactor') |
|
|||
4750 | if parmObj == None: |
|
|||
4751 | ippFactor = None |
|
|||
4752 | else: |
|
|||
4753 | value = opObj.getParameterValue(parameterName='ippFactor') |
|
|||
4754 | ippFactor = value |
|
|||
4755 | self.bufferSpectra("Processing Unit", "Ipp Factor", ippFactor) |
|
|||
4756 |
|
||||
4757 |
|
||||
4758 | opObj = puObj.getOperationObj(name="run") |
|
|||
4759 | if opObj == None: |
|
|||
4760 | pairsList = None |
|
|||
4761 | else: |
|
|||
4762 | parm = opObj.getParameterObj(parameterName='pairsList') |
|
|||
4763 | if parm == None: |
|
|||
4764 | pairsList = None |
|
|||
4765 | else: |
|
|||
4766 | value = opObj.getParameterValue(parameterName='pairsList') |
|
|||
4767 | value = str(value)[1:-1] |
|
|||
4768 | pairsList = value |
|
|||
4769 | self.bufferSpectra("Processing Unit", "PairsList", pairsList) |
|
|||
4770 |
|
||||
4771 |
|
||||
4772 | opObj = puObj.getOperationObj(name="selectChannels") |
|
|||
4773 | if opObj == None: |
|
|||
4774 | channel = None |
|
|||
4775 | else: |
|
|||
4776 | try: |
|
|||
4777 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
4778 | value = str(value)[1:-1] |
|
|||
4779 | channel = value |
|
|||
4780 |
|
||||
4781 | self.bufferSpectra("Processing Unit", "Channel List", channel) |
|
|||
4782 | except: |
|
|||
4783 | pass |
|
|||
4784 | try: |
|
|||
4785 | value = opObj.getParameterValue(parameterName='channelIndexList') |
|
|||
4786 | value = str(value)[1:-1] |
|
|||
4787 | channel = value |
|
|||
4788 |
|
||||
4789 | self.bufferSpectra("Processing Unit", "Channel Index List", channel) |
|
|||
4790 | except: |
|
|||
4791 | pass |
|
|||
4792 |
|
||||
4793 | opObj = puObj.getOperationObj(name="selectHeights") |
|
|||
4794 | if opObj == None: |
|
|||
4795 | heights = None |
|
|||
4796 | else: |
|
|||
4797 | value1 = int(opObj.getParameterValue(parameterName='minHei')) |
|
|||
4798 | value1 = str(value1) |
|
|||
4799 | value2 = int(opObj.getParameterValue(parameterName='maxHei')) |
|
|||
4800 | value2 = str(value2) |
|
|||
4801 | value = value1 + "," + value2 |
|
|||
4802 | heights = value |
|
|||
4803 | self.bufferSpectra("Processing Unit", "Heights", heights) |
|
|||
4804 |
|
||||
4805 | opObj = puObj.getOperationObj(name="IncohInt") |
|
|||
4806 | if opObj == None: |
|
|||
4807 | incoherentintegration = None |
|
|||
4808 | else: |
|
|||
4809 | try: |
|
|||
4810 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
|||
4811 | except: |
|
|||
4812 | value = opObj.getParameterValue(parameterName='n') |
|
|||
4813 |
|
||||
4814 | value = float(value) |
|
|||
4815 | incoherentintegration = str(value) |
|
|||
4816 | self.bufferSpectra("Processing Unit", "Incoherent Integration", incoherentintegration) |
|
|||
4817 |
|
||||
4818 |
|
||||
4819 | opObj = puObj.getOperationObj(name="removeDC") |
|
|||
4820 | if opObj == None: |
|
|||
4821 | removeDC = None |
|
|||
4822 | else: |
|
|||
4823 | value = opObj.getParameterValue(parameterName='mode') |
|
|||
4824 | self.bufferSpectra("Processing Unit", "Remove DC", value) |
|
|||
4825 |
|
||||
4826 | opObj = puObj.getOperationObj(name="removeInterference") |
|
|||
4827 | if opObj == None: |
|
|||
4828 | removeInterference = None |
|
|||
4829 | else: |
|
|||
4830 | self.bufferSpectra("Processing Unit", "Remove Interference", "1") |
|
|||
4831 |
|
||||
4832 | opObj = puObj.getOperationObj(name="getNoise") |
|
|||
4833 | if opObj == None: |
|
|||
4834 | getNoise = None |
|
|||
4835 | else: |
|
|||
4836 | value1 = opObj.getParameterObj(parameterName='minHei') |
|
|||
4837 | if value1 == None: |
|
|||
4838 | getNoise = None |
|
|||
4839 | getNoise = "Default" |
|
|||
4840 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
|||
4841 |
|
||||
4842 | else: |
|
|||
4843 | value1 = opObj.getParameterValue(parameterName='minHei') |
|
|||
4844 | value1 = str(value1) |
|
|||
4845 | value2 = opObj.getParameterObj(parameterName='maxHei') |
|
|||
4846 | if value2 == None: |
|
|||
4847 | getNoise = None |
|
|||
4848 | value = value1 |
|
|||
4849 | getNoise = value |
|
|||
4850 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
|||
4851 | else: |
|
|||
4852 | value2 = opObj.getParameterValue(parameterName='maxHei') |
|
|||
4853 | value2 = str(value2) |
|
|||
4854 | value3 = opObj.getParameterObj(parameterName='minVel') |
|
|||
4855 | if value3 == None: |
|
|||
4856 | getNoise = None |
|
|||
4857 | value = value1 + "," + value2 |
|
|||
4858 | getNoise = value |
|
|||
4859 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
|||
4860 | else: |
|
|||
4861 | value3 = opObj.getParameterValue(parameterName='minVel') |
|
|||
4862 | value3 = str(value3) |
|
|||
4863 | value4 = opObj.getParameterObj(parameterName='maxVel') |
|
|||
4864 | if value4 == None: |
|
|||
4865 | getNoise = None |
|
|||
4866 | value = value1 + "," + value2 + ',' + value3 |
|
|||
4867 | getNoise = value |
|
|||
4868 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
|||
4869 | else: |
|
|||
4870 | value4 = opObj.getParameterValue(parameterName='maxVel') |
|
|||
4871 | value4 = str(value4) |
|
|||
4872 | value = value1 + "," + value2 + ',' + value3 + ',' + value4 |
|
|||
4873 | getNoise = value |
|
|||
4874 | self.bufferSpectra("Processing Unit", "Get Noise", getNoise) |
|
|||
4875 |
|
||||
4876 | opObj = puObj.getOperationObj(name='SpectraPlot') |
|
|||
4877 | # opObj = puObj.getOpObjfromParamValue(value="SpectraPlot") |
|
|||
4878 |
|
||||
4879 | if opObj == None: |
|
|||
4880 | operationSpectraPlot = "Disabled" |
|
|||
4881 | freq_vel = None |
|
|||
4882 | heightsrange = None |
|
|||
4883 | channelListSpectraPlot = None |
|
|||
4884 | else: |
|
|||
4885 | operationSpectraPlot = "Enable" |
|
|||
4886 | self.bufferSpectra("Spectra Plot", "Operation", operationSpectraPlot) |
|
|||
4887 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
4888 | if parmObj == None: |
|
|||
4889 | channelListSpectraPlot = None |
|
|||
4890 | else: |
|
|||
4891 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
4892 | channelListSpectraPlot = str(value)[1:-1] |
|
|||
4893 | self.bufferSpectra("Spectra Plot", "Channel List", channelListSpectraPlot) |
|
|||
4894 |
|
||||
4895 |
|
||||
4896 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
4897 | if value1 == None: |
|
|||
4898 | freq_vel = None |
|
|||
4899 | else: |
|
|||
4900 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
4901 | value1 = str(value1) |
|
|||
4902 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
4903 | if value2 == None: |
|
|||
4904 | freq_vel = None |
|
|||
4905 | else: |
|
|||
4906 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
4907 | value2 = str(value2) |
|
|||
4908 | value = value1 + "," + value2 |
|
|||
4909 | freq_vel = value |
|
|||
4910 | self.bufferSpectra("Spectra Plot", "Freq/Vel", freq_vel) |
|
|||
4911 |
|
||||
4912 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
4913 | if value1 == None: |
|
|||
4914 | heightsrange = None |
|
|||
4915 | else: |
|
|||
4916 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
4917 | value1 = str(value1) |
|
|||
4918 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
4919 | if value2 == None: |
|
|||
4920 | fheightsrange = None |
|
|||
4921 | else: |
|
|||
4922 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
4923 | value2 = str(value2) |
|
|||
4924 | value = value1 + "," + value2 |
|
|||
4925 | heightsrange = value |
|
|||
4926 | self.bufferSpectra("Spectra Plot", "Height Range", heightsrange) |
|
|||
4927 |
|
||||
4928 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
|||
4929 | if value1 == None: |
|
|||
4930 | dBrange = None |
|
|||
4931 | else: |
|
|||
4932 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
|||
4933 | value1 = str(value1) |
|
|||
4934 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
|||
4935 | if value2 == None: |
|
|||
4936 | fdBrange = None |
|
|||
4937 | else: |
|
|||
4938 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
|||
4939 | value2 = str(value2) |
|
|||
4940 | value = value1 + "," + value2 |
|
|||
4941 | dbrange = value |
|
|||
4942 | self.bufferSpectra("Spectra Plot", "dB Range", dbrange) |
|
|||
4943 |
|
||||
4944 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
4945 | if parmObj == None: |
|
|||
4946 | path = None |
|
|||
4947 | else: |
|
|||
4948 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
4949 | self.bufferSpectra("Spectra Plot", "Save Path", path) |
|
|||
4950 |
|
||||
4951 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
4952 | if parmObj == None: |
|
|||
4953 | status = 'disable' |
|
|||
4954 | else: |
|
|||
4955 | status = 'enable' |
|
|||
4956 | self.bufferSpectra("Spectra Plot", "FTP", status) |
|
|||
4957 | self.showWr_Period(puObj, opObj, nameplotop="Spectra Plot") |
|
|||
4958 | # self.saveFTPvalues(opObj) |
|
|||
4959 |
|
||||
4960 | opObj = puObj.getOperationObj(name='CrossSpectraPlot') |
|
|||
4961 | # opObj = puObj.getOpObjfromParamValue(value="CrossSpectraPlot") |
|
|||
4962 | if opObj == None: |
|
|||
4963 | self.specGraphCebCrossSpectraplot.setCheckState(0) |
|
|||
4964 | operationCrossSpectraPlot = "Disabled" |
|
|||
4965 | channelList = None |
|
|||
4966 | freq_vel = None |
|
|||
4967 | heightsrange = None |
|
|||
4968 | else: |
|
|||
4969 | operationCrossSpectraPlot = "Enable" |
|
|||
4970 | self.specGraphCebCrossSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
|||
4971 | self.bufferSpectra("Cross Spectra Plot", "Operation", operationCrossSpectraPlot) |
|
|||
4972 |
|
||||
4973 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
4974 | if value1 == None: |
|
|||
4975 | freq_vel = None |
|
|||
4976 | else: |
|
|||
4977 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
4978 | value1 = str(value1) |
|
|||
4979 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
4980 | if value2 == None: |
|
|||
4981 | freq_vel = None |
|
|||
4982 | else: |
|
|||
4983 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
4984 | value2 = str(value2) |
|
|||
4985 | value = value1 + "," + value2 |
|
|||
4986 | freq_vel = value |
|
|||
4987 | self.bufferSpectra("Cross Spectra Plot", "Freq/Vel", freq_vel) |
|
|||
4988 |
|
||||
4989 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
4990 | if value1 == None: |
|
|||
4991 | heightsrange = None |
|
|||
4992 | else: |
|
|||
4993 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
4994 | value1 = str(value1) |
|
|||
4995 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
4996 | if value2 == None: |
|
|||
4997 | fheightsrange = None |
|
|||
4998 | else: |
|
|||
4999 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
5000 | value2 = str(value2) |
|
|||
5001 | value = value1 + "," + value2 |
|
|||
5002 | heightsrange = value |
|
|||
5003 | self.bufferSpectra("Cross Spectra Plot", "Height Range", heightsrange) |
|
|||
5004 |
|
||||
5005 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
|||
5006 | if value1 == None: |
|
|||
5007 | dBrange = None |
|
|||
5008 | else: |
|
|||
5009 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
|||
5010 | value1 = str(value1) |
|
|||
5011 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
|||
5012 | if value2 == None: |
|
|||
5013 | fdBrange = None |
|
|||
5014 | else: |
|
|||
5015 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
|||
5016 | value2 = str(value2) |
|
|||
5017 | value = value1 + "," + value2 |
|
|||
5018 | dbrange = value |
|
|||
5019 | self.bufferSpectra("Cross Spectra Plot", "dB Range", dbrange) |
|
|||
5020 |
|
||||
5021 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
5022 | if parmObj == None: |
|
|||
5023 | path = None |
|
|||
5024 | else: |
|
|||
5025 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5026 | self.bufferSpectra("Cross Spectra Plot", "Save Path", path) |
|
|||
5027 |
|
||||
5028 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
5029 | if parmObj == None: |
|
|||
5030 | status = 'disable' |
|
|||
5031 | else: |
|
|||
5032 | status = 'enable' |
|
|||
5033 | self.bufferSpectra("Cross Spectra Plot", "FTP", status) |
|
|||
5034 | self.showWr_Period(puObj, opObj, nameplotop="Cross Spectra Plot") |
|
|||
5035 | # self.saveFTPvalues(opObj) |
|
|||
5036 |
|
||||
5037 | opObj = puObj.getOperationObj(name='RTIPlot') |
|
|||
5038 | # opObj = puObj.getOpObjfromParamValue(value="RTIPlot") |
|
|||
5039 | if opObj == None: |
|
|||
5040 | self.specGraphCebRTIplot.setCheckState(0) |
|
|||
5041 | operationRTIPlot = "Disabled" |
|
|||
5042 | channelList = None |
|
|||
5043 | freq_vel = None |
|
|||
5044 | heightsrange = None |
|
|||
5045 | else: |
|
|||
5046 | operationRTIPlot = "Enable" |
|
|||
5047 | self.specGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
|||
5048 | self.bufferSpectra("RTI Plot", "Operation", operationRTIPlot) |
|
|||
5049 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5050 | if parmObj == None: |
|
|||
5051 | channelListRTIPlot = None |
|
|||
5052 | else: |
|
|||
5053 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5054 | channelListRTIPlot = str(value)[1:-1] |
|
|||
5055 | self.bufferSpectra("RTI Plot", "Channel List", channelListRTIPlot) |
|
|||
5056 |
|
||||
5057 |
|
||||
5058 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
5059 | if value1 == None: |
|
|||
5060 | freq_vel = None |
|
|||
5061 | else: |
|
|||
5062 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5063 | value1 = str(value1) |
|
|||
5064 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5065 | if value2 == None: |
|
|||
5066 | freq_vel = None |
|
|||
5067 | else: |
|
|||
5068 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5069 | value2 = str(value2) |
|
|||
5070 | value = value1 + "," + value2 |
|
|||
5071 | tmintmax = value |
|
|||
5072 | self.bufferSpectra("RTI Plot", "Tmin,Tmax", tmintmax) |
|
|||
5073 |
|
||||
5074 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
|||
5075 | if parmObj == None: |
|
|||
5076 | timerange = None |
|
|||
5077 | else: |
|
|||
5078 | value = opObj.getParameterValue(parameterName='timerange') |
|
|||
5079 | timerange = str(value) |
|
|||
5080 | self.bufferSpectra("RTI Plot", "Time Range", timerange) |
|
|||
5081 |
|
||||
5082 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
5083 | if value1 == None: |
|
|||
5084 | heightsrange = None |
|
|||
5085 | else: |
|
|||
5086 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5087 | value1 = str(value1) |
|
|||
5088 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5089 | if value2 == None: |
|
|||
5090 | fheightsrange = None |
|
|||
5091 | else: |
|
|||
5092 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
5093 | value2 = str(value2) |
|
|||
5094 | value = value1 + "," + value2 |
|
|||
5095 | heightsrange = value |
|
|||
5096 | self.bufferSpectra("RTI Plot", "Height Range", heightsrange) |
|
|||
5097 |
|
||||
5098 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
|||
5099 | if value1 == None: |
|
|||
5100 | dBrange = None |
|
|||
5101 | else: |
|
|||
5102 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
|||
5103 | value1 = str(value1) |
|
|||
5104 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
|||
5105 | if value2 == None: |
|
|||
5106 | fdBrange = None |
|
|||
5107 | else: |
|
|||
5108 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
|||
5109 | value2 = str(value2) |
|
|||
5110 | value = value1 + "," + value2 |
|
|||
5111 | dbrange = value |
|
|||
5112 | self.bufferSpectra("RTI Plot", "dB Range", dbrange) |
|
|||
5113 |
|
||||
5114 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
5115 | if parmObj == None: |
|
|||
5116 | path = None |
|
|||
5117 | else: |
|
|||
5118 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5119 | self.bufferSpectra("RTI Plot", "Save Path", path) |
|
|||
5120 |
|
||||
5121 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
5122 | if parmObj == None: |
|
|||
5123 | status = 'disable' |
|
|||
5124 | else: |
|
|||
5125 | status = 'enable' |
|
|||
5126 | self.bufferSpectra("RTI Plot", "FTP", status) |
|
|||
5127 | self.showWr_Period(puObj, opObj, nameplotop="RTI Plot") |
|
|||
5128 | # self.saveFTPvalues(opObj) |
|
|||
5129 |
|
||||
5130 | opObj = puObj.getOperationObj(name='CoherenceMap') |
|
|||
5131 | # opObj = puObj.getOpObjfromParamValue(value="CoherenceMap") |
|
|||
5132 | if opObj == None: |
|
|||
5133 | self.specGraphCebCoherencmap.setCheckState(0) |
|
|||
5134 | operationCoherenceMap = "Disabled" |
|
|||
5135 | channelList = None |
|
|||
5136 | freq_vel = None |
|
|||
5137 | heightsrange = None |
|
|||
5138 | else: |
|
|||
5139 | operationCoherenceMap = "Enable" |
|
|||
5140 | self.specGraphCebCoherencmap.setCheckState(QtCore.Qt.Checked) |
|
|||
5141 | self.bufferSpectra("Coherence Map Plot", "Operation", operationCoherenceMap) |
|
|||
5142 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5143 | if parmObj == None: |
|
|||
5144 | channelListRTIPlot = None |
|
|||
5145 | else: |
|
|||
5146 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5147 | channelListRTIPlot = str(value)[1:-1] |
|
|||
5148 | self.bufferSpectra("Coherence Map Plot", "Channel List", channelListRTIPlot) |
|
|||
5149 |
|
||||
5150 |
|
||||
5151 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
5152 | if value1 == None: |
|
|||
5153 | freq_vel = None |
|
|||
5154 | else: |
|
|||
5155 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5156 | value1 = str(value1) |
|
|||
5157 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5158 | if value2 == None: |
|
|||
5159 | freq_vel = None |
|
|||
5160 | else: |
|
|||
5161 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5162 | value2 = str(value2) |
|
|||
5163 | value = value1 + "," + value2 |
|
|||
5164 | tmintmax = value |
|
|||
5165 | self.bufferSpectra("Coherence Map Plot", "Tmin,Tmax", tmintmax) |
|
|||
5166 |
|
||||
5167 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
|||
5168 | if parmObj == None: |
|
|||
5169 | timerange = None |
|
|||
5170 | else: |
|
|||
5171 | value = opObj.getParameterValue(parameterName='timerange') |
|
|||
5172 | timerange = str(value) |
|
|||
5173 | self.bufferSpectra("Coherence Map Plot", "Time Range", timerange) |
|
|||
5174 |
|
||||
5175 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
5176 | if value1 == None: |
|
|||
5177 | heightsrange = None |
|
|||
5178 | else: |
|
|||
5179 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5180 | value1 = str(value1) |
|
|||
5181 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5182 | if value2 == None: |
|
|||
5183 | fheightsrange = None |
|
|||
5184 | else: |
|
|||
5185 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
5186 | value2 = str(value2) |
|
|||
5187 | value = value1 + "," + value2 |
|
|||
5188 | heightsrange = value |
|
|||
5189 | self.bufferSpectra("Coherence Map Plot", "Height Range", heightsrange) |
|
|||
5190 |
|
||||
5191 | value1 = opObj.getParameterObj(parameterName='zmin') |
|
|||
5192 | if value1 == None: |
|
|||
5193 | dBrange = None |
|
|||
5194 | else: |
|
|||
5195 | value1 = opObj.getParameterValue(parameterName='zmin') |
|
|||
5196 | value1 = str(value1) |
|
|||
5197 | value2 = opObj.getParameterObj(parameterName='zmax') |
|
|||
5198 | if value2 == None: |
|
|||
5199 | fdBrange = None |
|
|||
5200 | else: |
|
|||
5201 | value2 = opObj.getParameterValue(parameterName='zmax') |
|
|||
5202 | value2 = str(value2) |
|
|||
5203 | value = value1 + "," + value2 |
|
|||
5204 | dbrange = value |
|
|||
5205 | self.bufferSpectra("Coherence Map Plot", "Magnitud", dbrange) |
|
|||
5206 |
|
||||
5207 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
5208 | if parmObj == None: |
|
|||
5209 | path = None |
|
|||
5210 | else: |
|
|||
5211 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5212 | self.bufferSpectra("Coherence Map Plot", "Save Path", path) |
|
|||
5213 |
|
||||
5214 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
5215 | if parmObj == None: |
|
|||
5216 | status = 'disable' |
|
|||
5217 | else: |
|
|||
5218 | status = 'enable' |
|
|||
5219 | self.bufferSpectra("Coherence Map Plot", "FTP", status) |
|
|||
5220 | self.showWr_Period(puObj, opObj, nameplotop="Coherence Map Plot") |
|
|||
5221 | # self.saveFTPvalues(opObj) |
|
|||
5222 |
|
||||
5223 |
|
||||
5224 | opObj = puObj.getOperationObj(name='PowerProfilePlot') |
|
|||
5225 | # opObj = puObj.getOpObjfromParamValue(value="PowerProfilePlot") |
|
|||
5226 | if opObj == None: |
|
|||
5227 | self.specGraphPowerprofile.setCheckState(0) |
|
|||
5228 | operationPowerProfilePlot = "Disabled" |
|
|||
5229 | channelList = None |
|
|||
5230 | freq_vel = None |
|
|||
5231 | heightsrange = None |
|
|||
5232 | else: |
|
|||
5233 | operationPowerProfilePlot = "Enable" |
|
|||
5234 | self.specGraphPowerprofile.setCheckState(QtCore.Qt.Checked) |
|
|||
5235 | self.bufferSpectra("PowerProfile Plot", "Operation", operationPowerProfilePlot) |
|
|||
5236 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5237 | if parmObj == None: |
|
|||
5238 | channelListSpectraPlot = None |
|
|||
5239 | else: |
|
|||
5240 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5241 | channelListSpectraPlot = str(value)[1:-1] |
|
|||
5242 | self.bufferSpectra("PowerProfile Plot", "Channel List", channelListSpectraPlot) |
|
|||
5243 |
|
||||
5244 |
|
||||
5245 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
5246 | if value1 == None: |
|
|||
5247 | freq_vel = None |
|
|||
5248 | else: |
|
|||
5249 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5250 | value1 = str(value1) |
|
|||
5251 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5252 | if value2 == None: |
|
|||
5253 | freq_vel = None |
|
|||
5254 | else: |
|
|||
5255 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5256 | value2 = str(value2) |
|
|||
5257 | value = value1 + "," + value2 |
|
|||
5258 | dbrange = value |
|
|||
5259 | self.bufferSpectra("PowerProfile Plot", "dbRange", dbrange) |
|
|||
5260 |
|
||||
5261 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
5262 | if value1 == None: |
|
|||
5263 | heightsrange = None |
|
|||
5264 | else: |
|
|||
5265 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5266 | value1 = str(value1) |
|
|||
5267 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5268 | if value2 == None: |
|
|||
5269 | fheightsrange = None |
|
|||
5270 | else: |
|
|||
5271 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
5272 | value2 = str(value2) |
|
|||
5273 | value = value1 + "," + value2 |
|
|||
5274 | heightsrange = value |
|
|||
5275 | self.bufferSpectra("PowerProfile Plot", "Height Range", heightsrange) |
|
|||
5276 |
|
||||
5277 |
|
||||
5278 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
5279 | if parmObj == None: |
|
|||
5280 | path = None |
|
|||
5281 | else: |
|
|||
5282 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5283 | self.bufferSpectra("PowerProfile Plot", "Save Path", path) |
|
|||
5284 |
|
||||
5285 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
5286 | if parmObj == None: |
|
|||
5287 | status = 'disable' |
|
|||
5288 | else: |
|
|||
5289 | status = 'enable' |
|
|||
5290 | self.bufferSpectra("PowerProfile Plot", "FTP", status) |
|
|||
5291 | self.showWr_Period(puObj, opObj, nameplotop="PowerProfile Plot") |
|
|||
5292 | # self.saveFTPvalues(opObj) |
|
|||
5293 |
|
||||
5294 | # noise |
|
|||
5295 | opObj = puObj.getOperationObj(name='Noise') |
|
|||
5296 | # opObj = puObj.getOpObjfromParamValue(value="Noise") |
|
|||
5297 | if opObj == None: |
|
|||
5298 | self.specGraphCebRTInoise.setCheckState(0) |
|
|||
5299 | operationRTINoise = "Disabled" |
|
|||
5300 | channelList = None |
|
|||
5301 | freq_vel = None |
|
|||
5302 | dbRange = None |
|
|||
5303 | else: |
|
|||
5304 | operationRTINoise = "Enable" |
|
|||
5305 | self.specGraphCebRTInoise.setCheckState(QtCore.Qt.Checked) |
|
|||
5306 | self.bufferSpectra("Noise Plot", "Operation", operationRTINoise) |
|
|||
5307 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5308 | if parmObj == None: |
|
|||
5309 | channelListRTINoise = None |
|
|||
5310 | else: |
|
|||
5311 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5312 | channelListRTINoise = str(value)[1:-1] |
|
|||
5313 | self.bufferSpectra("Noise Plot", "Channel List", channelListRTINoise) |
|
|||
5314 |
|
||||
5315 |
|
||||
5316 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
5317 | if value1 == None: |
|
|||
5318 | freq_vel = None |
|
|||
5319 | else: |
|
|||
5320 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5321 | value1 = str(value1) |
|
|||
5322 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5323 | if value2 == None: |
|
|||
5324 | freq_vel = None |
|
|||
5325 | else: |
|
|||
5326 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5327 | value2 = str(value2) |
|
|||
5328 | value = value1 + "," + value2 |
|
|||
5329 | tmintmax = value |
|
|||
5330 | self.bufferSpectra("Noise Plot", "Tmin,Tmax", tmintmax) |
|
|||
5331 |
|
||||
5332 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
|||
5333 | if parmObj == None: |
|
|||
5334 | timerange = None |
|
|||
5335 | else: |
|
|||
5336 | value = opObj.getParameterValue(parameterName='timerange') |
|
|||
5337 | timerange = str(value) |
|
|||
5338 | self.bufferSpectra("Noise Plot", "Time Range", timerange) |
|
|||
5339 |
|
||||
5340 |
|
||||
5341 |
|
||||
5342 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
|||
5343 | if value1 == None: |
|
|||
5344 | DBrange = None |
|
|||
5345 | else: |
|
|||
5346 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5347 | value1 = str(value1) |
|
|||
5348 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5349 | if value2 == None: |
|
|||
5350 | fdBrange = None |
|
|||
5351 | else: |
|
|||
5352 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
|||
5353 | value2 = str(value2) |
|
|||
5354 | value = value1 + "," + value2 |
|
|||
5355 | dBrange = value |
|
|||
5356 | self.bufferSpectra("Noise Plot", "dB Range", dBrange) |
|
|||
5357 |
|
||||
5358 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
|||
5359 | if parmObj == None: |
|
|||
5360 | path = None |
|
|||
5361 | else: |
|
|||
5362 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5363 | self.bufferSpectra("Noise Plot", "Save Path", path) |
|
|||
5364 |
|
||||
5365 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
|||
5366 | if parmObj == None: |
|
|||
5367 | status = 'disable' |
|
|||
5368 | else: |
|
|||
5369 | status = 'enable' |
|
|||
5370 | self.bufferSpectra("Noise Plot", "FTP", status) |
|
|||
5371 | self.showWr_Period(puObj, opObj, nameplotop="Noise Plot") |
|
|||
5372 | # self.saveFTPvalues(opObj) |
|
|||
5373 |
|
||||
5374 | # outputSpectraWrite |
|
|||
5375 | opObj = puObj.getOperationObj(name='SpectraWriter') |
|
|||
5376 | if opObj == None: |
|
|||
5377 | pass |
|
|||
5378 | else: |
|
|||
5379 | operation = 'Enabled' |
|
|||
5380 | self.bufferSpectra("Output", "Operation", operation) |
|
|||
5381 | value = opObj.getParameterObj(parameterName='path') |
|
|||
5382 | if value == None: |
|
|||
5383 | path = None |
|
|||
5384 | else: |
|
|||
5385 | value = opObj.getParameterValue(parameterName='path') |
|
|||
5386 | path = str(value) |
|
|||
5387 | self.bufferSpectra("Output", "Path", path) |
|
|||
5388 | value = opObj.getParameterObj(parameterName='blocksPerFile') |
|
|||
5389 | if value == None: |
|
|||
5390 | blocksperfile = None |
|
|||
5391 | else: |
|
|||
5392 | value = opObj.getParameterValue(parameterName='blocksPerFile') |
|
|||
5393 | blocksperfile = str(value) |
|
|||
5394 | self.bufferSpectra("Output", "BlocksPerFile", blocksperfile) |
|
|||
5395 | value = opObj.getParameterObj(parameterName='profilesPerBlock') |
|
|||
5396 | if value == None: |
|
|||
5397 | profilesPerBlock = None |
|
|||
5398 | else: |
|
|||
5399 | value = opObj.getParameterValue(parameterName='profilesPerBlock') |
|
|||
5400 | profilesPerBlock = str(value) |
|
|||
5401 | self.bufferSpectra("Output", "ProfilesPerBlock", profilesPerBlock) |
|
|||
5402 |
|
||||
5403 | projectObj = self.getSelectedProjectObj() |
|
|||
5404 | ftpProcUnitConfObj = projectObj.getProcUnitObjByName(name="SendToServer") |
|
|||
5405 |
|
||||
5406 | if ftpProcUnitConfObj: |
|
|||
5407 |
|
||||
5408 | opObj = ftpProcUnitConfObj.getOperationObj(name='run') |
|
|||
5409 |
|
||||
5410 | server = opObj.getParameterValue(parameterName='server') |
|
|||
5411 | folder = opObj.getParameterValue(parameterName='remotefolder') |
|
|||
5412 | username = opObj.getParameterValue(parameterName='username') |
|
|||
5413 | password = opObj.getParameterValue(parameterName='password') |
|
|||
5414 | ftp_wei = opObj.getParameterValue(parameterName='ftp_wei') |
|
|||
5415 | exp_code = opObj.getParameterValue(parameterName='exp_code') |
|
|||
5416 | sub_exp_code = opObj.getParameterValue(parameterName='sub_exp_code') |
|
|||
5417 | plot_pos = opObj.getParameterValue(parameterName='plot_pos') |
|
|||
5418 | localfolder = opObj.getParameterValue(parameterName='localfolder') |
|
|||
5419 |
|
||||
5420 | self.bufferSpectra("FTP", "Server", server) |
|
|||
5421 | self.bufferSpectra("FTP", "Remote folder", folder) |
|
|||
5422 | self.bufferSpectra("FTP", "Local folder", localfolder) |
|
|||
5423 | self.bufferSpectra("FTP", "Username", username) |
|
|||
5424 | self.bufferSpectra("FTP", "Password", '*'*len(password)) |
|
|||
5425 | self.bufferSpectra("FTP", "Ftp_wei", ftp_wei) |
|
|||
5426 | self.bufferSpectra("FTP", "Exp_code", exp_code) |
|
|||
5427 | self.bufferSpectra("FTP", "Sub_exp_code", sub_exp_code) |
|
|||
5428 | self.bufferSpectra("FTP", "Plot_pos", plot_pos) |
|
|||
5429 |
|
||||
5430 | # set model PU Properties |
|
|||
5431 |
|
||||
5432 | self.propertiesModel = TreeModel() |
|
|||
5433 | self.propertiesModel.showProperties(self.specProperCaracteristica, self.specProperPrincipal, self.specProperDescripcion) |
|
|||
5434 |
|
||||
5435 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
|||
5436 | self.treeProjectProperties.expandAll() |
|
|||
5437 | self.treeProjectProperties.allColumnsShowFocus() |
|
|||
5438 | self.treeProjectProperties.resizeColumnToContents(0) |
|
|||
5439 | self.treeProjectProperties.resizeColumnToContents(1) |
|
|||
5440 |
|
||||
5441 | self.specProperCaracteristica = [] |
|
|||
5442 | self.specProperDescripcion = [] |
|
|||
5443 | self.specProperPrincipal = [] |
|
|||
5444 |
|
||||
5445 |
|
||||
5446 | def bufferSpectraHeis(self, caracteristica, principal, description): |
|
|||
5447 | self.specHeisProperCaracteristica.append(caracteristica) |
|
|||
5448 | self.specHeisProperPrincipal.append(principal) |
|
|||
5449 | self.specHeisProperDescripcion.append(description) |
|
|||
5450 | return self.specHeisProperCaracteristica, self.specHeisProperPrincipal, self.specHeisProperDescripcion |
|
|||
5451 |
|
||||
5452 |
|
||||
5453 | def showPUSpectraHeisProperties(self, puObj): |
|
|||
5454 | type = puObj.name |
|
|||
5455 | self.bufferSpectraHeis("Processing Unit", "Type", type) |
|
|||
5456 |
|
||||
5457 | opObj = puObj.getOperationObj(name="IncohInt4SpectraHeis") |
|
|||
5458 | if opObj == None: |
|
|||
5459 | incoherentintegration = None |
|
|||
5460 | else: |
|
|||
5461 | value = opObj.getParameterValue(parameterName='timeInterval') |
|
|||
5462 | value = float(value) |
|
|||
5463 | incoherentintegration = str(value) |
|
|||
5464 | self.bufferSpectraHeis("Processing Unit", "Incoherent Integration", incoherentintegration) |
|
|||
5465 | # spectraheis graph |
|
|||
5466 | opObj = puObj.getOperationObj(name='SpectraHeisScope') |
|
|||
5467 | # opObj = puObj.getOpObjfromParamValue(value="SpectraHeisScope") |
|
|||
5468 | if opObj == None: |
|
|||
5469 | self.specHeisGraphCebSpectraplot.setCheckState(0) |
|
|||
5470 | operationSpectraHeisPlot = "Disabled" |
|
|||
5471 | xmin_xmax = None |
|
|||
5472 | ymin_ymax = None |
|
|||
5473 | channelListSpectraPlot = None |
|
|||
5474 | else: |
|
|||
5475 | operationSpectraHeisPlot = "Enable" |
|
|||
5476 | self.specHeisGraphCebSpectraplot.setCheckState(QtCore.Qt.Checked) |
|
|||
5477 | self.bufferSpectraHeis("SpectraHeis Plot", "Operation", operationSpectraHeisPlot) |
|
|||
5478 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5479 | if parmObj == None: |
|
|||
5480 | channelListSpectraPlot = None |
|
|||
5481 | else: |
|
|||
5482 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5483 | channelListSpectraPlot = str(value)[1:-1] |
|
|||
5484 | self.bufferSpectraHeis("SpectraHeis Plot", "Channel List", channelListSpectraPlot) |
|
|||
5485 |
|
||||
5486 |
|
||||
5487 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
|||
5488 | if value1 == None: |
|
|||
5489 | xmin_xmax = None |
|
|||
5490 | else: |
|
|||
5491 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5492 | value1 = str(value1) |
|
|||
5493 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5494 | if value2 == None: |
|
|||
5495 | xmin_xmax = None |
|
|||
5496 | else: |
|
|||
5497 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5498 | value2 = str(value2) |
|
|||
5499 | value = value1 + "," + value2 |
|
|||
5500 | xmin_xmax = value |
|
|||
5501 | self.bufferSpectraHeis("SpectraHeis Plot", "Xmin-Xmax", xmin_xmax) |
|
|||
5502 |
|
4060 | |||
5503 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4061 | if fatherObj.getElementName() == 'Project': | |
5504 | if value1 == None: |
|
4062 | inputId = fatherObj.getReadUnitId() | |
5505 | ymin_ymax = None |
|
4063 | projectObjView = fatherObj | |
5506 | else: |
|
|||
5507 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5508 | value1 = str(value1) |
|
|||
5509 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5510 | if value2 == None: |
|
|||
5511 | ymin_ymax = None |
|
|||
5512 | else: |
|
4064 | else: | |
5513 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4065 | inputId = fatherObj.getId() | |
5514 | value2 = str(value2) |
|
4066 | projectObjView = self.getSelectedProjectObj() | |
5515 | value = value1 + "," + value2 |
|
|||
5516 | ymin_ymax = value |
|
|||
5517 | self.bufferSpectraHeis("SpectraHeis Plot", "Ymin-Ymax", ymin_ymax) |
|
|||
5518 |
|
4067 | |||
5519 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4068 | puObj = self.createProcUnitView(projectObjView, datatype, inputId) | |
5520 | if parmObj == None: |
|
|||
5521 | path = None |
|
|||
5522 | else: |
|
|||
5523 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5524 | self.bufferSpectraHeis("SpectraHeis Plot", "Save Path", path) |
|
|||
5525 |
|
4069 | |||
5526 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4070 | self.addPU2ProjectExplorer(id=puObj.getId(), name=datatype) | |
5527 | if parmObj == None: |
|
|||
5528 | status = 'disable' |
|
|||
5529 | else: |
|
|||
5530 | status = 'enable' |
|
|||
5531 | self.bufferSpectraHeis("SpectraHeis Plot", "FTP", status) |
|
|||
5532 | self.showWr_Period(puObj, opObj, nameplotop="SpectraHeis Plot") |
|
|||
5533 | # self.saveFTPvalues(opObj) |
|
|||
5534 |
|
4071 | |||
5535 | opObj = puObj.getOperationObj(name='RTIfromSpectraHeis') |
|
4072 | self.showtabPUCreated(datatype) | |
5536 | # opObj = puObj.getOpObjfromParamValue(value="RTIfromSpectraHeis") |
|
|||
5537 | if opObj == None: |
|
|||
5538 | self.specHeisGraphCebRTIplot.setCheckState(0) |
|
|||
5539 | operationRTIPlot = "Disabled" |
|
|||
5540 | channelList = None |
|
|||
5541 | freq_vel = None |
|
|||
5542 | heightsrange = None |
|
|||
5543 | else: |
|
|||
5544 | operationRTIPlot = "Enable" |
|
|||
5545 | self.specHeisGraphCebRTIplot.setCheckState(QtCore.Qt.Checked) |
|
|||
5546 | self.bufferSpectraHeis("RTIHeis Plot", "Operation", operationRTIPlot) |
|
|||
5547 | parmObj = opObj.getParameterObj(parameterName='channelList') |
|
|||
5548 | if parmObj == None: |
|
|||
5549 | channelListRTIPlot = None |
|
|||
5550 | else: |
|
|||
5551 | value = opObj.getParameterValue(parameterName='channelList') |
|
|||
5552 | channelListRTIPlot = str(value)[1:-1] |
|
|||
5553 | self.bufferSpectraHeis("RTIHeis Plot", "Channel List", channelListRTIPlot) |
|
|||
5554 |
|
4073 | |||
|
4074 | self.clearPUWindow(datatype) | |||
5555 |
|
4075 | |||
5556 | value1 = opObj.getParameterObj(parameterName='xmin') |
|
4076 | self.showPUinitView() | |
5557 | if value1 == None: |
|
|||
5558 | freq_vel = None |
|
|||
5559 | else: |
|
|||
5560 | value1 = opObj.getParameterValue(parameterName='xmin') |
|
|||
5561 | value1 = str(value1) |
|
|||
5562 | value2 = opObj.getParameterObj(parameterName='xmax') |
|
|||
5563 | if value2 == None: |
|
|||
5564 | freq_vel = None |
|
|||
5565 | else: |
|
|||
5566 | value2 = opObj.getParameterValue(parameterName='xmax') |
|
|||
5567 | value2 = str(value2) |
|
|||
5568 | value = value1 + "," + value2 |
|
|||
5569 | tmintmax = value |
|
|||
5570 | self.bufferSpectraHeis("RTIHeis Plot", "Tmin,Tmax", tmintmax) |
|
|||
5571 |
|
4077 | |||
5572 | parmObj = opObj.getParameterObj(parameterName='timerange') |
|
4078 | def addFTPConf2Operation(self, puObj, opObj): | |
5573 | if parmObj == None: |
|
|||
5574 | timerange = None |
|
|||
5575 | else: |
|
|||
5576 | value = opObj.getParameterValue(parameterName='timerange') |
|
|||
5577 | timerange = str(value) |
|
|||
5578 | self.bufferSpectraHeis("RTIHeis Plot", "Time Range", timerange) |
|
|||
5579 |
|
4079 | |||
5580 | value1 = opObj.getParameterObj(parameterName='ymin') |
|
4080 | if self.temporalFTP.create: | |
5581 | if value1 == None: |
|
4081 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
5582 | heightsrange = None |
|
|||
5583 | else: |
|
|||
5584 | value1 = opObj.getParameterValue(parameterName='ymin') |
|
|||
5585 | value1 = str(value1) |
|
|||
5586 | value2 = opObj.getParameterObj(parameterName='ymax') |
|
|||
5587 | if value2 == None: |
|
|||
5588 | fheightsrange = None |
|
|||
5589 | else: |
|
4082 | else: | |
5590 | value2 = opObj.getParameterValue(parameterName='ymax') |
|
4083 | self.temporalFTP.setwithoutconfiguration() | |
5591 | value2 = str(value2) |
|
4084 | server, remotefolder, username, password, ftp_wei, exp_code, sub_exp_code, plot_pos = self.temporalFTP.recover() | |
5592 | value = value1 + "," + value2 |
|
|||
5593 | heightsrange = value |
|
|||
5594 | self.bufferSpectraHeis("RTIHeis Plot", "Ymin-Ymax", heightsrange) |
|
|||
5595 |
|
4085 | |||
5596 | parmObj = opObj.getParameterObj(parameterName="figpath") |
|
4086 | # opObj.addParameter(name='server', value=server, format='str') | |
5597 | if parmObj == None: |
|
4087 | # opObj.addParameter(name='folder', value=remotefolder, format='str') | |
5598 | path = None |
|
4088 | # opObj.addParameter(name='username', value=username, format='str') | |
5599 | else: |
|
4089 | # opObj.addParameter(name='password', value=password, format='str') | |
5600 | path = opObj.getParameterValue(parameterName='figpath') |
|
|||
5601 | self.bufferSpectraHeis("RTIHeis Plot", "Save Path", path) |
|
|||
5602 |
|
4090 | |||
5603 | parmObj = opObj.getParameterObj(parameterName="ftp") |
|
4091 | if ftp_wei: | |
5604 | if parmObj == None: |
|
4092 | opObj.addParameter(name='ftp_wei', value=int(ftp_wei), format='int') | |
5605 | status = 'disable' |
|
4093 | if exp_code: | |
5606 | else: |
|
4094 | opObj.addParameter(name='exp_code', value=int(exp_code), format='int') | |
5607 | status = 'enable' |
|
4095 | if sub_exp_code: | |
5608 | self.bufferSpectraHeis("RTIHeis Plot", "FTP", status) |
|
4096 | opObj.addParameter(name='sub_exp_code', value=int(sub_exp_code), format='int') | |
5609 | self.showWr_Period(puObj, opObj, nameplotop="RTIHeis Plot") |
|
4097 | if plot_pos: | |
5610 | # self.saveFTPvalues(opObj) |
|
4098 | opObj.addParameter(name='plot_pos', value=int(plot_pos), format='int') | |
5611 |
|
4099 | |||
5612 | # outputSpectraHeisWrite |
|
4100 | if puObj.datatype == "Spectra": | |
5613 | opObj = puObj.getOperationObj(name='FitsWriter') |
|
4101 | value = self.specGgraphftpratio.text() | |
5614 |
if |
|
4102 | if puObj.datatype == "SpectraHeis": | |
|
4103 | value = self.specHeisGgraphftpratio.text() | |||
|
4104 | ||||
|
4105 | if not value == "": | |||
|
4106 | try: | |||
|
4107 | value = int(value) | |||
|
4108 | opObj.addParameter(name='wr_period', value=value, format='int') | |||
|
4109 | except: | |||
5615 | pass |
|
4110 | pass | |
|
4111 | ||||
|
4112 | ||||
|
4113 | def addFTPProcUnitView(self, server, username, password, remotefolder, | |||
|
4114 | ftp_wei, exp_code, sub_exp_code, plot_pos, | |||
|
4115 | localfolder='./', extension='.png', period='60', protocol='ftp'): | |||
|
4116 | ||||
|
4117 | projectObj = self.getSelectedProjectObj() | |||
|
4118 | procUnitConfObj = projectObj.getProcUnitObjByName(name="SendToServer") | |||
|
4119 | ||||
|
4120 | if not procUnitConfObj: | |||
|
4121 | procUnitConfObj = projectObj.addProcUnit(name="SendToServer") | |||
5616 | else: |
|
4122 | else: | |
5617 | operation = 'Enabled' |
|
4123 | procUnitConfObj.removeOperations() | |
5618 | self.bufferSpectraHeis("Output", "Operation", operation) |
|
4124 | ||
5619 | value = opObj.getParameterObj(parameterName='path') |
|
4125 | procUnitConfObj.addParameter(name='server', value=server, format='str') | |
5620 | if value == None: |
|
4126 | procUnitConfObj.addParameter(name='username', value=username, format='str') | |
5621 | path = None |
|
4127 | procUnitConfObj.addParameter(name='password', value=password, format='str') | |
5622 | else: |
|
4128 | procUnitConfObj.addParameter(name='localfolder', value=localfolder, format='str') | |
5623 | value = opObj.getParameterValue(parameterName='path') |
|
4129 | procUnitConfObj.addParameter(name='remotefolder', value=remotefolder, format='str') | |
5624 | path = str(value) |
|
4130 | procUnitConfObj.addParameter(name='ext', value=extension, format='str') | |
5625 | self.bufferSpectraHeis("Output", "Path", path) |
|
4131 | procUnitConfObj.addParameter(name='period', value=period, format='int') | |
5626 | value = opObj.getParameterObj(parameterName='dataBlocksPerFile') |
|
4132 | procUnitConfObj.addParameter(name='protocol', value=protocol, format='str') | |
5627 | if value == None: |
|
4133 | ||
5628 | blocksperfile = None |
|
4134 | procUnitConfObj.addParameter(name='ftp_wei', value=ftp_wei, format='str') | |
5629 | else: |
|
4135 | procUnitConfObj.addParameter(name='exp_code', value=exp_code, format='str') | |
5630 | value = opObj.getParameterValue(parameterName='dataBlocksPerFile') |
|
4136 | procUnitConfObj.addParameter(name='sub_exp_code', value=sub_exp_code, format='str') | |
5631 | blocksperfile = str(value) |
|
4137 | procUnitConfObj.addParameter(name='plot_pos', value=plot_pos, format='str') | |
5632 | self.bufferSpectraHeis("Output", "BlocksPerFile", blocksperfile) |
|
4138 | ||
5633 | value = opObj.getParameterObj(parameterName='metadatafile') |
|
4139 | self.__puObjDict[procUnitConfObj.getId()] = procUnitConfObj | |
5634 | if value == None: |
|
4140 | ||
5635 | metadata = None |
|
4141 | self.__ftpProcUnitAdded = True | |
5636 | else: |
|
4142 | self.__ftpProcUnitId = procUnitConfObj.getId() | |
5637 | value = opObj.getParameterValue(parameterName='metadatafile') |
|
4143 | ||
5638 | metadata = str(value) |
|
4144 | def removeFTPProcUnitView(self): | |
5639 | self.bufferSpectraHeis("Output", "Metadata", metadata) |
|
|||
5640 |
|
4145 | |||
5641 | projectObj = self.getSelectedProjectObj() |
|
4146 | projectObj = self.getSelectedProjectObj() | |
5642 |
|
|
4147 | procUnitConfObj = projectObj.getProcUnitObjByName(name="SendToServer") | |
5643 |
|
4148 | |||
5644 | if ftpProcUnitConfObj: |
|
4149 | self.__ftpProcUnitAdded = False | |
|
4150 | self.__ftpProcUnitId = None | |||
5645 |
|
4151 | |||
5646 | opObj = ftpProcUnitConfObj.getOperationObj(name='run') |
|
4152 | if not procUnitConfObj: | |
|
4153 | return | |||
5647 |
|
4154 | |||
5648 | server = opObj.getParameterValue(parameterName='server') |
|
4155 | projectObj.removeProcUnit(procUnitConfObj.getId()) | |
5649 | folder = opObj.getParameterValue(parameterName='folder') |
|
|||
5650 | username = opObj.getParameterValue(parameterName='username') |
|
|||
5651 | password = opObj.getParameterValue(parameterName='password') |
|
|||
5652 | ftp_wei = opObj.getParameterValue(parameterName='ftp_wei') |
|
|||
5653 | exp_code = opObj.getParameterValue(parameterName='exp_code') |
|
|||
5654 | sub_exp_code = opObj.getParameterValue(parameterName='sub_exp_code') |
|
|||
5655 | plot_pos = opObj.getParameterValue(parameterName='plot_pos') |
|
|||
5656 | localfolder = opObj.getParameterValue(parameterName='localfolder') |
|
|||
5657 |
|
4156 | |||
5658 | self.bufferSpectraHeis("FTP", "Server", server) |
|
4157 | if procUnitConfObj.getId() not in self.__puObjDict.keys(): | |
5659 | self.bufferSpectraHeis("FTP", "Remote folder", folder) |
|
4158 | return | |
5660 | self.bufferSpectraHeis("FTP", "Local folder", localfolder) |
|
|||
5661 | self.bufferSpectraHeis("FTP", "Username", username) |
|
|||
5662 | self.bufferSpectraHeis("FTP", "Password", '*'*len(password)) |
|
|||
5663 | self.bufferSpectraHeis("FTP", "Ftp_wei", ftp_wei) |
|
|||
5664 | self.bufferSpectraHeis("FTP", "Exp_code", exp_code) |
|
|||
5665 | self.bufferSpectraHeis("FTP", "Sub_exp_code", sub_exp_code) |
|
|||
5666 | self.bufferSpectraHeis("FTP", "Plot_pos", plot_pos) |
|
|||
5667 |
|
4159 | |||
5668 | # set model PU Properties |
|
4160 | self.__puObjDict.pop(procUnitConfObj.getId()) | |
5669 |
|
4161 | |||
|
4162 | def showPUinitView(self): | |||
5670 | self.propertiesModel = TreeModel() |
|
4163 | self.propertiesModel = TreeModel() | |
5671 | self.propertiesModel.showProperties(self.specHeisProperCaracteristica, self.specHeisProperPrincipal, self.specHeisProperDescripcion) |
|
4164 | self.propertiesModel.initPUVoltageView() | |
5672 |
|
||||
5673 | self.treeProjectProperties.setModel(self.propertiesModel) |
|
4165 | self.treeProjectProperties.setModel(self.propertiesModel) | |
5674 | self.treeProjectProperties.expandAll() |
|
4166 | self.treeProjectProperties.expandAll() | |
5675 | self.treeProjectProperties.allColumnsShowFocus() |
|
4167 | self.treeProjectProperties.allColumnsShowFocus() | |
5676 | self.treeProjectProperties.resizeColumnToContents(0) |
|
|||
5677 | self.treeProjectProperties.resizeColumnToContents(1) |
|
4168 | self.treeProjectProperties.resizeColumnToContents(1) | |
5678 |
|
4169 | |||
5679 | self.specHeisProperCaracteristica = [] |
|
|||
5680 | self.specHeisProperDescripcion = [] |
|
|||
5681 | self.specHeisProperPrincipal = [] |
|
|||
5682 |
|
||||
5683 |
|
||||
5684 | def showWr_Period(self, puObj, opObj, nameplotop): |
|
|||
5685 | parmObj = opObj.getParameterObj(parameterName='wr_period') |
|
|||
5686 | if parmObj == None: |
|
|||
5687 | wr_period = None |
|
|||
5688 | else: |
|
|||
5689 | value = opObj.getParameterValue(parameterName='wr_period') |
|
|||
5690 | wr_period = str(value) |
|
|||
5691 | if puObj.datatype == "Spectra": |
|
|||
5692 | self.bufferSpectra(nameplotop, "wr_period", wr_period) |
|
|||
5693 | if puObj.datatype == "SpectraHeis": |
|
|||
5694 | self.bufferSpectraHeis(nameplotop, "wr_period", wr_period) |
|
|||
5695 |
|
||||
5696 | def saveFTPvalues(self, opObj): |
|
4170 | def saveFTPvalues(self, opObj): | |
5697 |
|
4171 | |||
5698 | parmObj = opObj.getParameterObj(parameterName="server") |
|
4172 | parmObj = opObj.getParameterObj(parameterName="server") | |
@@ -5955,7 +4429,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
5955 | self.addPU2PELoadXML(id=puId , name=puObj.datatype , inputId=puObj.inputId) |
|
4429 | self.addPU2PELoadXML(id=puId , name=puObj.datatype , inputId=puObj.inputId) | |
5956 |
|
4430 | |||
5957 | if puObj.datatype in ("Voltage", "Spectra", "SpectraHeis"): |
|
4431 | if puObj.datatype in ("Voltage", "Spectra", "SpectraHeis"): | |
5958 |
self.refreshPUWindow(puObj |
|
4432 | self.refreshPUWindow(puObj) | |
5959 | self.refreshPUProperties(puObj) |
|
4433 | self.refreshPUProperties(puObj) | |
5960 | self.showtabPUCreated(datatype=puObj.datatype) |
|
4434 | self.showtabPUCreated(datatype=puObj.datatype) | |
5961 |
|
4435 | |||
@@ -6116,66 +4590,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
6116 | # print projectObj.procUnitConfObjDict |
|
4590 | # print projectObj.procUnitConfObjDict | |
6117 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict |
|
4591 | # print self.__itemTreeDict,self.__projectObjDict,self.__puObjDict | |
6118 |
|
4592 | |||
6119 | def getParmsFromProjectWindow(self): |
|
|||
6120 | """ |
|
|||
6121 | Return Inputs Project: |
|
|||
6122 | - id |
|
|||
6123 | - project_name |
|
|||
6124 | - datatype |
|
|||
6125 | - ext |
|
|||
6126 | - data_path |
|
|||
6127 | - readmode |
|
|||
6128 | - delay |
|
|||
6129 | - set |
|
|||
6130 | - walk |
|
|||
6131 | """ |
|
|||
6132 | project_name = str(self.proName.text()) |
|
|||
6133 | try: |
|
|||
6134 | name = str(self.proName.text()) |
|
|||
6135 | except: |
|
|||
6136 | self.console.clear() |
|
|||
6137 | self.console.append("Please Write a name") |
|
|||
6138 | return 0 |
|
|||
6139 |
|
||||
6140 | desc = str(self.proDescription.toPlainText()) |
|
|||
6141 | datatype = str(self.proComDataType.currentText()) |
|
|||
6142 | data_path = str(self.proDataPath.text()) |
|
|||
6143 | if not os.path.exists(data_path): |
|
|||
6144 | self.proOk.setEnabled(False) |
|
|||
6145 | self.console.clear() |
|
|||
6146 | self.console.append("Write a correct a path") |
|
|||
6147 | return |
|
|||
6148 |
|
||||
6149 | online = int(self.online) |
|
|||
6150 | if online == 0: |
|
|||
6151 | delay = 0 |
|
|||
6152 | set = 0 |
|
|||
6153 | else: |
|
|||
6154 | delay = self.proDelay.text() |
|
|||
6155 | try: |
|
|||
6156 | delay = int(self.proDelay.text()) |
|
|||
6157 | except: |
|
|||
6158 | self.console.clear() |
|
|||
6159 | self.console.append("Please Write a number for delay") |
|
|||
6160 | return 0 |
|
|||
6161 |
|
||||
6162 | set = self.proSet.text() |
|
|||
6163 | try: |
|
|||
6164 | set = int(self.proSet.text()) |
|
|||
6165 | except: |
|
|||
6166 | set = None |
|
|||
6167 |
|
||||
6168 |
|
||||
6169 | walk = int(self.walk) |
|
|||
6170 | starDate = str(self.proComStartDate.currentText()) |
|
|||
6171 | endDate = str(self.proComEndDate.currentText()) |
|
|||
6172 | reloj1 = self.proStartTime.time() |
|
|||
6173 | reloj2 = self.proEndTime.time() |
|
|||
6174 | startTime = str(reloj1.hour()) + ":" + str(reloj1.minute()) + ":" + str(reloj1.second()) |
|
|||
6175 | endTime = str(reloj2.hour()) + ":" + str(reloj2.minute()) + ":" + str(reloj2.second()) |
|
|||
6176 |
|
||||
6177 | return project_name, desc, datatype, data_path, starDate, endDate, startTime, endTime, online, delay, walk , set |
|
|||
6178 |
|
||||
6179 | def removefromtree(self, row): |
|
4593 | def removefromtree(self, row): | |
6180 | self.parentItem.removeRow(row) |
|
4594 | self.parentItem.removeRow(row) | |
6181 |
|
4595 | |||
@@ -6556,92 +4970,6 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
6556 | if datatype == "SpectraHeis": |
|
4970 | if datatype == "SpectraHeis": | |
6557 | return parms_ok, output_path, blocksperfile, metada |
|
4971 | return parms_ok, output_path, blocksperfile, metada | |
6558 |
|
4972 | |||
6559 | def searchData(self, data_path, ext, walk, expLabel=''): |
|
|||
6560 | dateList = [] |
|
|||
6561 | fileList = [] |
|
|||
6562 |
|
||||
6563 | if not os.path.exists(data_path): |
|
|||
6564 | return None |
|
|||
6565 |
|
||||
6566 | if walk == 0: |
|
|||
6567 | files = os.listdir(data_path) |
|
|||
6568 | for thisFile in files: |
|
|||
6569 | thisExt = os.path.splitext(thisFile)[-1] |
|
|||
6570 | if thisExt == ext: |
|
|||
6571 | fileList.append(thisFile) |
|
|||
6572 |
|
||||
6573 | for thisFile in fileList: |
|
|||
6574 | try: |
|
|||
6575 | year = int(thisFile[1:5]) |
|
|||
6576 | doy = int(thisFile[5:8]) |
|
|||
6577 |
|
||||
6578 | date = datetime.date(year, 1, 1) + datetime.timedelta(doy - 1) |
|
|||
6579 | dateformat = date.strftime("%Y/%m/%d") |
|
|||
6580 |
|
||||
6581 | if dateformat not in dateList: |
|
|||
6582 | dateList.append(dateformat) |
|
|||
6583 | except: |
|
|||
6584 | continue |
|
|||
6585 | # REVISION---------------------------------1 |
|
|||
6586 | if walk == 1: |
|
|||
6587 |
|
||||
6588 | dirList = os.listdir(data_path) |
|
|||
6589 |
|
||||
6590 | dirList.sort() |
|
|||
6591 |
|
||||
6592 | dateList = [] |
|
|||
6593 |
|
||||
6594 | for thisDir in dirList: |
|
|||
6595 |
|
||||
6596 | if not isRadarPath(thisDir): |
|
|||
6597 | self.console.clear() |
|
|||
6598 | self.console.append("Please, Choose the Correct Path") |
|
|||
6599 | self.proOk.setEnabled(False) |
|
|||
6600 | continue |
|
|||
6601 |
|
||||
6602 | doypath = os.path.join(data_path, thisDir, expLabel) |
|
|||
6603 | if not os.path.exists(doypath): |
|
|||
6604 | self.console.clear() |
|
|||
6605 | self.console.append("Please, Choose the Correct Path") |
|
|||
6606 | return |
|
|||
6607 | files = os.listdir(doypath) |
|
|||
6608 | fileList = [] |
|
|||
6609 |
|
||||
6610 | for thisFile in files: |
|
|||
6611 | thisExt = os.path.splitext(thisFile)[-1] |
|
|||
6612 | if thisExt != ext: |
|
|||
6613 | self.console.clear() |
|
|||
6614 | self.console.append("There is no datatype selected in the Path Directory") |
|
|||
6615 | self.proOk.setEnabled(False) |
|
|||
6616 | continue |
|
|||
6617 |
|
||||
6618 | if not isRadarFile(thisFile): |
|
|||
6619 | self.proOk.setEnabled(False) |
|
|||
6620 | self.console.clear() |
|
|||
6621 | self.console.append("Please, Choose the Correct Path") |
|
|||
6622 | continue |
|
|||
6623 |
|
||||
6624 | fileList.append(thisFile) |
|
|||
6625 | break |
|
|||
6626 |
|
||||
6627 | if fileList == []: |
|
|||
6628 | continue |
|
|||
6629 |
|
||||
6630 | year = int(thisDir[1:5]) |
|
|||
6631 | doy = int(thisDir[5:8]) |
|
|||
6632 |
|
||||
6633 | date = datetime.date(year, 1, 1) + datetime.timedelta(doy - 1) |
|
|||
6634 | dateformat = date.strftime("%Y/%m/%d") |
|
|||
6635 | dateList.append(dateformat) |
|
|||
6636 |
|
||||
6637 | if len(dateList) > 0: |
|
|||
6638 | self.proOk.setEnabled(True) |
|
|||
6639 | return dateList |
|
|||
6640 |
|
||||
6641 |
|
||||
6642 | # self.proOk.setEnabled(False) |
|
|||
6643 | return None |
|
|||
6644 |
|
||||
6645 | def findDatafiles(self, data_path, ext, walk, expLabel=''): |
|
4973 | def findDatafiles(self, data_path, ext, walk, expLabel=''): | |
6646 |
|
4974 | |||
6647 | dateList = [] |
|
4975 | dateList = [] | |
@@ -6921,7 +5249,7 class BasicWindow(QMainWindow, Ui_BasicWindow): | |||||
6921 | self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME') |
|
5249 | self.specGraphPrefix.setToolTip('Example: EXPERIMENT_NAME') | |
6922 |
|
5250 | |||
6923 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) |
|
5251 | sys.stdout = ShowMeConsole(textWritten=self.normalOutputWritten) | |
6924 |
|
|
5252 | sys.stderr = ShowMeConsole(textWritten=self.errorOutputWritten) | |
6925 |
|
5253 | |||
6926 |
|
5254 | |||
6927 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): |
|
5255 | class UnitProcessWindow(QMainWindow, Ui_UnitProcess): |
@@ -135,184 +135,217 class Ui_SpectraTab(object): | |||||
135 | self.specOpgetNoise.setObjectName(_fromUtf8("specOpgetNoise")) |
|
135 | self.specOpgetNoise.setObjectName(_fromUtf8("specOpgetNoise")) | |
136 | self.gridLayout_5.addWidget(self.specOpgetNoise, 16, 3, 1, 2) |
|
136 | self.gridLayout_5.addWidget(self.specOpgetNoise, 16, 3, 1, 2) | |
137 | self.tabWidgetSpectra.addTab(self.tabopSpectra, _fromUtf8("")) |
|
137 | self.tabWidgetSpectra.addTab(self.tabopSpectra, _fromUtf8("")) | |
|
138 | ||||
|
139 | ||||
138 | self.tabgraphSpectra = QtGui.QWidget() |
|
140 | self.tabgraphSpectra = QtGui.QWidget() | |
139 | self.tabgraphSpectra.setObjectName(_fromUtf8("tabgraphSpectra")) |
|
141 | self.tabgraphSpectra.setObjectName(_fromUtf8("tabgraphSpectra")) | |
140 | self.gridLayout_9 = QtGui.QGridLayout(self.tabgraphSpectra) |
|
142 | self.gridLayout_9 = QtGui.QGridLayout(self.tabgraphSpectra) | |
141 | self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) |
|
143 | self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) | |
142 | self.label_44 = QtGui.QLabel(self.tabgraphSpectra) |
|
144 | ||
143 | self.label_44.setObjectName(_fromUtf8("label_44")) |
|
|||
144 | self.gridLayout_9.addWidget(self.label_44, 10, 0, 1, 1) |
|
|||
145 | spacerItem14 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
145 | spacerItem14 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
146 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) |
|
146 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) | |
147 | self.label_20 = QtGui.QLabel(self.tabgraphSpectra) |
|
147 | ||
148 | self.label_20.setObjectName(_fromUtf8("label_20")) |
|
|||
149 | self.gridLayout_9.addWidget(self.label_20, 21, 0, 1, 1) |
|
|||
150 | self.specGraphSaveRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
|||
151 | self.specGraphSaveRTInoise.setText(_fromUtf8("")) |
|
|||
152 | self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise")) |
|
|||
153 | self.gridLayout_9.addWidget(self.specGraphSaveRTInoise, 13, 4, 1, 1) |
|
|||
154 | self.specGgraphmagnitud = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
155 | self.specGgraphmagnitud.setObjectName(_fromUtf8("specGgraphmagnitud")) |
|
|||
156 | self.gridLayout_9.addWidget(self.specGgraphmagnitud, 20, 1, 1, 7) |
|
|||
157 | self.specGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectra) |
|
|||
158 | self.specGraphSaveSpectra.setText(_fromUtf8("")) |
|
|||
159 | self.specGraphSaveSpectra.setObjectName(_fromUtf8("specGraphSaveSpectra")) |
|
|||
160 | self.gridLayout_9.addWidget(self.specGraphSaveSpectra, 6, 4, 1, 1) |
|
|||
161 | self.specGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
162 | self.specGgraphChannelList.setObjectName(_fromUtf8("specGgraphChannelList")) |
|
|||
163 | self.gridLayout_9.addWidget(self.specGgraphChannelList, 15, 1, 1, 7) |
|
|||
164 | self.label_25 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
165 | self.label_25.setObjectName(_fromUtf8("label_25")) |
|
|||
166 | self.gridLayout_9.addWidget(self.label_25, 2, 0, 1, 1) |
|
|||
167 | self.specGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
168 | self.specGgraphTminTmax.setObjectName(_fromUtf8("specGgraphTminTmax")) |
|
|||
169 | self.gridLayout_9.addWidget(self.specGgraphTminTmax, 21, 1, 1, 7) |
|
|||
170 | spacerItem15 = QtGui.QSpacerItem(28, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
|||
171 | self.gridLayout_9.addItem(spacerItem15, 27, 6, 1, 2) |
|
|||
172 | spacerItem16 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
|||
173 | self.gridLayout_9.addItem(spacerItem16, 3, 5, 1, 1) |
|
|||
174 | self.label_42 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
175 | self.label_42.setObjectName(_fromUtf8("label_42")) |
|
|||
176 | self.gridLayout_9.addWidget(self.label_42, 9, 0, 1, 1) |
|
|||
177 | self.label_16 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
178 | self.label_16.setObjectName(_fromUtf8("label_16")) |
|
|||
179 | self.gridLayout_9.addWidget(self.label_16, 18, 0, 1, 1) |
|
|||
180 | self.label_17 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
181 | self.label_17.setObjectName(_fromUtf8("label_17")) |
|
|||
182 | self.gridLayout_9.addWidget(self.label_17, 19, 0, 1, 1) |
|
|||
183 | self.label_18 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
184 | self.label_18.setObjectName(_fromUtf8("label_18")) |
|
|||
185 | self.gridLayout_9.addWidget(self.label_18, 20, 0, 1, 1) |
|
|||
186 | self.specGgraphFreq = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
187 | self.specGgraphFreq.setObjectName(_fromUtf8("specGgraphFreq")) |
|
|||
188 | self.gridLayout_9.addWidget(self.specGgraphFreq, 16, 1, 1, 7) |
|
|||
189 | self.specGgraphHeight = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
190 | self.specGgraphHeight.setObjectName(_fromUtf8("specGgraphHeight")) |
|
|||
191 | self.gridLayout_9.addWidget(self.specGgraphHeight, 18, 1, 1, 7) |
|
|||
192 | spacerItem17 = QtGui.QSpacerItem(49, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
|||
193 | self.gridLayout_9.addItem(spacerItem17, 27, 0, 1, 1) |
|
|||
194 | self.label_24 = QtGui.QLabel(self.tabgraphSpectra) |
|
148 | self.label_24 = QtGui.QLabel(self.tabgraphSpectra) | |
195 | self.label_24.setObjectName(_fromUtf8("label_24")) |
|
149 | self.label_24.setObjectName(_fromUtf8("label_24")) | |
196 | self.gridLayout_9.addWidget(self.label_24, 0, 0, 1, 1) |
|
150 | self.gridLayout_9.addWidget(self.label_24, 0, 0, 1, 1) | |
197 | self.specGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectra) |
|
151 | ||
198 | self.specGraphPrefix.setObjectName(_fromUtf8("specGraphPrefix")) |
|
|||
199 | self.gridLayout_9.addWidget(self.specGraphPrefix, 2, 1, 1, 7) |
|
|||
200 | self.specGgraphDbsrange = QtGui.QLineEdit(self.tabgraphSpectra) |
|
|||
201 | self.specGgraphDbsrange.setObjectName(_fromUtf8("specGgraphDbsrange")) |
|
|||
202 | self.gridLayout_9.addWidget(self.specGgraphDbsrange, 19, 1, 1, 7) |
|
|||
203 | self.label_46 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
204 | self.label_46.setObjectName(_fromUtf8("label_46")) |
|
|||
205 | self.gridLayout_9.addWidget(self.label_46, 11, 0, 1, 1) |
|
|||
206 | self.label_22 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
207 | self.label_22.setObjectName(_fromUtf8("label_22")) |
|
|||
208 | self.gridLayout_9.addWidget(self.label_22, 16, 0, 1, 1) |
|
|||
209 | self.specGraphPath = QtGui.QLineEdit(self.tabgraphSpectra) |
|
152 | self.specGraphPath = QtGui.QLineEdit(self.tabgraphSpectra) | |
210 | self.specGraphPath.setObjectName(_fromUtf8("specGraphPath")) |
|
153 | self.specGraphPath.setObjectName(_fromUtf8("specGraphPath")) | |
211 | self.gridLayout_9.addWidget(self.specGraphPath, 0, 1, 1, 6) |
|
154 | self.gridLayout_9.addWidget(self.specGraphPath, 0, 1, 1, 6) | |
212 | self.label_41 = QtGui.QLabel(self.tabgraphSpectra) |
|
155 | ||
213 | self.label_41.setObjectName(_fromUtf8("label_41")) |
|
|||
214 | self.gridLayout_9.addWidget(self.label_41, 8, 0, 1, 1) |
|
|||
215 | self.specGraphToolPath = QtGui.QToolButton(self.tabgraphSpectra) |
|
156 | self.specGraphToolPath = QtGui.QToolButton(self.tabgraphSpectra) | |
216 | self.specGraphToolPath.setObjectName(_fromUtf8("specGraphToolPath")) |
|
157 | self.specGraphToolPath.setObjectName(_fromUtf8("specGraphToolPath")) | |
217 | self.gridLayout_9.addWidget(self.specGraphToolPath, 0, 7, 1, 1) |
|
158 | self.gridLayout_9.addWidget(self.specGraphToolPath, 0, 7, 1, 1) | |
218 | self.label_6 = QtGui.QLabel(self.tabgraphSpectra) |
|
159 | ||
219 | self.label_6.setObjectName(_fromUtf8("label_6")) |
|
160 | self.label_25 = QtGui.QLabel(self.tabgraphSpectra) | |
220 | self.gridLayout_9.addWidget(self.label_6, 15, 0, 1, 1) |
|
161 | self.label_25.setObjectName(_fromUtf8("label_25")) | |
|
162 | self.gridLayout_9.addWidget(self.label_25, 2, 0, 1, 1) | |||
|
163 | self.specGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
164 | self.specGraphPrefix.setObjectName(_fromUtf8("specGraphPrefix")) | |||
|
165 | self.gridLayout_9.addWidget(self.specGraphPrefix, 2, 1, 1, 7) | |||
|
166 | ||||
|
167 | ||||
221 | self.label_40 = QtGui.QLabel(self.tabgraphSpectra) |
|
168 | self.label_40 = QtGui.QLabel(self.tabgraphSpectra) | |
222 | self.label_40.setObjectName(_fromUtf8("label_40")) |
|
169 | self.label_40.setObjectName(_fromUtf8("label_40")) | |
223 | self.gridLayout_9.addWidget(self.label_40, 6, 0, 1, 1) |
|
170 | self.gridLayout_9.addWidget(self.label_40, 6, 0, 1, 1) | |
|
171 | self.label_41 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
172 | self.label_41.setObjectName(_fromUtf8("label_41")) | |||
|
173 | self.gridLayout_9.addWidget(self.label_41, 8, 0, 1, 1) | |||
|
174 | self.label_42 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
175 | self.label_42.setObjectName(_fromUtf8("label_42")) | |||
|
176 | self.gridLayout_9.addWidget(self.label_42, 9, 0, 1, 1) | |||
|
177 | self.label_44 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
178 | self.label_44.setObjectName(_fromUtf8("label_44")) | |||
|
179 | self.gridLayout_9.addWidget(self.label_44, 10, 0, 1, 1) | |||
|
180 | self.label_46 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
181 | self.label_46.setObjectName(_fromUtf8("label_46")) | |||
|
182 | self.gridLayout_9.addWidget(self.label_46, 11, 0, 1, 1) | |||
|
183 | self.label_45 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
184 | self.label_45.setObjectName(_fromUtf8("label_45")) | |||
|
185 | self.gridLayout_9.addWidget(self.label_45, 13, 0, 1, 1) | |||
|
186 | ||||
|
187 | self.label_43 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
188 | self.label_43.setObjectName(_fromUtf8("label_43")) | |||
|
189 | self.gridLayout_9.addWidget(self.label_43, 3, 3, 2, 1) | |||
224 | self.specGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
190 | self.specGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
225 | self.specGraphCebSpectraplot.setText(_fromUtf8("")) |
|
191 | self.specGraphCebSpectraplot.setText(_fromUtf8("")) | |
226 | self.specGraphCebSpectraplot.setObjectName(_fromUtf8("specGraphCebSpectraplot")) |
|
192 | self.specGraphCebSpectraplot.setObjectName(_fromUtf8("specGraphCebSpectraplot")) | |
227 |
self.gridLayout_9.addWidget(self.specGraphCebSpectraplot, 6, |
|
193 | self.gridLayout_9.addWidget(self.specGraphCebSpectraplot, 6, 3, 1, 1) | |
228 | self.specGraphCebCrossSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
194 | self.specGraphCebCrossSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
229 | self.specGraphCebCrossSpectraplot.setText(_fromUtf8("")) |
|
195 | self.specGraphCebCrossSpectraplot.setText(_fromUtf8("")) | |
230 | self.specGraphCebCrossSpectraplot.setObjectName(_fromUtf8("specGraphCebCrossSpectraplot")) |
|
196 | self.specGraphCebCrossSpectraplot.setObjectName(_fromUtf8("specGraphCebCrossSpectraplot")) | |
231 |
self.gridLayout_9.addWidget(self.specGraphCebCrossSpectraplot, 8, |
|
197 | self.gridLayout_9.addWidget(self.specGraphCebCrossSpectraplot, 8, 3, 1, 1) | |
232 | self.specGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
198 | self.specGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
233 | self.specGraphCebRTIplot.setText(_fromUtf8("")) |
|
199 | self.specGraphCebRTIplot.setText(_fromUtf8("")) | |
234 | self.specGraphCebRTIplot.setObjectName(_fromUtf8("specGraphCebRTIplot")) |
|
200 | self.specGraphCebRTIplot.setObjectName(_fromUtf8("specGraphCebRTIplot")) | |
235 |
self.gridLayout_9.addWidget(self.specGraphCebRTIplot, 9, |
|
201 | self.gridLayout_9.addWidget(self.specGraphCebRTIplot, 9, 3, 1, 1) | |
236 | self.specGraphCebCoherencmap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
202 | self.specGraphCebCoherencmap = QtGui.QCheckBox(self.tabgraphSpectra) | |
237 | self.specGraphCebCoherencmap.setText(_fromUtf8("")) |
|
203 | self.specGraphCebCoherencmap.setText(_fromUtf8("")) | |
238 | self.specGraphCebCoherencmap.setObjectName(_fromUtf8("specGraphCebCoherencmap")) |
|
204 | self.specGraphCebCoherencmap.setObjectName(_fromUtf8("specGraphCebCoherencmap")) | |
239 |
self.gridLayout_9.addWidget(self.specGraphCebCoherencmap, 10, |
|
205 | self.gridLayout_9.addWidget(self.specGraphCebCoherencmap, 10, 3, 1, 1) | |
240 | self.specGraphPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
206 | self.specGraphPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
241 | self.specGraphPowerprofile.setText(_fromUtf8("")) |
|
207 | self.specGraphPowerprofile.setText(_fromUtf8("")) | |
242 | self.specGraphPowerprofile.setObjectName(_fromUtf8("specGraphPowerprofile")) |
|
208 | self.specGraphPowerprofile.setObjectName(_fromUtf8("specGraphPowerprofile")) | |
243 |
self.gridLayout_9.addWidget(self.specGraphPowerprofile, 11, |
|
209 | self.gridLayout_9.addWidget(self.specGraphPowerprofile, 11, 3, 1, 1) | |
|
210 | self.specGraphCebRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |||
|
211 | self.specGraphCebRTInoise.setText(_fromUtf8("")) | |||
|
212 | self.specGraphCebRTInoise.setObjectName(_fromUtf8("specGraphCebRTInoise")) | |||
|
213 | self.gridLayout_9.addWidget(self.specGraphCebRTInoise, 13, 3, 1, 1) | |||
|
214 | ||||
|
215 | # spacerItem18 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |||
|
216 | # self.gridLayout_9.addItem(spacerItem18, 4, 3, 1, 1) | |||
|
217 | ||||
|
218 | self.label_47 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
219 | self.label_47.setObjectName(_fromUtf8("label_47")) | |||
|
220 | self.gridLayout_9.addWidget(self.label_47, 3, 5, 2, 1) | |||
|
221 | self.specGraphSaveSpectra = QtGui.QCheckBox(self.tabgraphSpectra) | |||
|
222 | self.specGraphSaveSpectra.setText(_fromUtf8("")) | |||
|
223 | self.specGraphSaveSpectra.setObjectName(_fromUtf8("specGraphSaveSpectra")) | |||
|
224 | self.gridLayout_9.addWidget(self.specGraphSaveSpectra, 6, 5, 1, 1) | |||
244 | self.specGraphSaveCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
225 | self.specGraphSaveCross = QtGui.QCheckBox(self.tabgraphSpectra) | |
245 | self.specGraphSaveCross.setText(_fromUtf8("")) |
|
226 | self.specGraphSaveCross.setText(_fromUtf8("")) | |
246 | self.specGraphSaveCross.setObjectName(_fromUtf8("specGraphSaveCross")) |
|
227 | self.specGraphSaveCross.setObjectName(_fromUtf8("specGraphSaveCross")) | |
247 |
self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, |
|
228 | self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, 5, 1, 1) | |
248 |
self.specGraph |
|
229 | self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
249 |
self.specGraph |
|
230 | self.specGraphSaveRTIplot.setText(_fromUtf8("")) | |
250 |
self.specGraph |
|
231 | self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot")) | |
251 |
self.gridLayout_9.addWidget(self.specGraph |
|
232 | self.gridLayout_9.addWidget(self.specGraphSaveRTIplot, 9, 5, 1, 1) | |
252 | spacerItem18 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
|||
253 | self.gridLayout_9.addItem(spacerItem18, 4, 3, 1, 1) |
|
|||
254 | self.specGraphSavePowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
|||
255 | self.specGraphSavePowerprofile.setText(_fromUtf8("")) |
|
|||
256 | self.specGraphSavePowerprofile.setObjectName(_fromUtf8("specGraphSavePowerprofile")) |
|
|||
257 | self.gridLayout_9.addWidget(self.specGraphSavePowerprofile, 11, 4, 1, 1) |
|
|||
258 | self.specGraphSaveCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
233 | self.specGraphSaveCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) | |
259 | self.specGraphSaveCoherencemap.setText(_fromUtf8("")) |
|
234 | self.specGraphSaveCoherencemap.setText(_fromUtf8("")) | |
260 | self.specGraphSaveCoherencemap.setObjectName(_fromUtf8("specGraphSaveCoherencemap")) |
|
235 | self.specGraphSaveCoherencemap.setObjectName(_fromUtf8("specGraphSaveCoherencemap")) | |
261 |
self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, |
|
236 | self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, 5, 1, 1) | |
262 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
237 | self.specGraphSavePowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
263 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 1, 1) |
|
238 | self.specGraphSavePowerprofile.setText(_fromUtf8("")) | |
264 | self.specGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectra) |
|
239 | self.specGraphSavePowerprofile.setObjectName(_fromUtf8("specGraphSavePowerprofile")) | |
265 | self.specGgraphftpratio.setObjectName(_fromUtf8("specGgraphftpratio")) |
|
240 | self.gridLayout_9.addWidget(self.specGraphSavePowerprofile, 11, 5, 1, 1) | |
266 | self.gridLayout_9.addWidget(self.specGgraphftpratio, 23, 1, 1, 7) |
|
241 | self.specGraphSaveRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
267 | self.label_43 = QtGui.QLabel(self.tabgraphSpectra) |
|
242 | self.specGraphSaveRTInoise.setText(_fromUtf8("")) | |
268 |
self. |
|
243 | self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise")) | |
269 |
self.gridLayout_9.addWidget(self. |
|
244 | self.gridLayout_9.addWidget(self.specGraphSaveRTInoise, 13, 5, 1, 1) | |
|
245 | ||||
|
246 | self.label_19 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
247 | self.label_19.setObjectName(_fromUtf8("label_19")) | |||
|
248 | self.gridLayout_9.addWidget(self.label_19, 3, 7, 2, 1) | |||
|
249 | self.specGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectra) | |||
|
250 | self.specGraphftpSpectra.setText(_fromUtf8("")) | |||
|
251 | self.specGraphftpSpectra.setObjectName(_fromUtf8("specGraphftpSpectra")) | |||
|
252 | self.gridLayout_9.addWidget(self.specGraphftpSpectra, 6, 7, 1, 1) | |||
270 | self.specGraphftpCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
253 | self.specGraphftpCross = QtGui.QCheckBox(self.tabgraphSpectra) | |
271 | self.specGraphftpCross.setText(_fromUtf8("")) |
|
254 | self.specGraphftpCross.setText(_fromUtf8("")) | |
272 | self.specGraphftpCross.setObjectName(_fromUtf8("specGraphftpCross")) |
|
255 | self.specGraphftpCross.setObjectName(_fromUtf8("specGraphftpCross")) | |
273 |
self.gridLayout_9.addWidget(self.specGraphftpCross, 8, |
|
256 | self.gridLayout_9.addWidget(self.specGraphftpCross, 8, 7, 1, 1) | |
274 | self.label_29 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
275 | self.label_29.setObjectName(_fromUtf8("label_29")) |
|
|||
276 | self.gridLayout_9.addWidget(self.label_29, 23, 0, 1, 1) |
|
|||
277 | self.label_47 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
278 | self.label_47.setObjectName(_fromUtf8("label_47")) |
|
|||
279 | self.gridLayout_9.addWidget(self.label_47, 3, 4, 2, 1) |
|
|||
280 | self.specGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
257 | self.specGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
281 | self.specGraphftpRTIplot.setText(_fromUtf8("")) |
|
258 | self.specGraphftpRTIplot.setText(_fromUtf8("")) | |
282 | self.specGraphftpRTIplot.setObjectName(_fromUtf8("specGraphftpRTIplot")) |
|
259 | self.specGraphftpRTIplot.setObjectName(_fromUtf8("specGraphftpRTIplot")) | |
283 |
self.gridLayout_9.addWidget(self.specGraphftpRTIplot, 9, |
|
260 | self.gridLayout_9.addWidget(self.specGraphftpRTIplot, 9, 7, 1, 1) | |
284 | self.specGraphftpCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
261 | self.specGraphftpCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) | |
285 | self.specGraphftpCoherencemap.setText(_fromUtf8("")) |
|
262 | self.specGraphftpCoherencemap.setText(_fromUtf8("")) | |
286 | self.specGraphftpCoherencemap.setObjectName(_fromUtf8("specGraphftpCoherencemap")) |
|
263 | self.specGraphftpCoherencemap.setObjectName(_fromUtf8("specGraphftpCoherencemap")) | |
287 |
self.gridLayout_9.addWidget(self.specGraphftpCoherencemap, 10, |
|
264 | self.gridLayout_9.addWidget(self.specGraphftpCoherencemap, 10, 7, 1, 1) | |
288 | self.specGraphftpPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
265 | self.specGraphftpPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
289 | self.specGraphftpPowerprofile.setText(_fromUtf8("")) |
|
266 | self.specGraphftpPowerprofile.setText(_fromUtf8("")) | |
290 | self.specGraphftpPowerprofile.setObjectName(_fromUtf8("specGraphftpPowerprofile")) |
|
267 | self.specGraphftpPowerprofile.setObjectName(_fromUtf8("specGraphftpPowerprofile")) | |
291 |
self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, |
|
268 | self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, 7, 1, 1) | |
292 | self.label_19 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
293 | self.label_19.setObjectName(_fromUtf8("label_19")) |
|
|||
294 | self.gridLayout_9.addWidget(self.label_19, 3, 6, 2, 2) |
|
|||
295 | self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
|||
296 | self.specGraphSaveRTIplot.setText(_fromUtf8("")) |
|
|||
297 | self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot")) |
|
|||
298 | self.gridLayout_9.addWidget(self.specGraphSaveRTIplot, 9, 4, 1, 1) |
|
|||
299 | self.label_45 = QtGui.QLabel(self.tabgraphSpectra) |
|
|||
300 | self.label_45.setObjectName(_fromUtf8("label_45")) |
|
|||
301 | self.gridLayout_9.addWidget(self.label_45, 13, 0, 1, 1) |
|
|||
302 | self.specGraphftpRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
269 | self.specGraphftpRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
303 | self.specGraphftpRTInoise.setText(_fromUtf8("")) |
|
270 | self.specGraphftpRTInoise.setText(_fromUtf8("")) | |
304 | self.specGraphftpRTInoise.setObjectName(_fromUtf8("specGraphftpRTInoise")) |
|
271 | self.specGraphftpRTInoise.setObjectName(_fromUtf8("specGraphftpRTInoise")) | |
305 |
self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, |
|
272 | self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, 7, 1, 1) | |
306 | self.specGraphCebRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
273 | ||
307 | self.specGraphCebRTInoise.setText(_fromUtf8("")) |
|
274 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
308 | self.specGraphCebRTInoise.setObjectName(_fromUtf8("specGraphCebRTInoise")) |
|
275 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 1, 1) | |
309 | self.gridLayout_9.addWidget(self.specGraphCebRTInoise, 13, 2, 1, 1) |
|
276 | ||
|
277 | self.label_22 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
278 | self.label_22.setObjectName(_fromUtf8("label_22")) | |||
|
279 | self.gridLayout_9.addWidget(self.label_22, 16, 0, 1, 1) | |||
|
280 | self.specGgraphFreq = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
281 | self.specGgraphFreq.setObjectName(_fromUtf8("specGgraphFreq")) | |||
|
282 | self.gridLayout_9.addWidget(self.specGgraphFreq, 16, 2, 1, 2) | |||
|
283 | ||||
|
284 | self.label_16 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
285 | self.label_16.setObjectName(_fromUtf8("label_16")) | |||
|
286 | self.gridLayout_9.addWidget(self.label_16, 17, 0, 1, 1) | |||
|
287 | self.specGgraphHeight = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
288 | self.specGgraphHeight.setObjectName(_fromUtf8("specGgraphHeight")) | |||
|
289 | self.gridLayout_9.addWidget(self.specGgraphHeight, 17, 2, 1, 2) | |||
|
290 | ||||
|
291 | self.label_17 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
292 | self.label_17.setObjectName(_fromUtf8("label_17")) | |||
|
293 | self.gridLayout_9.addWidget(self.label_17, 18, 0, 1, 1) | |||
|
294 | self.specGgraphDbsrange = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
295 | self.specGgraphDbsrange.setObjectName(_fromUtf8("specGgraphDbsrange")) | |||
|
296 | self.gridLayout_9.addWidget(self.specGgraphDbsrange, 18, 2, 1, 2) | |||
|
297 | ||||
|
298 | self.specGraphTminTmaxLabel = QtGui.QLabel(self.tabgraphSpectra) | |||
|
299 | self.specGraphTminTmaxLabel.setObjectName(_fromUtf8("specGraphTminTmaxLabel")) | |||
|
300 | self.gridLayout_9.addWidget(self.specGraphTminTmaxLabel, 19, 0, 1, 2) | |||
|
301 | self.specGgraphTminTmax = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
302 | self.specGgraphTminTmax.setObjectName(_fromUtf8("specGgraphTminTmax")) | |||
|
303 | self.gridLayout_9.addWidget(self.specGgraphTminTmax, 19, 2, 1, 2) | |||
|
304 | ||||
|
305 | self.specGraphMagLabel = QtGui.QLabel(self.tabgraphSpectra) | |||
|
306 | self.specGraphMagLabel.setObjectName(_fromUtf8("specGraphMagLabel")) | |||
|
307 | self.gridLayout_9.addWidget(self.specGraphMagLabel, 16, 4, 1, 2) | |||
|
308 | self.specGgraphmagnitud = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
309 | self.specGgraphmagnitud.setObjectName(_fromUtf8("specGgraphmagnitud")) | |||
|
310 | self.gridLayout_9.addWidget(self.specGgraphmagnitud, 16, 6, 1, 2) | |||
|
311 | ||||
|
312 | self.specGraphPhaseLabel = QtGui.QLabel(self.tabgraphSpectra) | |||
|
313 | self.specGraphPhaseLabel.setObjectName(_fromUtf8("specGraphPhaseLabel")) | |||
|
314 | self.gridLayout_9.addWidget(self.specGraphPhaseLabel, 17, 4, 1, 2) | |||
|
315 | self.specGgraphPhase = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
316 | self.specGgraphPhase.setObjectName(_fromUtf8("specGgraphPhase")) | |||
|
317 | self.gridLayout_9.addWidget(self.specGgraphPhase, 17, 6, 1, 2) | |||
|
318 | ||||
|
319 | self.label_6 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
320 | self.label_6.setObjectName(_fromUtf8("label_6")) | |||
|
321 | self.gridLayout_9.addWidget(self.label_6, 18, 4, 1, 1) | |||
|
322 | self.specGgraphChannelList = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
323 | self.specGgraphChannelList.setObjectName(_fromUtf8("specGgraphChannelList")) | |||
|
324 | self.gridLayout_9.addWidget(self.specGgraphChannelList, 18, 6, 1, 2) | |||
|
325 | ||||
|
326 | self.label_29 = QtGui.QLabel(self.tabgraphSpectra) | |||
|
327 | self.label_29.setObjectName(_fromUtf8("label_29")) | |||
|
328 | self.gridLayout_9.addWidget(self.label_29, 19, 4, 1, 2) | |||
|
329 | self.specGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectra) | |||
|
330 | self.specGgraphftpratio.setObjectName(_fromUtf8("specGgraphftpratio")) | |||
|
331 | self.gridLayout_9.addWidget(self.specGgraphftpratio, 19, 6, 1, 2) | |||
|
332 | ||||
310 | self.label_48 = QtGui.QLabel(self.tabgraphSpectra) |
|
333 | self.label_48 = QtGui.QLabel(self.tabgraphSpectra) | |
311 | self.label_48.setObjectName(_fromUtf8("label_48")) |
|
334 | self.label_48.setObjectName(_fromUtf8("label_48")) | |
312 |
self.gridLayout_9.addWidget(self.label_48, 2 |
|
335 | self.gridLayout_9.addWidget(self.label_48, 20, 4, 1, 2) | |
313 | self.specGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectra) |
|
336 | self.specGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectra) | |
314 | self.specGgraphTimeRange.setObjectName(_fromUtf8("specGgraphTimeRange")) |
|
337 | self.specGgraphTimeRange.setObjectName(_fromUtf8("specGgraphTimeRange")) | |
315 |
self.gridLayout_9.addWidget(self.specGgraphTimeRange, 2 |
|
338 | self.gridLayout_9.addWidget(self.specGgraphTimeRange, 20, 6, 1, 2) | |
|
339 | ||||
|
340 | spacerItem15 = QtGui.QSpacerItem(28, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |||
|
341 | self.gridLayout_9.addItem(spacerItem15, 27, 6, 1, 2) | |||
|
342 | spacerItem16 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |||
|
343 | self.gridLayout_9.addItem(spacerItem16, 3, 5, 1, 1) | |||
|
344 | spacerItem17 = QtGui.QSpacerItem(49, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |||
|
345 | self.gridLayout_9.addItem(spacerItem17, 27, 0, 1, 1) | |||
|
346 | ||||
|
347 | ||||
|
348 | ||||
316 | self.tabWidgetSpectra.addTab(self.tabgraphSpectra, _fromUtf8("")) |
|
349 | self.tabWidgetSpectra.addTab(self.tabgraphSpectra, _fromUtf8("")) | |
317 | self.taboutputSpectra = QtGui.QWidget() |
|
350 | self.taboutputSpectra = QtGui.QWidget() | |
318 | self.taboutputSpectra.setObjectName(_fromUtf8("taboutputSpectra")) |
|
351 | self.taboutputSpectra.setObjectName(_fromUtf8("taboutputSpectra")) | |
@@ -382,25 +415,28 class Ui_SpectraTab(object): | |||||
382 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabopSpectra), _translate("MainWindow", "Operation", None)) |
|
415 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabopSpectra), _translate("MainWindow", "Operation", None)) | |
383 |
|
416 | |||
384 | self.label_44.setText(_translate("MainWindow", "Coherence Map", None)) |
|
417 | self.label_44.setText(_translate("MainWindow", "Coherence Map", None)) | |
385 |
self. |
|
418 | self.specGraphTminTmaxLabel.setText(_translate("MainWindow", "Time range:", None)) | |
386 | self.label_25.setText(_translate("MainWindow", "Prefix", None)) |
|
419 | self.label_25.setText(_translate("MainWindow", "Prefix", None)) | |
387 | self.label_42.setText(_translate("MainWindow", "RTI Plot", None)) |
|
420 | self.label_42.setText(_translate("MainWindow", "RTI Plot", None)) | |
388 | self.label_16.setText(_translate("MainWindow", "Height range", None)) |
|
421 | self.label_16.setText(_translate("MainWindow", "Height range", None)) | |
389 | self.label_17.setText(_translate("MainWindow", "dB range", None)) |
|
422 | self.label_17.setText(_translate("MainWindow", "dB range", None)) | |
390 |
self. |
|
423 | self.specGraphMagLabel.setText(_translate("MainWindow", "Coh. Magnitud ", None)) | |
391 | self.label_24.setText(_translate("MainWindow", "Path", None)) |
|
424 | self.label_24.setText(_translate("MainWindow", "Path", None)) | |
392 | self.label_46.setText(_translate("MainWindow", "Power Profile", None)) |
|
425 | self.label_46.setText(_translate("MainWindow", "Power Profile", None)) | |
393 | self.label_22.setText(_translate("MainWindow", "Freq/Vel:", None)) |
|
426 | self.label_22.setText(_translate("MainWindow", "Freq/Vel range:", None)) | |
394 | self.label_41.setText(_translate("MainWindow", "Cross Spectra Plot", None)) |
|
427 | self.label_41.setText(_translate("MainWindow", "Cross Spectra Plot", None)) | |
395 | self.specGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
428 | self.specGraphToolPath.setText(_translate("MainWindow", "...", None)) | |
396 | self.label_6.setText(_translate("MainWindow", "Channel List:", None)) |
|
429 | self.label_6.setText(_translate("MainWindow", "Channel List:", None)) | |
397 | self.label_40.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
430 | self.label_40.setText(_translate("MainWindow", "Spectra Plot", None)) | |
398 | self.label_43.setText(_translate("MainWindow", "Show", None)) |
|
431 | self.label_43.setText(_translate("MainWindow", "Show", None)) | |
399 | self.label_29.setText(_translate("MainWindow", "Wr Period:", None)) |
|
432 | self.label_29.setText(_translate("MainWindow", "Writing Period:", None)) | |
400 | self.label_47.setText(_translate("MainWindow", "Save", None)) |
|
433 | self.label_47.setText(_translate("MainWindow", "Save", None)) | |
401 |
self.label_19.setText(_translate("MainWindow", " |
|
434 | self.label_19.setText(_translate("MainWindow", "Ftp", None)) | |
402 | self.label_45.setText(_translate("MainWindow", "Noise", None)) |
|
435 | self.label_45.setText(_translate("MainWindow", "Noise", None)) | |
403 | self.label_48.setText(_translate("MainWindow", "Time Range:", None)) |
|
436 | self.label_48.setText(_translate("MainWindow", "Time Range:", None)) | |
|
437 | self.specGraphPhaseLabel.setText(_translate("MainWindow", "Coh. Phase:", None)) | |||
|
438 | self.label_48.hide() | |||
|
439 | self.specGgraphTimeRange.hide() | |||
404 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabgraphSpectra), _translate("MainWindow", "Graphics", None)) |
|
440 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabgraphSpectra), _translate("MainWindow", "Graphics", None)) | |
405 |
|
441 | |||
406 | self.label_39.setText(_translate("MainWindow", "Type:", None)) |
|
442 | self.label_39.setText(_translate("MainWindow", "Type:", None)) |
@@ -199,7 +199,7 class Figure(Operation): | |||||
199 |
|
199 | |||
200 | if save: |
|
200 | if save: | |
201 |
|
201 | |||
202 |
if figfile |
|
202 | if not figfile: | |
203 |
|
203 | |||
204 | if not thisDatetime: |
|
204 | if not thisDatetime: | |
205 | raise ValueError, "Saving figure: figfile or thisDatetime should be defined" |
|
205 | raise ValueError, "Saving figure: figfile or thisDatetime should be defined" |
@@ -264,6 +264,7 class CrossSpectraPlot(Figure): | |||||
264 |
|
264 | |||
265 | def run(self, dataOut, id, wintitle="", pairsList=None, |
|
265 | def run(self, dataOut, id, wintitle="", pairsList=None, | |
266 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, |
|
266 | xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, | |
|
267 | coh_min=None, coh_max=None, phase_min=None, phase_max=None, | |||
267 | save=False, figpath='./', figfile=None, ftp=False, wr_period=1, |
|
268 | save=False, figpath='./', figfile=None, ftp=False, wr_period=1, | |
268 | power_cmap='jet', coherence_cmap='jet', phase_cmap='RdBu_r', show=True, |
|
269 | power_cmap='jet', coherence_cmap='jet', phase_cmap='RdBu_r', show=True, | |
269 | server=None, folder=None, username=None, password=None, |
|
270 | server=None, folder=None, username=None, password=None, | |
@@ -311,6 +312,15 class CrossSpectraPlot(Figure): | |||||
311 | zdB = 10*numpy.log10(z) |
|
312 | zdB = 10*numpy.log10(z) | |
312 | noisedB = 10*numpy.log10(noise) |
|
313 | noisedB = 10*numpy.log10(noise) | |
313 |
|
314 | |||
|
315 | if coh_min == None: | |||
|
316 | coh_min = 0.0 | |||
|
317 | if coh_max == None: | |||
|
318 | coh_max = 1.0 | |||
|
319 | ||||
|
320 | if phase_min == None: | |||
|
321 | phase_min = -180 | |||
|
322 | if phase_max == None: | |||
|
323 | phase_max = 180 | |||
314 |
|
324 | |||
315 | #thisDatetime = dataOut.datatime |
|
325 | #thisDatetime = dataOut.datatime | |
316 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[0]) |
|
326 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[0]) | |
@@ -374,14 +384,14 class CrossSpectraPlot(Figure): | |||||
374 | title = "Coherence %d%d" %(pair[0], pair[1]) |
|
384 | title = "Coherence %d%d" %(pair[0], pair[1]) | |
375 | axes0 = self.axesList[i*self.__nsubplots+2] |
|
385 | axes0 = self.axesList[i*self.__nsubplots+2] | |
376 | axes0.pcolor(x, y, coherence, |
|
386 | axes0.pcolor(x, y, coherence, | |
377 |
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin= |
|
387 | xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=coh_min, zmax=coh_max, | |
378 | xlabel=xlabel, ylabel=ylabel, title=title, |
|
388 | xlabel=xlabel, ylabel=ylabel, title=title, | |
379 | ticksize=9, colormap=coherence_cmap, cblabel='') |
|
389 | ticksize=9, colormap=coherence_cmap, cblabel='') | |
380 |
|
390 | |||
381 | title = "Phase %d%d" %(pair[0], pair[1]) |
|
391 | title = "Phase %d%d" %(pair[0], pair[1]) | |
382 | axes0 = self.axesList[i*self.__nsubplots+3] |
|
392 | axes0 = self.axesList[i*self.__nsubplots+3] | |
383 | axes0.pcolor(x, y, phase, |
|
393 | axes0.pcolor(x, y, phase, | |
384 |
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin= |
|
394 | xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=phase_min, zmax=phase_max, | |
385 | xlabel=xlabel, ylabel=ylabel, title=title, |
|
395 | xlabel=xlabel, ylabel=ylabel, title=title, | |
386 | ticksize=9, colormap=phase_cmap, cblabel='') |
|
396 | ticksize=9, colormap=phase_cmap, cblabel='') | |
387 |
|
397 |
@@ -53,6 +53,7 class USRPReader(ProcessingUnit): | |||||
53 | ''' |
|
53 | ''' | |
54 | In this method will be initialized every parameter of dataOut object (header, no data) |
|
54 | In this method will be initialized every parameter of dataOut object (header, no data) | |
55 | ''' |
|
55 | ''' | |
|
56 | nProfiles = self.__sample_rate #Number of profiles by second | |||
56 |
|
57 | |||
57 | self.dataOut.radarControllerHeaderObj = RadarControllerHeader(ippKm=self.__ippKm, |
|
58 | self.dataOut.radarControllerHeaderObj = RadarControllerHeader(ippKm=self.__ippKm, | |
58 | txA=0, |
|
59 | txA=0, | |
@@ -66,7 +67,7 class USRPReader(ProcessingUnit): | |||||
66 | code = self.__code) |
|
67 | code = self.__code) | |
67 |
|
68 | |||
68 | self.dataOut.systemHeaderObj = SystemHeader(nSamples=self.__nSamples, |
|
69 | self.dataOut.systemHeaderObj = SystemHeader(nSamples=self.__nSamples, | |
69 |
nProfiles= |
|
70 | nProfiles=nProfiles, | |
70 | nChannels=len(self.__channelList), |
|
71 | nChannels=len(self.__channelList), | |
71 | adcResolution=14) |
|
72 | adcResolution=14) | |
72 |
|
73 | |||
@@ -80,7 +81,7 class USRPReader(ProcessingUnit): | |||||
80 |
|
81 | |||
81 | # self.dataOut.nHeights = 0 |
|
82 | # self.dataOut.nHeights = 0 | |
82 |
|
83 | |||
83 |
self.dataOut.nProfiles = |
|
84 | self.dataOut.nProfiles = nProfiles | |
84 |
|
85 | |||
85 | self.dataOut.heightList = self.__firstHeigth + numpy.arange(self.__nSamples, dtype = numpy.float)*self.__deltaHeigth |
|
86 | self.dataOut.heightList = self.__firstHeigth + numpy.arange(self.__nSamples, dtype = numpy.float)*self.__deltaHeigth | |
86 |
|
87 |
@@ -91,9 +91,9 class SpectraProc(ProcessingUnit): | |||||
91 | cspc = numpy.zeros((self.dataOut.nPairs, self.dataOut.nFFTPoints, self.dataOut.nHeights), dtype='complex') |
|
91 | cspc = numpy.zeros((self.dataOut.nPairs, self.dataOut.nFFTPoints, self.dataOut.nHeights), dtype='complex') | |
92 | for pair in self.dataOut.pairsList: |
|
92 | for pair in self.dataOut.pairsList: | |
93 | if pair[0] not in self.dataOut.channelList: |
|
93 | if pair[0] not in self.dataOut.channelList: | |
94 |
raise ValueError, "Error getting CrossSpectra: pair 0 of |
|
94 | raise ValueError, "Error getting CrossSpectra: pair 0 of %s is not in channelList = %s" %(str(pair), str(self.dataOut.channelList)) | |
95 | if pair[1] not in self.dataOut.channelList: |
|
95 | if pair[1] not in self.dataOut.channelList: | |
96 |
raise ValueError, "Error getting CrossSpectra: pair 1 of |
|
96 | raise ValueError, "Error getting CrossSpectra: pair 1 of %s is not in channelList = %s" %(str(pair), str(self.dataOut.channelList)) | |
97 |
|
97 | |||
98 | cspc[pairIndex,:,:] = fft_volt[pair[0],:,:] * numpy.conjugate(fft_volt[pair[1],:,:]) |
|
98 | cspc[pairIndex,:,:] = fft_volt[pair[0],:,:] * numpy.conjugate(fft_volt[pair[1],:,:]) | |
99 | pairIndex += 1 |
|
99 | pairIndex += 1 |
@@ -764,7 +764,7 class ProfileSelector(Operation): | |||||
764 |
|
764 | |||
765 | return True |
|
765 | return True | |
766 |
|
766 | |||
767 | def run(self, dataOut, profileList=None, profileRangeList=None, beam=None, byblock=False, rangeList = None): |
|
767 | def run(self, dataOut, profileList=None, profileRangeList=None, beam=None, byblock=False, rangeList = None, nProfiles=None): | |
768 |
|
768 | |||
769 | """ |
|
769 | """ | |
770 | ProfileSelector: |
|
770 | ProfileSelector: | |
@@ -779,7 +779,11 class ProfileSelector(Operation): | |||||
779 | """ |
|
779 | """ | |
780 |
|
780 | |||
781 | dataOut.flagNoData = True |
|
781 | dataOut.flagNoData = True | |
|
782 | ||||
|
783 | if nProfiles: | |||
782 | self.nProfiles = dataOut.nProfiles |
|
784 | self.nProfiles = dataOut.nProfiles | |
|
785 | else: | |||
|
786 | self.nProfiles = nProfiles | |||
783 |
|
787 | |||
784 | if dataOut.flagDataAsBlock: |
|
788 | if dataOut.flagDataAsBlock: | |
785 | """ |
|
789 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now