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.selecttaql - Function Up: ms - Tool Previous: ms.selectinit - Function


ms.select - Function



Package general
Module ms
Tool ms


Select a subset of the measurement set.


Synopsis
select(items)


Arguments

items in record with fields contain ranges and enumerations
    Allowed: Record
    Default: no default


Returns
Boolean



Description
This function will select a subset of the current measurement set based on the range of values for each field in the input record. The range function will return a record that can be altered and used as the argument for this function. A successful selection returns T. Allowable fields are tabulated in table 1.355 (in the general description of this tool). Unrecognized fields are ignored.

You need to call selectinit before calling this function. If you haven't then selectinit will be called for you with default arguments.

Repeated use of this function, with different arguments, will further refine the selection, resulting in a successively smaller selected measurement set. If the selected measurement set does not contain any rows then this function will return F and send a warning message in the logger. Otherwise this function will return T. To undo all the selections you need to use the selectinit function (with reset=T).



Example
      include 'ms.g'
      myms := ms("3C273XC1.ms");
      myms.selectinit(datadescid=1)
      myms.select([antenna1=[1,3,5],uvdist=[1200,1900]]);
      myms.select([time=[4121629420, 4121638290]]);
      include 'quanta.g';
      start := dq.getvalue(dq.convert(dq.quantity('1989/06/27/01:03:40'),'s'));
      stop := dq.getvalue(dq.convert(dq.quantity('1989/06/27/03:31:30'),'s'));
      myms.select([time=[start, stop]]);
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 all the data where the first antenna in the interferometer is number one, three or five and where the uv distance is between 1200 and 1900 meters. Finally it selects all the data which was observed between 4121629420 seconds and 4121638290 seconds (since zero hours on the day where the modified Julian day is zero). Since this time in seconds is quite obscure I have also illustrated how to use the quanta tool to convert a date/time string into seconds which can then be used to perform the same time selection.

The selections are cumulative so that at the end of this example only data in the specified time range, with the specified, interferometers, uv distances, spectral window and polarization setup are selected.



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