Coverage for /home/warp/casa/atejeda/coverage/build/linux-x86_64/python/2.7/__casac__/atmosphere : 0%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead.
from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_atmosphere', [dirname(__file__)]) except ImportError: import _atmosphere return _atmosphere if fp is not None: try: _mod = imp.load_module('_atmosphere', fp, pathname, description) finally: fp.close() return _mod _atmosphere = swig_import_helper() del swig_import_helper else: import _atmosphere del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name)
def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0
class atmosphere(_object): """Proxy of C++ casac::atmosphere class""" __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, atmosphere, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, atmosphere, name) __repr__ = _swig_repr __swig_setmethods__["_altitude_getBasicAtmParms"] = _atmosphere.atmosphere__altitude_getBasicAtmParms_set __swig_getmethods__["_altitude_getBasicAtmParms"] = _atmosphere.atmosphere__altitude_getBasicAtmParms_get if _newclass:_altitude_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__altitude_getBasicAtmParms_get, _atmosphere.atmosphere__altitude_getBasicAtmParms_set) __swig_setmethods__["_temperature_getBasicAtmParms"] = _atmosphere.atmosphere__temperature_getBasicAtmParms_set __swig_getmethods__["_temperature_getBasicAtmParms"] = _atmosphere.atmosphere__temperature_getBasicAtmParms_get if _newclass:_temperature_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__temperature_getBasicAtmParms_get, _atmosphere.atmosphere__temperature_getBasicAtmParms_set) __swig_setmethods__["_pressure_getBasicAtmParms"] = _atmosphere.atmosphere__pressure_getBasicAtmParms_set __swig_getmethods__["_pressure_getBasicAtmParms"] = _atmosphere.atmosphere__pressure_getBasicAtmParms_get if _newclass:_pressure_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__pressure_getBasicAtmParms_get, _atmosphere.atmosphere__pressure_getBasicAtmParms_set) __swig_setmethods__["_maxAltitude_getBasicAtmParms"] = _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_set __swig_getmethods__["_maxAltitude_getBasicAtmParms"] = _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_get if _newclass:_maxAltitude_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__maxAltitude_getBasicAtmParms_get, _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_set) __swig_setmethods__["_humidity_getBasicAtmParms"] = _atmosphere.atmosphere__humidity_getBasicAtmParms_set __swig_getmethods__["_humidity_getBasicAtmParms"] = _atmosphere.atmosphere__humidity_getBasicAtmParms_get if _newclass:_humidity_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__humidity_getBasicAtmParms_get, _atmosphere.atmosphere__humidity_getBasicAtmParms_set) __swig_setmethods__["_dTem_dh_getBasicAtmParms"] = _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_set __swig_getmethods__["_dTem_dh_getBasicAtmParms"] = _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_get if _newclass:_dTem_dh_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dTem_dh_getBasicAtmParms_get, _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_set) __swig_setmethods__["_dP_getBasicAtmParms"] = _atmosphere.atmosphere__dP_getBasicAtmParms_set __swig_getmethods__["_dP_getBasicAtmParms"] = _atmosphere.atmosphere__dP_getBasicAtmParms_get if _newclass:_dP_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dP_getBasicAtmParms_get, _atmosphere.atmosphere__dP_getBasicAtmParms_set) __swig_setmethods__["_dPm_getBasicAtmParms"] = _atmosphere.atmosphere__dPm_getBasicAtmParms_set __swig_getmethods__["_dPm_getBasicAtmParms"] = _atmosphere.atmosphere__dPm_getBasicAtmParms_get if _newclass:_dPm_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dPm_getBasicAtmParms_get, _atmosphere.atmosphere__dPm_getBasicAtmParms_set) __swig_setmethods__["_h0_getBasicAtmParms"] = _atmosphere.atmosphere__h0_getBasicAtmParms_set __swig_getmethods__["_h0_getBasicAtmParms"] = _atmosphere.atmosphere__h0_getBasicAtmParms_get if _newclass:_h0_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__h0_getBasicAtmParms_get, _atmosphere.atmosphere__h0_getBasicAtmParms_set) __swig_setmethods__["_atmType_getBasicAtmParms"] = _atmosphere.atmosphere__atmType_getBasicAtmParms_set __swig_getmethods__["_atmType_getBasicAtmParms"] = _atmosphere.atmosphere__atmType_getBasicAtmParms_get if _newclass:_atmType_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__atmType_getBasicAtmParms_get, _atmosphere.atmosphere__atmType_getBasicAtmParms_set) __swig_setmethods__["_thickness_getProfile"] = _atmosphere.atmosphere__thickness_getProfile_set __swig_getmethods__["_thickness_getProfile"] = _atmosphere.atmosphere__thickness_getProfile_get if _newclass:_thickness_getProfile = _swig_property(_atmosphere.atmosphere__thickness_getProfile_get, _atmosphere.atmosphere__thickness_getProfile_set) __swig_setmethods__["_temperature_getProfile"] = _atmosphere.atmosphere__temperature_getProfile_set __swig_getmethods__["_temperature_getProfile"] = _atmosphere.atmosphere__temperature_getProfile_get if _newclass:_temperature_getProfile = _swig_property(_atmosphere.atmosphere__temperature_getProfile_get, _atmosphere.atmosphere__temperature_getProfile_set) __swig_setmethods__["_watermassdensity_getProfile"] = _atmosphere.atmosphere__watermassdensity_getProfile_set __swig_getmethods__["_watermassdensity_getProfile"] = _atmosphere.atmosphere__watermassdensity_getProfile_get if _newclass:_watermassdensity_getProfile = _swig_property(_atmosphere.atmosphere__watermassdensity_getProfile_get, _atmosphere.atmosphere__watermassdensity_getProfile_set) __swig_setmethods__["_water_getProfile"] = _atmosphere.atmosphere__water_getProfile_set __swig_getmethods__["_water_getProfile"] = _atmosphere.atmosphere__water_getProfile_get if _newclass:_water_getProfile = _swig_property(_atmosphere.atmosphere__water_getProfile_get, _atmosphere.atmosphere__water_getProfile_set) __swig_setmethods__["_pressure_getProfile"] = _atmosphere.atmosphere__pressure_getProfile_set __swig_getmethods__["_pressure_getProfile"] = _atmosphere.atmosphere__pressure_getProfile_get if _newclass:_pressure_getProfile = _swig_property(_atmosphere.atmosphere__pressure_getProfile_get, _atmosphere.atmosphere__pressure_getProfile_set) __swig_setmethods__["_O3_getProfile"] = _atmosphere.atmosphere__O3_getProfile_set __swig_getmethods__["_O3_getProfile"] = _atmosphere.atmosphere__O3_getProfile_get if _newclass:_O3_getProfile = _swig_property(_atmosphere.atmosphere__O3_getProfile_get, _atmosphere.atmosphere__O3_getProfile_set) __swig_setmethods__["_CO_getProfile"] = _atmosphere.atmosphere__CO_getProfile_set __swig_getmethods__["_CO_getProfile"] = _atmosphere.atmosphere__CO_getProfile_get if _newclass:_CO_getProfile = _swig_property(_atmosphere.atmosphere__CO_getProfile_get, _atmosphere.atmosphere__CO_getProfile_set) __swig_setmethods__["_N2O_getProfile"] = _atmosphere.atmosphere__N2O_getProfile_set __swig_getmethods__["_N2O_getProfile"] = _atmosphere.atmosphere__N2O_getProfile_get if _newclass:_N2O_getProfile = _swig_property(_atmosphere.atmosphere__N2O_getProfile_get, _atmosphere.atmosphere__N2O_getProfile_set) __swig_setmethods__["_dryOpacity_getDryOpacitySpec"] = _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_set __swig_getmethods__["_dryOpacity_getDryOpacitySpec"] = _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_get if _newclass:_dryOpacity_getDryOpacitySpec = _swig_property(_atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_get, _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_set) __swig_setmethods__["_wetOpacity_getWetOpacitySpec"] = _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_set __swig_getmethods__["_wetOpacity_getWetOpacitySpec"] = _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_get if _newclass:_wetOpacity_getWetOpacitySpec = _swig_property(_atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_get, _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_set) __swig_setmethods__["_tebbSky_getTebbSkySpec"] = _atmosphere.atmosphere__tebbSky_getTebbSkySpec_set __swig_getmethods__["_tebbSky_getTebbSkySpec"] = _atmosphere.atmosphere__tebbSky_getTebbSkySpec_get if _newclass:_tebbSky_getTebbSkySpec = _swig_property(_atmosphere.atmosphere__tebbSky_getTebbSkySpec_get, _atmosphere.atmosphere__tebbSky_getTebbSkySpec_set) def __init__(self): """__init__(self) -> atmosphere""" this = _atmosphere.new_atmosphere() try: self.this.append(this) except: self.this = this __swig_destroy__ = _atmosphere.delete_atmosphere __del__ = lambda self : None; def getAtmVersion(self): """ getAtmVersion(self) -> string
Summary Returns the version of ATM library.
Description
Returns the version of ATM library implemented to this tool.
Example:
at.getAtmVersion() # 'ATM-0_5_0'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAtmVersion(self)
def listAtmosphereTypes(self): """ listAtmosphereTypes(self) -> std::vector<(std::string)>
Summary Returns a list of atmospheric types used by ATM.
Description
Returns a list of index numbers and corresponding atmosphere types used by the ATM library.
Example:
at.listAtmosphereTypes() # ['1 - TROPICAL', '2 - MIDLATSUMMER', '3 - MIDLATWINTER', # '4 - SUBARTSUMMER', '5 - SUBARTWINTER']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_listAtmosphereTypes(self)
def initAtmProfile(self, *args, **kwargs): """ initAtmProfile(self, altitude = Quantity(std::vector<double>(1, 5000.),"m"), temperature = Quantity(std::vector<double>(1, 270.0),"K"), pressure = Quantity(std::vector<double>(1, 560.0),"mbar"), maxAltitude = Quantity(std::vector<double>(1, 48.0),"km"), humidity = 20.0, dTem_dh = Quantity(std::vector<double>(1, -5.6),"K/km"), dP = Quantity(std::vector<double>(1, 10.0),"mbar"), dPm = 1.2, h0 = Quantity(std::vector<double>(1, 2.0),"km"), atmType = 1) -> string
Summary Set initial atmospheric profile for atmosphere tool
Description
An atmospheric profile is composed of 4 quantities as a function of altitude z:
* the layer thickness * the pressure P * the temperature T and * the gas densities for H2O, O3, CO and N2O.
This method is needed for computing the absorption and phase coefficients, as well as for performing radiative transfer calculations (only layer thickness/T are needed).
This method builds an atmospheric profile that can be used to calculate absorption and phase coefficients, as well as to perform forward and/or retrieval radiative transfer calculations. It is composed of a set of parameters needed to build a layer thickness/P/T/gas densities densities profile from simple parameters currently available at observatories (from weather stations for example) using functions from the ATM library. The set of input parameters consists of the pressure P, the temperature T and the relative humidity at the ground, the altitude of the site, the tropospheric temperature lapse rate,... The profile is built as: thickness of the considered atmospheric layers above the site, and mean P,T,H2O,O3,CO,N2O in them. The total number of atmospheric layers in the particular profile is also available (a negative value indicates an error). The zenith column of water vapor can be calculated by simply integrating the H2O profile.
Input Parameters: altitude Site altitude - Quantity with units of altitude, meter 5000. temperature Ambient Temperature - Quantity with units of temperature, K 270.0 pressure Ambient pressure - Quantity with units of pressure, mbar 560.0 maxAltitude altitude of the top pf the modelled atmosphere - Quantity with dimension of length, and units of kilometer 48.0 humidity used to guess water (0-100) 20.0 dTem_dh the derivative of temperature with respect to height - Quantity with units of K/km -5.6 dP initial pressure step - Quantity with the units of pressure, mb 10.0 dPm pressure multiplicative factor for steps 1.2 h0 scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer 2.0 atmType atmospheric type 1(tropical),2(mid latitude summer),3(mid latitude winter), 4(subarctic summer),5(subarctic winter), dimensionless 1
Example:
tmp = qa.quantity(270.0, 'K') pre = qa.quantity(560.0, 'mbar') hum = 20.0 alt = qa.quantity(5000, 'm') h0 = qa.quantity(2.0, 'km') wvl = qa.quantity(-5.6, 'K/km') mxA = qa.quantity(48, 'km') dpr = qa.quantity(10.0, 'mbar') dpm = 1.2 att = 1 myatm = at.initAtmProfile(alt, tmp, pre, mxA, hum, wvl, dpr, dpm, h0, att) print myatm # BASIC ATMOSPHERIC PARAMETERS TO GENERATE REFERENCE ATMOSPHERIC PROFILE # # Ground temperature T: 270 K # Ground pressure P: 560 mb # Relative humidity rh: 20 % # Scale height h0: 2 km # Pressure step dp: 10 mb # Altitude alti: 5000 m # Attitude top atm profile: 48 km # Pressure step factor: 1.2 # Tropospheric lapse rate: -5.6 K/km # Atmospheric type: TROPICAL # # Built atmospheric profile with 20 layers.
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_initAtmProfile(self, *args, **kwargs)
def updateAtmProfile(self, *args, **kwargs): """ updateAtmProfile(self, altitude = Quantity(std::vector<double>(1, 5000.),"m"), temperature = Quantity(std::vector<double>(1, 270.0),"K"), pressure = Quantity(std::vector<double>(1, 560.0),"mbar"), humidity = 20.0, dTem_dh = Quantity(std::vector<double>(1, -5.6),"K/km"), h0 = Quantity(std::vector<double>(1, 2.0),"km")) -> string
Summary Update basic atmospheric parameters of atmosphere tool
Description
This is used to update the { t atmosphere} tool when basic atmospheric parameters.change.
Input Parameters: altitude Site altitude - Quantity with units of altitude, meter 5000. temperature Ambient ground temperature - Quantity with units of temperature, K 270.0 pressure Ambient ground pressure - Quantity with units of pressure, mbar 560.0 humidity Relative humidy used to guess water (0-100) 20.0 dTem_dh Tropospheric Lapse Rate - the derivative of temperature with respect to height - Quantity with units of K/km -5.6 h0 scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer 2.0
Example:
new_tmp = qa.quantity(275.0, 'K') print at.updateAtmProfile(alt, new_tmp, pre, hum, wvl, h0) # UPDATED BASIC ATMOSPHERIC PARAMETERS TO GENERATE REFERENCE ATMOSPHERIC PROFILE # # Ground temperature T: 275 K # Ground pressure P: 560 mb # Relative humidity rh: 20 % # Scale height h0: 2 km # Altitude alti: 5000 m # Tropospheric lapse rate: -5.6 K/km
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_updateAtmProfile(self, *args, **kwargs)
def getBasicAtmParms(self, *args, **kwargs): """ getBasicAtmParms(self, _altitude = _altitude_getBasicAtmParms, _temperature = _temperature_getBasicAtmParms, _pressure = _pressure_getBasicAtmParms, _maxAltitude = _maxAltitude_getBasicAtmParms, _humidity = _humidity_getBasicAtmParms, _dTem_dh = _dTem_dh_getBasicAtmParms, _dP = _dP_getBasicAtmParms, _dPm = _dPm_getBasicAtmParms, _h0 = _h0_getBasicAtmParms, _atmType = _atmType_getBasicAtmParms) -> string
Summary Gets the current basic atmospheric parameters of the model.
Output Parameters: _altitude Site altitude - Quantity with units of altitude, meter _temperature Ambient ground temperature - Quantity with units of temperature, K _pressure Ambient pressure - Quantity with units of pressure, mbar _maxAltitude altitude of the top pf the modelled atmosphere - Quantity with dimension of length, and units of kilometer _humidity Ground relative humidity used to guess water (0-100) _dTem_dh Current Tropospheric Lapse Rate (the derivative of temperature with respect to height) - Quantity with units of K/km _dP initial pressure step - Quantity with the units of pressure, mb _dPm pressure multiplicative factor for steps _h0 Water vapor scale height ( exp distribution ) - Quantity with the dimension of length, and units of kilometer _atmType atmospheric type used to describe the behaviour above the tropopause. 1(tropical),2(mid latitude summer),3(mid latitude winter), 4(subarctic summer),5(subarctic winter), dimensionless
Example:
p = at.getBasicAtmParms() # returns a tuple of # 0 - string listing of parameters, 1 - altitude, 2 - temperature, # 3 - pressure, 4 - maxAltitude, 5 - humidity, 6 - dTem_dh, # 7 - dP, 8 - dPm. 9 - h0, and 10 - atmType print 'Atmospheric type: ', p[10] # Atmospheric type: TROPICAL print 'Ground temperature: ', p[2]['value'][0], p[2]['unit'] # Ground temperature: 288.16 K print p[0] # a 'pretty' listing of all the parameters # CURRENT ATMOSPHERIC PARAMETERS OF REFERENCE ATMOSPHERIC PROFILE # # Ground temperature T: 275 K # Ground pressure P: 560 mbar # Relative humidity rh: 20 % # Scale height h0: 2 km # Pressure step dp: 10 mbar # Altitude alti: 5000 m # Attitude top atm profile 48 km # Pressure step factor 1.2 # Tropospheric lapse rate -5.6 K/km # Atmospheric type: TROPICAL # # Atmospheric profile has 20 layers.
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getBasicAtmParms(self, *args, **kwargs)
def getNumLayers(self): """ getNumLayers(self) -> int
Summary Returns the number of layers in the atmospheric profile.
Example:
p = at.getProfile() for i in range(at.getNumLayers()): # Print atmospheric profile returned by at.getProfile(): # Layer thickness (idx=1), Temperature (idx=2), # Number density of water vapor(idx=4), and Pressure (idx=5) print p[1]['value'][i], p[2]['value'][i], p[4]['value'][i], p[5]['value'][i]
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNumLayers(self)
def getGroundWH2O(self): """ getGroundWH2O(self) -> Quantity
Summary get the zenith column of water vapor
Description
Method to get the zenith column of water vapor. It is computed by simply integrating the H2O profile:
Example:
w = at.getGroundWH2O() print 'Guessed water content: ', w['value'][0], w['unit'] # Guessed water content: 2.6529103462750112 mm
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getGroundWH2O(self)
def getProfile(self, *args, **kwargs): """ getProfile(self, _thickness = _thickness_getProfile, _temperature = _temperature_getProfile, _watermassdensity = _watermassdensity_getProfile, _water = _water_getProfile, _pressure = _pressure_getProfile, _O3 = _O3_getProfile, _CO = _CO_getProfile, _N2O = _N2O_getProfile) -> string
Summary get atmospheric profile
Description
Get the atmospheric profile.
Output Parameters: _thickness thickness of every atmospheric layer - Quantum with a vector value and unit of length, m _temperature temperature of every atmospheric layer - Quantum with a vector value and unit of temperature, K _watermassdensity water vapor mass density content of every atmospheric layer - Quantum with a vector value and unit of kg.m-3 _water water vapor content of every atmospheric layer - Quantum with a vector value and unit of m-3 _pressure pressure of every atmospheric layer - Quantum with a vector value and unit of Pascal _O3 O3 of every atmospheric layer - Quantum with a vector value and unit of m-3 _CO CO of every atmospheric layer - Quantum with a vector value and unit of m-3 _N2O N2O of every atmospheric layer - Quantum with a vector value and unit of m-3
Example:
p = at.getProfile() # returns a tuple of # 0 - string listing of layer values, and arrays of layer, 1 - thickness, # 2 - temperature, 3 - watermassdensity, 4 - water (number density), # 5 - pressure, 6 - O3 (number density), 7 - CO, 8 - N2O for i in range(at.getNumLayers()): # Print atmospheric profile returned by at.getProfile(): # Layer thickness (idx=1), Temperature (idx=2), # Number density of water vapor(idx=4), and Pressure (idx=5) print p[1]['value'][i], p[2]['value'][i], p[4]['value'][i], p[5]['value'][i]
print p[0] # 'pretty' listing of all layer parameters
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getProfile(self, *args, **kwargs)
def initSpectralWindow(self, *args, **kwargs): """ initSpectralWindow(self, nbands = 1, fCenter = Quantity(std::vector<double>(1, 90),"GHz"), fWidth = Quantity(std::vector<double>(1, 0.64),"GHz"), fRes = Quantity(std::vector<double>(1, 0.0),"GHz")) -> int
Summary initialize spectral window
Description
function that defines a spectral window, computes absorption and emmision coefficients for this window, using the above atmospheric parameters.
Input Parameters: nbands number of spectral windows/bands 1 fCenter center frequencies - Quantum with a vector value and unit of frequency, GHz 90 fWidth frequency width of band - Quantum with a vector value and unit of frequency, GHz 0.64 fRes resolution inside band - Quantum with a vector value and unit frequency, GHz. Default is for a single frequency. 0.0
Example:
nb = 1 fC = qa.quantity(88., 'GHz') fW = qa.quantity(0.5, 'GHz') fR = qa.quantity(0.5, 'GHz') at.initSpectralWindow(nb, fC, fW, fR)
nb = 2 fC = qa.quantity([88., 90.], 'GHz') fW = qa.quantity([0.5, 0.5], 'GHz') fR = qa.quantity([0.125, 0.125], 'GHz') at.initSpectralWindow(nb, fC, fW, fR)
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_initSpectralWindow(self, *args, **kwargs)
def addSpectralWindow(self, *args, **kwargs): """ addSpectralWindow(self, fCenter = Quantity(std::vector<double>(1, 350),"GHz"), fWidth = Quantity(std::vector<double>(1, 0.008),"GHz"), fRes = Quantity(std::vector<double>(1, 0.002),"GHz")) -> int
Summary add a new spectral window
Description
Add a new spectral window, uniformly sampled, this spectral window having no sideband.
Input Parameters: fCenter frequencies - Quantum with a double value and unit of frequency, GHz 350 fWidth frequency width of band - Quantum with a double value and unit of frequency, GHz 0.008 fRes resolution inside band - Quantum with a double value and unit frequency, GHz 0.002
Example:
fC2 = qa.quantity(350.0, 'GHz') fW2 = qa.quantity(0.008, 'GHz') fR2 = qa.quantity(0.002, 'GHz') nc = at.addSpectralWindow(fC2, fW2, fR2) print 'New spectral window has ', nc, ' channels'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_addSpectralWindow(self, *args, **kwargs)
def getNumSpectralWindows(self): """ getNumSpectralWindows(self) -> int
Summary Get number of spectral windows Example:
numSpw = at.getNumSpectralWindows() print 'There are ', numSpw, ' spectral windows'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNumSpectralWindows(self)
def getNumChan(self, spwid = 0): """ getNumChan(self, spwid = 0) -> int
Summary return the number of channels of ith band
Description
Return the number of channels of ith band ( passes in as parameter ).
Input Parameters: spwid Int standing for identifier of bands (0-based) 0
Example:
for spwid in range(at.getNumSpectralWindows()): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNumChan(self, spwid)
def getRefChan(self, spwid = 0): """ getRefChan(self, spwid = 0) -> int
Summary Get the reference channel of a given spectral window
Description
Return the reference channel of the given spectral window
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
rc = at.getRefChan() print 'Reference channel retrieved: ', rc
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getRefChan(self, spwid)
def getRefFreq(self, spwid = 0): """ getRefFreq(self, spwid = 0) -> Quantity
Summary Get the reference frequency of given spectral window
Description
Return the reference frequency of the given spectral window
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
rf = at.getRefFreq() print 'Reference frequency retrieved: ', rf['value'][0], rf['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getRefFreq(self, spwid)
def getChanSep(self, spwid = 0): """ getChanSep(self, spwid = 0) -> Quantity
Summary Get the channel separation for regularly spaced grid for spectral window
Description
Return the channel separation of the given spectral window
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
cs = at.getChanSep() print 'Channel separation retrieved: ', cs['value'][0], cs['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getChanSep(self, spwid)
def getChanFreq(self, chanNum = 0, spwid = 0): """ getChanFreq(self, chanNum = 0, spwid = 0) -> Quantity
Summary Get the channel frequency for a given grid point for the specified spectral window.
Description
Return the channel frequency for a given grid point for the specified spectral window.
Input Parameters: chanNum Int standing for channel number (0-based) 0 spwid Int standing for spectral window id (0-based) 0
Example:
for spwid in range(at.getNumSpectralWindows()): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Channel ', n, ' Frequency:', freq['value'][0], freq['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getChanFreq(self, chanNum, spwid)
def getSpectralWindow(self, spwid = 0): """ getSpectralWindow(self, spwid = 0) -> Quantity
Summary Get the spectral grid for the specified spectral window.
Description
Return the spectral grid for the specified spectral window.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
print at.getSpectralWindow()['value'],at.getSpectralWindow()['unit']
sg = at.getSpectralWindow() for i in range(len(sg['value'])): print sg['value'][i], sg['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getSpectralWindow(self, spwid)
def getChanNum(self, *args, **kwargs): """ getChanNum(self, freq, spwid = 0) -> double
Summary Get the grid position for a given frequency in the specified spectral window.
Description
Return the channel number for given frequency in the specified spectral window relative to the reference channel number.
Input Parameters: freq Frequency spwid Int standing for spectral window id (0-based) 0
Example:
# List current spectral window setting of SPW0 at.getRefFreq()['value'][0], at.getRefFreq()['unit'] # (90.0, 'GHz') print at.getChanSep()['value'][0], at.getChanSep()['unit'] # 10.0 MHz at.getRefChan() # 32
# Get grid positions at.getChanNum(qa.quantity(90., 'GHz')) # 0.0
at.getChanNum(qa.quantity(90., 'GHz'), 0) # 0.0
at.getChanNum(qa.quantity(90.08, 'GHz'), 0) # 8.0
at.getChanNum(qa.quantity(89.985, 'GHz'), 0) # -1.5
at.getChanNum(qa.quantity(89.98,'GHz'), 0) # -2.0
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getChanNum(self, *args, **kwargs)
def getBandwidth(self, spwid = 0): """ getBandwidth(self, spwid = 0) -> Quantity
Summary
Get the frequency range encompassing the list of frequency grid points for the specified spectral window.
Description
Get the frequency range encompassing the list of frequency grid points for the specified spectral window.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
print 'Total bandwidth retrieved: ', at.getBandwidth()['value'][0], at.getBandwidth()['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getBandwidth(self, spwid)
def getMinFreq(self, spwid = 0): """ getMinFreq(self, spwid = 0) -> Quantity
Summary
Get lowest frequency channel for the specified spectral window.
Description
Get lowest frequency channel for the specified spectral window.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
print 'Frequency range: from ', at.getMinFreq()['value'][0], ' to ', at.getMaxFreq()['value'][0], at.getMinFreq()['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getMinFreq(self, spwid)
def getMaxFreq(self, spwid = 0): """ getMaxFreq(self, spwid = 0) -> Quantity
Summary
Get highest frequency channel for the specified spectral window.
Description
Get highest frequency channel for the specified spectral window.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Example:
print 'Frequency range: from ', at.getMinFreq()['value'][0], ' to ', at.getMaxFreq()['value'][0], at.getMaxFreq()['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getMaxFreq(self, spwid)
def getDryOpacity(self, *args, **kwargs): """ getDryOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated Dry Opacity along the atmospheric path for channel nc in spectral window swpId
Description
Get the integrated Dry Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dry Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDryOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDryOpacity(self, *args, **kwargs)
def getDryContOpacity(self, *args, **kwargs): """ getDryContOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated Dry Continuum Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated Dry Continuum Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dry Cont Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDryContOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDryContOpacity(self, *args, **kwargs)
def getO2LinesOpacity(self, *args, **kwargs): """ getO2LinesOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated O2 Lines Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated O2 Lines Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total O2 Lines Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getO2LinesOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getO2LinesOpacity(self, *args, **kwargs)
def getO3LinesOpacity(self, *args, **kwargs): """ getO3LinesOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated O3 Lines Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated O3 Lines Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total O3 Lines Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getO3LinesOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getO3LinesOpacity(self, *args, **kwargs)
def getCOLinesOpacity(self, *args, **kwargs): """ getCOLinesOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated CO Lines Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated CO Lines Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total CO Lines Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getCOLinesOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getCOLinesOpacity(self, *args, **kwargs)
def getN2OLinesOpacity(self, *args, **kwargs): """ getN2OLinesOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated N2O Lines Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated N2O Lines Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total N2O Lines Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getN2OLinesOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getN2OLinesOpacity(self, *args, **kwargs)
def getWetOpacity(self, *args, **kwargs): """ getWetOpacity(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated Wet Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated Wet Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
for i in range(at.getNumSpectralWindows()): for j in range(at.getNumChan(i)): print 'Frequency: ', at.getChanFreq(j, i)['value'][0], at.getChanFreq(j, i)['unit'] print 'Wet opacity:', at.getWetOpacity(j, i)['value'][0], at.getWetOpacity(j, i)['unit'], ' for ', at.getUserWH2O()['value'][0], at.getUserWH2O()['unit'], ' H2O'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getWetOpacity(self, *args, **kwargs)
def getH2OLinesOpacity(self, *args, **kwargs): """ getH2OLinesOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated H2O Lines Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated H2O Lines Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total H2O Lines Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getH2OLinesOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getH2OLinesOpacity(self, *args, **kwargs)
def getH2OContOpacity(self, *args, **kwargs): """ getH2OContOpacity(self, nc = -1, spwid = 0) -> double
Summary get the integrated H2O Continuum Opacity along the atmospheric path for channel nc in spectral window spwid
Description
Get the integrated H2O Continuum Opacity for one channel in a band.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') fR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total H2O Cont Opacity at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getH2OContOpacity()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getH2OContOpacity(self, *args, **kwargs)
def getDryOpacitySpec(self, *args, **kwargs): """ getDryOpacitySpec(self, spwid = 0, _dryOpacity = _dryOpacity_getDryOpacitySpec) -> int
Summary get the integrated Dry optical depth along the atmospheric path on each channel of a band
Description
Get the integrated Dry optical depth along the atmospheric path on each channel in a band.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Output Parameters: _dryOpacity dry opacity for each channel
Example:
at.getDryOpacitySpec() # (8, # array([0.12113794420465548, 0.11890122206854335, # 0.11713584932434795, 0.11572780449702716, # 0.11459567027114714, 0.11368004975916192, # 0.11293678422232195,0.11233248854020933]))
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDryOpacitySpec(self, *args, **kwargs)
def getWetOpacitySpec(self, *args, **kwargs): """ getWetOpacitySpec(self, spwid = 0, _wetOpacity = _wetOpacity_getWetOpacitySpec) -> int
Summary get the integrated Wet optical depth along the atmospheric path on each channel of a band
Description
Get the integrated optical Wet depth along the atmospheric path on each channel in a band.
Input Parameters: spwid Int standing for spectral window id (0-based) 0
Output Parameters: _wetOpacity wet opacity for each channel in band - Quantum with a vector value and unit of mm-1
Example:
sw=at.getWetOpacitySpec() # returns a tuple of # 0 - The number of channels and # 1 - an quantity array of wet opacity for each channel in band sw[1]['value'] # array([1.7225454913767393, 1.7204246078103735, # 1.7188614166349163, 1.7179243635081174, # 1.7177278069990962, 1.7184525049248152, # 1.7204244157129918, 1.7242351137518073])
sw[0] # 8
Another example: for s in range(at.getNumSpectralWindows()): print 'band', s for i in range(at.getNumChan(0)): print ' - dryOpacity ', at.getDryOpacitySpec(spwid=s)[1][i], ' wet Opacity/mm ', at.getWetOpacitySpec(spwid=s)[1]['value'][i]
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getWetOpacitySpec(self, *args, **kwargs)
def getDispersivePhaseDelay(self, *args, **kwargs): """ getDispersivePhaseDelay(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated zenith H2O Atmospheric Phase Delay
Description
Get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part) for the current conditions, for channel number nc of spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() numSpw = at.getNumSpectralWindows() for spwid in range(numSpw): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Total Dispersive Phase Delay at ',freq['value'][0], freq['unit'], ' for 1.0 air mass: ', (at.getDispersivePhaseDelay(n, spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (', ((100*at.getDispersivePhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersivePhaseDelay(n,spwid)['value'][0]/w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDispersivePhaseDelay(self, *args, **kwargs)
def getDispersiveWetPhaseDelay(self, *args, **kwargs): """ getDispersiveWetPhaseDelay(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated dispersive wet Atmospheric Phase Delay
Description
Function to retrieve the integrated wet Atmospheric Phase Delay (Dispersive part) along the atmospheric path corresponding to the 1st guess water column.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() numSpw = at.getNumSpectralWindows() for spwid in range(numSpw): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Total Dispersive Wet Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ', (at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]), ' degrees per mm of water vapor (', ((100*at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveWetPhaseDelay(n,spwid)['value'][0]/w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDispersiveWetPhaseDelay(self, *args, **kwargs)
def getNonDispersiveWetPhaseDelay(self, *args, **kwargs): """ getNonDispersiveWetPhaseDelay(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated nondispersive wet Atmospheric Phase Delay
Description
Function to retrieve the integrated wet Atmospheric Phase Delay (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() numSpw = at.getNumSpectralWindows() for spwid in range(numSpw): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Total Dispersive Wet Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ', (at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]), ' degrees per mm of water vapor (', ((100*at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveWetPhaseDelay(n,spwid)['value'][0]/w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersiveWetPhaseDelay(self, *args, **kwargs)
def getNonDispersiveDryPhaseDelay(self, *args, **kwargs): """ getNonDispersiveDryPhaseDelay(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated nondispersive dry Atmospheric Phase Delay
Description
Function to retrieve the integrated dry Atmospheric Phase Delay (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() numSpw = at.getNumSpectralWindows() for spwid in range(numSpw): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Total Dispersive Dry Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ', (at.getDispersiveDryPhaseDelay(n,spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (', ((100*at.getDispersiveDryPhaseDelay(n,spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveDryPhaseDelay(n,spwid)['value'][0]/w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersiveDryPhaseDelay(self, *args, **kwargs)
def getNonDispersivePhaseDelay(self, *args, **kwargs): """ getNonDispersivePhaseDelay(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part)
Description
Get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part) for the current conditions, for channel number nc of spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() numSpw = at.getNumSpectralWindows() for spwid in range(numSpw): numCh = at.getNumChan(spwid) print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels' for n in range(numCh): freq = at.getChanFreq(n, spwid) print 'Total Dispersive Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ', (at.getDispersivePhaseDelay(n,spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (', ((100*at.getDispersivePhaseDelay(n,spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersivePhaseDelay(n,spwid)['value'][0]/w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersivePhaseDelay(self, *args, **kwargs)
def getDispersivePathLength(self, *args, **kwargs): """ getDispersivePathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated Atmospheric Dispersive Path
Description
Retrieve the integrated Atmospheric Path length (Dispersive part) along the atmospheric path corresponding to the user water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') nfR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDispersivePathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor' print '(',100*(at.getDispersivePathLength()['value'][0] / w['value'][0])/(at.getNonDispersivePathLength()['value'][0] / w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDispersivePathLength(self, *args, **kwargs)
def getDispersiveWetPathLength(self, *args, **kwargs): """ getDispersiveWetPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated wet Atmospheric Dispersive Path
Description
Retrieve the integrated wet Atmospheric Path length (Dispersive part) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getGroundWH2O() nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') nfR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDispersiveWetPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor' print '(',100*(at.getDispersiveWetPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveWetPathLength()['value'][0] / w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getDispersiveWetPathLength(self, *args, **kwargs)
def getNonDispersiveWetPathLength(self, *args, **kwargs): """ getNonDispersiveWetPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated wet Atmospheric NonDispersive Path
Description
Retrieve the integrated wet Atmospheric Path length (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getGroundWH2O() nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') nfR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDispersiveWetPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor' print '(',100*(at.getDispersiveWetPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveWetPathLength()['value'][0] / w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersiveWetPathLength(self, *args, **kwargs)
def getNonDispersiveDryPathLength(self, *args, **kwargs): """ getNonDispersiveDryPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated dry Atmospheric NonDispersive Path
Description
Retrieve the integrated dry Atmospheric Path length (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getGroundWH2O() nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') nfR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDispersiveDryPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor' print '(',100*(at.getDispersiveDryPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveDryPathLength()['value'][0] / w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersiveDryPathLength(self, *args, **kwargs)
def getO2LinesPathLength(self, *args, **kwargs): """ getO2LinesPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated O2 lines Path
Description
Retrieve the integrated Atmospheric Phase Delay (due to O2 Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getO2LinesPathLength(self, *args, **kwargs)
def getO3LinesPathLength(self, *args, **kwargs): """ getO3LinesPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated O3 lines Path
Description
Retrieve the integrated Atmospheric Phase Delay (due to O3 Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getO3LinesPathLength(self, *args, **kwargs)
def getCOLinesPathLength(self, *args, **kwargs): """ getCOLinesPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated CO lines Path
Description
Retrieve the integrated Atmospheric Path length (due to CO Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getCOLinesPathLength(self, *args, **kwargs)
def getN2OLinesPathLength(self, *args, **kwargs): """ getN2OLinesPathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated N2O lines Path
Description
Retrieve the integrated Atmospheric Path length (due to N2O Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getN2OLinesPathLength(self, *args, **kwargs)
def getNonDispersivePathLength(self, *args, **kwargs): """ getNonDispersivePathLength(self, nc = -1, spwid = 0) -> Quantity
Summary get the integrated Atmospheric Non-Dispersive Path
Description
Get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part) for the current conditions, for channel nc in spectral window spwid.
Input Parameters: nc Channel number (0-based; defaults to reference channel) -1 spwid Int standing for spectral window id (0-based) 0
Example:
w = at.getUserWH2O() nb = 1 fC = qa.quantity([850.0], 'GHz') fW = qa.quantity([0.5], 'GHz') nfR = qa.quantity([0.5], 'GHz') at.initSpectralWindow(nb, fC, fW, fR) print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ', at.getDispersivePathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor' print '(',100*(at.getDispersivePathLength()['value'][0] / w['value'][0])/(at.getNonDispersivePathLength()['value'][0] / w['value'][0]), '% of the Non-dispersive one )'
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getNonDispersivePathLength(self, *args, **kwargs)
def getAbsH2OLines(self, *args, **kwargs): """ getAbsH2OLines(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get H2O lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Accessor to get H2O lines Absorption Coefficient at layer nl, spectral window spwid and channel nf.
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsH2OLines(0, 0, 0) print 'H2O lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsH2OLines(self, *args, **kwargs)
def getAbsH2OCont(self, *args, **kwargs): """ getAbsH2OCont(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get H2O continuum Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get H2O continuum Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsH2OCont(0, 0, 0) print 'H2OCont absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsH2OCont(self, *args, **kwargs)
def getAbsO2Lines(self, *args, **kwargs): """ getAbsO2Lines(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get O2 lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get O2 lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsO2Lines(0, 0, 0) print 'O2 lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsO2Lines(self, *args, **kwargs)
def getAbsDryCont(self, *args, **kwargs): """ getAbsDryCont(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get Dry Continuum Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get Dry Continuum Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsDryCont(0, 0, 0) print 'Dry Continuum absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsDryCont(self, *args, **kwargs)
def getAbsO3Lines(self, *args, **kwargs): """ getAbsO3Lines(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get O3 lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get O3 lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsO3Lines(0, 0, 0) print 'O3 lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsO3Lines(self, *args, **kwargs)
def getAbsCOLines(self, *args, **kwargs): """ getAbsCOLines(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get CO lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get CO lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsCOLines(0, 0, 0) print 'CO lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsCOLines(self, *args, **kwargs)
def getAbsN2OLines(self, *args, **kwargs): """ getAbsN2OLines(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get N2O lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get N2O lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsN2OLines(0, 0, 0) print 'N2O lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsN2OLines(self, *args, **kwargs)
def getAbsTotalDry(self, *args, **kwargs): """ getAbsTotalDry(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get Total Dry Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get total dry Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsTotalDry(0, 0, 0) print 'Total dry absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsTotalDry(self, *args, **kwargs)
def getAbsTotalWet(self, *args, **kwargs): """ getAbsTotalWet(self, nl, nf = 0, spwid = 0) -> Quantity
Summary
Get total wet absorption coefficient at layer nl and frequency channel nf in spectral window spwid
Description
Get total wet absorption coefficient at layer nl, spectral window spwid and frequency channel nf
Input Parameters: nl atmospheric layer number nf frequency channnel number 0 spwid spectral window id 0
Example:
ac = at.getAbsTotalWet(0, 0, 0) print 'Total wet absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAbsTotalWet(self, *args, **kwargs)
def setUserWH2O(self, *args, **kwargs): """ setUserWH2O(self, wh2o = Quantity(std::vector<double>(1, 0.0),"mm")) -> bool
Summary set the user zenith water vapor column
Description
Set user zenith water vapor column for forward radiative transfer calculations.
Input Parameters: wh2o User water vapor column 0.0
Example:
wh2o=qa.quantity(0.8,'mm') at.setUserWH2O(wh2o)
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_setUserWH2O(self, *args, **kwargs)
def getUserWH2O(self): """ getUserWH2O(self) -> Quantity
Summary get the user zenith water vapor column
Description
Get user zenith water vapor column for forward radiative transfer calculations.
Example:
print 'water vapor column: ', at.getUserWH2O()['value'][0], at.getUserWH2O()['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getUserWH2O(self)
def setAirMass(self, *args, **kwargs): """ setAirMass(self, airmass) -> bool
Summary Set the air mass
Description
Setter for air mass in SkyStatus without performing water vapor retrieval.
Input Parameters: airmass Air Mass
Example:
at.setAirMass(1.51)
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_setAirMass(self, *args, **kwargs)
def getAirMass(self): """ getAirMass(self) -> double
Summary Get the air mass
Description
Accessor to get airmass.
Example:
at.setAirMass(2.0) print '(INPUT CHANGE) Air mass: ', at.getAirMass()
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAirMass(self)
def setSkyBackgroundTemperature(self, *args, **kwargs): """ setSkyBackgroundTemperature(self, tbgr = Quantity(std::vector<double>(1, 2.73),"K")) -> bool
Summary Set the sky background temperature
Description
Set sky background temperature in SkyStatus without performing water vapor retrieval
Input Parameters: tbgr sky background temperature 2.73
Example:
at.setSkyBackgroundTemperature(qa.quantity(2.73,'K'))
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_setSkyBackgroundTemperature(self, *args, **kwargs)
def getSkyBackgroundTemperature(self): """ getSkyBackgroundTemperature(self) -> Quantity
Summary Get the sky background temperature
Description
Get the sky background temperature
Example:
t = at.getSkyBackgroundTemperature() print t['value'][0], t['unit'] # 2.73 K
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getSkyBackgroundTemperature(self)
def getAverageTebbSky(self, *args, **kwargs): """ getAverageTebbSky(self, spwid = 0, wh2o = Quantity(std::vector<double>(1, -1),"mm")) -> Quantity
Summary Returns average equiv. BB Temp
Description
Returns the average Equivalent Blackbody Temperature in spectral window spwid, for the current conditions and a perfect sky coupling.
Input Parameters: spwid Spectral window (0-based) 0 wh2o User specified water column length in mm. Default is not to use wh2o. -1
Example:
wh2o = qa.quantity(0.4,'mm') print '(INPUT CHANGE) water vapor column:', wh2o['value'], wh2o['unit'] print '(NEW OUTPUT) T_EBB =', at.getAverageTebbSky(0,wh2o)['value'][0], at.getAverageTebbSky(0,wh2o)['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getAverageTebbSky(self, *args, **kwargs)
def getTebbSky(self, *args, **kwargs): """ getTebbSky(self, nc = -1, spwid = 0, wh2o = Quantity(std::vector<double>(1, -1),"mm")) -> Quantity
Summary Returns equiv. BB Temp
Description
Gets the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky.
Input Parameters: nc Channel number (0-based) - defaults to reference channel -1 spwid Spectral window (0-based) 0 wh2o User specified water column length in mm. Default is not to use wh2o. -1
Example:
for s in range(at.getNumSpectralWindows()): for i in range(at.getNumChan(s)): print 'Band', s, ' channel ', i, 'TebbSky = ', at.getTebbSky(i,s)['value'][0], at.getTebbSky()['unit']
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getTebbSky(self, *args, **kwargs)
def getTebbSkySpec(self, *args, **kwargs): """ getTebbSkySpec(self, spwid = 0, wh2o = Quantity(std::vector<double>(1, -1),"mm"), _tebbSky = _tebbSky_getTebbSkySpec) -> int
Summary Returns equiv. BB Temp on each channel of a band
Description
Gets the Equivalent Blackbody Temperatures in a spectral window spwid for Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky.
Input Parameters: spwid Spectral window (0-based) 0 wh2o User specified water column length in mm. Default is not to use wh2o. -1
Output Parameters: _tebbSky the Equivalent Blackbody Temperatures in a band - Quantum with a vector value and unit of K
Example:
sw=at.getWetOpacitySpec() # returns a tuple of # 0 - The number of channels, and # 1 - the Equivalent Blackbody Temperatures in a band sw[1]['value'] # [34.687910103670511, # 35.496193465331679, # 36.460355664151791, # 37.419146813713745, # 37.9452005127634, # 38.722631196093729, # 39.593561594172662, # 40.528694048924017]
sw[0] # 8
Another example: for s in range(at.getNumSpectralWindows()): print 'band', s tebbspec = at.getTebbSkySpec(spwid=s) for i in range(at.getNumChan(s)): print ' - TebbSky %f [%s] ' % (tebbspec[1]['value'][i],tebbspec[1]['unit'])
--------------------------------------------------------------------------------
""" return _atmosphere.atmosphere_getTebbSkySpec(self, *args, **kwargs)
atmosphere_swigregister = _atmosphere.atmosphere_swigregister atmosphere_swigregister(atmosphere) cvar = _atmosphere.cvar
# This file is compatible with both classic and new-style classes.
|