Source code for casatools.atmosphere

#
# stub class definition file for docstring parsing
#

[docs]class atmosphere: r""" Atmosphere model """
[docs] def atmosphere(self): r""" This is used to construct an ``atmosphere`` tool. """ pass
[docs] def close(self): r""" Destroy the atmosphere tool """ pass
[docs] def done(self): r""" Destroy the atmosphere tool """ pass
[docs] def getAtmVersion(self): r""" Returns the version of ATM library implemented to this tool. """ pass
[docs] def listAtmosphereTypes(self): r""" Returns a list of index numbers and corresponding atmosphere types used by the ATM library. """ pass
[docs] def initAtmProfile(self, altitude=5000., temperature=270.0, pressure=560.0, maxAltitude=48.0, humidity=20.0, dTem_dh=-5.6, dP=10.0, dPm=1.2, h0=2.0, atmType=1, layerBoundaries='', layerTemperature=''): r""" 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. .. rubric:: Parameters - ``altitude (double=5000.)`` - Site altitude - Quantity with units of altitude, meter - ``temperature (double=270.0)`` - Ambient Temperature - Quantity with units of temperature, K - ``pressure (double=560.0)`` - Ambient pressure - Quantity with units of pressure, mbar - ``maxAltitude (double=48.0)`` - altitude of the top pf the modelled atmosphere - Quantity with dimension of length, and units of kilometer - ``humidity (double=20.0)`` - used to guess water (0-100) - ``dTem_dh (double=-5.6)`` - the derivative of temperature with respect to height - Quantity with units of K/km - ``dP (double=10.0)`` - initial pressure step - Quantity with the units of pressure, mb - ``dPm (double=1.2)`` - pressure multiplicative factor for steps - ``h0 (double=2.0)`` - scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer - ``atmType (int=1)`` - atmospheric type 1(tropical),2(mid latitude summer),3(mid latitude winter), 4(subarctic summer),5(subarctic winter), dimensionless - ``layerBoundaries (doubleVec='')`` - Altitude of user-defined temperature profile, a double array in unit of meter - ``layerTemperature (doubleVec='')`` - User-defined temperature profile, a double array in unit of Kelvin .. rubric:: Returns ``string`` .. rubric:: Examples :: 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 # User-defined temperature profile: OFF # # Built atmospheric profile with 19 layers. User-defined temperature profile myalt = [ 5071.72200397, 6792.36546384, 15727.0776121, 42464.18192672 ] #meter mytemp = [ 270., 264., 258., 252. ] #Kelvin newatm = at.initAtmProfile(alt, tmp, pre, mxA, hum, wvl, dpr, dpm, h0, att, myalt, mytemp) print newatm # 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 # User-defined temperature profile: ON # # Built atmospheric profile with 19 layers. """ pass
[docs] def updateAtmProfile(self, altitude=5000., temperature=270.0, pressure=560.0, humidity=20.0, dTem_dh=-5.6, h0=2.0): r""" This is used to update the ``atmosphere`` tool when basic atmospheric parameters.change. .. rubric:: Parameters - ``altitude (double=5000.)`` - Site altitude - Quantity with units of altitude, meter - ``temperature (double=270.0)`` - Ambient ground temperature - Quantity with units of temperature, K - ``pressure (double=560.0)`` - Ambient ground pressure - Quantity with units of pressure, mbar - ``humidity (double=20.0)`` - Relative humidy used to guess water (0-100) - ``dTem_dh (double=-5.6)`` - Tropospheric Lapse Rate - the derivative of temperature with respect to height - Quantity with units of K/km - ``h0 (double=2.0)`` - scale height for water( exp distribution ) - Quantity with the dimension of length, and units of kilometer .. rubric:: Returns ``string`` .. rubric:: Examples :: 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 """ pass
[docs] def getBasicAtmParms(self): r""" Gets the current basic atmospheric parameters of the model. """ pass
[docs] def getNumLayers(self): r""" Returns the number of layers in the atmospheric profile. """ pass
[docs] def getGroundWH2O(self): r""" Method to get the zenith column of water vapor. It is computed by simply integrating the H2O profile: """ pass
[docs] def getProfile(self): r""" Get the atmospheric profile. """ pass
[docs] def initSpectralWindow(self, nbands=1, fCenter=90, fWidth=0.64, fRes=0.0): r""" function that defines a spectral window, computes absorption and emmision coefficients for this window, using the atmospheric model profile. NOTE: This method should be invoked after setting atmospheric profile model by initAtmProfile. .. rubric:: Parameters - ``nbands (int=1)`` - number of spectral windows/bands. The value must be > 0. - ``fCenter (double=90)`` - center frequencies - Quantum with a vector value and unit of frequency, GHz - ``fWidth (double=0.64)`` - frequency width of band - Quantum with a vector value and unit of frequency, GHz - ``fRes (double=0.0)`` - resolution inside band - Quantum with a vector value and unit frequency, GHz. Default is for a single frequency. .. rubric:: Returns ``int`` .. rubric:: Examples :: 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) """ pass
[docs] def addSpectralWindow(self, fCenter=350, fWidth=0.008, fRes=0.002): r""" Add a new spectral window, uniformly sampled, this spectral window having no sideband. .. rubric:: Parameters - ``fCenter (double=350)`` - frequencies - Quantum with a double value and unit of frequency, GHz - ``fWidth (double=0.008)`` - frequency width of band - Quantum with a double value and unit of frequency, GHz - ``fRes (double=0.002)`` - resolution inside band - Quantum with a double value and unit frequency, GHz .. rubric:: Returns ``int`` .. rubric:: Examples :: 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" """ pass
[docs] def getNumSpectralWindows(self): r""" Get number of spectral windows """ pass
[docs] def getNumChan(self, spwid=0): r""" Return the number of channels of ith band ( passes in as parameter ). .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for identifier of bands (0-based). The value must be >= 0. .. rubric:: Returns ``int`` .. rubric:: Examples :: for spwid in range(at.getNumSpectralWindows()): numCh = at.getNumChan(spwid) print "Spectral window ", spwid, " has ", numCh, " frequency channels" """ pass
[docs] def getRefChan(self, spwid=0): r""" Return the reference channel of the given spectral window .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``int`` .. rubric:: Examples :: rc = at.getRefChan() print "Reference channel retrieved: ", rc """ pass
[docs] def getRefFreq(self, spwid=0): r""" Return the reference frequency of the given spectral window .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: rf = at.getRefFreq() print "Reference frequency retrieved: ", rf['value'][0], rf['unit'] """ pass
[docs] def getChanSep(self, spwid=0): r""" Return the channel separation of the given spectral window .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: cs = at.getChanSep() print "Channel separation retrieved: ", cs['value'][0], cs['unit'] """ pass
[docs] def getChanFreq(self, chanNum=0, spwid=0): r""" Return the channel frequency for a given grid point for the specified spectral window. .. rubric:: Parameters - ``chanNum (int=0)`` - Int standing for channel number (0-based). The value must be >= 0. - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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'] """ pass
[docs] def getSpectralWindow(self, spwid=0): r""" Return the spectral grid for the specified spectral window. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: print at.getSpectralWindow()['value'],at.getSpectralWindow()['unit'] sg = at.getSpectralWindow() for i in range(len(sg['value'])): print sg['value'][i], sg['unit'] """ pass
[docs] def getChanNum(self, freq='', spwid=0): r""" Return the channel number for given frequency in the specified spectral window relative to the reference channel number. .. rubric:: Parameters - ``freq (double='')`` - Frequency - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: # 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 """ pass
[docs] def getBandwidth(self, spwid=0): r""" Get the frequency range encompassing the list of frequency grid points for the specified spectral window. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: print "Total bandwidth retrieved: ", at.getBandwidth()['value'][0], at.getBandwidth()['unit'] """ pass
[docs] def getMinFreq(self, spwid=0): r""" Get lowest frequency channel for the specified spectral window. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: print "Frequency range: from ", at.getMinFreq()['value'][0], " to ",\ at.getMaxFreq()['value'][0], at.getMinFreq()['unit'] """ pass
[docs] def getMaxFreq(self, spwid=0): r""" Get highest frequency channel for the specified spectral window. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: print "Frequency range: from ", at.getMinFreq()['value'][0], " to ",\ at.getMaxFreq()['value'][0], at.getMaxFreq()['unit'] """ pass
[docs] def getDryOpacity(self, nc=-1, spwid=0): r""" Get the integrated Dry Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getDryContOpacity(self, nc=-1, spwid=0): r""" Get the integrated Dry Continuum Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getO2LinesOpacity(self, nc=-1, spwid=0): r""" Get the integrated O2 Lines Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getO3LinesOpacity(self, nc=-1, spwid=0): r""" Get the integrated O3 Lines Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getCOLinesOpacity(self, nc=-1, spwid=0): r""" Get the integrated CO Lines Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getN2OLinesOpacity(self, nc=-1, spwid=0): r""" Get the integrated N2O Lines Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getWetOpacity(self, nc=-1, spwid=0): r""" Get the integrated zenith Wet Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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" """ pass
[docs] def getH2OLinesOpacity(self, nc=-1, spwid=0): r""" Get the integrated zenith H2O Lines Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getH2OContOpacity(self, nc=-1, spwid=0): r""" Get the integrated zenith H2O Continuum Opacity for one channel in a band. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``double`` .. rubric:: Examples :: 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() """ pass
[docs] def getDryOpacitySpec(self, spwid=0): r""" Get the integrated Dry opacity along the atmospheric path on each channel in a band. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``int`` .. rubric:: Examples :: at.getDryOpacitySpec() # (8, # array([0.12113794420465548, 0.11890122206854335, # 0.11713584932434795, 0.11572780449702716, # 0.11459567027114714, 0.11368004975916192, # 0.11293678422232195,0.11233248854020933])) """ pass
[docs] def getWetOpacitySpec(self, spwid=0): r""" Getthe integrated zenith Wet Opacity along the atmospheric path on each channel in a band. .. rubric:: Parameters - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``int`` .. rubric:: Examples :: 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] """ pass
[docs] def getDispersivePhaseDelay(self, nc=-1, spwid=0): r""" Get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part) for the current conditions, for channel number nc of spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getDispersiveWetPhaseDelay(self, nc=-1, spwid=0): r""" Function to retrievethe the integrated Atmospheric Phase Delay (Dispersive part) along the atmospheric path corresponding to the 1st guess water column. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getNonDispersiveWetPhaseDelay(self, nc=-1, spwid=0): r""" Function to retrieve the integrated wet Atmospheric Phase Delay (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getNonDispersiveDryPhaseDelay(self, nc=-1, spwid=0): r""" Function to retrieve the integrated dry Atmospheric Phase Delay (NonDispersive part) along the atmospheric path corresponding to the 1st guess water column. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getNonDispersivePhaseDelay(self, nc=-1, spwid=0): r""" Get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part) for the current conditions, for channel number nc of spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getDispersivePathLength(self, nc=-1, spwid=0): r""" Retrieve the integrated zenith H2O Atmospheric Path length (Dispersive part) along the atmospheric path corresponding to the user water column for channel nc in spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getDispersiveWetPathLength(self, nc=-1, spwid=0): r""" 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. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getNonDispersiveWetPathLength(self, nc=-1, spwid=0): r""" 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. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getNonDispersiveDryPathLength(self, nc=-1, spwid=0): r""" 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. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getO2LinesPathLength(self, nc=-1, spwid=0): r""" Retrieve the integrated Atmospheric Path length (due to O2 Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` """ pass
[docs] def getO3LinesPathLength(self, nc=-1, spwid=0): r""" Retrieve the integrated Atmospheric Path length (due to O3 Lines) along the atmospheric path corresponding to the 1st guess water column for channel nc in spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` """ pass
[docs] def getCOLinesPathLength(self, nc=-1, spwid=0): r""" 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. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` """ pass
[docs] def getN2OLinesPathLength(self, nc=-1, spwid=0): r""" 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. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` """ pass
[docs] def getNonDispersivePathLength(self, nc=-1, spwid=0): r""" Get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part) for the current conditions, for channel nc in spectral window spwid. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based; defaults to reference channel) - ``spwid (int=0)`` - Int standing for spectral window id (0-based). The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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 )" """ pass
[docs] def getAbsH2OLines(self, nl='', nf=0, spwid=0): r""" Accessor to get H2O lines Absorption Coefficient at layer nl, spectral window spwid and channel nf. .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsH2OLines(0, 0, 0) print "H2O lines absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsH2OCont(self, nl='', nf=0, spwid=0): r""" Get H2O continuum Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsH2OCont(0, 0, 0) print "H2OCont absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsO2Lines(self, nl='', nf=0, spwid=0): r""" Get O2 lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsO2Lines(0, 0, 0) print "O2 lines absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsDryCont(self, nl='', nf=0, spwid=0): r""" Get Dry Continuum Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsDryCont(0, 0, 0) print "Dry Continuum absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsO3Lines(self, nl='', nf=0, spwid=0): r""" Get O3 lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsO3Lines(0, 0, 0) print "O3 lines absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsCOLines(self, nl='', nf=0, spwid=0): r""" Get CO lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsCOLines(0, 0, 0) print "CO lines absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsN2OLines(self, nl='', nf=0, spwid=0): r""" Get N2O lines Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsN2OLines(0, 0, 0) print "N2O lines absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsTotalDry(self, nl='', nf=0, spwid=0): r""" Get total dry Absorption Coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsTotalDry(0, 0, 0) print "Total dry absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def getAbsTotalWet(self, nl='', nf=0, spwid=0): r""" Get total wet absorption coefficient at layer nl, spectral window spwid and frequency channel nf .. rubric:: Parameters - ``nl (int='')`` - atmospheric layer number. The value must be >= 0. - ``nf (int=0)`` - frequency channnel number. The value must be >= 0. - ``spwid (int=0)`` - spectral window id. The value must be >= 0. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: ac = at.getAbsTotalWet(0, 0, 0) print "Total wet absorption coefficient for layer 0, channel 0 is ", ac['value'][0], ac['unit'] """ pass
[docs] def setUserWH2O(self, wh2o=0.0): r""" Set user zenith water vapor column for forward radiative transfer calculations. .. rubric:: Parameters - ``wh2o (double=0.0)`` - User water vapor column .. rubric:: Returns ``bool`` .. rubric:: Examples :: wh2o=qa.quantity(0.8,"mm") at.setUserWH2O(wh2o) """ pass
[docs] def getUserWH2O(self): r""" Get user zenith water vapor column for forward radiative transfer calculations. """ pass
[docs] def setAirMass(self, airmass=''): r""" Setter for air mass in SkyStatus without performing water vapor retrieval. .. rubric:: Parameters - ``airmass (double='')`` - Air Mass .. rubric:: Returns ``bool`` .. rubric:: Examples :: at.setAirMass(1.51) """ pass
[docs] def getAirMass(self): r""" Accessor to get airmass. """ pass
[docs] def setSkyBackgroundTemperature(self, tbgr=2.73): r""" Set sky background temperature in SkyStatus without performing water vapor retrieval .. rubric:: Parameters - ``tbgr (double=2.73)`` - sky background temperature .. rubric:: Returns ``bool`` .. rubric:: Examples :: at.setSkyBackgroundTemperature(qa.quantity(2.73,'K')) """ pass
[docs] def getSkyBackgroundTemperature(self): r""" Get the sky background temperature """ pass
[docs] def getAverageTebbSky(self, spwid=0, wh2o=-1): r""" Returns the average Equivalent Blackbody Temperature in spectral window spwid, for the current conditions and a perfect sky coupling. .. rubric:: Parameters - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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'] """ pass
[docs] def getTebbSky(self, nc=-1, spwid=0, wh2o=-1): r""" Gets the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for the current (user) Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based) - defaults to reference channel - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: 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'] """ pass
[docs] def getTebbSkySpec(self, spwid=0, wh2o=-1): r""" Gets the Equivalent Blackbody Temperatures in a spectral window spwid for the current (user) Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky. .. rubric:: Parameters - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``int`` .. rubric:: Examples :: 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']) """ pass
[docs] def getAverageTrjSky(self, spwid=0, wh2o=-1): r""" Returns the average Rayleigh-Jeans Temperature in spectral window spwid, for the current (user) Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky. .. rubric:: Parameters - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: wh2o = qa.quantity(0.4,'mm') print "(INPUT CHANGE) water vapor column:", wh2o['value'], wh2o['unit'] print "(NEW OUTPUT) T_RJ =", at.getAverageTrjSky(0,wh2o)['value'][0], at.getAverageTrjSky(0,wh2o)['unit'] """ pass
[docs] def getTrjSky(self, nc=-1, spwid=0, wh2o=-1): r""" Gets the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the current (user) Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky. .. rubric:: Parameters - ``nc (int=-1)`` - Channel number (0-based) - defaults to reference channel - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``Quantity`` .. rubric:: Examples :: for s in range(at.getNumSpectralWindows()): for i in range(at.getNumChan(s)): print "Band", s, " channel ", i, "TrjSky = ", at.getTrjSky(i,s)['value'][0], at.getTrjSky()['unit'] """ pass
[docs] def getTrjSkySpec(self, spwid=0, wh2o=-1): r""" Gets the Rayleigh-Jeans Temperatures in a spectral window spwid for the current (user) Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky. .. rubric:: Parameters - ``spwid (int=0)`` - Spectral window (0-based). The value must be >= 0. - ``wh2o (double=-1)`` - User specified water column length in mm. Default is not to use wh2o. .. rubric:: Returns ``int`` .. rubric:: Examples :: 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 trjspec = at.getTrjSkySpec(spwid=s) for i in range(at.getNumChan(s)): print " - TrjSky %f [%s] " % (trjspec[1]['value'][i],trjspec[1]['unit']) """ pass