@@ -516,7 +516,7 class Plot(Operation): | |||||
516 | ''' |
|
516 | ''' | |
517 | if stitle is not None: |
|
517 | if stitle is not None: | |
518 | s_string = re.sub(r"[^A-Z0-9.]","",str(stitle)) |
|
518 | s_string = re.sub(r"[^A-Z0-9.]","",str(stitle)) | |
519 |
new_string=s_string[:3] |
|
519 | new_string=s_string[:3]+"_"+s_string[4:6]+"_"+s_string[6:] | |
520 |
|
520 | |||
521 | if self.oneFigure: |
|
521 | if self.oneFigure: | |
522 | if (self.data.max_time - self.save_time) <= self.save_period: |
|
522 | if (self.data.max_time - self.save_time) <= self.save_period: |
@@ -625,15 +625,17 class HDFWriter(Operation): | |||||
625 | return key |
|
625 | return key | |
626 | return name |
|
626 | return name | |
627 | else: |
|
627 | else: | |
628 |
if ' |
|
628 | if 'Data' in self.description: | |
629 |
|
|
629 | data = self.description['Data'] | |
|
630 | if 'Metadata' in self.description: | |||
|
631 | data.update(self.description['Metadata']) | |||
630 | else: |
|
632 | else: | |
631 |
|
|
633 | data = self.description | |
632 |
if name in |
|
634 | if name in data: | |
633 |
if isinstance( |
|
635 | if isinstance(data[name], list): | |
634 |
return |
|
636 | return data[name][x] | |
635 |
elif isinstance( |
|
637 | elif isinstance(data[name], dict): | |
636 |
for key, value in |
|
638 | for key, value in data[name].items(): | |
637 | return value[x] |
|
639 | return value[x] | |
638 | if 'cspc' in name: |
|
640 | if 'cspc' in name: | |
639 | return 'pair{:02d}'.format(x) |
|
641 | return 'pair{:02d}'.format(x) | |
@@ -677,6 +679,7 class HDFWriter(Operation): | |||||
677 | data = [] |
|
679 | data = [] | |
678 |
|
680 | |||
679 | for dsInfo in self.dsList: |
|
681 | for dsInfo in self.dsList: | |
|
682 | ||||
680 | if dsInfo['nDim'] == 0: |
|
683 | if dsInfo['nDim'] == 0: | |
681 | ds = grp.create_dataset( |
|
684 | ds = grp.create_dataset( | |
682 | self.getLabel(dsInfo['variable']), |
|
685 | self.getLabel(dsInfo['variable']), | |
@@ -691,10 +694,14 class HDFWriter(Operation): | |||||
691 | sgrp = grp.create_group(label) |
|
694 | sgrp = grp.create_group(label) | |
692 | else: |
|
695 | else: | |
693 | sgrp = grp |
|
696 | sgrp = grp | |
|
697 | if self.blocksPerFile == 1: | |||
|
698 | shape = dsInfo['shape'][1:] | |||
|
699 | else: | |||
|
700 | shape = (self.blocksPerFile, ) + dsInfo['shape'][1:] | |||
694 | for i in range(dsInfo['dsNumber']): |
|
701 | for i in range(dsInfo['dsNumber']): | |
695 | ds = sgrp.create_dataset( |
|
702 | ds = sgrp.create_dataset( | |
696 | self.getLabel(dsInfo['variable'], i), |
|
703 | self.getLabel(dsInfo['variable'], i), | |
697 |
|
|
704 | shape, | |
698 | chunks=True, |
|
705 | chunks=True, | |
699 | dtype=dsInfo['dtype']) |
|
706 | dtype=dsInfo['dtype']) | |
700 | dtsets.append(ds) |
|
707 | dtsets.append(ds) | |
@@ -720,7 +727,10 class HDFWriter(Operation): | |||||
720 | if ch == -1: |
|
727 | if ch == -1: | |
721 | ds[self.blockIndex] = getattr(self.dataOut, attr) |
|
728 | ds[self.blockIndex] = getattr(self.dataOut, attr) | |
722 | else: |
|
729 | else: | |
723 | ds[self.blockIndex] = getattr(self.dataOut, attr)[ch] |
|
730 | if self.blocksPerFile == 1: | |
|
731 | ds[:] = getattr(self.dataOut, attr)[ch] | |||
|
732 | else: | |||
|
733 | ds[self.blockIndex] = getattr(self.dataOut, attr)[ch] | |||
724 |
|
734 | |||
725 | self.fp.flush() |
|
735 | self.fp.flush() | |
726 | self.blockIndex += 1 |
|
736 | self.blockIndex += 1 |
@@ -105,6 +105,7 class ParametersProc(ProcessingUnit): | |||||
105 | self.dataOut.frequency = self.dataIn.frequency |
|
105 | self.dataOut.frequency = self.dataIn.frequency | |
106 | # self.dataOut.noise = self.dataIn.noise |
|
106 | # self.dataOut.noise = self.dataIn.noise | |
107 | self.dataOut.runNextUnit = self.dataIn.runNextUnit |
|
107 | self.dataOut.runNextUnit = self.dataIn.runNextUnit | |
|
108 | self.dataOut.h0 = self.dataIn.h0 | |||
108 |
|
109 | |||
109 | def run(self, runNextUnit = 0): |
|
110 | def run(self, runNextUnit = 0): | |
110 |
|
111 | |||
@@ -4256,10 +4257,9 class PedestalInformation(Operation): | |||||
4256 | dataOut.flagNoData = False |
|
4257 | dataOut.flagNoData = False | |
4257 | if numpy.isnan(az) or numpy.isnan(el) : |
|
4258 | if numpy.isnan(az) or numpy.isnan(el) : | |
4258 | dataOut.flagNoData = True |
|
4259 | dataOut.flagNoData = True | |
4259 | #print("NAN") |
|
|||
4260 | return dataOut |
|
4260 | return dataOut | |
4261 |
|
4261 | |||
4262 |
dataOut.azimuth = az |
|
4262 | dataOut.azimuth = az + az_offset | |
4263 | if dataOut.azimuth < 0: |
|
4263 | if dataOut.azimuth < 0: | |
4264 | dataOut.azimuth += 360 |
|
4264 | dataOut.azimuth += 360 | |
4265 | dataOut.elevation = el |
|
4265 | dataOut.elevation = el |
General Comments 0
You need to be logged in to leave comments.
Login now