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

1.1.3 Find specified axis in coordinate system


Description

This function finds the specified axis in the Coordinate System. If the axis does not exist, it throws an exception.

Arguments





Inputs

world

is axis a world or pixel axis ?

allowed:

bool

Default:

true

axis

Axis in coordinate system

allowed:

int

Default:

0

Returns
record

Example

 
 
"""  
#  
print "\t----\t findaxis Ex 1 \t----"  
csys=cs.newcoordsys(direction=True, linear=2)          # RA/DEC/Lin1/Lin2  
rtn=csys.findaxis(T,1)                              # DEC  
rtn  
#{’axisincoordinate’: 1L, ’coordinate’: 0L}  
rtn = csys.findaxis(T,2)                            # Lin1  
rtn  
#{’axisincoordinate’: 0L, ’coordinate’: 1L}  
#  
"""  
 
 
In these examples, the Coordinate System has 2 coordinates and 4 axes  
(0-rel, both world and pixel the same).  The first example finds the  
DEC axis (coordinate system axis 1) to be the second axis of the  
Direction Coordinate (coordinate 0). The second example finds the  
first linear axis (coordinate system axis 2) to be the first axis of  
the Linear Coordinate (coordinate 1).  
 

__________________________________________________________________


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