|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
coordsys.setreferencelocation - Function
1.1.3 Set reference pixel and value
Description
This function sets the reference pixel and reference value to the specified
values. The world coordinate can be specified in any of the formats that the
output world coordinate is returned in by the toworld function.
You can specify a mask (argument mask) indicating which pixel axes are set (T) and which are left unchanged (F). This function will refuse to change the reference location of a Stokes axis (gets you into trouble otherwise).
This function can be rather useful when regridding images. It allows you to keep easily a particular feature centered in the regridded image.
Arguments
Inputs |
| ||
pixel |
| New reference pixel. Defaults to old reference pixel.
| |
| allowed: | intArray |
|
| Default: | -1 | |
world |
| New reference value. Defaults to old reference value.
| |
| allowed: | any |
|
| Default: | variant -1 |
|
mask |
| Indicates which axes to center. Defaults to all.
| |
| allowed: | boolArray |
|
| Default: | false |
|
bool
Example
"""
#
print "\t----\t setreferencelocation Ex 1 \t----"
csys = cs.newcoordsys(linear=2)
print csys.referencepixel()
#[0.0, 0.0]
print csys.referencevalue()
#{’numeric’: array([ 0., 0.])}
w = csys.toworld([19,19], format=’n’)
shp = [128,128]
p = [64, 64]
csys.setreferencelocation (pixel=p, world=w)
print csys.referencepixel()
#[64.0, 64.0]
print csys.referencevalue()
#{’numeric’: array([ 19., 19.])}
#
"""
__________________________________________________________________
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