NRAO Home > CASA > CASA Toolkit Reference Manual
ms.msselect - Function

1.3.1 Use the MSSelection module for data selection.


Description

A retun value of True implies that the combination of all selection expressions resulted in a non-Null combined TaQL expression. False implies that the combined TaQL could not be formed (i.e. it is Null, and the ”selected MS” will be the same as the input MS).

The details of selection expressions are desribed in the MSSelection Memo.

Note that this function can be called multiple times but the result is cumulative. I.e. selection will work on the data already selected from all previous calls of this function. Use the function reset() to reset all selections to NULL (original database).

Arguments





Inputs

items

Record with fields contain the selection experessions. Keys recognized in the record are: ”spw”, ”time”, ”field”, ”baseline”, ”scan”, ”scanintent”, ”polarization”, ”observation”, ”array”, ”uvdist” and ”taql”.

allowed:

record

Default:

onlyparse

If set to True, expressions will only be parsed but not applied to the MS for selection. When set to False, a selected MS will also be generated internally. Default is False.

When only parsing is requested, the selected-MS is the same as the original MS.

allowed:

bool

Default:

false

Returns
bool

Example

 
       CASA: staql={’field’:’3C286’, ’spw’:’0~7:10~55’};  
       CASA: ms.open(MSNAME);  
       CASA: ms.msselect(staql, onlyparse=True); # For only getting the list  
                                                 # of indices correspoding to the selection  
       CASA: ndx=ms.msselectedindices();  
       CASA: ndx[’field’]  
         Out[5]: array([1], dtype=int32)  
          :  
          :  
       CASA: ms.msselect(staql);  # To do the actual selection.  
                                  # From this point on, the ms-tool is  
                                  # attached to the selected MS.  

__________________________________________________________________


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