Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: tableiterator - Constructor Up: table - Module Previous: tablerow.done - Function


tableiterator - Tool



Package utility
Module table


Postscript file available

Allows iteration through a table tool



Description
A tableiterator allows iteration through a table based on the contents of one or more columns. Each step in the iteration process forms a subset of the table for which the specified columns have the same value.



Example
vis:=table("3C273XC1.MS");
vis.summary();
visbyants:=tableiterator(vis, "ANTENNA1 ANTENNA2");
visbyants.reset();
while(visbyants.next()) {
  nrows:=visbyants.table().nrows();
  print "Antenna1 ", visbyants.table().getcell("ANTENNA1", 1),
        " Antenna2 ", visbyants.table().getcell("ANTENNA2", 1),
        ": ", nrows, "samples";
}
This example iterates through the table on ANTENNA1 and ANTENNA2. Thus each call to next forms a (reference) table containing the rows of a single baseline in the main table. The table function can be used to get access to the current subset.
Note that a next has to be done to get the first subset.

Constructors
tableiterator Construct a tableiterator
Functions
close close the tableiterator tool
done end the tableiterator tool
next Advance to the next table subset
reset Reset iteration to the beginning
table Return the current table subset
terminate Terminate the iteration and clean up memory




next up previous contents index
Next: tableiterator - Constructor Up: table - Module Previous: tablerow.done - 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-10-15