##// END OF EJS Templates
regresar bloque
José Chávez -
r1005:6d4c9673341e
parent child
Show More
@@ -632,7 +632,7 class Decoder(Operation):
632 632 for j in profilesList:
633 633 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
634 634
635 @profile
635 #@profile
636 636 def __convolutionByBlockInTime(self, data):
637 637
638 638 repetitions = self.__nProfiles / self.nCode
@@ -640,12 +640,11 class Decoder(Operation):
640 640 junk = numpy.lib.stride_tricks.as_strided(self.code, (repetitions, self.code.size), (0, self.code.itemsize))
641 641 junk = junk.flatten()
642 642 code_block = numpy.reshape(junk, (self.nCode*repetitions, self.nBaud))
643
643 profilesList = xrange(self.__nProfiles)
644 644
645 645 # def toVectorize(a,b):
646 646 # return numpy.correlate(a,b, mode='full')
647 647 # vectorized = numpy.vectorize(toVectorize, signature='(n),(m)->(k)')
648 a = time()
649 648 for i in range(self.__nChannels):
650 649 # self.datadecTime[i,:,:] = numpy.array([numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:] for j in profilesList ])
651 650 # def func(i, j):
@@ -653,14 +652,13 class Decoder(Operation):
653 652 # map(lambda j: func(i, j), range(self.__nProfiles))
654 653 #print data[i,:,:].shape
655 654 # self.datadecTime[i,:,:] = vectorized(data[i,:,:], code_block[:,:])[:,self.nBaud-1:]
656 self.oldCorrelate(i, data, code_block)
657 print self.datadecTime[i,:,:]
655 for j in profilesList:
656 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
658 657 # print data[i,:,:]
659 658 # print cSchain.correlateByBlock(data[i,:,:], code_block, 2)
660 self.datadecTime[i,:,:] = cSchain.correlateByBlock(data[i,:,:], code_block, 2)
661 print self.datadecTime[i,:,:]
659 # self.datadecTime[i,:,:] = cSchain.correlateByBlock(data[i,:,:], code_block, 2)
660 # print self.datadecTime[i,:,:]
662 661 #print self.datadecTime[i,:,:].shape
663 print time() - a
664 662 return self.datadecTime
665 663
666 664
General Comments 0
You need to be logged in to leave comments. Login now