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.select - Function Up: ms - Tool Previous: ms.lister - Function


ms.selectinit - Function



Package general
Module ms
Tool ms


Initialize the selection of a MS


Synopsis
selectinit(datadescid, reset)


Arguments

datadescid in Data description id
    Allowed: integer
    Default: 0
reset in Reset to unselected state
    Allowed: Boolean
    Default: F


Returns
Boolean



Description
A measurement set can contain data with a variety of different shapes (as described in the overall description to this tool). To allow functions to return data in fixed shape arrays you need to select, using this function, rows that contain the same data shape. You do not need to use this function if all the data in your measurement set has only one shape.

The DATA_DESC_ID column in the measurement set contains a value that maps to a particular row in the POLARIZATION and SPECTRAL_WINDOW subtables. Hence all rows with the same value in the DATA_DESC_ID column must have the same data shape. To select all the data where the DATA_DESC_ID value is N you call this function with the datadescid argument set to N + 1. The examples below make this a bit clearer.

It is possible to have a measurement set with differing values in the DATA_DESC_ID column but where all the data is a fixed shape. For example this will occur if the reference frequency changes but the number of spectral channels is fixed. In cases like this all the data can be selected, using this function with an argument of zero. If the data shape does change and you call this function with an datadescid set to zero it is equivalent to calling this function with datadescid set to one. When this happens the return value will be F. In all other cases it will be T.

To return to the completely unselected measurement set, set the reset argument to True. This will allow you to acces the full range of rows in the measurement set, rather than just the selected measurement set.

The datadescid must always be a non-negative integer.



Example
      include 'ms.g'
      myms := ms("3C273XC1.ms");
      myms.selectinit(datadescid=1);
      print myms.range("uvdist");
      myms.selectinit(reset=T);
      print myms.range("uvdist");
In this example displays the range of uv distances for the data in the specified measurement set. The first print statement will only use data where the DATA_DESC_ID column is 0. This will correspond to a specific spectral window and polarization setup. The second print statement will print the range of uv distances for all the data in measurement set.



next up previous contents index
Next: ms.select - Function Up: ms - Tool Previous: ms.lister - 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