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

1.1.3 Convert many numeric mixed coordinates


Description

This function converts between many mixed pixel/world/abs/rel numeric coordinates. See function convert for more information.

The only diffference with that function is that you provide a matrix holding many coordinates to convert and a matrix of many converted coordinates is returned.

Arguments





Inputs

coordin

Input coordinate, numeric matrix

allowed:

any

Default:

variant

absin

Are input coordinate elements absolute ?

allowed:

boolArray

Default:

true

dopplerin

Input doppler type for velocities

allowed:

string

Default:

radio

unitsin

Input units, string vector

allowed:

stringArray

Default:

Native

absout

Are output coordinate elements absolute ?

allowed:

boolArray

Default:

true

dopplerout

Output doppler type for velocities

allowed:

string

Default:

radio

unitsout

Output units

allowed:

stringArray

Default:

Native

shape

Image shape, integer array

allowed:

intArray

Default:

-1

Returns
variant

Example

 
 
"""  
#  
print "\t----\t convertmany Ex 1 \t----"  
csys = cs.newcoordsys(direction=T, spectral=T)    # 3 axes  
# absolute pixel coordinates; 10 conversions each of length 3; spectral  
cin=[(15, 15, 15, 15, 15, 15, 15, 15, 15, 15),  # pixel runs from 1 to 10  
     (20, 20, 20, 20, 20, 20, 20, 20, 20, 20),  
     ( 1,  2,  3,  4,  5,  6,  7,  8,  9, 10)]  
cout = csys.convertmany (coordin=cin,  
                         absin=[T,T,T],  
                         unitsin=["pix","pix","pix"],  
                         absout=[T,F,T],  
                         dopplerout=’optical’,  
                         unitsout=["pix","deg","km/s"]);  
print cout  
#[(15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0),  
# (0.31666827885771637, 0.31666827885771637, 0.31666827885771637,  
#  0.31666827885771637, 0.31666827885771637, 0.31666827885771637,  
#  0.31666827885771637, 0.31666827885771637, 0.31666827885771637,  
#  0.31666827885771637),  
# (1145.3029083129913, 1145.0902316004676, 1144.8775551885467,  
#  1144.6648790772279, 1144.4522032665102, 1144.2395277563601,  
#  1144.0268525468437, 1143.8141776379266, 1143.6015030296085,  
#  1143.3888287218554)]  
#  
"""  
 

__________________________________________________________________


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