Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | Absolute pixel coordinate | |
Allowed: | Numeric vector | ||
Default: | Reference pixel | ||
format | in | Format string | |
Allowed: | String from combination of "n", "q", "s", "m" | ||
Default: | 'n' |
This function converts between absolute pixel coordinate (1-rel) and absolute world (physical coordinate).
If you supply fewer pixel values than there are axes in the Coordinate System, your coordinate vector will be padded out with the reference pixel for the missing axes. Excess values will be silently ignored.
You may ask for the world coordinate in all of the formats described in the discussion regarding the formatting possibilities available via argument format.
- cs := coordsys(direction=T, spectral=T) - - cs.toworld([-2,2,2], 'n') [3.00000051 1.00000001 1.415001e+09] - - cs.toworld([-2,2,2], 'q') [*1=[value=3.00000051, unit='], *2=[value=1.00000001, unit='], *3=[value=1.415001e+09, unit=Hz]] - - cs.toworld([-2,2,2], 'm') [direction=[type=direction, refer=J2000, m1=[value=0.000290888213, unit=rad], m0=[unit=rad, value=0.000872664774]], spectral=[frequency=[type=frequency, refer=LSRK, m0=[value=1.415001e+09, unit=Hz]], radiovelocity=[value=1140.73308, unit=km/s], opticalvelocity=[value=1145.09023, unit=km/s], betavelocity=[value=1142.90335, unit=km/s]]] - - cs.toworld([-2,2,2], 's') 00:00:12.000 +00.01.00.000 1.415001e+09
- cs := coordsys (stokes="I V", linear=2) - cs.toworld([1,2,3], 's') I 1.000000e+00 2.000000e+00 - - cs.toworld([1,2,3], 'm') [stokes=I, linear=[*1=[value=1, unit=km], *2=[value=2, unit=km]]] - - cs.toworld([1,2,3], 'q') [*1=[value=1, unit=], *2=[value=1, unit=km], *3=[value=2, unit=km]]
- cs := coordsys (spectral=T, linear=1) - cs.toworld([1,2,3], 'q') [*1=[value=1.415e+09, unit=Hz], *2=[value=1, unit=km]]