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

1.1.3 Set 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 allows you to set a new reference pixel. You should not do this on ”stokes” axes unless you are an adept or a big risk taker.

You can set the reference pixel either for all axes (type=unset) or for just the axes associated with a particular coordinate type.

Bear in mind, that if your Coordinate System came from a real image, then the reference pixel is special and you should not change it for Direction Coordinates.

You can recover the current reference pixel with function referencepixel.

Arguments





Inputs

value

Reference pixel

allowed:

doubleArray

Default:

type

Coordinate type: ”direction”, ”stokes”, ”spectral”, ”linear”, ”tabular” or leave unset for all

allowed:

string

Default:

Returns
bool

Example

 
 
"""  
#  
print "\t----\t setreferencepixel Ex 1 \t----"  
csys = cs.newcoordsys(spectral=T, linear=2)  
csys.setreferencepixel(value=[1.0, 2.0, 3.0])  
print csys.referencepixel()  
#[1.0, 2.0, 3.0]  
csys.setreferencepixel([-1, -1], ’lin’)  
print csys.referencepixel()  
#[1.0, -1.0, -1.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