##// END OF EJS Templates
Correcting floats slicing bug
jespinoza -
r1236:834118a512ca
parent child
Show More
@@ -315,7 +315,7 class VoltageReader(JRODataReader, ProcessingUnit):
315 self.nTxs, self.processingHeaderObj.nHeights))
315 self.nTxs, self.processingHeaderObj.nHeights))
316
316
317 self.datablock = self.datablock.reshape(
317 self.datablock = self.datablock.reshape(
318 (self.systemHeaderObj.nChannels, self.processingHeaderObj.profilesPerBlock * self.nTxs, self.processingHeaderObj.nHeights / self.nTxs))
318 (self.systemHeaderObj.nChannels, self.processingHeaderObj.profilesPerBlock * self.nTxs, int(self.processingHeaderObj.nHeights / self.nTxs)))
319
319
320 self.dataOut.nProfiles = self.processingHeaderObj.profilesPerBlock * self.nTxs
320 self.dataOut.nProfiles = self.processingHeaderObj.profilesPerBlock * self.nTxs
321 self.dataOut.heightList = numpy.arange(self.processingHeaderObj.nHeights / self.nTxs) * \
321 self.dataOut.heightList = numpy.arange(self.processingHeaderObj.nHeights / self.nTxs) * \
@@ -463,7 +463,6 class VoltageReader(JRODataReader, ProcessingUnit):
463 """
463 """
464 if self.flagNoMoreFiles:
464 if self.flagNoMoreFiles:
465 self.dataOut.flagNoData = True
465 self.dataOut.flagNoData = True
466 print('Process finished')
467 return 0
466 return 0
468 self.flagDiscontinuousBlock = 0
467 self.flagDiscontinuousBlock = 0
469 self.flagIsNewBlock = 0
468 self.flagIsNewBlock = 0
@@ -492,16 +491,6 class VoltageReader(JRODataReader, ProcessingUnit):
492
491
493 self.profileIndex += 1
492 self.profileIndex += 1
494
493
495 # elif self.selBlocksize==None or self.selBlocksize==self.dataOut.nProfiles:
496 # """
497 # Return all block
498 # """
499 # self.dataOut.flagDataAsBlock = True
500 # self.dataOut.data = self.datablock
501 # self.dataOut.profileIndex = self.dataOut.nProfiles - 1
502 #
503 # self.profileIndex = self.dataOut.nProfiles
504
505 else:
494 else:
506 """
495 """
507 Return a block
496 Return a block
@@ -229,8 +229,8 class VoltageProc(ProcessingUnit):
229 """
229 """
230 Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
230 Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
231 """
231 """
232 buffer = self.dataOut.data[:, :, 0:int(self.dataOut.nHeights-r)]
232 buffer = self.dataOut.data[:, :, 0:int(self.dataOut.nHeights-r)]
233 buffer = buffer.reshape(self.dataOut.nChannels,self.dataOut.nProfiles,self.dataOut.nHeights/window,window)
233 buffer = buffer.reshape(self.dataOut.nChannels, self.dataOut.nProfiles, int(self.dataOut.nHeights/window), window)
234 buffer = numpy.sum(buffer,3)
234 buffer = numpy.sum(buffer,3)
235
235
236 else:
236 else:
@@ -665,8 +665,7 class Decoder(Operation):
665
665
666 def __convolutionByBlockInTime(self, data):
666 def __convolutionByBlockInTime(self, data):
667
667
668 repetitions = self.__nProfiles / self.nCode
668 repetitions = int(self.__nProfiles / self.nCode)
669
670 junk = numpy.lib.stride_tricks.as_strided(self.code, (repetitions, self.code.size), (0, self.code.itemsize))
669 junk = numpy.lib.stride_tricks.as_strided(self.code, (repetitions, self.code.size), (0, self.code.itemsize))
671 junk = junk.flatten()
670 junk = junk.flatten()
672 code_block = numpy.reshape(junk, (self.nCode*repetitions, self.nBaud))
671 code_block = numpy.reshape(junk, (self.nCode*repetitions, self.nBaud))
General Comments 0
You need to be logged in to leave comments. Login now