| 
         | 
  |||
| NRAO Home > CASA > CASA Toolkit Reference Manual | 
       | 
  ||
coordsys.units - Function
1.1.3 Recover the units for each axis
Description
Each axis associated with the Coordinate System has a unit. This function
returns those units (in world axis order).
You can recover the units either for all coordinates (leave type unset) or for a specific coordinate type (mimumum match of the allowed types will do). If you ask for a non-existent coordinate an exception is generated.
You can set the units with function setunits.
Arguments
| Inputs | 
  | ||
| type | 
  | Coordinate type: ’direction’, ’stokes’, ’spectral’, ’linear’
or leave unset for all 
 | |
  | allowed:  | string  | 
|
  | Default:  | 
  | 
|
stringArray
Example
                                                                  
                                                                  
"""
#
print "\t----\t units Ex 1 \t----"
csys = cs.newcoordsys(direction=True, spectral=True)
print csys.units()
#["’", "’", ’Hz’]
print csys.units(’spec’)
#Hz
#
"""
__________________________________________________________________
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