Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
coordin | in | Input coordinate | |
Allowed: | Numeric vector | ||
absin | in | Are input coordinate elements absolute ? | |
Allowed: | Boolean vector | ||
Default: | All T | ||
dopplerin | in | Input doppler type for velocities | |
Allowed: | String | ||
Default: | 'radio' | ||
unitsin | in | Input units | |
Allowed: | String vector | ||
Default: | Native | ||
absout | in | Are output coordinate elements absolute ? | |
Allowed: | Boolean vector | ||
Default: | All T | ||
dopplerout | in | Output doppler type for velocities | |
Allowed: | String | ||
Default: | 'radio' | ||
unitsout | in | Output units | |
Allowed: | String vector | ||
Default: | Native | ||
shape | in | Image shape | |
Allowed: | Integer vector | ||
Default: | Unused |
This function converts between mixed pixel/world/abs/rel numeric coordinates. The input and output coordinates are specified via a numeric vector giving coordinate values, a string vector giving units, a boolean vector specifying whether the coordinate is absolute or relative (to the reference pixel) and doppler strings specifying the doppler convention for velocities.
The units string may include pix for pixel coordinates and velocity units (i.e. any unit consistent with m/s).
The allowed doppler strings and definition are described in function summary.
The shape argument is optional. If your Coordinate System from an image, then assign the image shape to this argument. It is used only when making mixed (pixel/world) conversions for Direction Coordinates to resolve ambiguity.
The example will make the use of this function clear.
- cs := coordsys(direction=T, spectral=T) # 3 axes - - cout := cs.convert (coordin=[10,20,30], absin=[T,T,T], unitsin="pix pix pix", absout=[T,F,T], dopplerout='optical', unitsout="pix arcsec km/s"); - - print 'cout=', cout [10 1140.0058 1134.82336]In this example we convert from a vector of absolute pixels to a mixture of pixel/world and abs/rel.