##// 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 197 def __str__(self):
198 198
199 return '{} - {}'.format(self.type, self.datatime())
199 return '{} - {}'.format(self.type, self.datatime)
200 200
201 201 def getNoise(self):
202 202
@@ -560,8 +560,9 class Spectra(JROData):
560 560 self.ippFactor = 1
561 561 self.beacon_heiIndexList = []
562 562 self.noise_estimation = None
563 self.spc_noise = None
563 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 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 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 590 # this was estimated by getNoise Operation defined in jroproc_spectra.py
587 591 return self.noise_estimation
588 592 else:
@@ -955,6 +959,7 class Parameters(Spectra):
955 959 nAvg = None
956 960 noise_estimation = None
957 961 GauSPC = None # Fit gaussian SPC
962 spc_noise = None
958 963
959 964 def __init__(self):
960 965 '''
@@ -996,12 +1001,6 class Parameters(Spectra):
996 1001
997 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 1005 class PlotterData(object):
1007 1006 '''
@@ -144,10 +144,7 class HDFReader(Reader, ProcessingUnit):
144 144
145 145 self.__readMetadata()
146 146 self.__readData()
147 self.__setBlockList()
148
149 if 'type' in self.meta:
150 self.dataOut = eval(self.meta['type'])()
147 self.__setBlockList()
151 148
152 149 for attr in self.meta:
153 150 setattr(self.dataOut, attr, self.meta[attr])
@@ -278,6 +275,9 class HDFReader(Reader, ProcessingUnit):
278 275
279 276 self.getData()
280 277
278 if 'type' in self.meta:
279 self.dataOut.type = self.meta['type'].decode('utf-8')
280
281 281 return
282 282
283 283 @MPDecorator
General Comments 0
You need to be logged in to leave comments. Login now