##// END OF EJS Templates
update uniquechannel
avaldez -
r1784:57448bf73d50
parent child
Show More
@@ -386,7 +386,7 class HDFWriter(Operation):
386 self.description = description
386 self.description = description
387 self.set_kwargs(**kwargs)
387 self.set_kwargs(**kwargs)
388 #print("self.uniqueChannel: ", self.uniqueChannel)
388 #print("self.uniqueChannel: ", self.uniqueChannel)
389 #self.uniqueChannel = uniqueChannel
389 self.uniqueChannel = uniqueChannel
390
390
391 if self.metadataList is None:
391 if self.metadataList is None:
392 self.metadataList = self.dataOut.metadata_list
392 self.metadataList = self.dataOut.metadata_list
@@ -405,7 +405,7 class HDFWriter(Operation):
405
405
406 if dataAux is None:
406 if dataAux is None:
407 continue
407 continue
408 elif isinstance(dataAux, (int, float, numpy.integer, numpy.float)):
408 elif isinstance(dataAux, (int, float, numpy.integer, numpy.float_)):
409 dsDict['nDim'] = 0
409 dsDict['nDim'] = 0
410 else:
410 else:
411 if self.uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels
411 if self.uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels
@@ -183,9 +183,8 class selectHeights(Operation):
183 """
183 """
184
184
185 self.dataOut = dataOut
185 self.dataOut = dataOut
186
186 #if minHei and maxHei:
187 if minHei and maxHei:
187 if 1:
188 #if 1:
189 if minHei == None:
188 if minHei == None:
190 minHei = self.dataOut.heightList[0]
189 minHei = self.dataOut.heightList[0]
191
190
@@ -201,10 +200,8 class selectHeights(Operation):
201 minIndex = 0
200 minIndex = 0
202 maxIndex = 0
201 maxIndex = 0
203 heights = self.dataOut.heightList
202 heights = self.dataOut.heightList
204
205 inda = numpy.where(heights >= minHei)
203 inda = numpy.where(heights >= minHei)
206 indb = numpy.where(heights <= maxHei)
204 indb = numpy.where(heights <= maxHei)
207
208 try:
205 try:
209 minIndex = inda[0][0]
206 minIndex = inda[0][0]
210 except:
207 except:
@@ -218,7 +215,6 class selectHeights(Operation):
218 self.selectHeightsByIndex(minIndex, maxIndex)
215 self.selectHeightsByIndex(minIndex, maxIndex)
219 #print(self.dataOut.nHeights)
216 #print(self.dataOut.nHeights)
220
217
221
222 return self.dataOut
218 return self.dataOut
223
219
224 def selectHeightsByIndex(self, minIndex, maxIndex):
220 def selectHeightsByIndex(self, minIndex, maxIndex):
@@ -239,6 +235,7 class selectHeights(Operation):
239 """
235 """
240
236
241 if self.dataOut.type == 'Voltage':
237 if self.dataOut.type == 'Voltage':
238 #print("SOS",minIndex, maxIndex)
242 if (minIndex < 0) or (minIndex > maxIndex):
239 if (minIndex < 0) or (minIndex > maxIndex):
243 raise ValueError("Height index range (%d,%d) is not valid" % (minIndex, maxIndex))
240 raise ValueError("Height index range (%d,%d) is not valid" % (minIndex, maxIndex))
244
241
@@ -11531,7 +11528,7 class Decoder(Operation):
11531
11528
11532 self.ndatadec = self.__nHeis #- self.nBaud + 1
11529 self.ndatadec = self.__nHeis #- self.nBaud + 1
11533
11530
11534 self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype=numpy.complex)
11531 self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype=numpy.complex_)
11535
11532
11536 else:
11533 else:
11537
11534
General Comments 0
You need to be logged in to leave comments. Login now