##// END OF EJS Templates
hora y fecha en el primer bloque hdf5 >> consola
joabAM -
r1400:005589ae0527
parent child
Show More
@@ -115,7 +115,7 class AMISRReader(ProcessingUnit):
115 self.searchFilesOnLine(path, startDate, endDate, startTime,endTime,walk)
115 self.searchFilesOnLine(path, startDate, endDate, startTime,endTime,walk)
116
116
117 if not(self.filenameList):
117 if not(self.filenameList):
118 print("There is no files into the folder: %s"%(path))
118 raise schainpy.admin.SchainWarning("There is no files into the folder: %s"%(path))
119 sys.exit()
119 sys.exit()
120
120
121 self.fileIndex = 0
121 self.fileIndex = 0
@@ -135,7 +135,7 class AMISRReader(ProcessingUnit):
135 if self.isConfig and (not self.flagNoMoreFiles):
135 if self.isConfig and (not self.flagNoMoreFiles):
136 newShape = fp.get('Raw11/Data/Samples/Data').shape[1:]
136 newShape = fp.get('Raw11/Data/Samples/Data').shape[1:]
137 if self.dataShape != newShape and newShape != None:
137 if self.dataShape != newShape and newShape != None:
138 print("\nNEW FILE HAS A DIFFERENT SHAPE")
138 raise schainpy.admin.SchainError("NEW FILE HAS A DIFFERENT SHAPE: ")
139 print(self.dataShape,newShape,"\n")
139 print(self.dataShape,newShape,"\n")
140 return 0
140 return 0
141 else:
141 else:
@@ -411,7 +411,7 class AMISRReader(ProcessingUnit):
411 self.fileIndex += 1
411 self.fileIndex += 1
412 except:
412 except:
413 self.flagNoMoreFiles = 1
413 self.flagNoMoreFiles = 1
414 print("No more Files")
414 raise schainpy.admin.SchainError('No more files to read')
415 return 0
415 return 0
416
416
417 self.flagIsNewFile = 1
417 self.flagIsNewFile = 1
@@ -285,10 +285,16 class HDFReader(Reader, ProcessingUnit):
285 self.dataOut.flagNoData = False
285 self.dataOut.flagNoData = False
286 self.blockIndex += 1
286 self.blockIndex += 1
287
287
288 if self.blockIndex == 1:
288 log.log("Block No. {}/{} -> {}".format(
289 log.log("Block No. {}/{} -> {}".format(
289 self.blockIndex,
290 self.blockIndex,
290 self.blocksPerFile,
291 self.blocksPerFile,
291 self.dataOut.datatime.ctime()), self.name)
292 self.dataOut.datatime.ctime()), self.name)
293 else:
294 log.log("Block No. {}/{} ".format(
295 self.blockIndex,
296 self.blocksPerFile),self.name)
297
292
298
293 return
299 return
294
300
@@ -633,8 +639,10 class HDFWriter(Operation):
633
639
634 self.fp.flush()
640 self.fp.flush()
635 self.blockIndex += 1
641 self.blockIndex += 1
642 if self.blockIndex == 1:
643 log.log('Block No. {}/{} --> {}'.format(self.blockIndex, self.blocksPerFile,self.dataOut.datatime.ctime()), self.name)
644 else:
636 log.log('Block No. {}/{}'.format(self.blockIndex, self.blocksPerFile), self.name)
645 log.log('Block No. {}/{}'.format(self.blockIndex, self.blocksPerFile), self.name)
637
638 return
646 return
639
647
640 def closeFile(self):
648 def closeFile(self):
General Comments 0
You need to be logged in to leave comments. Login now