|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
ms.range - Function
1.3.1 Get the range of values in the measurement set
Description
This function will return the range of values in the currently selected
measurement set for the items specified. Possible items include most scalar
columns, interferometer number (1000*antenna1+antenna2), uvdist(ance), u,
v, w, amplitude, phase, real and imaginary components of the data (and
corrected and model versions of these - if these columns are present). See the
table at the top of the document to find the exact list.
You specify items in which you are interested using a string vector where each element is a case insensitive item name. This function will then return a record that has fields corresponding to each of the specified items. Each field will contain the range of the specified item. For many items the range will be the minimum and maximum values but for some it will be a list of unique values. Unrecognized items are ignored.
By default the FLAG column is used to exclude flagged data before any ranges are determined, but you can set useflags=False to include flagged data in the range. However, if you average in frequency, flagging will still be applied.
You can influence the memory use and the reading speed using the blocksize argument - it specifies how big a block of data to read at once (in MB). For large datasets on machines with lots of memory you may speed things up by setting this higher than the default (10 MB).
For some items, as indicated with an § in table 1.6 (in the general description of this tool), you need to call selectinit to select a portion of the data with a unique shape prior to calling this function.
Items prefixed with corrected, model, residual or obs_residual and the imaging_weight item are not available unless your measurement set has been processed either with the imager or calibrator tools.
Arguments
Inputs |
| ||
items |
| Item names | |
| allowed: | stringArray |
|
| Default: |
| |
useflags |
| Use the data flags
| |
| allowed: | bool |
|
| Default: | true |
|
blocksize |
| Set the blocksize in MB
| |
| allowed: | int |
|
| Default: | 10 |
|
record
Example
ms.open("3C273XC1.MS")
ms.selectinit(datadescid=0)
ms.range(["time","uvdist","amplitude","antenna1"])
#{’amplitude’: array([ 2.60339398e-02, 3.38518333e+01]),
# ’antenna1’: array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13,
# 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]),
# ’time’: array([ 4.12162940e+09, 4.12164267e+09]),
# ’uvdist’: array([ 46.26912101, 3727.97385983])}
In this example the minimum and maximum observation times,
uvdistances, data amplitudes are returned as well as a list of all the
antennas in the antenna1 column.
For this dataset the selectinit function did not need to be
called as all the data is of one shape.
__________________________________________________________________
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