##// END OF EJS Templates
remove profilehooks imports
Juan C. Espinoza -
r1050:d6a89c93744f
parent child
Show More
@@ -1,6 +1,5
1 1 import sys
2 2 import numpy
3 from profilehooks import profile
4 3 from scipy import interpolate
5 4 from schainpy import cSchain
6 5 from jroproc_base import ProcessingUnit, Operation
@@ -623,13 +622,6 class Decoder(Operation):
623 622
624 623 return self.datadecTime
625 624
626 #@profile
627 def oldCorrelate(self, i, data, code_block):
628 profilesList = xrange(self.__nProfiles)
629 for j in profilesList:
630 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
631
632 #@profile
633 625 def __convolutionByBlockInTime(self, data):
634 626
635 627 repetitions = self.__nProfiles / self.nCode
@@ -639,25 +631,10 class Decoder(Operation):
639 631 code_block = numpy.reshape(junk, (self.nCode*repetitions, self.nBaud))
640 632 profilesList = xrange(self.__nProfiles)
641 633
642 # def toVectorize(a,b):
643 # return numpy.correlate(a,b, mode='full')
644 # vectorized = numpy.vectorize(toVectorize, signature='(n),(m)->(k)')
645 for i in range(self.__nChannels):
646 # self.datadecTime[i,:,:] = numpy.array([numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:] for j in profilesList ])
647 # def func(i, j):
648 # self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
649 # map(lambda j: func(i, j), range(self.__nProfiles))
650 #print data[i,:,:].shape
651 # self.datadecTime[i,:,:] = vectorized(data[i,:,:], code_block[:,:])[:,self.nBaud-1:]
652 for j in profilesList:
653 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
654 # print data[i,:,:]
655 # print cSchain.correlateByBlock(data[i,:,:], code_block, 2)
656 # self.datadecTime[i,:,:] = cSchain.correlateByBlock(data[i,:,:], code_block, 2)
657 # print self.datadecTime[i,:,:]
658 #print self.datadecTime[i,:,:].shape
659 return self.datadecTime
660
634 for i in range(self.__nChannels):
635 for j in profilesList:
636 self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
637 return self.datadecTime
661 638
662 639 def __convolutionByBlockInFreq(self, data):
663 640
@@ -7,7 +7,6 import json
7 7 import numpy
8 8 import paho.mqtt.client as mqtt
9 9 import zmq
10 from profilehooks import profile
11 10 import datetime
12 11 from zmq.utils.monitor import recv_monitor_message
13 12 from functools import wraps
General Comments 0
You need to be logged in to leave comments. Login now