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.lister - Function Up: ms - Tool Previous: ms.writehistory - Function


ms.range - Function



Package general
Module ms
Tool ms


Get the range of values in the measurement set


Synopsis
range(items, useflags, blocksize)


Arguments

items in Item names
    Allowed: Vector of strings
    Default: no default
useflags in Use the data flags
    Allowed: Bool
    Default: T
blocksize in Set the blocksize in MB
    Allowed: Int
    Default: 10


Returns
record with ranges for the requested items



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 which items you are interested in 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 from before any ranges are determined, but you can set useflags=F to include flagged data in the range (but 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.355 (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 either; 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.



Example
      include 'ms.g'
      myms:=ms("3C273XC1.ms");
      myms.selectinit(datadsescid=1);
      a.range("time uvdist amplitude antenna1")
      [time=[4.12163e+09 4.12164e+09] ,
       uvdist=[46.2691 3727.97] ,
       amplitude=[0.0260339 33.8518] ,
       antenna1=[1 2 3 4 ... 27] ]
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. Note that the double quoted string produces a string vector as the input argument.

For this dataset the selectinit function did not need to be called as all the data is of one shape.



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