##// END OF EJS Templates
Miguel Valdez -
r101:d2f7311ab8fe
parent child
Show More
@@ -43,7 +43,6 class VoltageProcessor:
43 43
44 44 m_CoherentIntegrator= CoherentIntegrator()
45 45
46
47 46 def __init__(self, dataInObj, dataOutObj=None):
48 47 '''
49 48 Constructor
@@ -205,7 +204,7 class VoltageProcessor:
205 204
206 205 def selectChannels(self, channelList):
207 206 """
208 Selecciona un bloque de datos en base a canales y pares segun el channelList y el pairList
207 Selecciona un bloque de datos en base a canales segun el channelList
209 208
210 209 Input:
211 210 channelList : lista sencilla de canales a seleccionar por ej. [2,3,7]
@@ -228,19 +227,16 class VoltageProcessor:
228 227 if channel not in self.dataOutObj.channelList:
229 228 raise ValueError, "The value %d in channelList is not valid" %channel
230 229
231 nchannels = len(channelList)
232 profiles = self.dataOutObj.nProfiles
233 heights = self.dataOutObj.nHeights #m_ProcessingHeader.numHeights
230 nChannels = len(channelList)
234 231
235 data = numpy.zeros( (nchannels,heights), dtype='complex' )
236 for index,channel in enumerate(channelList):
237 data[index,:] = self.dataOutObj.data[channel,:]
232 data = self.dataOutObj.data[channelList,:]
238 233
239 234 self.dataOutObj.data = data
240 235 self.dataOutObj.channelList = channelList
241 self.dataOutObj.nChannels = nchannels
242 self.dataOutObj.m_ProcessingHeader.totalSpectra = nchannels
243 self.dataOutObj.m_SystemHeader.numChannels = nchannels
236 self.dataOutObj.nChannels = nChannels
237
238 self.dataOutObj.m_ProcessingHeader.totalSpectra = nChannels
239 self.dataOutObj.m_SystemHeader.numChannels = nChannels
244 240 self.dataOutObj.m_ProcessingHeader.blockSize = data.size
245 241 return 1
246 242
@@ -321,7 +317,6 class VoltageProcessor:
321 317 raise ValueError, "some value in (%d,%d) is not valid" % (minIndex, maxIndex)
322 318
323 319 nHeights = maxIndex - minIndex + 1
324 firstHeight = 0
325 320
326 321 #voltage
327 322 data = self.dataOutObj.data[:,minIndex:maxIndex+1]
@@ -401,13 +396,11 class Decoder:
401 396
402 397 data = None
403 398 profCounter = 1
404 nCode = ncode
405 nBaud = nbaud
399 nCode = None
400 nBaud = None
406 401 codeIndex = 0
407 code = code #this is a List
408 fft_code = None
402 code = None
409 403 flag = False
410 setCodeFft = False
411 404
412 405 def __init__(self,code, ncode, nbaud):
413 406
@@ -417,9 +410,7 class Decoder:
417 410 self.nBaud = nbaud
418 411 self.codeIndex = 0
419 412 self.code = code #this is a List
420 self.fft_code = None
421 413 self.flag = False
422 self.setCodeFft = False
423 414
424 415 def exe(self, data, ndata=None, type = 0):
425 416
@@ -445,9 +436,7 class Decoder:
445 436 conv = fft_data.copy()
446 437 conv.fill(0)
447 438
448 conv = fft_data*fft_code # This other way to calculate multiplication between bidimensional arrays
449 # for i in range(ndata):
450 # conv[i,:] = fft_data[i,:]*fft_code[i]
439 conv = fft_data*fft_code
451 440
452 441 self.data = numpy.fft.ifft(conv,axis=1)
453 442 self.flag = True
@@ -483,7 +472,7 class CoherentIntegrator:
483 472 data = None
484 473 buffer = None
485 474 flag = False
486 nCohInt = N
475 nCohInt = None
487 476
488 477 def __init__(self, N):
489 478
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now