NRAO Home > CASA > CASA Toolkit Reference Manual
sd.scantable.set_restfreqs - Function

5.1.2 Set rest frequency
Description

Set or replace the restfrequency specified and if the ’freqs’ argument holds a scalar, then that rest frequency will be applied to all the selected data. If the ’freqs’ argument holds a vector, then it MUST be of equal or smaller length than the number of IFs (and the available restfrequencies will be replaced by this vector). In this case, *all* data have the restfrequency set per IF according to the corresponding value you give in the ’freqs’ vector. E.g. ’freqs=[1e9, 2e9]’ would mean IF 0 gets restfreq 1e9 and IF 1 gets restfreq 2e9.

You can also specify the frequencies via a linecatalog.

Note that, to do more sophisticate Restfrequency setting, e.g. on a source and IF basis, use scantable.set_selection() before using this function::

             # provided your scantable is called scan  
             selection = sd.selector()  
             selection.set_name("ORION*")  
             selection.set_ifs([1])  
             scan.set_selection(selection)  
             scan.set_restfreqs(freqs=86.6e9)  
    

Arguments





Inputs

freqs

List of rest frequency values or string identifiers

allowed:

string

Default:

None

unit

Unit for rest frequency

allowed:

string

Default:

’Hz’





Returns

Example

         scan = sd.scantable(’OrionS_rawACSmod_cal’)  
         # set the given restfrequency for the all currently selected IFs  
         scan.set_restfreqs(freqs=1.4e9)  
         # set restfrequencies for the n IFs  (n > 1) in the order of the  
         # list, i.e  
         # IF0 -> 1.4e9, IF1 ->  1.41e9, IF3 -> 1.42e9  
         # len(list_of_restfreqs) == nIF  
         # for nIF == 1 the following will set multiple restfrequency for  
         # that IF  
         scan.set_restfreqs(freqs=[1.4e9, 1.41e9, 1.42e9])  
         # set multiple restfrequencies per IF. as a list of lists where  
         # the outer list has nIF elements, the inner s arbitrary  
         scan.set_restfreqs(freqs=[[1.4e9, 1.41e9], [1.67e9]])


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