|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
image.toworld - Function
1.1.1 Convert from pixel to world coordinate
Description
This function converts between absolute pixel coordinate (0-rel) and world
(physical coordinate).
This function is just a wrapper for the Coordsys tool function toworld so see the documentation there for a description of the arguments and more examples.
Arguments
Inputs |
| ||
value |
| Absolute pixel coordinate. Numeric vector is allowed.
Default is reference pixel.
| |
| allowed: | any |
|
| Default: | variant
|
|
format |
| What type of formatting? String from combination of
’n’ (numeric), ’q’ (quantity), ’m’ (measure), ’s’ (string).
| |
| allowed: | string |
|
| Default: | n |
|
dovelocity |
| Compute corresponding spectral velocities?
| |
| allowed: | bool |
|
| Default: | True |
|
record
Example
"""
#
print "\t----\t toworld Ex 1 \t----"
ia.maketestimage(’hcn’,overwrite=true)
w = ia.toworld([10,10], ’n’)
print w
#{’numeric’: array([ 0.00174533, -0.0015708 ])}
w = ia.toworld([10,10], ’nmq’)
print w
#{’measure’: {’direction’: {’m0’: {’unit’: ’rad’,
# ’value’: 0.0017453323593185704},
# ’m1’: {’unit’: ’rad’,
# ’value’: -0.0015707969259645381},
# ’refer’: ’J2000’,
# ’type’: ’direction’}},
# ’numeric’: array([ 0.00174533, -0.0015708 ]),
# ’quantity’: {’*1’: {’unit’: ’rad’, ’value’: 0.0017453323593185704},
# ’*2’: {’unit’: ’rad’, ’value’: -0.0015707969259645381}}}
ia.close()
#
"""
Convert to a vector of floats and then to a record
holding a vector of floats, a vector of quantities
and a subrecord of measures.
__________________________________________________________________
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