|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
ms.selectchannel - Function
1.3.1 Select and average frequency channels
Description
This function allows you to select a subset of the frequency channels in the
current measurement set. This function can also average, over frequency
channels, prior to providing the values to the user.
Selection on channels is not allowed using either the select or command functions as they can only select entire rows in a measurement set. Channel selection involves accessing only some of the values in a row. Like all the selection functions this function does not change the current measurement but updates the measurement set selection parameters so that functions like getdata will return the desired subset of the data. Repeated use of this function will overwrite any previous channel selection.
There are four parameters, the number of output channels, the first input channel to use, the number of input channels to average into one output channel, and the increment in the input spectrum for the next output channel. All four parameters need to be specified.
This function return True if the selection was successful, and False if not. In the latter case an error message will also be sent to the logger.
You need to call selectinit before calling this function. If you haven’t then selectinit will be called for you with default arguments.
Arguments
Inputs |
| ||
nchan |
| Number of output channels, positive integer
| |
| allowed: | int | |
| Default: | 1 |
|
start |
| First input channel to use, positive integer
| |
| allowed: | int | |
| Default: | 0 |
|
width |
| Number of input channels to average together, positive
integer
| |
| allowed: | int |
|
| Default: | 1 |
|
inc |
| Increment to next (group of) input channel(s), positive
integer
| |
| allowed: | int |
|
| Default: | 1 |
|
bool
Example
ms.fromfits("NGC5921.MS",
"/usr/lib/casapy/data/demo/NGC5921.fits")
ms.selectinit(datadescid=0)
ms.selectchannel(3,2,5,3)
This example selects all the data from the measurement set where
the value in the DATA_DESC_ID column is zero. This
corresponds to a particular spectral window and polarization
setup. It then selects on frequency channels to produce 3 output
channels, the first output channel is the average of channels
2,3,4,5,6 in the input, the second output channel is the average
of channel 5,6,7,8,9 and the third is the average of channels
8,9,10,11,12.
__________________________________________________________________
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