@@ -1400,13 +1400,13 class VoltageReader(JRODataReader): | |||
|
1400 | 1400 | |
|
1401 | 1401 | self.dataOut.flagShiftFFT = False |
|
1402 | 1402 | |
|
1403 |
if self. |
|
|
1403 | if self.radarControllerHeaderObj.code != None: | |
|
1404 | 1404 | |
|
1405 |
self.dataOut.nCode = self. |
|
|
1405 | self.dataOut.nCode = self.radarControllerHeaderObj.nCode | |
|
1406 | 1406 | |
|
1407 |
self.dataOut.nBaud = self. |
|
|
1407 | self.dataOut.nBaud = self.radarControllerHeaderObj.nBaud | |
|
1408 | 1408 | |
|
1409 |
self.dataOut.code = self. |
|
|
1409 | self.dataOut.code = self.radarControllerHeaderObj.code | |
|
1410 | 1410 | |
|
1411 | 1411 | self.dataOut.systemHeaderObj = self.systemHeaderObj.copy() |
|
1412 | 1412 |
@@ -360,7 +360,7 class VoltageProc(ProcessingUnit): | |||
|
360 | 360 | buffer = buffer.reshape(self.dataOut.data.shape[0],self.dataOut.data.shape[1]/window,window) |
|
361 | 361 | buffer = numpy.average(buffer,2) |
|
362 | 362 | self.dataOut.data = buffer |
|
363 | self.dataOut.heightList = numpy.arange(self.dataOut.heightList[0],newdelta*self.dataOut.nHeights/window,newdelta) | |
|
363 | self.dataOut.heightList = numpy.arange(self.dataOut.heightList[0],newdelta*self.dataOut.nHeights/window-newdelta,newdelta) | |
|
364 | 364 | |
|
365 | 365 | |
|
366 | 366 | |
@@ -586,7 +586,7 class Decoder(Operation): | |||
|
586 | 586 | |
|
587 | 587 | def convolutionInFreq(self, data): |
|
588 | 588 | |
|
589 |
ndata = data.shape |
|
|
589 | nchannel, ndata = data.shape | |
|
590 | 590 | newcode = numpy.zeros(ndata) |
|
591 | 591 | newcode[0:self.nBaud] = self.code[self.__profIndex] |
|
592 | 592 | |
@@ -604,8 +604,9 class Decoder(Operation): | |||
|
604 | 604 | datadec = data[:,:-self.nBaud+1] |
|
605 | 605 | ndatadec = ndata - self.nBaud + 1 |
|
606 | 606 | |
|
607 | if self.__profIndex == self.nCode: | |
|
607 | if self.__profIndex == self.nCode-1: | |
|
608 | 608 | self.__profIndex = 0 |
|
609 | return ndatadec, datadec | |
|
609 | 610 | |
|
610 | 611 | self.__profIndex += 1 |
|
611 | 612 | |
@@ -614,18 +615,18 class Decoder(Operation): | |||
|
614 | 615 | |
|
615 | 616 | def convolutionInTime(self, data): |
|
616 | 617 | |
|
617 |
nchannel = data.shape |
|
|
618 | nchannel, ndata = data.shape | |
|
618 | 619 | newcode = self.code[self.__profIndex] |
|
620 | ndatadec = ndata - self.nBaud + 1 | |
|
619 | 621 | |
|
620 |
datadec = |
|
|
622 | datadec = numpy.zeros((nchannel, ndatadec)) | |
|
621 | 623 | |
|
622 | 624 | for i in range(nchannel): |
|
623 | 625 | datadec[i,:] = numpy.correlate(data[i,:], newcode) |
|
624 | 626 | |
|
625 | ndatadec = ndata - self.nBaud + 1 | |
|
626 | ||
|
627 | if self.__profIndex == self.nCode: | |
|
628 | self.__profIndex = 0 | |
|
627 | if self.__profIndex == self.nCode-1: | |
|
628 | self.__profIndex = 0 | |
|
629 | return ndatadec, datadec | |
|
629 | 630 | |
|
630 | 631 | self.__profIndex += 1 |
|
631 | 632 | |
@@ -642,14 +643,15 class Decoder(Operation): | |||
|
642 | 643 | self.__isConfig = True |
|
643 | 644 | |
|
644 | 645 | if mode == 0: |
|
645 | ndatadec, datadec = self.convolutionInFreq(data) | |
|
646 | ndatadec, datadec = self.convolutionInFreq(dataOut.data) | |
|
646 | 647 | |
|
647 | 648 | if mode == 1: |
|
648 | ndatadec, datadec = self.convolutionInTime(data) | |
|
649 | print "This function is not implemented" | |
|
650 | # ndatadec, datadec = self.convolutionInTime(dataOut.data) | |
|
649 | 651 | |
|
650 | 652 | dataOut.data = datadec |
|
651 | 653 | |
|
652 |
dataOut.heightList = dataOut.heightList[0:ndatadec |
|
|
654 | dataOut.heightList = dataOut.heightList[0:ndatadec] | |
|
653 | 655 | |
|
654 | 656 | dataOut.flagDecodeData = True #asumo q la data no esta decodificada |
|
655 | 657 |
General Comments 0
You need to be logged in to leave comments.
Login now