##// END OF EJS Templates
Se corrige bug en el metodo filterByHeights....
Daniel Valdez -
r236:b12f3705eeef
parent child
Show More
@@ -1400,13 +1400,13 class VoltageReader(JRODataReader):
1400
1400
1401 self.dataOut.flagShiftFFT = False
1401 self.dataOut.flagShiftFFT = False
1402
1402
1403 if self.processingHeaderObj.code != None:
1403 if self.radarControllerHeaderObj.code != None:
1404
1404
1405 self.dataOut.nCode = self.processingHeaderObj.nCode
1405 self.dataOut.nCode = self.radarControllerHeaderObj.nCode
1406
1406
1407 self.dataOut.nBaud = self.processingHeaderObj.nBaud
1407 self.dataOut.nBaud = self.radarControllerHeaderObj.nBaud
1408
1408
1409 self.dataOut.code = self.processingHeaderObj.code
1409 self.dataOut.code = self.radarControllerHeaderObj.code
1410
1410
1411 self.dataOut.systemHeaderObj = self.systemHeaderObj.copy()
1411 self.dataOut.systemHeaderObj = self.systemHeaderObj.copy()
1412
1412
@@ -360,7 +360,7 class VoltageProc(ProcessingUnit):
360 buffer = buffer.reshape(self.dataOut.data.shape[0],self.dataOut.data.shape[1]/window,window)
360 buffer = buffer.reshape(self.dataOut.data.shape[0],self.dataOut.data.shape[1]/window,window)
361 buffer = numpy.average(buffer,2)
361 buffer = numpy.average(buffer,2)
362 self.dataOut.data = buffer
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 def convolutionInFreq(self, data):
587 def convolutionInFreq(self, data):
588
588
589 ndata = data.shape[1]
589 nchannel, ndata = data.shape
590 newcode = numpy.zeros(ndata)
590 newcode = numpy.zeros(ndata)
591 newcode[0:self.nBaud] = self.code[self.__profIndex]
591 newcode[0:self.nBaud] = self.code[self.__profIndex]
592
592
@@ -604,8 +604,9 class Decoder(Operation):
604 datadec = data[:,:-self.nBaud+1]
604 datadec = data[:,:-self.nBaud+1]
605 ndatadec = ndata - self.nBaud + 1
605 ndatadec = ndata - self.nBaud + 1
606
606
607 if self.__profIndex == self.nCode:
607 if self.__profIndex == self.nCode-1:
608 self.__profIndex = 0
608 self.__profIndex = 0
609 return ndatadec, datadec
609
610
610 self.__profIndex += 1
611 self.__profIndex += 1
611
612
@@ -614,18 +615,18 class Decoder(Operation):
614
615
615 def convolutionInTime(self, data):
616 def convolutionInTime(self, data):
616
617
617 nchannel = data.shape[1]
618 nchannel, ndata = data.shape
618 newcode = self.code[self.__profIndex]
619 newcode = self.code[self.__profIndex]
620 ndatadec = ndata - self.nBaud + 1
619
621
620 datadec = data.copy()
622 datadec = numpy.zeros((nchannel, ndatadec))
621
623
622 for i in range(nchannel):
624 for i in range(nchannel):
623 datadec[i,:] = numpy.correlate(data[i,:], newcode)
625 datadec[i,:] = numpy.correlate(data[i,:], newcode)
624
626
625 ndatadec = ndata - self.nBaud + 1
627 if self.__profIndex == self.nCode-1:
626
627 if self.__profIndex == self.nCode:
628 self.__profIndex = 0
628 self.__profIndex = 0
629 return ndatadec, datadec
629
630
630 self.__profIndex += 1
631 self.__profIndex += 1
631
632
@@ -642,14 +643,15 class Decoder(Operation):
642 self.__isConfig = True
643 self.__isConfig = True
643
644
644 if mode == 0:
645 if mode == 0:
645 ndatadec, datadec = self.convolutionInFreq(data)
646 ndatadec, datadec = self.convolutionInFreq(dataOut.data)
646
647
647 if mode == 1:
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 dataOut.data = datadec
652 dataOut.data = datadec
651
653
652 dataOut.heightList = dataOut.heightList[0:ndatadec+1]
654 dataOut.heightList = dataOut.heightList[0:ndatadec]
653
655
654 dataOut.flagDecodeData = True #asumo q la data no esta decodificada
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