##// END OF EJS Templates
Signal Chain GUI...
Miguel Valdez -
r600:19c1076f2d8a
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -43,54 +43,69 class ParameterConf():
43 return self.ELEMENTNAME
43 return self.ELEMENTNAME
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 self.format == 'bool':
61 if format == 'bool':
61 value = int(value)
62 value = int(value)
62
63
63 if self.format == 'list':
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 self.format == 'intlist':
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 self.format == 'floatlist':
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 self.format == 'date':
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 self.format == 'time':
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 self.format == 'pairslist':
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 self.format == 'multilist':
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(self.format)
162 format_func = eval(format)
135
163
136 self.__formated_value = format_func(value)
164 self.__formated_value = format_func(value)
137
165
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -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, 2, 1, 1)
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, 2, 1, 1)
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, 2, 1, 1)
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, 2, 1, 1)
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, 2, 1, 1)
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, 4, 1, 1)
228 self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, 5, 1, 1)
248 self.specGraphftpSpectra = QtGui.QCheckBox(self.tabgraphSpectra)
229 self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra)
249 self.specGraphftpSpectra.setText(_fromUtf8(""))
230 self.specGraphSaveRTIplot.setText(_fromUtf8(""))
250 self.specGraphftpSpectra.setObjectName(_fromUtf8("specGraphftpSpectra"))
231 self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot"))
251 self.gridLayout_9.addWidget(self.specGraphftpSpectra, 6, 6, 1, 1)
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, 4, 1, 1)
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.label_43.setObjectName(_fromUtf8("label_43"))
243 self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise"))
269 self.gridLayout_9.addWidget(self.label_43, 3, 2, 2, 1)
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, 6, 1, 1)
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, 6, 1, 1)
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, 6, 1, 1)
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, 6, 1, 1)
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, 6, 1, 1)
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, 22, 0, 1, 1)
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, 22, 1, 1, 7)
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.label_20.setText(_translate("MainWindow", "Tmin, Tmax:", None))
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.label_18.setText(_translate("MainWindow", "Magnitud ", None))
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", "ftp", None))
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 == None:
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,7 +312,16 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
314
319
320 if phase_min == None:
321 phase_min = -180
322 if phase_max == None:
323 phase_max = 180
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])
317 title = wintitle + " Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
327 title = wintitle + " Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S"))
@@ -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=0, zmax=1,
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=-180, zmax=180,
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=1024,
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 = 1
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 (%s) is not in channelList=%s" %(str(pair), str(self.dataOut.channelList))
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 (%s) is not in channelList=%s" %(str(pair), str(self.dataOut.channelList))
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 self.nProfiles = dataOut.nProfiles
782
783 if 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