NRAO Home > CASA > CASA Cookbook and User Reference Manual

2.3.3 The spw Parameter

The spw parameter is a string that indicates the specific spectral windows and the channels within them to be used in subsequent processing. Spectral window selection (’SPWSEL’) can be given as a spectral window integer ID, a list of integer IDs, a spectral window name specified as a literal string (for exact match) or a regular expression or pattern.

The specification can be via frequency ranges or by indexes. A range of frequencies are used to select all spectral windows which contain channels within the given range. Frequencies can be specified with an optional unit — the default unit being Hz. Other common choices for radio and mm/sub-mm data are kHz, MHz, and GHz. You will get the entire spectral windows, not just the channels in the specified range. You will need to do channel selection (see below) to do that.

The spw can also be selected via comparison for integer IDs. For example, ’>ID’ will select all spectral windows with ID greater than the specified value, while ’<ID’ will select those with ID lesser than the specified value.

ALERT: In the current release, ’<ID’ and ’>ID’ are inclusive with the ID specified included in the selection, e.g. spw=’<2’ is equivalent to spw=’0,1,2’ and not spw=’0,1’ as was intended. This will be fixed in an upcoming release.

Spectral window selection using strings follows the standard rules:

  spw = ’1’                   # SPWID 1  
  spw = ’1,3,5’               # SPWID 1,3,5  
  spw = ’0~3’                 # SPWID 0,1,2,3  
  spw = ’0~3,5’               # SPWID 0,1,2,3 and 5  
  spw = ’<3,5’                # SPWID 0,1,2,3 and 5  
  spw = ’*’                   # All spectral windows  
  spw = ’1412~1415MHz’        # Spectral windows containing 1412-1415MHz

In some cases, the spectral windows may allow specification by name. For example,

  spw = ’3mmUSB, 3mmLSB’      # choose by names (if available)

might be meaningful for the dataset in question.

Note that the order in which multiple spws are given may be important for other parameters. For example, the mode = ’channel’ in clean uses the first spw as the origin for the channelization of the resulting image cube.

   2.3.3.1 Channel selection in the spw parameter


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

Copyright © 2010 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