|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
coordsys.referencepixel - Function
1.1.3 Recover the reference pixel
Description
Each axis associated with the Coordinate System has a reference value,
reference pixel and an increment (per pixel). These are used in the mapping
from pixel to world coordinate.
This function returns the reference pixel (in pixel axis order). You can recover the reference pixel either for all coordinates (leave type unset) or for a specific coordinate type (mimumum match of the allowed types will do). If you ask for a non-existent coordinate an exception is generated.
You can set the reference pixel with function setreferencepixel.
Arguments
Inputs |
| ||
type |
| Coordinate type: ”direction”, ”stokes”, ”spectral”,
”linear”, ”tabular”. Leave empty for all.
| |
| allowed: | string |
|
| Default: |
|
|
record
Example
"""
#
print "\t----\t referencepixel Ex 1 \t----"
csys = cs.newcoordsys(spectral=T, linear=2)
csys.setreferencepixel([1.0, 2.0, 3.0])
print csys.referencepixel()
#{’ar_type’: ’absolute’, ’pw_type’: ’pixel’, ’numeric’: array([ 1., 2., 3.])}
print csys.referencepixel(’lin’)
#{’ar_type’: ’absolute’, ’pw_type’: ’pixel’, ’numeric’: array([ 2., 3.])}
#
"""
__________________________________________________________________
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