Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | Absolute world coordinates | |
Allowed: | Numeric matrix |
This function converts many absolute world coordinates to pixel coordinates. It exists so you can efficiently make many conversions (which would be rather slow if you did them all with topixel). Because speed is the object, the interface is purely in terms of numeric matrices, rather than being able to accept strings and quanta etc. like topixel can.
The units of the numeric values must be the native units, given by function units.
- cs := coordsys(direction=T, spectral=T) # 3 axes - - rv := cs.referencevalue(); # reference value - inc := cs.increment(); # increment - idx := 0:99; - off := inc[3] * idx; # offset for third axis - - wabs := array (rv, 3, 100); # 100 conversions each of length 3 - wabs[3,] +:= off; # Make spectral axis values change - - pabs := cs.topixelmany (wabs); # Convert - pabs[,1] # First absolute pixel coordinate [1 1 1] - pabs[,100] # 100th absolute pixel coordinate [1 1 100]