NRAO Home > CASA > CASA Toolkit Reference Manual
coordsys.frequencytofrequency - Function

1.1.3 Apply relativistic Doppler shift to a list of frequencies


Description

This function converts frequencies to frequencies by applying a relativistic Doppler shift: fout = fin * sqrt((1.-v/c)/(1.+v/c)) .

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 coordsys units() for the spectral coordinate.

This function does not make any frame conversions (e.g. LSR to BARY).

This function fails if there is no spectral coordinate in the Coordinate System. See also function frequencytovelocity.

Arguments





Inputs

value

Frequencies to convert

allowed:

doubleArray

Default:

frequnit

Unit of input frequencies. Default is unit of the spectral coordinate.

allowed:

string

Default:

velocity

Velocity

allowed:

any

Default:

variant

Returns
doubleArray

Example

 
"""  
  ia.open(’M100line.image’)  
  mycs = ia.coordsys()  
  ia.close()  
 
  mycs.frequencytofrequency(value=[115271201800.0], frequnit=’Hz’, velocity=’1000km/s’)  
results in  
  array([114887337607.0])  
 
Let’s see if this is correct  
  print 115271201800.0*sqrt((1.-1000000./299792458.0)/(1.+1000000./299792458.0))  
Result: 1.14887337607e+11  
"""  

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 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