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

1.1.3 Convert many numeric relative coordinates to absolute


Description

This function converts many relative coordinates to absolute. It exists so you can efficiently make many conversions (which would be rather slow if you did them all with toabs). Because speed is the object, the interface is purely in terms of numeric matrices, rather than being able to accept strings and quanta etc. like toabs can.

When dealing with world coordinates, the units of the numeric values must be the native units, given by function units.

Arguments





Inputs

value

Relative coordinates

allowed:

any

Default:

variant

isworld

Is coordinate world or pixel? Default is unset.

allowed:

int

Default:

-1

Returns
record

Example

 
 
"""  
#  
print "\t----\t toabsmany Ex 1 \t----"  
csys = cs.newcoordsys(direction=True, spectral=True)    # 3 axes  
rv = csys.referencevalue();                 # reference value  
w = csys.torel(rv)                          # make relative  
inc = csys.increment();                     # increment  
off=[]  
for idx in range(100):  
  off.append(inc[’numeric’][2]*idx)         # offset for third axis  
wrel = ia.makearray(0,[3,100])              # 100 conversions each of length 3  
for i in range(3):  
  for j in range(100):  
    wrel[i][j]=w[’numeric’][i]  
for j in range(100):  
  wrel[2][j] += off[j]                      # Make spectral axis values change  
wabs  = csys.toabsmany (wrel, T)[’numeric’] # Convert  
print wabs[0][0],wabs[1][0],wabs[2,0]       # First absolute coordinate  
#0.0 0.0 1415000000.0  
print wabs[0][99],wabs[1][99],wabs[2][99]   # 100th absolute coordinate  
#0.0 0.0 1415099000.0  
#  
"""  
 
This example uses world coordinates.  

__________________________________________________________________


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