Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | Units | |
Allowed: | Vector of strings | ||
type | in | Which coordinate type ? | |
Allowed: | String from "direction", "stokes", "spectral", "linear", "tabular" or unset | ||
Default: | All | ||
overwrite | in | Overwrite linear or tabular coordinate units ? | |
Allowed: | Bool | ||
Default: | F | ||
which | in | Which coordinate if more than one of same type | |
Allowed: | Integer | ||
Default: | First |
Each axis associated with the Coordinate System has a unit. This function (short-hand name su) allows you to set new axis units.
You can set the units either for all axes (type=unset) or for just the axes associated with a particular coordinate type.
In general, the units must be consistent with the old units. When you change the units, the increment and reference value will be adjusted appropriately. However, for a linear or tabular coordinate, and only when you specify type='linear' or type='tabular' (i.e. you supply units only for the specified linear of tabular coordinate), and if you set overwrite=T, you can just overwrite the units with no further adjustments. Otherwise, the overwrite argument will be silently ignored. Use argument which to specify which coordinate if you have more than one of the specified type.
You can recover the current axis units with function units.
- cs := coordsys(direction=T, spectral=T) - cs.summary() - Direction reference : J2000 Spectral reference : LSRK Velocity type : RADIO Rest frequency : 1.42041e+09 Hz Telescope : ATCA Observer : Karl Jansky Date observation : 2000/07/05/06:58:46 Axis Type Name Proj Coord value at pixel Coord incr Units ------------------------------------------------------------------------------- 1 Direction Right Ascension SIN 00:00:00.000 1.00 -6.000000e+01 arcsec 2 Direction Declination SIN +00.00.00.000 1.00 6.000000e+01 arcsec 3 Spectral Frequency 1.415000e+09 1.00 1.000000e+03 Hz Velocity 1.140944e+03 1.00 -2.110611e-01 km/s - - cs.setunits(value="deg rad mHz"); - - Direction reference : J2000 Spectral reference : LSRK Velocity type : RADIO Rest frequency : 1.42041e+12 mHz Telescope : ATCA Observer : Karl Jansky Date observation : 2000/07/05/06:58:46 Axis Type Name Proj Coord value at pixel Coord incr Units ------------------------------------------------------------------------------- 1 Direction Right Ascension SIN 00:00:00.000 1.00 -6.000000e+01 arcsec 2 Direction Declination SIN +00.00.00.000 1.00 6.000000e+01 arcsec 3 Spectral Frequency 1.415000e+12 1.00 1.000000e+06 mHz Velocity 1.140944e+03 1.00 -2.110611e-01 km/s