Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | New rest frequencies | |
Allowed: | Quantity, double or string vector | ||
which | in | Which is the active rest frequency | |
Allowed: | Integer | ||
Default: | 1 | ||
append | in | Append this list or overwrite ? | |
Allowed: | Bool | ||
Default: | F |
If the Coordinate System contains a spectral coordinate, then it has a rest frequency. In fact, the spectral coordinate can hold several rest frequencies (to handle for example, an observation where the band covers many lines), although only one is active (for velocity conversions) at a time.
This function (short-hand name srf) allows you to set new rest frequencies. You can provide the rest frequency as a quantity, a quantity string, or a double (units of current rest frequency assumed).
You specify whether the list of frequencies will be appended to the current list or whether it will replace that list. You must select which of the frequencies will become the active one. By default its the first in the list. The index refers to the final list (either appended or replaced).
You can recover the current rest frequencies with restfrequency.
If the Coordinate System does not contain a frequency coordinate, an exception is generated.
- cs := coordsys(spectral=T) - cs.restfrequency() [value=1.42040575e+09, unit=Hz] - - cs.setrestfrequency(dq.quantity('1.4GHz')) - cs.restfrequency() [value=1.4e+09, unit=Hz] - - cs.setrestfrequency(1.3e9) - cs.restfrequency() [value=1.3e+09, unit=Hz] - - cs.setrestfrequency (value=[1.2e9, 1.3e9], which=2) - cs.restfrequency() [value=[1.3e+09 1.2e+09] , unit=Hz] - - cs.setrestfrequency (dq.quantity([1,2],'GHz'), which=4, append=T) - cs.restfrequency() [value=[2e+09 1.2e+09 1.3e+09 1e+09] , unit=Hz] - - cs.setrestfrequency ("1.4E9Hz 1667MHz") - cs.restfrequency() [value=[1.4e+09 1.667e+09] , unit=Hz]