@@ -306,6 +306,8 class MADReader(JRODataReader, ProcessingUnit): | |||
|
306 | 306 | dum = [] |
|
307 | 307 | if self.ext == '.txt': |
|
308 | 308 | dt = self.data[self.counter_records][:6].astype(int) |
|
309 | if datetime.datetime(dt[0], dt[1], dt[2], dt[3], dt[4], dt[5]).date() > self.datatime.date(): | |
|
310 | self.flagDiscontinuousBlock = 1 | |
|
309 | 311 | self.datatime = datetime.datetime(dt[0], dt[1], dt[2], dt[3], dt[4], dt[5]) |
|
310 | 312 | while True: |
|
311 | 313 | dt = self.data[self.counter_records][:6].astype(int) |
@@ -318,8 +320,6 class MADReader(JRODataReader, ProcessingUnit): | |||
|
318 | 320 | break |
|
319 | 321 | continue |
|
320 | 322 | self.intervals.add((datatime-self.datatime).seconds) |
|
321 | if datatime.date() > self.datatime.date(): | |
|
322 | self.flagDiscontinuousBlock = 1 | |
|
323 | 323 | break |
|
324 | 324 | elif self.ext == '.hdf5': |
|
325 | 325 | datatime = datetime.datetime.utcfromtimestamp( |
@@ -527,8 +527,17 class MADWriter(Operation): | |||
|
527 | 527 | heights = self.dataOut.heightList |
|
528 | 528 | |
|
529 | 529 | if self.ext == '.dat': |
|
530 | invalid = numpy.isnan(self.dataOut.data_output) | |
|
531 | self.dataOut.data_output[invalid] = self.missing | |
|
530 | for key, value in self.twoDDict.items(): | |
|
531 | if isinstance(value, str): | |
|
532 | data = getattr(self.dataOut, value) | |
|
533 | invalid = numpy.isnan(data) | |
|
534 | data[invalid] = self.missing | |
|
535 | elif isinstance(value, (tuple, list)): | |
|
536 | attr, key = value | |
|
537 | data = getattr(self.dataOut, attr) | |
|
538 | invalid = numpy.isnan(data) | |
|
539 | data[invalid] = self.missing | |
|
540 | ||
|
532 | 541 |
out = {} |
|
533 | 542 | for key, value in self.twoDDict.items(): |
|
534 | 543 | key = key.lower() |
@@ -586,7 +595,7 class MADWriter(Operation): | |||
|
586 | 595 | self.fp.append(rec) |
|
587 | 596 | if self.ext == '.hdf5' and self.counter % 500 == 0 and self.counter > 0: |
|
588 | 597 | self.fp.dump() |
|
589 | if self.counter % 10 == 0 and self.counter > 0: | |
|
598 | if self.counter % 100 == 0 and self.counter > 0: | |
|
590 | 599 | log.log( |
|
591 | 600 | 'Writing {} records'.format( |
|
592 | 601 | self.counter), |
General Comments 0
You need to be logged in to leave comments.
Login now