|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
coordsys.toworldmany - Function
1.1.3 Convert many absolute pixel coordinates to numeric world
Description
This function converts many absolute pixel coordinates to world coordinates.
It exists so you can efficiently make many conversions (which would be rather
slow if you did them all with toworld). Because speed is the object, the
interface is purely in terms of numeric matrices, rather than being able to
produce strings and quanta etc. like toworld can.
The units of the output world values are the native units given by function units.
Arguments
Inputs |
| ||
value |
| Absolute pixel coordinates
| |
| allowed: | variant |
|
| Default: |
|
|
record
Example
"""
#
print "\t----\t toworldmany Ex 1 \t----"
csys = cs.newcoordsys(direction=T, spectral=T) # 3 axes
rp = csys.referencepixel()[’numeric’]; # reference pixel
pabs = ia.makearray(0,[3,100]) # 100 conversions each of length 3
for i in range(3):
for j in range(100):
pabs[i][j] = rp[i]
for ioff in range(100): # offset for third axis
pabs[2][ioff] += ioff; # Make spectral axis values change
wabs = csys.toworldmany (pabs)[’numeric’]; # Convert
print wabs[0][0], wabs[1][0], wabs[2][0] # First absolute pixel coordinate
#0.0 0.0 1415000000.0
print wabs[0][99], wabs[1][99], wabs[2][99] # 100th absolute pixel coordinate
#0.0 0.0 1415099000.0
#
"""
__________________________________________________________________
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