def __init__(self, **kwargs): """ Inputs: None """ ProcessingUnit.__init__(self, **kwargs) self.dataOut = Parameters() self.isConfig = False
class BLTRParametersProc(ProcessingUnit): ''' Processing unit for BLTR parameters data (winds) Inputs: self.dataOut.nmodes - Number of operation modes self.dataOut.nchannels - Number of channels self.dataOut.nranges - Number of ranges self.dataOut.data_snr - SNR array self.dataOut.data_output - Zonal, Vertical and Meridional velocity array self.dataOut.height - Height array (km) self.dataOut.time - Time array (seconds) self.dataOut.fileIndex -Index of the file currently read self.dataOut.lat - Latitude coordinate of BLTR location self.dataOut.doy - Experiment doy (number of the day in the current year) self.dataOut.month - Experiment month self.dataOut.day - Experiment day self.dataOut.year - Experiment year ''' def __init__(self): ''' Inputs: None ''' ProcessingUnit.__init__(self) self.dataOut = Parameters() def setup(self, mode): ''' ''' self.dataOut.mode = mode def run(self, mode, snr_threshold=None): ''' Inputs: mode = High resolution (0) or Low resolution (1) data snr_threshold = snr filter value ''' if not self.isConfig: self.setup(mode) self.isConfig = True if self.dataIn.type == 'Parameters': self.dataOut.copy(self.dataIn) self.dataOut.data_param = self.dataOut.data[mode] self.dataOut.heightList = self.dataOut.height[0] self.dataOut.data_snr = self.dataOut.data_snr[mode] if snr_threshold is not None: SNRavg = numpy.average(self.dataOut.data_snr, axis=0) SNRavgdB = 10 * numpy.log10(SNRavg) for i in range(3): self.dataOut.data_param[i][ SNRavgdB <= snr_threshold] = numpy.nan
class PXParametersProc(ProcessingUnit): ''' Processing unit for PX parameters data ''' def __init__(self, **kwargs): """ Inputs: None """ ProcessingUnit.__init__(self, **kwargs) self.dataOut = Parameters() self.isConfig = False def setup(self, mode): """ """ self.dataOut.mode = mode def run(self, mode): """ Args: mode (str): select independent variable 'E' for elevation or 'A' for azimuth """ if not self.isConfig: self.setup(mode) self.isConfig = True if self.dataIn.type == 'Parameters': self.dataOut.copy(self.dataIn) self.dataOut.data_param = numpy.array( [self.dataOut.data[var] for var in self.dataOut.parameters]) self.dataOut.data_param[self.dataOut.data_param == self.dataOut.missing] = numpy.nan if mode.upper() == 'E': self.dataOut.heightList = self.dataOut.data['Azimuth'] else: self.dataOut.heightList = self.dataOut.data['Elevation'] attrs = [ 'units', 'elevation', 'azimuth', 'max_range', 'latitude', 'longitude' ] meta = {} for attr in attrs: meta[attr] = getattr(self.dataOut, attr) meta['mode'] = mode self.dataOut.meta = meta
def __init__(self): Operation.__init__(self) self.dataOut = Parameters() self.counter = 0 self.path = None self.fp = None
def __init__(self, **kwargs): ProcessingUnit.__init__(self, **kwargs) self.dataOut = Parameters() self.counter_records = 0 self.flagNoMoreFiles = 0 self.isConfig = False self.filename = None self.clockpulse = 0.15 self.kd = 213.6
def __init__(self): ProcessingUnit.__init__(self) self.dataOut = Parameters() self.dataOut.timezone = 300 self.counter_records = 0 self.flagNoMoreFiles = 0 self.isConfig = False self.filename = None self.status_value = 0 self.datatime = datetime.datetime(1900, 1, 1) self.filefmt = "*********%Y%m%d******"
def __init__(self): ProcessingUnit.__init__(self) self.dataOut = Parameters() self.counter_records = 0 self.nrecords = None self.flagNoMoreFiles = 0 self.filename = None self.intervals = set() self.datatime = datetime.datetime(1900, 1, 1) self.format = None self.filefmt = "***%Y%m%d*******"
def __init__(self, **kwargs): ProcessingUnit.__init__(self, **kwargs) self.dataOut = Parameters() self.counter_records = 0 self.nrecords = None self.flagNoMoreFiles = 0 self.isConfig = False self.filename = None self.intervals = set() self.ext = ('.nc', '.tgz') self.online_mode = False
def __init__(self): ''' Inputs: None ''' ProcessingUnit.__init__(self) self.dataOut = Parameters()