The requested changes are too big and content was truncated. Show full diff
@@ -43,54 +43,69 class ParameterConf(): | |||
|
43 | 43 | return self.ELEMENTNAME |
|
44 | 44 | |
|
45 | 45 | def getValue(self): |
|
46 | ||
|
46 | ||
|
47 | value = self.value | |
|
48 | format = self.format | |
|
49 | ||
|
47 | 50 | if self.__formated_value != None: |
|
48 | 51 | |
|
49 | 52 | return self.__formated_value |
|
50 | 53 | |
|
51 | value = self.value | |
|
52 | ||
|
53 | if self.format == 'str': | |
|
54 | if format == 'str': | |
|
54 | 55 | self.__formated_value = str(value) |
|
55 | 56 | return self.__formated_value |
|
56 | 57 | |
|
57 | 58 | if value == '': |
|
58 | 59 | raise ValueError, "%s: This parameter value is empty" %self.name |
|
59 | 60 | |
|
60 |
if |
|
|
61 | if format == 'bool': | |
|
61 | 62 | value = int(value) |
|
62 | 63 | |
|
63 |
if |
|
|
64 | if format == 'list': | |
|
64 | 65 | strList = value.split(',') |
|
65 | 66 | |
|
66 | 67 | self.__formated_value = strList |
|
67 | 68 | |
|
68 | 69 | return self.__formated_value |
|
69 | 70 | |
|
70 |
if |
|
|
71 | if format == 'intlist': | |
|
71 | 72 | """ |
|
72 | 73 | Example: |
|
73 | 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 | 85 | self.__formated_value = intList |
|
78 | 86 | |
|
79 | 87 | return self.__formated_value |
|
80 | 88 | |
|
81 |
if |
|
|
89 | if format == 'floatlist': | |
|
82 | 90 | """ |
|
83 | 91 | Example: |
|
84 | 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 | 104 | self.__formated_value = floatList |
|
90 | 105 | |
|
91 | 106 | return self.__formated_value |
|
92 | 107 | |
|
93 |
if |
|
|
108 | if format == 'date': | |
|
94 | 109 | strList = value.split('/') |
|
95 | 110 | intList = [int(x) for x in strList] |
|
96 | 111 | date = datetime.date(intList[0], intList[1], intList[2]) |
@@ -99,7 +114,7 class ParameterConf(): | |||
|
99 | 114 | |
|
100 | 115 | return self.__formated_value |
|
101 | 116 | |
|
102 |
if |
|
|
117 | if format == 'time': | |
|
103 | 118 | strList = value.split(':') |
|
104 | 119 | intList = [int(x) for x in strList] |
|
105 | 120 | time = datetime.time(intList[0], intList[1], intList[2]) |
@@ -108,30 +123,43 class ParameterConf(): | |||
|
108 | 123 | |
|
109 | 124 | return self.__formated_value |
|
110 | 125 | |
|
111 |
if |
|
|
126 | if format == 'pairslist': | |
|
112 | 127 | """ |
|
113 | 128 | Example: |
|
114 | 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 | 144 | self.__formated_value = pairList |
|
120 | 145 | |
|
121 | 146 | return self.__formated_value |
|
122 | 147 | |
|
123 |
if |
|
|
148 | if format == 'multilist': | |
|
124 | 149 | """ |
|
125 | 150 | Example: |
|
126 | 151 | value = (0,1,2),(3,4,5) |
|
127 | 152 | """ |
|
128 | 153 | multiList = ast.literal_eval(value) |
|
129 | 154 | |
|
155 | if type(multiList[0]) == int: | |
|
156 | multiList = ast.literal_eval("(" + value + ")") | |
|
157 | ||
|
130 | 158 | self.__formated_value = multiList |
|
131 | 159 | |
|
132 | 160 | return self.__formated_value |
|
133 | 161 | |
|
134 |
format_func = eval( |
|
|
162 | format_func = eval(format) | |
|
135 | 163 | |
|
136 | 164 | self.__formated_value = format_func(value) |
|
137 | 165 |
|
1 | 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 | 135 | self.specOpgetNoise.setObjectName(_fromUtf8("specOpgetNoise")) |
|
136 | 136 | self.gridLayout_5.addWidget(self.specOpgetNoise, 16, 3, 1, 2) |
|
137 | 137 | self.tabWidgetSpectra.addTab(self.tabopSpectra, _fromUtf8("")) |
|
138 | ||
|
139 | ||
|
138 | 140 | self.tabgraphSpectra = QtGui.QWidget() |
|
139 | 141 | self.tabgraphSpectra.setObjectName(_fromUtf8("tabgraphSpectra")) |
|
140 | 142 | self.gridLayout_9 = QtGui.QGridLayout(self.tabgraphSpectra) |
|
141 | 143 | self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) |
|
142 | self.label_44 = QtGui.QLabel(self.tabgraphSpectra) | |
|
143 | self.label_44.setObjectName(_fromUtf8("label_44")) | |
|
144 | self.gridLayout_9.addWidget(self.label_44, 10, 0, 1, 1) | |
|
144 | ||
|
145 | 145 | spacerItem14 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) |
|
146 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) | |
|
147 | self.label_20 = QtGui.QLabel(self.tabgraphSpectra) | |
|
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) | |
|
146 | self.gridLayout_9.addItem(spacerItem14, 14, 2, 1, 1) | |
|
147 | ||
|
194 | 148 | self.label_24 = QtGui.QLabel(self.tabgraphSpectra) |
|
195 | 149 | self.label_24.setObjectName(_fromUtf8("label_24")) |
|
196 | 150 | self.gridLayout_9.addWidget(self.label_24, 0, 0, 1, 1) |
|
197 | self.specGraphPrefix = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
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) | |
|
151 | ||
|
209 | 152 | self.specGraphPath = QtGui.QLineEdit(self.tabgraphSpectra) |
|
210 | 153 | self.specGraphPath.setObjectName(_fromUtf8("specGraphPath")) |
|
211 | 154 | self.gridLayout_9.addWidget(self.specGraphPath, 0, 1, 1, 6) |
|
212 | self.label_41 = QtGui.QLabel(self.tabgraphSpectra) | |
|
213 | self.label_41.setObjectName(_fromUtf8("label_41")) | |
|
214 | self.gridLayout_9.addWidget(self.label_41, 8, 0, 1, 1) | |
|
155 | ||
|
215 | 156 | self.specGraphToolPath = QtGui.QToolButton(self.tabgraphSpectra) |
|
216 | 157 | self.specGraphToolPath.setObjectName(_fromUtf8("specGraphToolPath")) |
|
217 | 158 | self.gridLayout_9.addWidget(self.specGraphToolPath, 0, 7, 1, 1) |
|
218 | self.label_6 = QtGui.QLabel(self.tabgraphSpectra) | |
|
219 | self.label_6.setObjectName(_fromUtf8("label_6")) | |
|
220 | self.gridLayout_9.addWidget(self.label_6, 15, 0, 1, 1) | |
|
159 | ||
|
160 | self.label_25 = QtGui.QLabel(self.tabgraphSpectra) | |
|
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 | 168 | self.label_40 = QtGui.QLabel(self.tabgraphSpectra) |
|
222 | 169 | self.label_40.setObjectName(_fromUtf8("label_40")) |
|
223 | 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 | 190 | self.specGraphCebSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
225 | 191 | self.specGraphCebSpectraplot.setText(_fromUtf8("")) |
|
226 | 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 | 194 | self.specGraphCebCrossSpectraplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
229 | 195 | self.specGraphCebCrossSpectraplot.setText(_fromUtf8("")) |
|
230 | 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 | 198 | self.specGraphCebRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
233 | 199 | self.specGraphCebRTIplot.setText(_fromUtf8("")) |
|
234 | 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 | 202 | self.specGraphCebCoherencmap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
237 | 203 | self.specGraphCebCoherencmap.setText(_fromUtf8("")) |
|
238 | 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 | 206 | self.specGraphPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
241 | 207 | self.specGraphPowerprofile.setText(_fromUtf8("")) |
|
242 | 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 | 225 | self.specGraphSaveCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
245 | 226 | self.specGraphSaveCross.setText(_fromUtf8("")) |
|
246 | 227 | self.specGraphSaveCross.setObjectName(_fromUtf8("specGraphSaveCross")) |
|
247 |
self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, |
|
|
248 |
self.specGraph |
|
|
249 |
self.specGraph |
|
|
250 |
self.specGraph |
|
|
251 |
self.gridLayout_9.addWidget(self.specGraph |
|
|
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) | |
|
228 | self.gridLayout_9.addWidget(self.specGraphSaveCross, 8, 5, 1, 1) | |
|
229 | self.specGraphSaveRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
230 | self.specGraphSaveRTIplot.setText(_fromUtf8("")) | |
|
231 | self.specGraphSaveRTIplot.setObjectName(_fromUtf8("specGraphSaveRTIplot")) | |
|
232 | self.gridLayout_9.addWidget(self.specGraphSaveRTIplot, 9, 5, 1, 1) | |
|
258 | 233 | self.specGraphSaveCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
259 | 234 | self.specGraphSaveCoherencemap.setText(_fromUtf8("")) |
|
260 | 235 | self.specGraphSaveCoherencemap.setObjectName(_fromUtf8("specGraphSaveCoherencemap")) |
|
261 |
self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, |
|
|
262 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
263 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 1, 1) | |
|
264 | self.specGgraphftpratio = QtGui.QLineEdit(self.tabgraphSpectra) | |
|
265 | self.specGgraphftpratio.setObjectName(_fromUtf8("specGgraphftpratio")) | |
|
266 | self.gridLayout_9.addWidget(self.specGgraphftpratio, 23, 1, 1, 7) | |
|
267 | self.label_43 = QtGui.QLabel(self.tabgraphSpectra) | |
|
268 |
self. |
|
|
269 |
self.gridLayout_9.addWidget(self. |
|
|
236 | self.gridLayout_9.addWidget(self.specGraphSaveCoherencemap, 10, 5, 1, 1) | |
|
237 | self.specGraphSavePowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
238 | self.specGraphSavePowerprofile.setText(_fromUtf8("")) | |
|
239 | self.specGraphSavePowerprofile.setObjectName(_fromUtf8("specGraphSavePowerprofile")) | |
|
240 | self.gridLayout_9.addWidget(self.specGraphSavePowerprofile, 11, 5, 1, 1) | |
|
241 | self.specGraphSaveRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
242 | self.specGraphSaveRTInoise.setText(_fromUtf8("")) | |
|
243 | self.specGraphSaveRTInoise.setObjectName(_fromUtf8("specGraphSaveRTInoise")) | |
|
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 | 253 | self.specGraphftpCross = QtGui.QCheckBox(self.tabgraphSpectra) |
|
271 | 254 | self.specGraphftpCross.setText(_fromUtf8("")) |
|
272 | 255 | self.specGraphftpCross.setObjectName(_fromUtf8("specGraphftpCross")) |
|
273 |
self.gridLayout_9.addWidget(self.specGraphftpCross, 8, |
|
|
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) | |
|
256 | self.gridLayout_9.addWidget(self.specGraphftpCross, 8, 7, 1, 1) | |
|
280 | 257 | self.specGraphftpRTIplot = QtGui.QCheckBox(self.tabgraphSpectra) |
|
281 | 258 | self.specGraphftpRTIplot.setText(_fromUtf8("")) |
|
282 | 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 | 261 | self.specGraphftpCoherencemap = QtGui.QCheckBox(self.tabgraphSpectra) |
|
285 | 262 | self.specGraphftpCoherencemap.setText(_fromUtf8("")) |
|
286 | 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 | 265 | self.specGraphftpPowerprofile = QtGui.QCheckBox(self.tabgraphSpectra) |
|
289 | 266 | self.specGraphftpPowerprofile.setText(_fromUtf8("")) |
|
290 | 267 | self.specGraphftpPowerprofile.setObjectName(_fromUtf8("specGraphftpPowerprofile")) |
|
291 |
self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, |
|
|
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) | |
|
268 | self.gridLayout_9.addWidget(self.specGraphftpPowerprofile, 11, 7, 1, 1) | |
|
302 | 269 | self.specGraphftpRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) |
|
303 | 270 | self.specGraphftpRTInoise.setText(_fromUtf8("")) |
|
304 | 271 | self.specGraphftpRTInoise.setObjectName(_fromUtf8("specGraphftpRTInoise")) |
|
305 |
self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, |
|
|
306 | self.specGraphCebRTInoise = QtGui.QCheckBox(self.tabgraphSpectra) | |
|
307 | self.specGraphCebRTInoise.setText(_fromUtf8("")) | |
|
308 | self.specGraphCebRTInoise.setObjectName(_fromUtf8("specGraphCebRTInoise")) | |
|
309 | self.gridLayout_9.addWidget(self.specGraphCebRTInoise, 13, 2, 1, 1) | |
|
272 | self.gridLayout_9.addWidget(self.specGraphftpRTInoise, 13, 7, 1, 1) | |
|
273 | ||
|
274 | spacerItem19 = QtGui.QSpacerItem(39, 15, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
|
275 | self.gridLayout_9.addItem(spacerItem19, 27, 4, 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 | 333 | self.label_48 = QtGui.QLabel(self.tabgraphSpectra) |
|
311 | 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 | 336 | self.specGgraphTimeRange = QtGui.QLineEdit(self.tabgraphSpectra) |
|
314 | 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 | 349 | self.tabWidgetSpectra.addTab(self.tabgraphSpectra, _fromUtf8("")) |
|
317 | 350 | self.taboutputSpectra = QtGui.QWidget() |
|
318 | 351 | self.taboutputSpectra.setObjectName(_fromUtf8("taboutputSpectra")) |
@@ -382,25 +415,28 class Ui_SpectraTab(object): | |||
|
382 | 415 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabopSpectra), _translate("MainWindow", "Operation", None)) |
|
383 | 416 | |
|
384 | 417 | self.label_44.setText(_translate("MainWindow", "Coherence Map", None)) |
|
385 |
self. |
|
|
418 | self.specGraphTminTmaxLabel.setText(_translate("MainWindow", "Time range:", None)) | |
|
386 | 419 | self.label_25.setText(_translate("MainWindow", "Prefix", None)) |
|
387 | 420 | self.label_42.setText(_translate("MainWindow", "RTI Plot", None)) |
|
388 | 421 | self.label_16.setText(_translate("MainWindow", "Height range", None)) |
|
389 | 422 | self.label_17.setText(_translate("MainWindow", "dB range", None)) |
|
390 |
self. |
|
|
423 | self.specGraphMagLabel.setText(_translate("MainWindow", "Coh. Magnitud ", None)) | |
|
391 | 424 | self.label_24.setText(_translate("MainWindow", "Path", None)) |
|
392 | 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 | 427 | self.label_41.setText(_translate("MainWindow", "Cross Spectra Plot", None)) |
|
395 | 428 | self.specGraphToolPath.setText(_translate("MainWindow", "...", None)) |
|
396 | 429 | self.label_6.setText(_translate("MainWindow", "Channel List:", None)) |
|
397 | 430 | self.label_40.setText(_translate("MainWindow", "Spectra Plot", None)) |
|
398 | 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 | 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 | 435 | self.label_45.setText(_translate("MainWindow", "Noise", None)) |
|
403 | 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 | 440 | self.tabWidgetSpectra.setTabText(self.tabWidgetSpectra.indexOf(self.tabgraphSpectra), _translate("MainWindow", "Graphics", None)) |
|
405 | 441 | |
|
406 | 442 | self.label_39.setText(_translate("MainWindow", "Type:", None)) |
@@ -199,7 +199,7 class Figure(Operation): | |||
|
199 | 199 | |
|
200 | 200 | if save: |
|
201 | 201 | |
|
202 |
if figfile |
|
|
202 | if not figfile: | |
|
203 | 203 | |
|
204 | 204 | if not thisDatetime: |
|
205 | 205 | raise ValueError, "Saving figure: figfile or thisDatetime should be defined" |
@@ -264,6 +264,7 class CrossSpectraPlot(Figure): | |||
|
264 | 264 | |
|
265 | 265 | def run(self, dataOut, id, wintitle="", pairsList=None, |
|
266 | 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 | 268 | save=False, figpath='./', figfile=None, ftp=False, wr_period=1, |
|
268 | 269 | power_cmap='jet', coherence_cmap='jet', phase_cmap='RdBu_r', show=True, |
|
269 | 270 | server=None, folder=None, username=None, password=None, |
@@ -311,7 +312,16 class CrossSpectraPlot(Figure): | |||
|
311 | 312 | zdB = 10*numpy.log10(z) |
|
312 | 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 | 325 | #thisDatetime = dataOut.datatime |
|
316 | 326 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[0]) |
|
317 | 327 | title = wintitle + " Cross-Spectra: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) |
@@ -374,14 +384,14 class CrossSpectraPlot(Figure): | |||
|
374 | 384 | title = "Coherence %d%d" %(pair[0], pair[1]) |
|
375 | 385 | axes0 = self.axesList[i*self.__nsubplots+2] |
|
376 | 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 | 388 | xlabel=xlabel, ylabel=ylabel, title=title, |
|
379 | 389 | ticksize=9, colormap=coherence_cmap, cblabel='') |
|
380 | 390 | |
|
381 | 391 | title = "Phase %d%d" %(pair[0], pair[1]) |
|
382 | 392 | axes0 = self.axesList[i*self.__nsubplots+3] |
|
383 | 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 | 395 | xlabel=xlabel, ylabel=ylabel, title=title, |
|
386 | 396 | ticksize=9, colormap=phase_cmap, cblabel='') |
|
387 | 397 |
@@ -53,6 +53,7 class USRPReader(ProcessingUnit): | |||
|
53 | 53 | ''' |
|
54 | 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 | 58 | self.dataOut.radarControllerHeaderObj = RadarControllerHeader(ippKm=self.__ippKm, |
|
58 | 59 | txA=0, |
@@ -66,7 +67,7 class USRPReader(ProcessingUnit): | |||
|
66 | 67 | code = self.__code) |
|
67 | 68 | |
|
68 | 69 | self.dataOut.systemHeaderObj = SystemHeader(nSamples=self.__nSamples, |
|
69 |
nProfiles= |
|
|
70 | nProfiles=nProfiles, | |
|
70 | 71 | nChannels=len(self.__channelList), |
|
71 | 72 | adcResolution=14) |
|
72 | 73 | |
@@ -80,7 +81,7 class USRPReader(ProcessingUnit): | |||
|
80 | 81 | |
|
81 | 82 | # self.dataOut.nHeights = 0 |
|
82 | 83 | |
|
83 |
self.dataOut.nProfiles = |
|
|
84 | self.dataOut.nProfiles = nProfiles | |
|
84 | 85 | |
|
85 | 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 | 91 | cspc = numpy.zeros((self.dataOut.nPairs, self.dataOut.nFFTPoints, self.dataOut.nHeights), dtype='complex') |
|
92 | 92 | for pair in self.dataOut.pairsList: |
|
93 | 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 | 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 | 98 | cspc[pairIndex,:,:] = fft_volt[pair[0],:,:] * numpy.conjugate(fft_volt[pair[1],:,:]) |
|
99 | 99 | pairIndex += 1 |
@@ -764,7 +764,7 class ProfileSelector(Operation): | |||
|
764 | 764 | |
|
765 | 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 | 770 | ProfileSelector: |
@@ -779,7 +779,11 class ProfileSelector(Operation): | |||
|
779 | 779 | """ |
|
780 | 780 | |
|
781 | 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 | 788 | if dataOut.flagDataAsBlock: |
|
785 | 789 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now