##// END OF EJS Templates
añadido FaradayIntegration para limpieza de datos, restringida la operación al funcionamiento con la pdata regular
añadido FaradayIntegration para limpieza de datos, restringida la operación al funcionamiento con la pdata regular

File last commit:

r1167:1f521b07c958
r1399:101813202a42
Show More
pxproc_parameters.py
63 lines | 1.6 KiB | text/x-python | PythonLexer
/ schainpy / model / proc / pxproc_parameters.py
NCDFReader -> PXReader, add PXParametersProc to select ppi or rhi modes
r1140 '''
Created on Oct 24, 2016
@author: roj- LouVD
'''
import numpy
import datetime
import time
from time import gmtime
from numpy import transpose
George Yong
Python 2to3, Spectra (all operations) working
r1167 from .jroproc_base import ProcessingUnit, Operation
NCDFReader -> PXReader, add PXParametersProc to select ppi or rhi modes
r1140 from schainpy.model.data.jrodata import Parameters
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']
Change AER to Geodetic coordinates in PX plots
r1145 attrs = ['units', 'elevation', 'azimuth', 'max_range', 'latitude', 'longitude']
NCDFReader -> PXReader, add PXParametersProc to select ppi or rhi modes
r1140 meta = {}
for attr in attrs:
meta[attr] = getattr(self.dataOut, attr)
meta['mode'] = mode
self.dataOut.meta = meta