Selecting Spectral Windows and Channels: Difference between revisions

From CASA Guides
Jump to navigationJump to search
No edit summary
(Added external link to measurement set selection syntax document)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Oftentimes, you don't want to run a certain task on every single spectral channel in your data. This is where the 'spw' parameter comes in; it allows you to select both spectral windows and channels. A colon separates spectral window information from channel information, and a tilde denotes a range. NOTE: all index numbering in CASA begins with 0, not 1!
{{Using CASA Hints Tips Tricks}}
[[Category: CASA Basics]]
 
You may need to run a certain task on a specific channel or range of channels in your data: this is where the 'spw' parameter comes in. This parameter allows you to select both spectral windows (synonymous with IFs in VLA data) and channels. A colon separates spectral window information from channel information, and a tilde denotes a range. NOTE: all index numbering in CASA begins with 0, not 1!


Here are some basic examples:
Here are some basic examples:
Line 7: Line 10:
spw = '1,3,5'                    # Spectral windows 1, 3, and 5
spw = '1,3,5'                    # Spectral windows 1, 3, and 5
spw = '*:10~50'                  # Channels 10--50 for all spectral windows
spw = '*:10~50'                  # Channels 10--50 for all spectral windows
spw = '4~7:30~40'                # Channels 30--40 for spectral windows 4, 5, 6, and 7
</pre>
In most cases, to specify a single channel, you should just be able to type:
<pre>
spw = '1:30'                        # Channel 30 of spectral window 1
</pre>
However, in [[plotms]], to specify a single channel, you'll need to write it as a range:
<pre>
spw = '1:30~30'                        # Channel 30 of spectral window 1 in plotms
</pre>
</pre>
You can also use frequency units to select spectral windows or channels:
You can also use frequency units to select spectral windows or channels:
<pre>
<pre>
Line 18: Line 32:
spw = '2:5~15;25~35'            # Channels 5--15 and 25--35 for spectral window 2
spw = '2:5~15;25~35'            # Channels 5--15 and 25--35 for spectral window 2
</pre>
</pre>
You can find more detail in the CASA cookbook.
You can find more detail in the [http://casa.nrao.edu/Doc/Cookbook/casa_cookbook.pdf CASA Cookbook.]
 
You can also find more information on measurement set selection syntax, including antennas and polarizations, [http://www.aoc.nrao.edu/~sbhatnag/misc/msselection/msselection.html here].
 
Last checked on CASA Version 3.0.0 (r9860)


--[[User:Lchomiuk|Laura Chomiuk]] 21:52, 10 February 2010 (UTC)
--[[User:Lchomiuk|Laura Chomiuk]] 21:52, 10 February 2010 (UTC)
[[Main Page | &#8629; '''CASAguides''']] <br>

Latest revision as of 15:42, 20 August 2012

Hints, Tips, and Tricks

You may need to run a certain task on a specific channel or range of channels in your data: this is where the 'spw' parameter comes in. This parameter allows you to select both spectral windows (synonymous with IFs in VLA data) and channels. A colon separates spectral window information from channel information, and a tilde denotes a range. NOTE: all index numbering in CASA begins with 0, not 1!

Here are some basic examples:

spw = '1'                        # Spectral window 1 
spw = '0~3'                      # Spectral windows 0, 1, 2, and 3
spw = '1,3,5'                    # Spectral windows 1, 3, and 5
spw = '*:10~50'                  # Channels 10--50 for all spectral windows
spw = '4~7:30~40'                # Channels 30--40 for spectral windows 4, 5, 6, and 7

In most cases, to specify a single channel, you should just be able to type:

spw = '1:30'                        # Channel 30 of spectral window 1 

However, in plotms, to specify a single channel, you'll need to write it as a range:

spw = '1:30~30'                        # Channel 30 of spectral window 1 in plotms


You can also use frequency units to select spectral windows or channels:

spw = '1412~1415MHz'             # All spectral windows containing 1412--1415 MHz
spw = '*:1412~1415MHz'           # Channels in the range 1412--1415 MHz

It is also possible to specify multiple ranges:

spw = '0:3~10,1:20~30'           # Channels 3--10 from spectral window 0 and channels 20--30 from spectral window 1 
spw = '2:5~15;25~35'             # Channels 5--15 and 25--35 for spectral window 2

You can find more detail in the CASA Cookbook.

You can also find more information on measurement set selection syntax, including antennas and polarizations, here.

Last checked on CASA Version 3.0.0 (r9860)

--Laura Chomiuk 21:52, 10 February 2010 (UTC)

CASAguides