NRAO Home > CASA > CASA Toolkit Reference Manual
coordsys.restfrequency - Function

1.1.3 Recover the rest frequency


If the Coordinate System contains a spectral coordinate, then it has a rest frequency. In fact, the spectral coordinate can hold several rest frequencies (to handle for example, an observation where the band covers many lines), although only one is active (for velocity conversions) at a time.

This function recovers the rest frequencies as a quantity vector. The first frequency is the active one.

You can change the rest frequencies with setrestfrequency.

If the Coordinate System does not contain a frequency coordinate, an exception is generated.




print "\t----\t restfrequency Ex 1 \t----"  
csys = cs.newcoordsys(spectral=T)  
print csys.restfrequency()  
#{’value’: [1420405751.7860003], ’unit’: ’Hz’}  
csys.setrestfrequency (value=qa.quantity([1.2e9, 1.3e9],’Hz’), which=1, append=F)  
print csys.restfrequency()  
#{’value’: [1300000000.0, 1200000000.0], ’unit’: ’Hz’}  
In the example, the initial spectral coordinate has 1 rest frequency.  
Then we set it with two, nominating the second as the active rest frequency,  
and recover them.  


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense

Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search