Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: ms.selectpolarization - Function Up: ms - Tool Previous: ms.selecttaql - Function


ms.selectchannel - Function



Package general
Module ms
Tool ms


Select and average frequency channels


Synopsis
selectchannel(nchan, start, width, inc)


Arguments

nchan in Number of output channels
    Allowed: Positive integer
    Default: no default
start in First input channel to use
    Allowed: Positive integer
    Default: no default
width in Number of input channels to average together
    Allowed: Positive integer
    Default: no default
inc in Increment to next (group of) input channel(s)
    Allowed: Positive integer
    Default: no default


Returns
Boolean



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 result 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 T if the selection was successful, and F 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.



Example
      include 'ms.g'
      myms := ms("3C273XC1.ms");
      myms.selectinit(datadescid=1);
      myms.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.



next up previous contents index
Next: ms.selectpolarization - Function Up: ms - Tool Previous: ms.selecttaql - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01