|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
ms.selecttaql - Function
1.3.1 Select a subset of the measurement set.
Description
This function will select a subset of the current measurement set based on the
standard TaQL selection string given.
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 False and send a warning message in the logger. Otherwise this function will return True. To undo all the selections you need to use the selectinit function (with reset=True). Note that index values used in the TaQL string are zero-based as are all tool indices.
Arguments
Inputs |
| ||
msselect |
| TaQL selection string
| |
| allowed: | string |
|
| Default: |
|
|
bool
Example
ms.open("3C273XC1.MS")
ms.selectinit(datadescid=0)
ms.select({’antenna1’:[0,2,4],’uvdist’:[1200.,1900.]})
ms.selecttaql(’ANTENNA1==2’)
ms.range(["ANTENNA1","ANTENNA2"])
# {’antenna1’: array([2]),
# ’antenna2’: array([ 6, 9, 11, 18, 20, 21, 24])}
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 zero, two or four and where the uv
distance is between 1200 and 1900 meters. Finally it uses a query
to select all the data for which the ANTENNA1 column is 2 (this
selects the middle antenna of the previous, zero-based, 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.
__________________________________________________________________
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