![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaRef |
|
||
1.1.3 Convert velocity to frequency
Description
This function converts velocities to frequencies.
The input velocities are specified via a vector of numeric values, a specified unit (velunit), and a velocity doppler definition (doppler).
The frequencies are returned in a vector for which you specify the units (frequnit). If you don’t give the unit, it is assumed that the units are those given by function units for the spectral coordinate.
This function will return a fail if there is no spectral coordinate in the Coordinate System. See also the function frequencytovelocity.
Arguments
| Inputs |
| ||
| value |
| Velocity to convert
| |
| allowed: | doubleArray |
|
| Default: |
| |
| frequnit |
| Unit of output frequencies. Default is intrinisic units.
| |
| allowed: | string |
|
| Default: |
|
|
| doppler |
| Velocity doppler definition
| |
| allowed: | string |
|
| Default: | radio |
|
| velunit |
| Unit of input velocities
| |
| allowed: | string |
|
| Default: | km/s |
|
Example
In this example, we find the optical velocity in km/s of every pixel along the spectral axis of our image. First we obtain the Coordinate System from the image. Then we find which axis of the Coordinate System (image) pertain to the spectral coordinate. Then we loop over each pixel of the spectral axis, and convert a pixel coordinate (one for each axis of the image) to world. We obtain the value for the spectral axis from that world vector, and add it to the vector of frequencies. Then we convert that vector of frequencies to velocity. Then we convert it back to frequency. They better agree.
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.