##// END OF EJS Templates
Codificacion optimizada
Miguel Valdez -
r303:2e8a2ff26882
parent child
Show More
@@ -1,7 +1,7
1 import numpy
1 import numpy
2 cimport numpy
2 cimport numpy
3
3
4 def decoder(numpy.ndarray[numpy.float32, ndim=2] fft_code, numpy.ndarray[numpy.complex, ndim=2] data):
4 def decoder(numpy.ndarray[numpy.float32_t, ndim=2] fft_code, numpy.ndarray[numpy.complex_t, ndim=2] data):
5
5
6 fft_data = numpy.fft.fft(data, axis=1)
6 fft_data = numpy.fft.fft(data, axis=1)
7 conv = fft_data*fft_code
7 conv = fft_data*fft_code
@@ -596,7 +596,7 class Decoder(Operation):
596
596
597 self.__nChannels, self.__nHeis = shape
597 self.__nChannels, self.__nHeis = shape
598
598
599 self.__codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype=numpy.float)
599 self.__codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype=numpy.float32)
600
600
601 self.__codeBuffer[:,0:self.nBaud] = self.code
601 self.__codeBuffer[:,0:self.nBaud] = self.code
602
602
@@ -687,6 +687,9 class Decoder(Operation):
687 print "This function is not implemented"
687 print "This function is not implemented"
688 # ndatadec, datadec = self.convolutionInTime(dataOut.data)
688 # ndatadec, datadec = self.convolutionInTime(dataOut.data)
689
689
690 if mode == 3:
691 ndatadec, datadec = self.convolutionInFreqOpt(dataOut.data)
692
690 dataOut.data = datadec
693 dataOut.data = datadec
691
694
692 dataOut.heightList = dataOut.heightList[0:ndatadec]
695 dataOut.heightList = dataOut.heightList[0:ndatadec]
General Comments 0
You need to be logged in to leave comments. Login now