@@ -262,6 +262,7 class RadarControllerHeader(Header): | |||||
262 | self.flip1 = flip1 |
|
262 | self.flip1 = flip1 | |
263 | self.flip2 = flip2 |
|
263 | self.flip2 = flip2 | |
264 |
|
264 | |||
|
265 | self.code_size = int(numpy.ceil(self.nBaud/32.))*self.nCode*4 | |||
265 | # self.dynamic = numpy.array([],numpy.dtype('byte')) |
|
266 | # self.dynamic = numpy.array([],numpy.dtype('byte')) | |
266 |
|
267 | |||
267 |
|
268 | |||
@@ -303,7 +304,8 class RadarControllerHeader(Header): | |||||
303 | self.samplesWin = samplingWindow['nsa'] |
|
304 | self.samplesWin = samplingWindow['nsa'] | |
304 |
|
305 | |||
305 | self.Taus = numpy.fromfile(fp,'<f4',self.numTaus) |
|
306 | self.Taus = numpy.fromfile(fp,'<f4',self.numTaus) | |
306 |
|
307 | |||
|
308 | self.code_size = 0 | |||
307 | if self.codeType != 0: |
|
309 | if self.codeType != 0: | |
308 | self.nCode = int(numpy.fromfile(fp,'<u4',1)) |
|
310 | self.nCode = int(numpy.fromfile(fp,'<u4',1)) | |
309 | self.nBaud = int(numpy.fromfile(fp,'<u4',1)) |
|
311 | self.nBaud = int(numpy.fromfile(fp,'<u4',1)) |
@@ -580,7 +580,7 class JRODataReader(JRODataIO): | |||||
580 | idFile += 1 |
|
580 | idFile += 1 | |
581 | if not(idFile < len(self.filenameList)): |
|
581 | if not(idFile < len(self.filenameList)): | |
582 | self.flagNoMoreFiles = 1 |
|
582 | self.flagNoMoreFiles = 1 | |
583 | print "No more Files" |
|
583 | # print "[Reading] No more Files" | |
584 | return 0 |
|
584 | return 0 | |
585 |
|
585 | |||
586 | filename = self.filenameList[idFile] |
|
586 | filename = self.filenameList[idFile] | |
@@ -598,7 +598,7 class JRODataReader(JRODataIO): | |||||
598 | self.fileSize = fileSize |
|
598 | self.fileSize = fileSize | |
599 | self.fp = fp |
|
599 | self.fp = fp | |
600 |
|
600 | |||
601 | print "[Reading] Setting the file: %s"%self.filename |
|
601 | # print "[Reading] Setting the file: %s"%self.filename | |
602 |
|
602 | |||
603 | return 1 |
|
603 | return 1 | |
604 |
|
604 | |||
@@ -650,10 +650,10 class JRODataReader(JRODataIO): | |||||
650 |
|
650 | |||
651 | for nTries in range( tries ): |
|
651 | for nTries in range( tries ): | |
652 | if firstTime_flag: |
|
652 | if firstTime_flag: | |
653 | print "\tWaiting %0.2f sec for the file \"%s\" , try %03d ..." % ( self.delay, filename, nTries+1 ) |
|
653 | print "\t[Reading] Waiting %0.2f sec for the file \"%s\" , try %03d ..." % ( self.delay, filename, nTries+1 ) | |
654 | sleep( self.delay ) |
|
654 | sleep( self.delay ) | |
655 | else: |
|
655 | else: | |
656 | print "\tSearching next \"%s%04d%03d%03d%s\" file ..." % (self.optchar, self.year, self.doy, self.set, self.ext) |
|
656 | print "\t[Reading] Searching the next \"%s%04d%03d%03d%s\" file ..." % (self.optchar, self.year, self.doy, self.set, self.ext) | |
657 |
|
657 | |||
658 | fullfilename, filename = checkForRealPath( self.path, self.foldercounter, self.year, self.doy, self.set, self.ext ) |
|
658 | fullfilename, filename = checkForRealPath( self.path, self.foldercounter, self.year, self.doy, self.set, self.ext ) | |
659 | if fullfilename: |
|
659 | if fullfilename: | |
@@ -666,7 +666,7 class JRODataReader(JRODataIO): | |||||
666 |
|
666 | |||
667 | firstTime_flag = False |
|
667 | firstTime_flag = False | |
668 |
|
668 | |||
669 | print "\tSkipping the file \"%s\" due to this file doesn't exist" % filename |
|
669 | print "\t[Reading] Skipping the file \"%s\" due to this file doesn't exist" % filename | |
670 | self.set += 1 |
|
670 | self.set += 1 | |
671 |
|
671 | |||
672 | if nFiles == (self.nFiles-1): #si no encuentro el file buscado cambio de carpeta y busco en la siguiente carpeta |
|
672 | if nFiles == (self.nFiles-1): #si no encuentro el file buscado cambio de carpeta y busco en la siguiente carpeta | |
@@ -681,14 +681,14 class JRODataReader(JRODataIO): | |||||
681 | if self.fp != None: self.fp.close() |
|
681 | if self.fp != None: self.fp.close() | |
682 | self.fp = open(fullfilename, 'rb') |
|
682 | self.fp = open(fullfilename, 'rb') | |
683 | self.flagNoMoreFiles = 0 |
|
683 | self.flagNoMoreFiles = 0 | |
684 | print '[Reading] Setting the file: %s' % fullfilename |
|
684 | # print '[Reading] Setting the file: %s' % fullfilename | |
685 | else: |
|
685 | else: | |
686 | self.fileSize = 0 |
|
686 | self.fileSize = 0 | |
687 | self.filename = None |
|
687 | self.filename = None | |
688 | self.flagIsNewFile = 0 |
|
688 | self.flagIsNewFile = 0 | |
689 | self.fp = None |
|
689 | self.fp = None | |
690 | self.flagNoMoreFiles = 1 |
|
690 | self.flagNoMoreFiles = 1 | |
691 | print '[Reading] No more files to read' |
|
691 | # print '[Reading] No more files to read' | |
692 |
|
692 | |||
693 | return fileOk_flag |
|
693 | return fileOk_flag | |
694 |
|
694 | |||
@@ -702,8 +702,11 class JRODataReader(JRODataIO): | |||||
702 | newFile = self.__setNextFileOffline() |
|
702 | newFile = self.__setNextFileOffline() | |
703 |
|
703 | |||
704 | if not(newFile): |
|
704 | if not(newFile): | |
|
705 | print '[Reading] No more files to read' | |||
705 | return 0 |
|
706 | return 0 | |
706 |
|
707 | |||
|
708 | print '[Reading] Setting the file: %s' % self.filename | |||
|
709 | ||||
707 | self.__readFirstHeader() |
|
710 | self.__readFirstHeader() | |
708 | self.nReadBlocks = 0 |
|
711 | self.nReadBlocks = 0 | |
709 | return 1 |
|
712 | return 1 |
@@ -557,7 +557,7 class SpectraWriter(JRODataWriter, Operation): | |||||
557 | self.nWriteBlocks += 1 |
|
557 | self.nWriteBlocks += 1 | |
558 | self.blockIndex += 1 |
|
558 | self.blockIndex += 1 | |
559 |
|
559 | |||
560 |
print "[Writing] Block = " |
|
560 | # print "[Writing] Block = %d04" %self.blockIndex | |
561 |
|
561 | |||
562 | def putData(self): |
|
562 | def putData(self): | |
563 | """ |
|
563 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now