Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: coordsys.frequencytovelocity - Function Up: coordsys - Tool Previous: coordsys.findcoordinate - Function


coordsys.frequencytofrequency - Function



Package general
Module images
Tool coordsys


Convert frequency to frequency with an offset


Synopsis
frequencytofrequency(value, frequnit, velocity, doppler)


Arguments

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'


Returns
Double or vector of double or fail


Description

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.



Example
- 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]





next up previous contents index
Next: coordsys.frequencytovelocity - Function Up: coordsys - Tool Previous: coordsys.findcoordinate - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01