nraonrao
 
NRAO Home > CASA > CasaRef
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:

Returns
anyrecord

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.])}  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 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

Updated daily during alpha development.