Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/atmosphere.py: 60%
319 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 19:53 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 19:53 +0000
1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 3.0.12
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
7from sys import version_info as _swig_python_version_info
8if _swig_python_version_info >= (2, 7, 0):
9 def swig_import_helper():
10 import importlib
11 pkg = __name__.rpartition('.')[0]
12 mname = '.'.join((pkg, '_atmosphere')).lstrip('.')
13 try:
14 return importlib.import_module(mname)
15 except ImportError:
16 return importlib.import_module('_atmosphere')
17 _atmosphere = swig_import_helper()
18 del swig_import_helper
19elif _swig_python_version_info >= (2, 6, 0):
20 def swig_import_helper():
21 from os.path import dirname
22 import imp
23 fp = None
24 try:
25 fp, pathname, description = imp.find_module('_atmosphere', [dirname(__file__)])
26 except ImportError:
27 import _atmosphere
28 return _atmosphere
29 try:
30 _mod = imp.load_module('_atmosphere', fp, pathname, description)
31 finally:
32 if fp is not None:
33 fp.close()
34 return _mod
35 _atmosphere = swig_import_helper()
36 del swig_import_helper
37else:
38 import _atmosphere
39del _swig_python_version_info
41try:
42 _swig_property = property
43except NameError:
44 pass # Python < 2.2 doesn't have 'property'.
46try:
47 import builtins as __builtin__
48except ImportError:
49 import __builtin__
51def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
52 if (name == "thisown"):
53 return self.this.own(value)
54 if (name == "this"):
55 if type(value).__name__ == 'SwigPyObject':
56 self.__dict__[name] = value
57 return
58 method = class_type.__swig_setmethods__.get(name, None)
59 if method:
60 return method(self, value)
61 if (not static):
62 if _newclass:
63 object.__setattr__(self, name, value)
64 else:
65 self.__dict__[name] = value
66 else:
67 raise AttributeError("You cannot add attributes to %s" % self)
70def _swig_setattr(self, class_type, name, value):
71 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
74def _swig_getattr(self, class_type, name):
75 if (name == "thisown"):
76 return self.this.own()
77 method = class_type.__swig_getmethods__.get(name, None)
78 if method:
79 return method(self)
80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
83def _swig_repr(self):
84 try:
85 strthis = "proxy of " + self.this.__repr__()
86 except __builtin__.Exception:
87 strthis = ""
88 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
90try:
91 _object = object
92 _newclass = 1
93except __builtin__.Exception:
94 class _object:
95 pass
96 _newclass = 0
98class atmosphere(_object):
99 """Proxy of C++ casac::atmosphere class."""
101 __swig_setmethods__ = {}
102 __setattr__ = lambda self, name, value: _swig_setattr(self, atmosphere, name, value)
103 __swig_getmethods__ = {}
104 __getattr__ = lambda self, name: _swig_getattr(self, atmosphere, name)
105 __repr__ = _swig_repr
107 def __init__(self):
108 """__init__(self) -> atmosphere"""
109 this = _atmosphere.new_atmosphere()
110 try:
111 self.this.append(this)
112 except __builtin__.Exception:
113 self.this = this
115 def close(self):
116 """
117 close(self) -> bool
121 Summary:
122 Destroy the atmosphere tool
124 Example:
126 at.close()
128 --------------------------------------------------------------------------------
130 """
131 return _atmosphere.atmosphere_close(self)
134 def done(self):
135 """
136 done(self) -> bool
140 Summary:
141 Destroy the atmosphere tool
143 Example:
145 at.done()
147 --------------------------------------------------------------------------------
149 """
150 return _atmosphere.atmosphere_done(self)
153 def getAtmVersion(self):
154 """
155 getAtmVersion(self) -> string
159 Summary:
160 Returns the version of ATM library.
162 Description:
165 Returns the version of ATM library implemented to this tool.
167 Example:
169 at.getAtmVersion()
170 # 'ATM-0_5_0'
172 --------------------------------------------------------------------------------
174 """
175 return _atmosphere.atmosphere_getAtmVersion(self)
178 def listAtmosphereTypes(self):
179 """
180 listAtmosphereTypes(self) -> std::vector< std::string >
184 Summary:
185 Returns a list of atmospheric types used by ATM.
187 Description:
190 Returns a list of index numbers and corresponding atmosphere types
191 used by the ATM library.
193 Example:
195 at.listAtmosphereTypes()
196 # ['1 - TROPICAL', '2 - MIDLATSUMMER', '3 - MIDLATWINTER',
197 # '4 - SUBARTSUMMER', '5 - SUBARTWINTER']
199 --------------------------------------------------------------------------------
201 """
202 return _atmosphere.atmosphere_listAtmosphereTypes(self)
205 def initAtmProfile(self, *args, **kwargs):
206 """
207 initAtmProfile(self, _altitude, _temperature, _pressure, _maxAltitude, _humidity, _dTem_dh, _dP, _dPm, _h0, _atmType, _layerBoundaries, _layerTemperature) -> string
211 Summary:
212 Set initial atmospheric profile for atmosphere tool
214 Description:
217 An atmospheric profile is composed of 4 quantities as a function of
218 altitude z:
220 * the layer thickness
221 * the pressure P
222 * the temperature T and
223 * the gas densities for H2O, O3, CO and N2O.
226 This method is needed for computing the absorption and phase
227 coefficients, as well as for performing radiative transfer
228 calculations (only layer thickness/T are needed).
230 This method builds an atmospheric profile that can be used to calculate
231 absorption and phase coefficients, as well as to perform forward
232 and/or retrieval radiative transfer calculations. It is composed of a
233 set of parameters needed to build a layer thickness/P/T/gas densities
234 densities profile from simple parameters currently available at
235 observatories (from weather stations for example) using functions from
236 the ATM library. The set of input parameters consists of the pressure
237 P, the temperature T and the relative humidity at the ground, the
238 altitude of the site, the tropospheric temperature lapse rate,... The
239 profile is built as: thickness of the considered atmospheric layers
240 above the site, and mean P,T,H2O,O3,CO,N2O in them. The total number
241 of atmospheric layers in the particular profile is also available (a
242 negative value indicates an error). The zenith column of water vapor
243 can be calculated by simply integrating the H2O profile.
245 Input Parameters:
246 altitude Site altitude - Quantity with units of altitude, meter
247 temperature Ambient Temperature - Quantity with units of temperature, K
248 pressure Ambient pressure - Quantity with units of pressure, mbar
249 maxAltitude altitude of the top pf the modelled atmosphere - Quantity with dimension of length, and units of kilometer
250 humidity used to guess water (0-100)
251 dTem_dh the derivative of temperature with respect to height - Quantity with units of K/km
252 dP initial pressure step - Quantity with the units of pressure, mb
253 dPm pressure multiplicative factor for steps
254 h0 scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer
255 atmType atmospheric type 1(tropical),2(mid latitude summer),3(mid latitude winter), 4(subarctic summer),5(subarctic winter), dimensionless
256 layerBoundaries Altitude of user-defined temperature profile, a double array in unit of meter
257 layerTemperature User-defined temperature profile, a double array in unit of Kelvin
259 Example:
261 tmp = qa.quantity(270.0, 'K')
262 pre = qa.quantity(560.0, 'mbar')
263 hum = 20.0
264 alt = qa.quantity(5000, 'm')
265 h0 = qa.quantity(2.0, 'km')
266 wvl = qa.quantity(-5.6, 'K/km')
267 mxA = qa.quantity(48, 'km')
268 dpr = qa.quantity(10.0, 'mbar')
269 dpm = 1.2
270 att = 1
271 myatm = at.initAtmProfile(alt, tmp, pre, mxA, hum, wvl, dpr, dpm, h0, att)
272 print myatm
273 # BASIC ATMOSPHERIC PARAMETERS TO GENERATE REFERENCE ATMOSPHERIC PROFILE
274 #
275 # Ground temperature T: 270 K
276 # Ground pressure P: 560 mb
277 # Relative humidity rh: 20 %
278 # Scale height h0: 2 km
279 # Pressure step dp: 10 mb
280 # Altitude alti: 5000 m
281 # Attitude top atm profile: 48 km
282 # Pressure step factor: 1.2
283 # Tropospheric lapse rate: -5.6 K/km
284 # Atmospheric type: TROPICAL
285 # User-defined temperature profile: OFF
286 #
287 # Built atmospheric profile with 19 layers.
289 User-defined temperature profile
290 myalt = [ 5071.72200397, 6792.36546384, 15727.0776121, 42464.18192672 ] #meter
291 mytemp = [ 270., 264., 258., 252. ] #Kelvin
292 newatm = at.initAtmProfile(alt, tmp, pre, mxA, hum, wvl, dpr, dpm, h0, att, myalt, mytemp)
293 print newatm
294 # BASIC ATMOSPHERIC PARAMETERS TO GENERATE REFERENCE ATMOSPHERIC PROFILE
295 #
296 # Ground temperature T: 270 K
297 # Ground pressure P: 560 mb
298 # Relative humidity rh: 20 %
299 # Scale height h0: 2 km
300 # Pressure step dp: 10 mb
301 # Altitude alti: 5000 m
302 # Attitude top atm profile: 48 km
303 # Pressure step factor: 1.2
304 # Tropospheric lapse rate: -5.6 K/km
305 # Atmospheric type: TROPICAL
306 # User-defined temperature profile: ON
307 #
308 # Built atmospheric profile with 19 layers.
310 --------------------------------------------------------------------------------
312 """
313 return _atmosphere.atmosphere_initAtmProfile(self, *args, **kwargs)
316 def updateAtmProfile(self, *args, **kwargs):
317 """
318 updateAtmProfile(self, _altitude, _temperature, _pressure, _humidity, _dTem_dh, _h0) -> string
322 Summary:
323 Update basic atmospheric parameters of atmosphere tool
325 Description:
328 This is used to update the {tt atmosphere} tool when basic
329 atmospheric parameters.change.
331 Input Parameters:
332 altitude Site altitude - Quantity with units of altitude, meter
333 temperature Ambient ground temperature - Quantity with units of temperature, K
334 pressure Ambient ground pressure - Quantity with units of pressure, mbar
335 humidity Relative humidy used to guess water (0-100)
336 dTem_dh Tropospheric Lapse Rate - the derivative of temperature with respect to height - Quantity with units of K/km
337 h0 scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer
339 Example:
341 new_tmp = qa.quantity(275.0, 'K')
342 print at.updateAtmProfile(alt, new_tmp, pre, hum, wvl, h0)
343 # UPDATED BASIC ATMOSPHERIC PARAMETERS TO GENERATE REFERENCE ATMOSPHERIC PROFILE
344 #
345 # Ground temperature T: 275 K
346 # Ground pressure P: 560 mb
347 # Relative humidity rh: 20 %
348 # Scale height h0: 2 km
349 # Altitude alti: 5000 m
350 # Tropospheric lapse rate: -5.6 K/km
352 --------------------------------------------------------------------------------
354 """
355 return _atmosphere.atmosphere_updateAtmProfile(self, *args, **kwargs)
358 def getBasicAtmParms(self, *args, **kwargs):
359 """
360 getBasicAtmParms(self, _altitude, _temperature, _pressure, _maxAltitude, _humidity, _dTem_dh, _dP, _dPm, _h0, _atmType) -> string
364 Summary:
365 Gets the current basic atmospheric parameters of the model.
367 Output Parameters:
368 altitude Site altitude - Quantity with units of altitude, meter
369 temperature Ambient ground temperature - Quantity with units of temperature, K
370 pressure Ambient pressure - Quantity with units of pressure, mbar
371 maxAltitude altitude of the top pf the modelled atmosphere - Quantity with dimension of length, and units of kilometer
372 humidity Ground relative humidity used to guess water (0-100)
373 dTem_dh Current Tropospheric Lapse Rate (the derivative of temperature with respect to height) - Quantity with units of K/km
374 dP initial pressure step - Quantity with the units of pressure, mb
375 dPm pressure multiplicative factor for steps
376 h0 Water vapor scale height ( exp distribution ) - Quantity with the dimension of length, and units of kilometer
377 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
379 Example:
381 p = at.getBasicAtmParms()
382 # returns a tuple of
383 # 0 - string listing of parameters, 1 - altitude, 2 - temperature,
384 # 3 - pressure, 4 - maxAltitude, 5 - humidity, 6 - dTem_dh,
385 # 7 - dP, 8 - dPm. 9 - h0, and 10 - atmType
386 print 'Atmospheric type: ', p[10]
387 # Atmospheric type: TROPICAL
388 print 'Ground temperature: ', p[2]['value'][0], p[2]['unit']
389 # Ground temperature: 288.16 K
390 print p[0] # a 'pretty' listing of all the parameters
391 # CURRENT ATMOSPHERIC PARAMETERS OF REFERENCE ATMOSPHERIC PROFILE
392 #
393 # Ground temperature T: 275 K
394 # Ground pressure P: 560 mbar
395 # Relative humidity rh: 20 %
396 # Scale height h0: 2 km
397 # Pressure step dp: 10 mbar
398 # Altitude alti: 5000 m
399 # Attitude top atm profile 48 km
400 # Pressure step factor 1.2
401 # Tropospheric lapse rate -5.6 K/km
402 # Atmospheric type: TROPICAL
403 #
404 # Atmospheric profile has 19 layers.
406 --------------------------------------------------------------------------------
408 """
409 return _atmosphere.atmosphere_getBasicAtmParms(self, *args, **kwargs)
412 def getNumLayers(self):
413 """
414 getNumLayers(self) -> long
418 Summary:
419 Returns the number of layers in the atmospheric profile.
421 Example:
423 p = at.getProfile()
424 for i in range(at.getNumLayers()):
425 # Print atmospheric profile returned by at.getProfile():
426 # Layer thickness (idx=1), Temperature (idx=2),
427 # Number density of water vapor(idx=4), and Pressure (idx=5)
428 print p[1]['value'][i], p[2]['value'][i], p[4]['value'][i], p[5]['value'][i]
430 --------------------------------------------------------------------------------
432 """
433 return _atmosphere.atmosphere_getNumLayers(self)
436 def getGroundWH2O(self):
437 """
438 getGroundWH2O(self) -> Quantity
442 Summary:
443 get the zenith column of water vapor
445 Description:
448 Method to get the zenith column of water vapor. It is computed by
449 simply integrating the H2O profile:
451 Example:
453 w = at.getGroundWH2O()
454 print 'Guessed water content: ', w['value'][0], w['unit']
455 # Guessed water content: 2.6529103462750112 mm
457 --------------------------------------------------------------------------------
459 """
460 return _atmosphere.atmosphere_getGroundWH2O(self)
463 def getProfile(self, *args, **kwargs):
464 """
465 getProfile(self, _thickness, _temperature, _watermassdensity, _water, _pressure, _O3, _CO, _N2O) -> string
469 Summary:
470 get atmospheric profile
472 Description:
476 Get the atmospheric profile.
478 Output Parameters:
479 thickness thickness of every atmospheric layer - Quantum with a vector value and unit of length, m
480 temperature temperature of every atmospheric layer - Quantum with a vector value and unit of temperature, K
481 watermassdensity water vapor mass density content of every atmospheric layer - Quantum with a vector value and unit of kg.m-3
482 water water vapor content of every atmospheric layer - Quantum with a vector value and unit of m-3
483 pressure pressure of every atmospheric layer - Quantum with a vector value and unit of Pascal
484 O3 O3 of every atmospheric layer - Quantum with a vector value and unit of m-3
485 CO CO of every atmospheric layer - Quantum with a vector value and unit of m-3
486 N2O N2O of every atmospheric layer - Quantum with a vector value and unit of m-3
488 Example:
490 p = at.getProfile()
491 # returns a tuple of
492 # 0 - string listing of layer values, and arrays of layer, 1 - thickness,
493 # 2 - temperature, 3 - watermassdensity, 4 - water (number density),
494 # 5 - pressure, 6 - O3 (number density), 7 - CO, 8 - N2O
495 for i in range(at.getNumLayers()):
496 # Print atmospheric profile returned by at.getProfile():
497 # Layer thickness (idx=1), Temperature (idx=2),
498 # Number density of water vapor(idx=4), and Pressure (idx=5)
499 print p[1]['value'][i], p[2]['value'][i], p[4]['value'][i],
500 p[5]['value'][i]
502 print p[0] # 'pretty' listing of all layer parameters
504 --------------------------------------------------------------------------------
506 """
507 return _atmosphere.atmosphere_getProfile(self, *args, **kwargs)
510 def initSpectralWindow(self, *args, **kwargs):
511 """
512 initSpectralWindow(self, _nbands, _fCenter, _fWidth, _fRes) -> long
516 Summary:
517 initialize spectral window
519 Description:
523 function that defines a spectral window, computes absorption and emmision coefficients for this window,
524 using the atmospheric model profile.
526 NOTE: This method should be invoked after setting atmospheric profile model by initAtmProfile.
528 Input Parameters:
529 nbands number of spectral windows/bands. The value must be > 0.
530 fCenter center frequencies - Quantum with a vector value and unit of frequency, GHz
531 fWidth frequency width of band - Quantum with a vector value and unit of frequency, GHz
532 fRes resolution inside band - Quantum with a vector value and unit frequency, GHz. Default is for a single frequency.
534 Example:
536 nb = 1
537 fC = qa.quantity(88., 'GHz')
538 fW = qa.quantity(0.5, 'GHz')
539 fR = qa.quantity(0.5, 'GHz')
540 at.initSpectralWindow(nb, fC, fW, fR)
542 nb = 2
543 fC = qa.quantity([88., 90.], 'GHz')
544 fW = qa.quantity([0.5, 0.5], 'GHz')
545 fR = qa.quantity([0.125, 0.125], 'GHz')
546 at.initSpectralWindow(nb, fC, fW, fR)
548 --------------------------------------------------------------------------------
550 """
551 return _atmosphere.atmosphere_initSpectralWindow(self, *args, **kwargs)
554 def addSpectralWindow(self, *args, **kwargs):
555 """
556 addSpectralWindow(self, _fCenter, _fWidth, _fRes) -> long
560 Summary:
561 add a new spectral window
563 Description:
568 Add a new spectral window, uniformly sampled, this spectral window
569 having no sideband.
571 Input Parameters:
572 fCenter frequencies - Quantum with a double value and unit of frequency, GHz
573 fWidth frequency width of band - Quantum with a double value and unit of frequency, GHz
574 fRes resolution inside band - Quantum with a double value and unit frequency, GHz
576 Example:
578 fC2 = qa.quantity(350.0, 'GHz')
579 fW2 = qa.quantity(0.008, 'GHz')
580 fR2 = qa.quantity(0.002, 'GHz')
581 nc = at.addSpectralWindow(fC2, fW2, fR2)
582 print 'New spectral window has ', nc, ' channels'
584 --------------------------------------------------------------------------------
586 """
587 return _atmosphere.atmosphere_addSpectralWindow(self, *args, **kwargs)
590 def getNumSpectralWindows(self):
591 """
592 getNumSpectralWindows(self) -> long
596 Summary:
597 Get number of spectral windows
599 Example:
601 numSpw = at.getNumSpectralWindows()
602 print 'There are ', numSpw, ' spectral windows'
604 --------------------------------------------------------------------------------
606 """
607 return _atmosphere.atmosphere_getNumSpectralWindows(self)
610 def getNumChan(self, *args, **kwargs):
611 """
612 getNumChan(self, _spwid) -> long
616 Summary:
617 return the number of channels of ith band
619 Description:
622 Return the number of channels of ith band ( passes in as parameter ).
624 Input Parameters:
625 spwid Int standing for identifier of bands (0-based). The value must be >= 0.
627 Example:
629 for spwid in range(at.getNumSpectralWindows()):
630 numCh = at.getNumChan(spwid)
631 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
633 --------------------------------------------------------------------------------
635 """
636 return _atmosphere.atmosphere_getNumChan(self, *args, **kwargs)
639 def getRefChan(self, *args, **kwargs):
640 """
641 getRefChan(self, _spwid) -> long
645 Summary:
646 Get the reference channel of a given spectral window
648 Description:
651 Return the reference channel of the given spectral window
653 Input Parameters:
654 spwid Int standing for spectral window id (0-based). The value must be >= 0.
656 Example:
658 rc = at.getRefChan()
659 print 'Reference channel retrieved: ', rc
661 --------------------------------------------------------------------------------
663 """
664 return _atmosphere.atmosphere_getRefChan(self, *args, **kwargs)
667 def getRefFreq(self, *args, **kwargs):
668 """
669 getRefFreq(self, _spwid) -> Quantity
673 Summary:
674 Get the reference frequency of given spectral window
676 Description:
679 Return the reference frequency of the given spectral window
681 Input Parameters:
682 spwid Int standing for spectral window id (0-based). The value must be >= 0.
684 Example:
686 rf = at.getRefFreq()
687 print 'Reference frequency retrieved: ', rf['value'][0], rf['unit']
689 --------------------------------------------------------------------------------
691 """
692 return _atmosphere.atmosphere_getRefFreq(self, *args, **kwargs)
695 def getChanSep(self, *args, **kwargs):
696 """
697 getChanSep(self, _spwid) -> Quantity
701 Summary:
702 Get the channel separation for regularly spaced grid for spectral window
704 Description:
707 Return the channel separation of the given spectral window
709 Input Parameters:
710 spwid Int standing for spectral window id (0-based). The value must be >= 0.
712 Example:
714 cs = at.getChanSep()
715 print 'Channel separation retrieved: ', cs['value'][0], cs['unit']
717 --------------------------------------------------------------------------------
719 """
720 return _atmosphere.atmosphere_getChanSep(self, *args, **kwargs)
723 def getChanFreq(self, *args, **kwargs):
724 """
725 getChanFreq(self, _chanNum, _spwid) -> Quantity
729 Summary:
730 Get the channel frequency for a given grid point for the specified spectral window.
732 Description:
735 Return the channel frequency for a given grid point for the specified spectral window.
738 Input Parameters:
739 chanNum Int standing for channel number (0-based). The value must be >= 0.
740 spwid Int standing for spectral window id (0-based). The value must be >= 0.
742 Example:
744 for spwid in range(at.getNumSpectralWindows()):
745 numCh = at.getNumChan(spwid)
746 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
747 for n in range(numCh):
748 freq = at.getChanFreq(n, spwid)
749 print 'Channel ', n, ' Frequency:', freq['value'][0], freq['unit']
751 --------------------------------------------------------------------------------
753 """
754 return _atmosphere.atmosphere_getChanFreq(self, *args, **kwargs)
757 def getSpectralWindow(self, *args, **kwargs):
758 """
759 getSpectralWindow(self, _spwid) -> Quantity
763 Summary:
764 Get the spectral grid for the specified spectral window.
766 Description:
769 Return the spectral grid for the specified spectral window.
772 Input Parameters:
773 spwid Int standing for spectral window id (0-based). The value must be >= 0.
775 Example:
777 print at.getSpectralWindow()['value'],at.getSpectralWindow()['unit']
779 sg = at.getSpectralWindow()
780 for i in range(len(sg['value'])):
781 print sg['value'][i], sg['unit']
783 --------------------------------------------------------------------------------
785 """
786 return _atmosphere.atmosphere_getSpectralWindow(self, *args, **kwargs)
789 def getChanNum(self, *args, **kwargs):
790 """
791 getChanNum(self, _freq, _spwid) -> double
795 Summary:
796 Get the grid position for a given frequency in the specified spectral window.
798 Description:
801 Return the channel number for given frequency in the specified
802 spectral window relative to the reference channel number.
805 Input Parameters:
806 freq Frequency
807 spwid Int standing for spectral window id (0-based). The value must be >= 0.
809 Example:
811 # List current spectral window setting of SPW0
812 at.getRefFreq()['value'][0], at.getRefFreq()['unit']
813 # (90.0, 'GHz')
814 print at.getChanSep()['value'][0], at.getChanSep()['unit']
815 # 10.0 MHz
816 at.getRefChan()
817 # 32
819 # Get grid positions
820 at.getChanNum(qa.quantity(90., 'GHz'))
821 # 0.0
823 at.getChanNum(qa.quantity(90., 'GHz'), 0)
824 # 0.0
826 at.getChanNum(qa.quantity(90.08, 'GHz'), 0)
827 # 8.0
829 at.getChanNum(qa.quantity(89.985, 'GHz'), 0)
830 # -1.5
832 at.getChanNum(qa.quantity(89.98,'GHz'), 0)
833 # -2.0
835 --------------------------------------------------------------------------------
837 """
838 return _atmosphere.atmosphere_getChanNum(self, *args, **kwargs)
841 def getBandwidth(self, *args, **kwargs):
842 """
843 getBandwidth(self, _spwid) -> Quantity
847 Summary:
848 Get the frequency range encompassing the list of frequency grid points for the specified spectral window.
850 Description:
853 Get the frequency range encompassing the list of frequency grid points for the specified spectral window.
856 Input Parameters:
857 spwid Int standing for spectral window id (0-based). The value must be >= 0.
859 Example:
861 print 'Total bandwidth retrieved: ', at.getBandwidth()['value'][0], at.getBandwidth()['unit']
863 --------------------------------------------------------------------------------
865 """
866 return _atmosphere.atmosphere_getBandwidth(self, *args, **kwargs)
869 def getMinFreq(self, *args, **kwargs):
870 """
871 getMinFreq(self, _spwid) -> Quantity
875 Summary:
876 Get lowest frequency channel for the specified spectral window.
878 Description:
881 Get lowest frequency channel for the specified spectral window.
884 Input Parameters:
885 spwid Int standing for spectral window id (0-based). The value must be >= 0.
887 Example:
889 print 'Frequency range: from ', at.getMinFreq()['value'][0], ' to ',
890 at.getMaxFreq()['value'][0], at.getMinFreq()['unit']
892 --------------------------------------------------------------------------------
894 """
895 return _atmosphere.atmosphere_getMinFreq(self, *args, **kwargs)
898 def getMaxFreq(self, *args, **kwargs):
899 """
900 getMaxFreq(self, _spwid) -> Quantity
904 Summary:
905 Get highest frequency channel for the specified spectral window.
907 Description:
910 Get highest frequency channel for the specified spectral window.
913 Input Parameters:
914 spwid Int standing for spectral window id (0-based). The value must be >= 0.
916 Example:
918 print 'Frequency range: from ', at.getMinFreq()['value'][0], ' to ',
919 at.getMaxFreq()['value'][0], at.getMaxFreq()['unit']
921 --------------------------------------------------------------------------------
923 """
924 return _atmosphere.atmosphere_getMaxFreq(self, *args, **kwargs)
927 def getDryOpacity(self, *args, **kwargs):
928 """
929 getDryOpacity(self, _nc, _spwid) -> double
933 Summary:
934 get the integrated Dry Opacity along the atmospheric path for channel nc in spectral window swpId
936 Description:
940 Get the integrated Dry Opacity for one channel in a band.
942 Input Parameters:
943 nc Channel number (0-based; defaults to reference channel)
944 spwid Int standing for spectral window id (0-based). The value must be >= 0.
946 Example:
948 nb = 1
949 fC = qa.quantity([850.0], 'GHz')
950 fW = qa.quantity([0.5], 'GHz')
951 fR = qa.quantity([0.5], 'GHz')
952 at.initSpectralWindow(nb, fC, fW, fR)
953 print 'Total Dry Opacity at ', fC['value'][0], fC['unit'],
954 ' for 1.0 air mass: ', at.getDryOpacity()
956 --------------------------------------------------------------------------------
958 """
959 return _atmosphere.atmosphere_getDryOpacity(self, *args, **kwargs)
962 def getDryContOpacity(self, *args, **kwargs):
963 """
964 getDryContOpacity(self, _nc, _spwid) -> double
968 Summary:
969 get the integrated Dry Continuum Opacity along the atmospheric path for channel nc in spectral window spwid
971 Description:
975 Get the integrated Dry Continuum Opacity for one channel in a band.
977 Input Parameters:
978 nc Channel number (0-based; defaults to reference channel)
979 spwid Int standing for spectral window id (0-based). The value must be >= 0.
981 Example:
983 nb = 1
984 fC = qa.quantity([850.0], 'GHz')
985 fW = qa.quantity([0.5], 'GHz')
986 fR = qa.quantity([0.5], 'GHz')
987 at.initSpectralWindow(nb, fC, fW, fR)
988 print 'Total Dry Cont Opacity at ', fC['value'][0], fC['unit'],
989 ' for 1.0 air mass: ', at.getDryContOpacity()
991 --------------------------------------------------------------------------------
993 """
994 return _atmosphere.atmosphere_getDryContOpacity(self, *args, **kwargs)
997 def getO2LinesOpacity(self, *args, **kwargs):
998 """
999 getO2LinesOpacity(self, _nc, _spwid) -> double
1003 Summary:
1004 get the integrated O2 Lines Opacity along the atmospheric path for channel nc in spectral window spwid
1006 Description:
1010 Get the integrated O2 Lines Opacity for one channel in a band.
1012 Input Parameters:
1013 nc Channel number (0-based; defaults to reference channel)
1014 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1016 Example:
1018 nb = 1
1019 fC = qa.quantity([850.0], 'GHz')
1020 fW = qa.quantity([0.5], 'GHz')
1021 fR = qa.quantity([0.5], 'GHz')
1022 at.initSpectralWindow(nb, fC, fW, fR)
1023 print 'Total O2 Lines Opacity at ', fC['value'][0], fC['unit'],
1024 ' for 1.0 air mass: ', at.getO2LinesOpacity()
1026 --------------------------------------------------------------------------------
1028 """
1029 return _atmosphere.atmosphere_getO2LinesOpacity(self, *args, **kwargs)
1032 def getO3LinesOpacity(self, *args, **kwargs):
1033 """
1034 getO3LinesOpacity(self, _nc, _spwid) -> double
1038 Summary:
1039 get the integrated O3 Lines Opacity along the atmospheric path for channel nc in spectral window spwid
1041 Description:
1045 Get the integrated O3 Lines Opacity for one channel in a band.
1047 Input Parameters:
1048 nc Channel number (0-based; defaults to reference channel)
1049 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1051 Example:
1053 nb = 1
1054 fC = qa.quantity([850.0], 'GHz')
1055 fW = qa.quantity([0.5], 'GHz')
1056 fR = qa.quantity([0.5], 'GHz')
1057 at.initSpectralWindow(nb, fC, fW, fR)
1058 print 'Total O3 Lines Opacity at ', fC['value'][0], fC['unit'],
1059 ' for 1.0 air mass: ', at.getO3LinesOpacity()
1061 --------------------------------------------------------------------------------
1063 """
1064 return _atmosphere.atmosphere_getO3LinesOpacity(self, *args, **kwargs)
1067 def getCOLinesOpacity(self, *args, **kwargs):
1068 """
1069 getCOLinesOpacity(self, _nc, _spwid) -> double
1073 Summary:
1074 get the integrated CO Lines Opacity along the atmospheric path for channel nc in spectral window spwid
1076 Description:
1080 Get the integrated CO Lines Opacity for one channel in a band.
1082 Input Parameters:
1083 nc Channel number (0-based; defaults to reference channel)
1084 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1086 Example:
1088 nb = 1
1089 fC = qa.quantity([850.0], 'GHz')
1090 fW = qa.quantity([0.5], 'GHz')
1091 fR = qa.quantity([0.5], 'GHz')
1092 at.initSpectralWindow(nb, fC, fW, fR)
1093 print 'Total CO Lines Opacity at ', fC['value'][0], fC['unit'],
1094 ' for 1.0 air mass: ', at.getCOLinesOpacity()
1096 --------------------------------------------------------------------------------
1098 """
1099 return _atmosphere.atmosphere_getCOLinesOpacity(self, *args, **kwargs)
1102 def getN2OLinesOpacity(self, *args, **kwargs):
1103 """
1104 getN2OLinesOpacity(self, _nc, _spwid) -> double
1108 Summary:
1109 get the integrated N2O Lines Opacity along the atmospheric path for channel nc in spectral window spwid
1111 Description:
1115 Get the integrated N2O Lines Opacity for one channel in a band.
1117 Input Parameters:
1118 nc Channel number (0-based; defaults to reference channel)
1119 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1121 Example:
1123 nb = 1
1124 fC = qa.quantity([850.0], 'GHz')
1125 fW = qa.quantity([0.5], 'GHz')
1126 fR = qa.quantity([0.5], 'GHz')
1127 at.initSpectralWindow(nb, fC, fW, fR)
1128 print 'Total N2O Lines Opacity at ', fC['value'][0], fC['unit'],
1129 ' for 1.0 air mass: ', at.getN2OLinesOpacity()
1131 --------------------------------------------------------------------------------
1133 """
1134 return _atmosphere.atmosphere_getN2OLinesOpacity(self, *args, **kwargs)
1137 def getWetOpacity(self, *args, **kwargs):
1138 """
1139 getWetOpacity(self, _nc, _spwid) -> Quantity
1143 Summary:
1144 get the integrated zenith Wet Opacity along the atmospheric path for channel nc in spectral window spwid
1146 Description:
1150 Get the integrated zenith Wet Opacity for one channel in a band.
1152 Input Parameters:
1153 nc Channel number (0-based; defaults to reference channel)
1154 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1156 Example:
1158 for i in range(at.getNumSpectralWindows()):
1159 for j in range(at.getNumChan(i)):
1160 print 'Frequency: ', at.getChanFreq(j, i)['value'][0], at.getChanFreq(j, i)['unit']
1161 print 'Wet opacity:', at.getWetOpacity(j, i)['value'][0], at.getWetOpacity(j, i)['unit'],
1162 ' for ', at.getUserWH2O()['value'][0], at.getUserWH2O()['unit'], ' H2O'
1164 --------------------------------------------------------------------------------
1166 """
1167 return _atmosphere.atmosphere_getWetOpacity(self, *args, **kwargs)
1170 def getH2OLinesOpacity(self, *args, **kwargs):
1171 """
1172 getH2OLinesOpacity(self, _nc, _spwid) -> double
1176 Summary:
1177 get the integrated zenith H2O Lines Opacity along the atmospheric path for channel nc in spectral window spwid
1179 Description:
1183 Get the integrated zenith H2O Lines Opacity for one channel in a band.
1185 Input Parameters:
1186 nc Channel number (0-based; defaults to reference channel)
1187 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1189 Example:
1191 nb = 1
1192 fC = qa.quantity([850.0], 'GHz')
1193 fW = qa.quantity([0.5], 'GHz')
1194 fR = qa.quantity([0.5], 'GHz')
1195 at.initSpectralWindow(nb, fC, fW, fR)
1196 print 'Total H2O Lines Opacity at ', fC['value'][0], fC['unit'],
1197 ' for 1.0 air mass: ', at.getH2OLinesOpacity()
1199 --------------------------------------------------------------------------------
1201 """
1202 return _atmosphere.atmosphere_getH2OLinesOpacity(self, *args, **kwargs)
1205 def getH2OContOpacity(self, *args, **kwargs):
1206 """
1207 getH2OContOpacity(self, _nc, _spwid) -> double
1211 Summary:
1212 get the integrated zenith H2O Continuum Opacity along the atmospheric path for channel nc in spectral window spwid
1214 Description:
1218 Get the integrated zenith H2O Continuum Opacity for one channel in a band.
1220 Input Parameters:
1221 nc Channel number (0-based; defaults to reference channel)
1222 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1224 Example:
1226 nb = 1
1227 fC = qa.quantity([850.0], 'GHz')
1228 fW = qa.quantity([0.5], 'GHz')
1229 fR = qa.quantity([0.5], 'GHz')
1230 at.initSpectralWindow(nb, fC, fW, fR)
1231 print 'Total H2O Cont Opacity at ', fC['value'][0], fC['unit'],
1232 ' for 1.0 air mass: ', at.getH2OContOpacity()
1234 --------------------------------------------------------------------------------
1236 """
1237 return _atmosphere.atmosphere_getH2OContOpacity(self, *args, **kwargs)
1240 def getDryOpacitySpec(self, *args, **kwargs):
1241 """
1242 getDryOpacitySpec(self, _spwid, _dryOpacity) -> long
1246 Summary:
1247 get the integrated Dry opacity along the atmospheric path on each channel of a band
1249 Description:
1253 Get the integrated Dry opacity along the atmospheric path on each channel in a band.
1255 Input Parameters:
1256 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1258 Output Parameters:
1259 dryOpacity the integrated dry opacity for each channel
1261 Example:
1263 at.getDryOpacitySpec()
1264 # (8,
1265 # array([0.12113794420465548, 0.11890122206854335,
1266 # 0.11713584932434795, 0.11572780449702716,
1267 # 0.11459567027114714, 0.11368004975916192,
1268 # 0.11293678422232195,0.11233248854020933]))
1270 --------------------------------------------------------------------------------
1272 """
1273 return _atmosphere.atmosphere_getDryOpacitySpec(self, *args, **kwargs)
1276 def getWetOpacitySpec(self, *args, **kwargs):
1277 """
1278 getWetOpacitySpec(self, _spwid, _wetOpacity) -> long
1282 Summary:
1283 get the integrated zenith Wet Opacity along the atmospheric path on each channel of a band
1285 Description:
1289 Getthe integrated zenith Wet Opacity along the atmospheric path on each channel in a band.
1291 Input Parameters:
1292 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1294 Output Parameters:
1295 wetOpacity wet opacity for each channel in band - Quantum with a vector value and unit of mm-1
1297 Example:
1299 sw=at.getWetOpacitySpec()
1300 # returns a tuple of
1301 # 0 - The number of channels and
1302 # 1 - an quantity array of wet opacity for each channel in band
1303 sw[1]['value']
1304 # array([1.7225454913767393, 1.7204246078103735,
1305 # 1.7188614166349163, 1.7179243635081174,
1306 # 1.7177278069990962, 1.7184525049248152,
1307 # 1.7204244157129918, 1.7242351137518073])
1309 sw[0]
1310 # 8
1312 Another example:
1313 for s in range(at.getNumSpectralWindows()):
1314 print 'band', s
1315 for i in range(at.getNumChan(0)):
1316 print ' - dryOpacity ', at.getDryOpacitySpec(spwid=s)[1][i], ' wet Opacity/mm ',
1317 at.getWetOpacitySpec(spwid=s)[1]['value'][i]
1319 --------------------------------------------------------------------------------
1321 """
1322 return _atmosphere.atmosphere_getWetOpacitySpec(self, *args, **kwargs)
1325 def getDispersivePhaseDelay(self, *args, **kwargs):
1326 """
1327 getDispersivePhaseDelay(self, _nc, _spwid) -> Quantity
1331 Summary:
1332 get the integrated zenith H2O Atmospheric Phase Delay
1334 Description:
1337 Get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part)
1338 for the current conditions, for channel number nc of spectral window spwid.
1340 Input Parameters:
1341 nc Channel number (0-based; defaults to reference channel)
1342 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1344 Example:
1346 w = at.getUserWH2O()
1347 numSpw = at.getNumSpectralWindows()
1348 for spwid in range(numSpw):
1349 numCh = at.getNumChan(spwid)
1350 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
1351 for n in range(numCh):
1352 freq = at.getChanFreq(n, spwid)
1353 print 'Total Dispersive Phase Delay at ',freq['value'][0], freq['unit'], ' for 1.0 air mass: ',
1354 (at.getDispersivePhaseDelay(n, spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (',
1355 ((100*at.getDispersivePhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersivePhaseDelay(n,spwid)['value'][0]/w['value'][0]),
1356 '% of the Non-dispersive one )'
1358 --------------------------------------------------------------------------------
1360 """
1361 return _atmosphere.atmosphere_getDispersivePhaseDelay(self, *args, **kwargs)
1364 def getDispersiveWetPhaseDelay(self, *args, **kwargs):
1365 """
1366 getDispersiveWetPhaseDelay(self, _nc, _spwid) -> Quantity
1370 Summary:
1371 get the integrated dispersive wet Atmospheric Phase Delay
1373 Description:
1376 Function to retrievethe the integrated Atmospheric Phase Delay
1377 (Dispersive part) along the atmospheric path corresponding to the 1st
1378 guess water column.
1380 Input Parameters:
1381 nc Channel number (0-based; defaults to reference channel)
1382 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1384 Example:
1386 w = at.getUserWH2O()
1387 numSpw = at.getNumSpectralWindows()
1388 for spwid in range(numSpw):
1389 numCh = at.getNumChan(spwid)
1390 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
1391 for n in range(numCh):
1392 freq = at.getChanFreq(n, spwid)
1393 print 'Total Dispersive Wet Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ',
1394 (at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]), ' degrees per mm of water vapor (',
1395 ((100*at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveWetPhaseDelay(n,spwid)['value'][0]/w['value'][0]),
1396 '% of the Non-dispersive one )'
1398 --------------------------------------------------------------------------------
1400 """
1401 return _atmosphere.atmosphere_getDispersiveWetPhaseDelay(self, *args, **kwargs)
1404 def getNonDispersiveWetPhaseDelay(self, *args, **kwargs):
1405 """
1406 getNonDispersiveWetPhaseDelay(self, _nc, _spwid) -> Quantity
1410 Summary:
1411 get the integrated nondispersive wet Atmospheric Phase Delay
1413 Description:
1416 Function to retrieve the integrated wet Atmospheric Phase Delay
1417 (NonDispersive part) along the atmospheric path corresponding to the 1st
1418 guess water column.
1420 Input Parameters:
1421 nc Channel number (0-based; defaults to reference channel)
1422 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1424 Example:
1426 w = at.getUserWH2O()
1427 numSpw = at.getNumSpectralWindows()
1428 for spwid in range(numSpw):
1429 numCh = at.getNumChan(spwid)
1430 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
1431 for n in range(numCh):
1432 freq = at.getChanFreq(n, spwid)
1433 print 'Total Dispersive Wet Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ',
1434 (at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]), ' degrees per mm of water vapor (',
1435 ((100*at.getDispersiveWetPhaseDelay(n, spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveWetPhaseDelay(n,spwid)['value'][0]/w['value'][0]),
1436 '% of the Non-dispersive one )'
1438 --------------------------------------------------------------------------------
1440 """
1441 return _atmosphere.atmosphere_getNonDispersiveWetPhaseDelay(self, *args, **kwargs)
1444 def getNonDispersiveDryPhaseDelay(self, *args, **kwargs):
1445 """
1446 getNonDispersiveDryPhaseDelay(self, _nc, _spwid) -> Quantity
1450 Summary:
1451 get the integrated nondispersive dry Atmospheric Phase Delay
1453 Description:
1456 Function to retrieve the integrated dry Atmospheric Phase Delay
1457 (NonDispersive part) along the atmospheric path corresponding to the 1st
1458 guess water column.
1460 Input Parameters:
1461 nc Channel number (0-based; defaults to reference channel)
1462 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1464 Example:
1466 w = at.getUserWH2O()
1467 numSpw = at.getNumSpectralWindows()
1468 for spwid in range(numSpw):
1469 numCh = at.getNumChan(spwid)
1470 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
1471 for n in range(numCh):
1472 freq = at.getChanFreq(n, spwid)
1473 print 'Total Dispersive Dry Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ',
1474 (at.getDispersiveDryPhaseDelay(n,spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (',
1475 ((100*at.getDispersiveDryPhaseDelay(n,spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersiveDryPhaseDelay(n,spwid)['value'][0]/w['value'][0]),
1476 '% of the Non-dispersive one )'
1478 --------------------------------------------------------------------------------
1480 """
1481 return _atmosphere.atmosphere_getNonDispersiveDryPhaseDelay(self, *args, **kwargs)
1484 def getNonDispersivePhaseDelay(self, *args, **kwargs):
1485 """
1486 getNonDispersivePhaseDelay(self, _nc, _spwid) -> Quantity
1490 Summary:
1491 get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part)
1493 Description:
1496 Get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive
1497 part) for the current conditions, for channel number nc of spectral
1498 window spwid.
1500 Input Parameters:
1501 nc Channel number (0-based; defaults to reference channel)
1502 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1504 Example:
1506 w = at.getUserWH2O()
1507 numSpw = at.getNumSpectralWindows()
1508 for spwid in range(numSpw):
1509 numCh = at.getNumChan(spwid)
1510 print 'Spectral window ', spwid, ' has ', numCh, ' frequency channels'
1511 for n in range(numCh):
1512 freq = at.getChanFreq(n, spwid)
1513 print 'Total Dispersive Phase Delay at ', freq['value'][0], freq['unit'], ' for 1.0 air mass: ',
1514 (at.getDispersivePhaseDelay(n,spwid)['value'][0])/(w['value'][0]),' degrees per mm of water vapor (',
1515 ((100*at.getDispersivePhaseDelay(n,spwid)['value'][0])/(w['value'][0]))/(at.getNonDispersivePhaseDelay(n,spwid)['value'][0]/w['value'][0]),
1516 '% of the Non-dispersive one )'
1518 --------------------------------------------------------------------------------
1520 """
1521 return _atmosphere.atmosphere_getNonDispersivePhaseDelay(self, *args, **kwargs)
1524 def getDispersivePathLength(self, *args, **kwargs):
1525 """
1526 getDispersivePathLength(self, _nc, _spwid) -> Quantity
1530 Summary:
1531 get the integrated zenith Atmospheric Dispersive Path
1533 Description:
1536 Retrieve the integrated zenith H2O Atmospheric Path length (Dispersive part)
1537 along the atmospheric path corresponding to the user water column
1538 for channel nc in spectral window spwid.
1540 Input Parameters:
1541 nc Channel number (0-based; defaults to reference channel)
1542 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1544 Example:
1546 w = at.getUserWH2O()
1547 nb = 1
1548 fC = qa.quantity([850.0], 'GHz')
1549 fW = qa.quantity([0.5], 'GHz')
1550 nfR = qa.quantity([0.5], 'GHz')
1551 at.initSpectralWindow(nb, fC, fW, fR)
1552 print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ',
1553 at.getDispersivePathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor'
1554 print '(',100*(at.getDispersivePathLength()['value'][0] / w['value'][0])/(at.getNonDispersivePathLength()['value'][0] / w['value'][0]),
1555 '% of the Non-dispersive one )'
1557 --------------------------------------------------------------------------------
1559 """
1560 return _atmosphere.atmosphere_getDispersivePathLength(self, *args, **kwargs)
1563 def getDispersiveWetPathLength(self, *args, **kwargs):
1564 """
1565 getDispersiveWetPathLength(self, _nc, _spwid) -> Quantity
1569 Summary:
1570 get the integrated wet Atmospheric Dispersive Path
1572 Description:
1575 Retrieve the integrated wet Atmospheric Path length (Dispersive part)
1576 along the atmospheric path corresponding to the 1st guess water column
1577 for channel nc in spectral window spwid.
1579 Input Parameters:
1580 nc Channel number (0-based; defaults to reference channel)
1581 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1583 Example:
1585 w = at.getGroundWH2O()
1586 nb = 1
1587 fC = qa.quantity([850.0], 'GHz')
1588 fW = qa.quantity([0.5], 'GHz')
1589 nfR = qa.quantity([0.5], 'GHz')
1590 at.initSpectralWindow(nb, fC, fW, fR)
1591 print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ',
1592 at.getDispersiveWetPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor'
1593 print '(',100*(at.getDispersiveWetPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveWetPathLength()['value'][0] / w['value'][0]),
1594 '% of the Non-dispersive one )'
1596 --------------------------------------------------------------------------------
1598 """
1599 return _atmosphere.atmosphere_getDispersiveWetPathLength(self, *args, **kwargs)
1602 def getNonDispersiveWetPathLength(self, *args, **kwargs):
1603 """
1604 getNonDispersiveWetPathLength(self, _nc, _spwid) -> Quantity
1608 Summary:
1609 get the integrated wet Atmospheric NonDispersive Path
1611 Description:
1614 Retrieve the integrated wet Atmospheric Path length (NonDispersive part)
1615 along the atmospheric path corresponding to the 1st guess water column
1616 for channel nc in spectral window spwid.
1618 Input Parameters:
1619 nc Channel number (0-based; defaults to reference channel)
1620 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1622 Example:
1624 w = at.getGroundWH2O()
1625 nb = 1
1626 fC = qa.quantity([850.0], 'GHz')
1627 fW = qa.quantity([0.5], 'GHz')
1628 nfR = qa.quantity([0.5], 'GHz')
1629 at.initSpectralWindow(nb, fC, fW, fR)
1630 print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ',
1631 at.getDispersiveWetPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor'
1632 print '(',100*(at.getDispersiveWetPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveWetPathLength()['value'][0] / w['value'][0]),
1633 '% of the Non-dispersive one )'
1635 --------------------------------------------------------------------------------
1637 """
1638 return _atmosphere.atmosphere_getNonDispersiveWetPathLength(self, *args, **kwargs)
1641 def getNonDispersiveDryPathLength(self, *args, **kwargs):
1642 """
1643 getNonDispersiveDryPathLength(self, _nc, _spwid) -> Quantity
1647 Summary:
1648 get the integrated dry Atmospheric NonDispersive Path
1650 Description:
1653 Retrieve the integrated dry Atmospheric Path length (NonDispersive part)
1654 along the atmospheric path corresponding to the 1st guess water column
1655 for channel nc in spectral window spwid.
1657 Input Parameters:
1658 nc Channel number (0-based; defaults to reference channel)
1659 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1661 Example:
1663 w = at.getGroundWH2O()
1664 nb = 1
1665 fC = qa.quantity([850.0], 'GHz')
1666 fW = qa.quantity([0.5], 'GHz')
1667 nfR = qa.quantity([0.5], 'GHz')
1668 at.initSpectralWindow(nb, fC, fW, fR)
1669 print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ',
1670 at.getDispersiveDryPathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor'
1671 print '(',100*(at.getDispersiveDryPathLength()['value'][0] / w['value'][0])/(at.getNonDispersiveDryPathLength()['value'][0] / w['value'][0]),
1672 '% of the Non-dispersive one )'
1674 --------------------------------------------------------------------------------
1676 """
1677 return _atmosphere.atmosphere_getNonDispersiveDryPathLength(self, *args, **kwargs)
1680 def getO2LinesPathLength(self, *args, **kwargs):
1681 """
1682 getO2LinesPathLength(self, _nc, _spwid) -> Quantity
1686 Summary:
1687 get the integrated O2 lines Path
1689 Description:
1692 Retrieve the integrated Atmospheric Path length (due to O2 Lines) along
1693 the atmospheric path corresponding to the 1st guess water column
1694 for channel nc in spectral window spwid.
1696 Input Parameters:
1697 nc Channel number (0-based; defaults to reference channel)
1698 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1700 --------------------------------------------------------------------------------
1702 """
1703 return _atmosphere.atmosphere_getO2LinesPathLength(self, *args, **kwargs)
1706 def getO3LinesPathLength(self, *args, **kwargs):
1707 """
1708 getO3LinesPathLength(self, _nc, _spwid) -> Quantity
1712 Summary:
1713 get the integrated O3 lines Path
1715 Description:
1718 Retrieve the integrated Atmospheric Path length (due to O3 Lines) along
1719 the atmospheric path corresponding to the 1st guess water column
1720 for channel nc in spectral window spwid.
1722 Input Parameters:
1723 nc Channel number (0-based; defaults to reference channel)
1724 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1726 --------------------------------------------------------------------------------
1728 """
1729 return _atmosphere.atmosphere_getO3LinesPathLength(self, *args, **kwargs)
1732 def getCOLinesPathLength(self, *args, **kwargs):
1733 """
1734 getCOLinesPathLength(self, _nc, _spwid) -> Quantity
1738 Summary:
1739 get the integrated CO lines Path
1741 Description:
1744 Retrieve the integrated Atmospheric Path length (due to CO Lines)
1745 along the atmospheric path corresponding to the 1st guess water column
1746 for channel nc in spectral window spwid.
1748 Input Parameters:
1749 nc Channel number (0-based; defaults to reference channel)
1750 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1752 --------------------------------------------------------------------------------
1754 """
1755 return _atmosphere.atmosphere_getCOLinesPathLength(self, *args, **kwargs)
1758 def getN2OLinesPathLength(self, *args, **kwargs):
1759 """
1760 getN2OLinesPathLength(self, _nc, _spwid) -> Quantity
1764 Summary:
1765 get the integrated N2O lines Path
1767 Description:
1770 Retrieve the integrated Atmospheric Path length (due to N2O Lines)
1771 along the atmospheric path corresponding to the 1st guess water column
1772 for channel nc in spectral window spwid.
1774 Input Parameters:
1775 nc Channel number (0-based; defaults to reference channel)
1776 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1778 --------------------------------------------------------------------------------
1780 """
1781 return _atmosphere.atmosphere_getN2OLinesPathLength(self, *args, **kwargs)
1784 def getNonDispersivePathLength(self, *args, **kwargs):
1785 """
1786 getNonDispersivePathLength(self, _nc, _spwid) -> Quantity
1790 Summary:
1791 get the integrated zenith H2O Atmospheric Non-Dispersive Path
1793 Description:
1796 Get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part)
1797 for the current conditions, for channel nc in spectral window spwid.
1799 Input Parameters:
1800 nc Channel number (0-based; defaults to reference channel)
1801 spwid Int standing for spectral window id (0-based). The value must be >= 0.
1803 Example:
1805 w = at.getUserWH2O()
1806 nb = 1
1807 fC = qa.quantity([850.0], 'GHz')
1808 fW = qa.quantity([0.5], 'GHz')
1809 nfR = qa.quantity([0.5], 'GHz')
1810 at.initSpectralWindow(nb, fC, fW, fR)
1811 print 'Total Dispersive Delay at ', fC['value'][0], fC['unit'], ' for 1.0 air mass: ',
1812 at.getDispersivePathLength()['value'][0] / w['value'][0], ' meters per mm of water vapor'
1813 print '(',100*(at.getDispersivePathLength()['value'][0] / w['value'][0])/(at.getNonDispersivePathLength()['value'][0] / w['value'][0]),
1814 '% of the Non-dispersive one )'
1816 --------------------------------------------------------------------------------
1818 """
1819 return _atmosphere.atmosphere_getNonDispersivePathLength(self, *args, **kwargs)
1822 def getAbsH2OLines(self, *args, **kwargs):
1823 """
1824 getAbsH2OLines(self, _nl, _nf, _spwid) -> Quantity
1828 Summary:
1829 Get H2O lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1831 Description:
1834 Accessor to get H2O lines Absorption Coefficient at layer nl,
1835 spectral window spwid and channel nf.
1837 Input Parameters:
1838 nl atmospheric layer number. The value must be >= 0.
1839 nf frequency channnel number. The value must be >= 0.
1840 spwid spectral window id. The value must be >= 0.
1842 Example:
1844 ac = at.getAbsH2OLines(0, 0, 0)
1845 print 'H2O lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
1847 --------------------------------------------------------------------------------
1849 """
1850 return _atmosphere.atmosphere_getAbsH2OLines(self, *args, **kwargs)
1853 def getAbsH2OCont(self, *args, **kwargs):
1854 """
1855 getAbsH2OCont(self, _nl, _nf, _spwid) -> Quantity
1859 Summary:
1860 Get H2O continuum Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1862 Description:
1865 Get H2O continuum Absorption Coefficient at layer nl,
1866 spectral window spwid and frequency channel nf
1868 Input Parameters:
1869 nl atmospheric layer number. The value must be >= 0.
1870 nf frequency channnel number. The value must be >= 0.
1871 spwid spectral window id. The value must be >= 0.
1873 Example:
1875 ac = at.getAbsH2OCont(0, 0, 0)
1876 print 'H2OCont absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
1878 --------------------------------------------------------------------------------
1880 """
1881 return _atmosphere.atmosphere_getAbsH2OCont(self, *args, **kwargs)
1884 def getAbsO2Lines(self, *args, **kwargs):
1885 """
1886 getAbsO2Lines(self, _nl, _nf, _spwid) -> Quantity
1890 Summary:
1891 Get O2 lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1893 Description:
1896 Get O2 lines Absorption Coefficient at layer nl,
1897 spectral window spwid and frequency channel nf
1899 Input Parameters:
1900 nl atmospheric layer number. The value must be >= 0.
1901 nf frequency channnel number. The value must be >= 0.
1902 spwid spectral window id. The value must be >= 0.
1904 Example:
1906 ac = at.getAbsO2Lines(0, 0, 0)
1907 print 'O2 lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
1909 --------------------------------------------------------------------------------
1911 """
1912 return _atmosphere.atmosphere_getAbsO2Lines(self, *args, **kwargs)
1915 def getAbsDryCont(self, *args, **kwargs):
1916 """
1917 getAbsDryCont(self, _nl, _nf, _spwid) -> Quantity
1921 Summary:
1922 Get Dry Continuum Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1924 Description:
1927 Get Dry Continuum Absorption Coefficient at layer nl,
1928 spectral window spwid and frequency channel nf
1930 Input Parameters:
1931 nl atmospheric layer number. The value must be >= 0.
1932 nf frequency channnel number. The value must be >= 0.
1933 spwid spectral window id. The value must be >= 0.
1935 Example:
1937 ac = at.getAbsDryCont(0, 0, 0)
1938 print 'Dry Continuum absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
1940 --------------------------------------------------------------------------------
1942 """
1943 return _atmosphere.atmosphere_getAbsDryCont(self, *args, **kwargs)
1946 def getAbsO3Lines(self, *args, **kwargs):
1947 """
1948 getAbsO3Lines(self, _nl, _nf, _spwid) -> Quantity
1952 Summary:
1953 Get O3 lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1955 Description:
1958 Get O3 lines Absorption Coefficient at layer nl,
1959 spectral window spwid and frequency channel nf
1961 Input Parameters:
1962 nl atmospheric layer number. The value must be >= 0.
1963 nf frequency channnel number. The value must be >= 0.
1964 spwid spectral window id. The value must be >= 0.
1966 Example:
1968 ac = at.getAbsO3Lines(0, 0, 0)
1969 print 'O3 lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
1971 --------------------------------------------------------------------------------
1973 """
1974 return _atmosphere.atmosphere_getAbsO3Lines(self, *args, **kwargs)
1977 def getAbsCOLines(self, *args, **kwargs):
1978 """
1979 getAbsCOLines(self, _nl, _nf, _spwid) -> Quantity
1983 Summary:
1984 Get CO lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
1986 Description:
1989 Get CO lines Absorption Coefficient at layer nl,
1990 spectral window spwid and frequency channel nf
1992 Input Parameters:
1993 nl atmospheric layer number. The value must be >= 0.
1994 nf frequency channnel number. The value must be >= 0.
1995 spwid spectral window id. The value must be >= 0.
1997 Example:
1999 ac = at.getAbsCOLines(0, 0, 0)
2000 print 'CO lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
2002 --------------------------------------------------------------------------------
2004 """
2005 return _atmosphere.atmosphere_getAbsCOLines(self, *args, **kwargs)
2008 def getAbsN2OLines(self, *args, **kwargs):
2009 """
2010 getAbsN2OLines(self, _nl, _nf, _spwid) -> Quantity
2014 Summary:
2015 Get N2O lines Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
2017 Description:
2020 Get N2O lines Absorption Coefficient at layer nl,
2021 spectral window spwid and frequency channel nf
2023 Input Parameters:
2024 nl atmospheric layer number. The value must be >= 0.
2025 nf frequency channnel number. The value must be >= 0.
2026 spwid spectral window id. The value must be >= 0.
2028 Example:
2030 ac = at.getAbsN2OLines(0, 0, 0)
2031 print 'N2O lines absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
2033 --------------------------------------------------------------------------------
2035 """
2036 return _atmosphere.atmosphere_getAbsN2OLines(self, *args, **kwargs)
2039 def getAbsTotalDry(self, *args, **kwargs):
2040 """
2041 getAbsTotalDry(self, _nl, _nf, _spwid) -> Quantity
2045 Summary:
2046 Get Total Dry Absorption Coefficient at layer nl and frequency channel nf in spectral window spwid
2048 Description:
2051 Get total dry Absorption Coefficient at layer nl,
2052 spectral window spwid and frequency channel nf
2054 Input Parameters:
2055 nl atmospheric layer number. The value must be >= 0.
2056 nf frequency channnel number. The value must be >= 0.
2057 spwid spectral window id. The value must be >= 0.
2059 Example:
2061 ac = at.getAbsTotalDry(0, 0, 0)
2062 print 'Total dry absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
2064 --------------------------------------------------------------------------------
2066 """
2067 return _atmosphere.atmosphere_getAbsTotalDry(self, *args, **kwargs)
2070 def getAbsTotalWet(self, *args, **kwargs):
2071 """
2072 getAbsTotalWet(self, _nl, _nf, _spwid) -> Quantity
2076 Summary:
2077 Get total wet absorption coefficient at layer nl and frequency channel nf in spectral window spwid
2079 Description:
2082 Get total wet absorption coefficient at layer nl,
2083 spectral window spwid and frequency channel nf
2085 Input Parameters:
2086 nl atmospheric layer number. The value must be >= 0.
2087 nf frequency channnel number. The value must be >= 0.
2088 spwid spectral window id. The value must be >= 0.
2090 Example:
2092 ac = at.getAbsTotalWet(0, 0, 0)
2093 print 'Total wet absorption coefficient for layer 0, channel 0 is ', ac['value'][0], ac['unit']
2095 --------------------------------------------------------------------------------
2097 """
2098 return _atmosphere.atmosphere_getAbsTotalWet(self, *args, **kwargs)
2101 def setUserWH2O(self, *args, **kwargs):
2102 """
2103 setUserWH2O(self, _wh2o) -> bool
2107 Summary:
2108 set the user zenith water vapor column
2110 Description:
2114 Set user zenith water vapor column for forward radiative transfer
2115 calculations.
2117 Input Parameters:
2118 wh2o User water vapor column
2120 Example:
2122 wh2o=qa.quantity(0.8,'mm')
2123 at.setUserWH2O(wh2o)
2125 --------------------------------------------------------------------------------
2127 """
2128 return _atmosphere.atmosphere_setUserWH2O(self, *args, **kwargs)
2131 def getUserWH2O(self):
2132 """
2133 getUserWH2O(self) -> Quantity
2137 Summary:
2138 get the user zenith water vapor column
2140 Description:
2144 Get user zenith water vapor column for forward radiative transfer
2145 calculations.
2147 Example:
2149 print 'water vapor column: ', at.getUserWH2O()['value'][0], at.getUserWH2O()['unit']
2151 --------------------------------------------------------------------------------
2153 """
2154 return _atmosphere.atmosphere_getUserWH2O(self)
2157 def setAirMass(self, *args, **kwargs):
2158 """
2159 setAirMass(self, _airmass) -> bool
2163 Summary:
2164 Set the air mass
2166 Description:
2169 Setter for air mass in SkyStatus without performing water vapor retrieval.
2171 Input Parameters:
2172 airmass Air Mass
2174 Example:
2176 at.setAirMass(1.51)
2178 --------------------------------------------------------------------------------
2180 """
2181 return _atmosphere.atmosphere_setAirMass(self, *args, **kwargs)
2184 def getAirMass(self):
2185 """
2186 getAirMass(self) -> double
2190 Summary:
2191 Get the air mass
2193 Description:
2196 Accessor to get airmass.
2198 Example:
2200 at.setAirMass(2.0)
2201 print '(INPUT CHANGE) Air mass: ', at.getAirMass()
2203 --------------------------------------------------------------------------------
2205 """
2206 return _atmosphere.atmosphere_getAirMass(self)
2209 def setSkyBackgroundTemperature(self, *args, **kwargs):
2210 """
2211 setSkyBackgroundTemperature(self, _tbgr) -> bool
2215 Summary:
2216 Set the sky background temperature
2218 Description:
2221 Set sky background temperature in SkyStatus without performing water vapor retrieval
2223 Input Parameters:
2224 tbgr sky background temperature
2226 Example:
2228 at.setSkyBackgroundTemperature(qa.quantity(2.73,'K'))
2230 --------------------------------------------------------------------------------
2232 """
2233 return _atmosphere.atmosphere_setSkyBackgroundTemperature(self, *args, **kwargs)
2236 def getSkyBackgroundTemperature(self):
2237 """
2238 getSkyBackgroundTemperature(self) -> Quantity
2242 Summary:
2243 Get the sky background temperature
2245 Description:
2248 Get the sky background temperature
2250 Example:
2252 t = at.getSkyBackgroundTemperature()
2253 print t['value'][0], t['unit']
2254 # 2.73 K
2256 --------------------------------------------------------------------------------
2258 """
2259 return _atmosphere.atmosphere_getSkyBackgroundTemperature(self)
2262 def getAverageTebbSky(self, *args, **kwargs):
2263 """
2264 getAverageTebbSky(self, _spwid, _wh2o) -> Quantity
2268 Summary:
2269 Returns average equiv. BB Temp
2271 Description:
2274 Returns the average Equivalent Blackbody Temperature in spectral
2275 window spwid, for the current conditions and a perfect sky coupling.
2277 Input Parameters:
2278 spwid Spectral window (0-based). The value must be >= 0.
2279 wh2o User specified water column length in mm. Default is not to use wh2o.
2281 Example:
2283 wh2o = qa.quantity(0.4,'mm')
2284 print '(INPUT CHANGE) water vapor column:', wh2o['value'], wh2o['unit']
2285 print '(NEW OUTPUT) T_EBB =', at.getAverageTebbSky(0,wh2o)['value'][0], at.getAverageTebbSky(0,wh2o)['unit']
2287 --------------------------------------------------------------------------------
2289 """
2290 return _atmosphere.atmosphere_getAverageTebbSky(self, *args, **kwargs)
2293 def getTebbSky(self, *args, **kwargs):
2294 """
2295 getTebbSky(self, _nc, _spwid, _wh2o) -> Quantity
2299 Summary:
2300 Returns equiv. BB Temp
2302 Description:
2305 Gets the Equivalent Blackbody Temperature in spectral window spwid and
2306 channel nc, for the current (user) Water Vapor Column wh2o,
2307 the current Air Mass, and perfect Sky Coupling to the sky.
2309 Input Parameters:
2310 nc Channel number (0-based) - defaults to reference channel
2311 spwid Spectral window (0-based). The value must be >= 0.
2312 wh2o User specified water column length in mm. Default is not to use wh2o.
2314 Example:
2316 for s in range(at.getNumSpectralWindows()):
2317 for i in range(at.getNumChan(s)):
2318 print 'Band', s, ' channel ', i, 'TebbSky = ', at.getTebbSky(i,s)['value'][0], at.getTebbSky()['unit']
2320 --------------------------------------------------------------------------------
2322 """
2323 return _atmosphere.atmosphere_getTebbSky(self, *args, **kwargs)
2326 def getTebbSkySpec(self, *args, **kwargs):
2327 """
2328 getTebbSkySpec(self, _spwid, _wh2o, _tebbSky) -> long
2332 Summary:
2333 Returns equiv. BB Temp on each channel of a band
2335 Description:
2338 Gets the Equivalent Blackbody Temperatures in a spectral window spwid
2339 for the current (user) Water Vapor Column wh2o, the current Air Mass, and
2340 perfect Sky Coupling to the sky.
2342 Input Parameters:
2343 spwid Spectral window (0-based). The value must be >= 0.
2344 wh2o User specified water column length in mm. Default is not to use wh2o.
2346 Output Parameters:
2347 tebbSky the Equivalent Blackbody Temperatures in a band - Quantum with a vector value and unit of K
2349 Example:
2351 sw=at.getWetOpacitySpec()
2352 # returns a tuple of
2353 # 0 - The number of channels, and
2354 # 1 - the Equivalent Blackbody Temperatures in a band
2355 sw[1]['value']
2356 # [34.687910103670511,
2357 # 35.496193465331679,
2358 # 36.460355664151791,
2359 # 37.419146813713745,
2360 # 37.9452005127634,
2361 # 38.722631196093729,
2362 # 39.593561594172662,
2363 # 40.528694048924017]
2365 sw[0]
2366 # 8
2368 Another example:
2369 for s in range(at.getNumSpectralWindows()):
2370 print 'band', s
2371 tebbspec = at.getTebbSkySpec(spwid=s)
2372 for i in range(at.getNumChan(s)):
2373 print ' - TebbSky %f [%s] ' % (tebbspec[1]['value'][i],tebbspec[1]['unit'])
2375 --------------------------------------------------------------------------------
2377 """
2378 return _atmosphere.atmosphere_getTebbSkySpec(self, *args, **kwargs)
2381 def getAverageTrjSky(self, *args, **kwargs):
2382 """
2383 getAverageTrjSky(self, _spwid, _wh2o) -> Quantity
2387 Summary:
2388 Returns the average Rayleigh-Jeans Temperature
2390 Description:
2393 Returns the average Rayleigh-Jeans Temperature in spectral
2394 window spwid, for the current (user) Water Vapor Column wh2o,
2395 the current Air Mass, and perfect Sky Coupling to the sky.
2397 Input Parameters:
2398 spwid Spectral window (0-based). The value must be >= 0.
2399 wh2o User specified water column length in mm. Default is not to use wh2o.
2401 Example:
2403 wh2o = qa.quantity(0.4,'mm')
2404 print '(INPUT CHANGE) water vapor column:', wh2o['value'], wh2o['unit']
2405 print '(NEW OUTPUT) T_RJ =', at.getAverageTrjSky(0,wh2o)['value'][0], at.getAverageTrjSky(0,wh2o)['unit']
2407 --------------------------------------------------------------------------------
2409 """
2410 return _atmosphere.atmosphere_getAverageTrjSky(self, *args, **kwargs)
2413 def getTrjSky(self, *args, **kwargs):
2414 """
2415 getTrjSky(self, _nc, _spwid, _wh2o) -> Quantity
2419 Summary:
2420 Returns the Rayleigh-Jeans Temperature
2422 Description:
2425 Gets the Rayleigh-Jeans Temperature in spectral window spwid and
2426 channel nc, for the current (user) Water Vapor Column wh2o, the
2427 current Air Mass, and perfect Sky Coupling to the sky.
2429 Input Parameters:
2430 nc Channel number (0-based) - defaults to reference channel
2431 spwid Spectral window (0-based). The value must be >= 0.
2432 wh2o User specified water column length in mm. Default is not to use wh2o.
2434 Example:
2436 for s in range(at.getNumSpectralWindows()):
2437 for i in range(at.getNumChan(s)):
2438 print 'Band', s, ' channel ', i, 'TrjSky = ', at.getTrjSky(i,s)['value'][0], at.getTrjSky()['unit']
2440 --------------------------------------------------------------------------------
2442 """
2443 return _atmosphere.atmosphere_getTrjSky(self, *args, **kwargs)
2446 def getTrjSkySpec(self, *args, **kwargs):
2447 """
2448 getTrjSkySpec(self, _spwid, _wh2o, _trjSky) -> long
2452 Summary:
2453 Returns the Rayleigh-Jeans Temperatures on each channel of a band
2455 Description:
2458 Gets the Rayleigh-Jeans Temperatures in a spectral window spwid
2459 for the current (user) Water Vapor Column wh2o, the current Air
2460 Mass, and perfect Sky Coupling to the sky.
2462 Input Parameters:
2463 spwid Spectral window (0-based). The value must be >= 0.
2464 wh2o User specified water column length in mm. Default is not to use wh2o.
2466 Output Parameters:
2467 trjSky the Rayleigh-Jeans Temperatures in a band - Quantum with a vector value and unit of K
2469 Example:
2471 sw=at.getWetOpacitySpec()
2472 # returns a tuple of
2473 # 0 - The number of channels, and
2474 # 1 - the Equivalent Blackbody Temperatures in a band
2475 sw[1]['value']
2476 # [34.687910103670511,
2477 # 35.496193465331679,
2478 # 36.460355664151791,
2479 # 37.419146813713745,
2480 # 37.9452005127634,
2481 # 38.722631196093729,
2482 # 39.593561594172662,
2483 # 40.528694048924017]
2485 sw[0]
2486 # 8
2488 Another example:
2489 for s in range(at.getNumSpectralWindows()):
2490 print 'band', s
2491 trjspec = at.getTrjSkySpec(spwid=s)
2492 for i in range(at.getNumChan(s)):
2493 print ' - TrjSky %f [%s] ' % (trjspec[1]['value'][i],trjspec[1]['unit'])
2495 --------------------------------------------------------------------------------
2497 """
2498 return _atmosphere.atmosphere_getTrjSkySpec(self, *args, **kwargs)
2500 __swig_destroy__ = _atmosphere.delete_atmosphere
2501 __del__ = lambda self: None
2502 __swig_setmethods__["_altitude_getBasicAtmParms"] = _atmosphere.atmosphere__altitude_getBasicAtmParms_set
2503 __swig_getmethods__["_altitude_getBasicAtmParms"] = _atmosphere.atmosphere__altitude_getBasicAtmParms_get
2504 if _newclass:
2505 _altitude_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__altitude_getBasicAtmParms_get, _atmosphere.atmosphere__altitude_getBasicAtmParms_set)
2506 __swig_setmethods__["_temperature_getBasicAtmParms"] = _atmosphere.atmosphere__temperature_getBasicAtmParms_set
2507 __swig_getmethods__["_temperature_getBasicAtmParms"] = _atmosphere.atmosphere__temperature_getBasicAtmParms_get
2508 if _newclass:
2509 _temperature_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__temperature_getBasicAtmParms_get, _atmosphere.atmosphere__temperature_getBasicAtmParms_set)
2510 __swig_setmethods__["_pressure_getBasicAtmParms"] = _atmosphere.atmosphere__pressure_getBasicAtmParms_set
2511 __swig_getmethods__["_pressure_getBasicAtmParms"] = _atmosphere.atmosphere__pressure_getBasicAtmParms_get
2512 if _newclass:
2513 _pressure_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__pressure_getBasicAtmParms_get, _atmosphere.atmosphere__pressure_getBasicAtmParms_set)
2514 __swig_setmethods__["_maxAltitude_getBasicAtmParms"] = _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_set
2515 __swig_getmethods__["_maxAltitude_getBasicAtmParms"] = _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_get
2516 if _newclass:
2517 _maxAltitude_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__maxAltitude_getBasicAtmParms_get, _atmosphere.atmosphere__maxAltitude_getBasicAtmParms_set)
2518 __swig_setmethods__["_humidity_getBasicAtmParms"] = _atmosphere.atmosphere__humidity_getBasicAtmParms_set
2519 __swig_getmethods__["_humidity_getBasicAtmParms"] = _atmosphere.atmosphere__humidity_getBasicAtmParms_get
2520 if _newclass:
2521 _humidity_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__humidity_getBasicAtmParms_get, _atmosphere.atmosphere__humidity_getBasicAtmParms_set)
2522 __swig_setmethods__["_dTem_dh_getBasicAtmParms"] = _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_set
2523 __swig_getmethods__["_dTem_dh_getBasicAtmParms"] = _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_get
2524 if _newclass:
2525 _dTem_dh_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dTem_dh_getBasicAtmParms_get, _atmosphere.atmosphere__dTem_dh_getBasicAtmParms_set)
2526 __swig_setmethods__["_dP_getBasicAtmParms"] = _atmosphere.atmosphere__dP_getBasicAtmParms_set
2527 __swig_getmethods__["_dP_getBasicAtmParms"] = _atmosphere.atmosphere__dP_getBasicAtmParms_get
2528 if _newclass:
2529 _dP_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dP_getBasicAtmParms_get, _atmosphere.atmosphere__dP_getBasicAtmParms_set)
2530 __swig_setmethods__["_dPm_getBasicAtmParms"] = _atmosphere.atmosphere__dPm_getBasicAtmParms_set
2531 __swig_getmethods__["_dPm_getBasicAtmParms"] = _atmosphere.atmosphere__dPm_getBasicAtmParms_get
2532 if _newclass:
2533 _dPm_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__dPm_getBasicAtmParms_get, _atmosphere.atmosphere__dPm_getBasicAtmParms_set)
2534 __swig_setmethods__["_h0_getBasicAtmParms"] = _atmosphere.atmosphere__h0_getBasicAtmParms_set
2535 __swig_getmethods__["_h0_getBasicAtmParms"] = _atmosphere.atmosphere__h0_getBasicAtmParms_get
2536 if _newclass:
2537 _h0_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__h0_getBasicAtmParms_get, _atmosphere.atmosphere__h0_getBasicAtmParms_set)
2538 __swig_setmethods__["_atmType_getBasicAtmParms"] = _atmosphere.atmosphere__atmType_getBasicAtmParms_set
2539 __swig_getmethods__["_atmType_getBasicAtmParms"] = _atmosphere.atmosphere__atmType_getBasicAtmParms_get
2540 if _newclass:
2541 _atmType_getBasicAtmParms = _swig_property(_atmosphere.atmosphere__atmType_getBasicAtmParms_get, _atmosphere.atmosphere__atmType_getBasicAtmParms_set)
2542 __swig_setmethods__["_thickness_getProfile"] = _atmosphere.atmosphere__thickness_getProfile_set
2543 __swig_getmethods__["_thickness_getProfile"] = _atmosphere.atmosphere__thickness_getProfile_get
2544 if _newclass:
2545 _thickness_getProfile = _swig_property(_atmosphere.atmosphere__thickness_getProfile_get, _atmosphere.atmosphere__thickness_getProfile_set)
2546 __swig_setmethods__["_temperature_getProfile"] = _atmosphere.atmosphere__temperature_getProfile_set
2547 __swig_getmethods__["_temperature_getProfile"] = _atmosphere.atmosphere__temperature_getProfile_get
2548 if _newclass:
2549 _temperature_getProfile = _swig_property(_atmosphere.atmosphere__temperature_getProfile_get, _atmosphere.atmosphere__temperature_getProfile_set)
2550 __swig_setmethods__["_watermassdensity_getProfile"] = _atmosphere.atmosphere__watermassdensity_getProfile_set
2551 __swig_getmethods__["_watermassdensity_getProfile"] = _atmosphere.atmosphere__watermassdensity_getProfile_get
2552 if _newclass:
2553 _watermassdensity_getProfile = _swig_property(_atmosphere.atmosphere__watermassdensity_getProfile_get, _atmosphere.atmosphere__watermassdensity_getProfile_set)
2554 __swig_setmethods__["_water_getProfile"] = _atmosphere.atmosphere__water_getProfile_set
2555 __swig_getmethods__["_water_getProfile"] = _atmosphere.atmosphere__water_getProfile_get
2556 if _newclass:
2557 _water_getProfile = _swig_property(_atmosphere.atmosphere__water_getProfile_get, _atmosphere.atmosphere__water_getProfile_set)
2558 __swig_setmethods__["_pressure_getProfile"] = _atmosphere.atmosphere__pressure_getProfile_set
2559 __swig_getmethods__["_pressure_getProfile"] = _atmosphere.atmosphere__pressure_getProfile_get
2560 if _newclass:
2561 _pressure_getProfile = _swig_property(_atmosphere.atmosphere__pressure_getProfile_get, _atmosphere.atmosphere__pressure_getProfile_set)
2562 __swig_setmethods__["_O3_getProfile"] = _atmosphere.atmosphere__O3_getProfile_set
2563 __swig_getmethods__["_O3_getProfile"] = _atmosphere.atmosphere__O3_getProfile_get
2564 if _newclass:
2565 _O3_getProfile = _swig_property(_atmosphere.atmosphere__O3_getProfile_get, _atmosphere.atmosphere__O3_getProfile_set)
2566 __swig_setmethods__["_CO_getProfile"] = _atmosphere.atmosphere__CO_getProfile_set
2567 __swig_getmethods__["_CO_getProfile"] = _atmosphere.atmosphere__CO_getProfile_get
2568 if _newclass:
2569 _CO_getProfile = _swig_property(_atmosphere.atmosphere__CO_getProfile_get, _atmosphere.atmosphere__CO_getProfile_set)
2570 __swig_setmethods__["_N2O_getProfile"] = _atmosphere.atmosphere__N2O_getProfile_set
2571 __swig_getmethods__["_N2O_getProfile"] = _atmosphere.atmosphere__N2O_getProfile_get
2572 if _newclass:
2573 _N2O_getProfile = _swig_property(_atmosphere.atmosphere__N2O_getProfile_get, _atmosphere.atmosphere__N2O_getProfile_set)
2574 __swig_setmethods__["_dryOpacity_getDryOpacitySpec"] = _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_set
2575 __swig_getmethods__["_dryOpacity_getDryOpacitySpec"] = _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_get
2576 if _newclass:
2577 _dryOpacity_getDryOpacitySpec = _swig_property(_atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_get, _atmosphere.atmosphere__dryOpacity_getDryOpacitySpec_set)
2578 __swig_setmethods__["_wetOpacity_getWetOpacitySpec"] = _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_set
2579 __swig_getmethods__["_wetOpacity_getWetOpacitySpec"] = _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_get
2580 if _newclass:
2581 _wetOpacity_getWetOpacitySpec = _swig_property(_atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_get, _atmosphere.atmosphere__wetOpacity_getWetOpacitySpec_set)
2582 __swig_setmethods__["_tebbSky_getTebbSkySpec"] = _atmosphere.atmosphere__tebbSky_getTebbSkySpec_set
2583 __swig_getmethods__["_tebbSky_getTebbSkySpec"] = _atmosphere.atmosphere__tebbSky_getTebbSkySpec_get
2584 if _newclass:
2585 _tebbSky_getTebbSkySpec = _swig_property(_atmosphere.atmosphere__tebbSky_getTebbSkySpec_get, _atmosphere.atmosphere__tebbSky_getTebbSkySpec_set)
2586 __swig_setmethods__["_trjSky_getTrjSkySpec"] = _atmosphere.atmosphere__trjSky_getTrjSkySpec_set
2587 __swig_getmethods__["_trjSky_getTrjSkySpec"] = _atmosphere.atmosphere__trjSky_getTrjSkySpec_get
2588 if _newclass:
2589 _trjSky_getTrjSkySpec = _swig_property(_atmosphere.atmosphere__trjSky_getTrjSkySpec_get, _atmosphere.atmosphere__trjSky_getTrjSkySpec_set)
2590atmosphere_swigregister = _atmosphere.atmosphere_swigregister
2591atmosphere_swigregister(atmosphere)
2592cvar = _atmosphere.cvar
2594# This file is compatible with both classic and new-style classes.