Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | Absolute world coordinate | |
Allowed: | Numeric vector, vector of quantities, vector of strings or record | ||
Default: | Reference value |
This function converts between world (physical) coordinate and absolute pixel coordinate (1-rel).
The world coordinate can be provided in one of four formats via the argument world. These match the output formats of function toworld.
If you supply fewer world values than there are axes in the Coordinate System, your coordinate vector will be padded out with the reference value for the missing axes. Excess values will be silently ignored.
You may supply the world coordinate in all of the formats described in the formatting discussion.
- cs := coordsys(direction=T, spectral=T, stokes="I V", linear=2) - - w := cs.toworld([-2,2,1,2,23,24], 'n') - cs.topixel(w) [-2 2 1 2 23 24] - - w := cs.toworld([-2,2,1,2,23,24], 'q') - cs.topixel(w) [-2 2 1 2 23 24] - - w := cs.toworld([-2,2,1,2,23,24], 'm') - cs.topixel(w) [-2 2 1 2 23 24] - - w := cs.toworld([-2,2,1,2,23,24], 's') - cs.topixel(w) [-2 2 1 2 23 24] - - w := cs.toworld([-2,2,1,2,23,24], 'mnq') - cs.topixel(w) [-2 2 1 2 23 24]
- 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]]