##// END OF EJS Templates
Fix HDFReader, update metadata list for spectra
Juan C. Espinoza -
r1552:634b09aabe58
parent child
Show More
@@ -196,7 +196,7 class JROData(GenericData):
196
196
197 def __str__(self):
197 def __str__(self):
198
198
199 return '{} - {}'.format(self.type, self.datatime())
199 return '{} - {}'.format(self.type, self.datatime)
200
200
201 def getNoise(self):
201 def getNoise(self):
202
202
@@ -560,8 +560,9 class Spectra(JROData):
560 self.ippFactor = 1
560 self.ippFactor = 1
561 self.beacon_heiIndexList = []
561 self.beacon_heiIndexList = []
562 self.noise_estimation = None
562 self.noise_estimation = None
563 self.spc_noise = None
563 self.metadata_list = ['type', 'heightList', 'timeZone', 'pairsList', 'channelList', 'nCohInt',
564 self.metadata_list = ['type', 'heightList', 'timeZone', 'pairsList', 'channelList', 'nCohInt',
564 'code', 'nCode', 'nBaud', 'ippSeconds', 'ipp', 'nIncohInt', 'nFFTPoints', 'nProfiles']
565 'code', 'nCode', 'nBaud', 'ippSeconds', 'ipp', 'nIncohInt', 'nFFTPoints', 'nProfiles', 'flagDecodeData']
565
566
566 def getNoisebyHildebrand(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=None):
567 def getNoisebyHildebrand(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=None):
567 """
568 """
@@ -582,7 +583,10 class Spectra(JROData):
582
583
583 def getNoise(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=None):
584 def getNoise(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=None):
584
585
585 if self.noise_estimation is not None:
586 if self.spc_noise is not None:
587 # this was estimated by getNoise Operation defined in jroproc_parameters.py
588 return self.spc_noise
589 elif self.noise_estimation is not None:
586 # this was estimated by getNoise Operation defined in jroproc_spectra.py
590 # this was estimated by getNoise Operation defined in jroproc_spectra.py
587 return self.noise_estimation
591 return self.noise_estimation
588 else:
592 else:
@@ -955,6 +959,7 class Parameters(Spectra):
955 nAvg = None
959 nAvg = None
956 noise_estimation = None
960 noise_estimation = None
957 GauSPC = None # Fit gaussian SPC
961 GauSPC = None # Fit gaussian SPC
962 spc_noise = None
958
963
959 def __init__(self):
964 def __init__(self):
960 '''
965 '''
@@ -996,12 +1001,6 class Parameters(Spectra):
996
1001
997 return
1002 return
998
1003
999 def getNoise(self):
1000
1001 return self.spc_noise
1002
1003 noise = property(getNoise, setValue, "I'm the 'Noise' property.")
1004
1005
1004
1006 class PlotterData(object):
1005 class PlotterData(object):
1007 '''
1006 '''
@@ -144,10 +144,7 class HDFReader(Reader, ProcessingUnit):
144
144
145 self.__readMetadata()
145 self.__readMetadata()
146 self.__readData()
146 self.__readData()
147 self.__setBlockList()
147 self.__setBlockList()
148
149 if 'type' in self.meta:
150 self.dataOut = eval(self.meta['type'])()
151
148
152 for attr in self.meta:
149 for attr in self.meta:
153 setattr(self.dataOut, attr, self.meta[attr])
150 setattr(self.dataOut, attr, self.meta[attr])
@@ -278,6 +275,9 class HDFReader(Reader, ProcessingUnit):
278
275
279 self.getData()
276 self.getData()
280
277
278 if 'type' in self.meta:
279 self.dataOut.type = self.meta['type'].decode('utf-8')
280
281 return
281 return
282
282
283 @MPDecorator
283 @MPDecorator
General Comments 0
You need to be logged in to leave comments. Login now