MeasurementSet Selection Syntax

S. Bhatnagar
NRAO, Socorro

June 15, 2007
(Updated: July 28, 2015)

PDF Version1


This note describes the syntax for the various expressions for selecting data from the Measurement Set, implemented in the MSSelection2  module of CASACore. All expressions consist of a comma or semi-colon separated list of specifications. Except channel selection, the final product of parsing the expressions is a Table Expression Node (TEN) which can be used to construct a table with only the selected rows. Higher level global methods to return a selected table, given the user supplied expressions, are also provided as part of this module.

Error handling is done via the C++ exception handling mechanism. The exceptions thrown by the MSSelection module are of type MSSelectionError3  which is derived from AipsError class. The exceptions generated from each individual expression parser are further specializations of the MSSeletionError class. Application layer code therefore can have a finer level control on error handling. The module also support externally plug-able error handlers of type MSSelectionErrorHandler4 . This allows application layer code to have control on the resolution mechanism of the exceptional states that may be reached during the parsing cycle.

The MSSelection module can also be used for other tables that follow the general data base design of the MeasurementSet. The CASA CalTables5  is an example which also uses the MSSelection module for data selection.

1 General Syntax
 1.1 Number Format
 1.2 Range Specification
 1.3 Units
 1.4 Strings
 1.5 White Spaces (blanks in expressions)
2 Time Selection
 2.1 Syntax
3 Antenna/Baseline Selection
 3.1 Syntax
 3.2 Integers-as-names VLA Naming Convention
4 Field Selection
 4.1 Syntax
5 UV Distance Selection
 5.1 Syntax
6 Frequency Selection
 6.1 Spectral Window Specification Syntax
 6.2 Channel Specification Syntax
 6.3 Frequency Selection Syntax
7 Polarization Selection
8 ”Scan intent” Based Selection
 8.1 Syntax
 8.2 Examples
9 Scan/Sub-array Selection
 9.1 Syntax
10 Using MSSelection expressions in TaQL
A Appendix: API Note - General Error Handling
 A.1 Installing Error Handlers
B Appendix: API Note - Using the MSSelection module for other MS-like Tables
 B.1 Using MSSelection for CalTables
C Appendix: Usage Examples
 C.1 Example 1
 C.2 Example 2
 C.3 Example 3
 C.4 Example 4
 C.5 Example 5
 C.6 Example 6
 C.7 Example 7
 C.8 Example 8
 C.9 Example 9