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

1.1.3 Find axes of specified coordinate


Description

This function finds the axes in the Coordinate System for the specified coordinate (minimum match is active for argument type). By default it finds the first coordinate, but if there is more than one (can happen for linear coordinates), you can specify which. It returns a dictionary with ’return’, ’pixel’, and ’world’ as keys. The associated value of ’return’ is a boolean indicating if the specified coordinate was found. The values of ’pixel’ and ’world’ are arrays indicating the indices of the associated pixel and world axes, respectively, of the specified coordinate. If the coordinate does not exist, these arrays will be empty.

See also the function axesmap which returns the mapping between pixel and world axes.

Arguments





Inputs

type

Type of coordinate to find: direction, stokes, spectral, linear, or tabular

allowed:

string

Default:

direction

which

Which coordinate if more than one

allowed:

int

Default:

0

Returns
record

Example

 
 
"""  
#  
print "\t----\t findcoordinate Ex 1 \t----"  
csys=cs.newcoordsys(direction=T)  
rtn=cs.findcoordinate(’direction’)  
print rtn  
#{’world’: [0L, 1L], ’pixel’: [0L, 1L]}  
print ’pixel, world axes =’, rtn[’pixel’], rtn[’world’]  
#pixel, world axes = [0 1] [0 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