Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
value | in | Frequency to convert | |
Allowed: | Numeric or vector of numeric | ||
frequnit | in | Unit of input frequencies | |
Allowed: | String | ||
Default: | Intrinsic units | ||
velocity | in | Velocity offset | |
Allowed: | Quantity | ||
Default: | None | ||
doppler | in | Velocity doppler definition | |
Allowed: | String | ||
Default: | 'radio' |
This function (short-hand name ftf) converts frequencies to frequencies by applying (subtracting) a velocity offset.
The input frequencies are specified via a vector of numeric values and a specified unit (frequnit). If you don't give a frequency unit, it is assumed that the units are those given by function units for the spectral coordinate.
This function does not make any frame conversions (e.g. LSR to BARY) but you can specifiy the velocity doppler definition for the velocity via the doppler argument (see summary for possible values).
This function will return a fail if there is no spectral coordinate in the Coordinate System. See also function frequencytovelocity.
This function presently uses an approximation only valid for velocities less than the speed of light. The correction tends to zero as the velocity appraches the speed of light. You will get NaNs for larger values of the velocity.
- cs := coordsys(spectral=T) - idx := 1 + 0.1*(1:5) - rv := cs.referencevalue() - freq := idx * rv - - print 'In = ', freq [1.5565e+09 1.698e+09 1.8395e+09 1.981e+09 2.1225e+09] - - print cs.frequencytofrequency(freq, velocity='100km/s') [1.55598089e+09 1.6974337e+09 1.83888651e+09 1.98033932e+09 2.12179213e+09]