##// END OF EJS Templates
Bug fixed writing pdata files
Miguel Valdez -
r584:aa8cbd77726d
parent child
Show More
@@ -262,6 +262,7 class RadarControllerHeader(Header):
262 262 self.flip1 = flip1
263 263 self.flip2 = flip2
264 264
265 self.code_size = int(numpy.ceil(self.nBaud/32.))*self.nCode*4
265 266 # self.dynamic = numpy.array([],numpy.dtype('byte'))
266 267
267 268
@@ -303,7 +304,8 class RadarControllerHeader(Header):
303 304 self.samplesWin = samplingWindow['nsa']
304 305
305 306 self.Taus = numpy.fromfile(fp,'<f4',self.numTaus)
306
307
308 self.code_size = 0
307 309 if self.codeType != 0:
308 310 self.nCode = int(numpy.fromfile(fp,'<u4',1))
309 311 self.nBaud = int(numpy.fromfile(fp,'<u4',1))
@@ -580,7 +580,7 class JRODataReader(JRODataIO):
580 580 idFile += 1
581 581 if not(idFile < len(self.filenameList)):
582 582 self.flagNoMoreFiles = 1
583 print "No more Files"
583 # print "[Reading] No more Files"
584 584 return 0
585 585
586 586 filename = self.filenameList[idFile]
@@ -598,7 +598,7 class JRODataReader(JRODataIO):
598 598 self.fileSize = fileSize
599 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 603 return 1
604 604
@@ -650,10 +650,10 class JRODataReader(JRODataIO):
650 650
651 651 for nTries in range( tries ):
652 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 654 sleep( self.delay )
655 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 658 fullfilename, filename = checkForRealPath( self.path, self.foldercounter, self.year, self.doy, self.set, self.ext )
659 659 if fullfilename:
@@ -666,7 +666,7 class JRODataReader(JRODataIO):
666 666
667 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 670 self.set += 1
671 671
672 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 681 if self.fp != None: self.fp.close()
682 682 self.fp = open(fullfilename, 'rb')
683 683 self.flagNoMoreFiles = 0
684 print '[Reading] Setting the file: %s' % fullfilename
684 # print '[Reading] Setting the file: %s' % fullfilename
685 685 else:
686 686 self.fileSize = 0
687 687 self.filename = None
688 688 self.flagIsNewFile = 0
689 689 self.fp = None
690 690 self.flagNoMoreFiles = 1
691 print '[Reading] No more files to read'
691 # print '[Reading] No more files to read'
692 692
693 693 return fileOk_flag
694 694
@@ -702,8 +702,11 class JRODataReader(JRODataIO):
702 702 newFile = self.__setNextFileOffline()
703 703
704 704 if not(newFile):
705 print '[Reading] No more files to read'
705 706 return 0
706 707
708 print '[Reading] Setting the file: %s' % self.filename
709
707 710 self.__readFirstHeader()
708 711 self.nReadBlocks = 0
709 712 return 1
@@ -557,7 +557,7 class SpectraWriter(JRODataWriter, Operation):
557 557 self.nWriteBlocks += 1
558 558 self.blockIndex += 1
559 559
560 print "[Writing] Block = ", self.blockIndex
560 # print "[Writing] Block = %d04" %self.blockIndex
561 561
562 562 def putData(self):
563 563 """
General Comments 0
You need to be logged in to leave comments. Login now