Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
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 |
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.
- 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]