Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: coordsys.setreferencepixel - Function Up: coordsys - Tool Previous: coordsys.setreferencecode - Function


coordsys.setreferencelocation - Function



Package general
Module images
Tool coordsys


Set reference pixel and value


Synopsis
setreferencelocation(pixel, world, mask)


Arguments

pixel in New reference pixel
    Allowed: Vector of integer
    Default: Old reference pixel
world in New reference value
    Allowed: Vector of doubles, vector of quantities, quantity of vector of doubles, vector of string, record
    Default: Old reference value
mask in Indicates which axes to center
    Allowed: Vector of boolean
    Default: All



Returns
T or fail


Description

This function (short-hand name srl) 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.



Example
- cs := coordsys(linear=2)
- cs.referencepixel()
[1 1] 
- cs.referencevalue()
[0 0]
-
- w := cs.toworld([20,20], format='n')
- shp := [129,129]
- p := (shp-1)/2.0 + 1;
- cs.setreferencelocation (pixel=p, world=w)
- cs.referencepixel()
[65 65]  
- cs.referencevalue()
[19 19]





next up previous contents index
Next: coordsys.setreferencepixel - Function Up: coordsys - Tool Previous: coordsys.setreferencecode - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01