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


next up previous contents index
Next: table - Tool Up: Utility Previous: executivetest - Function


table - Module

Postscript file available

Glish interface to table system

include "table.g"



Description

AIPS++ stores all data inside AIPS++ tables which are stored on disk. An AIPS++ table consists of an unlimited number of columns of data, with optional column keywords and optional table keywords. Columns are named and rows are numbered (starting at 1). The columns hold data, such as visibilities and uv coordinates, while the keywords hold general information such as units or revision numbers or table author or even other tables.

To make this concrete, examples of columns might be:

  U       V        W         TIME        ANT1   ANT2      VISIBILITY
124.011 54560.0  3477.1  43456789.0990    1      2        4.327 -0.1132
34561.0 45629.3  3900.5  43456789.0990    1      3        5.398 0.4521
....
....
....

and examples of keywords might be:

REVISION=2.01
AUTHOR="Tim Cornwell"
INSTRUMENT="VLA"

Everything in an AIPS++ table (and thus all data stored in AIPS++) is potentially accessible and changable from Glish. The table module provides a convenient way of accessing and changing AIPS++ tables from inside Glish. To do this one creates table tools inside Glish. The resulting tools can be operated on in various ways:

There is no tofits function available. It might get available in the future.

In addition this module contains a number of global functions related to tables, such as determining if a table exists (tableexists).

All operations are done inside the Glish client and are not written to disk until an explicit flush command is performed.

The most typical operation on an AIPS++ table is to open it by creating a table tool inside Glish, load a column from the table into Glish, alter it using Glish capabilities, and then write it back to the table. For this only a few commands are relevant: see the example below.

Sorting and selecting of tables is possible. The table thus produced is a reference table, and points back to the original table.

The Glish client handling all table events and operations is the tableserver. At startup of table.g the defaulttableserver is started which runs until the glish session ends. This server is by default used. It is, however, possible to start another one like:

  mytableserver:=tableserver();
and use that in the various constructors and functions taking a tableserver argument. In a similar way the defaulttableserver can be restarted in case it crashes in one way or another.



Example
  include "table.g"
  vis:=table("3C273XC1.MS", readonly=F);
  vis.summary();
  uvw:=vis.getcol("UVW");
  spw:=table("3C273XC1.MS/SPECTRAL_WINDOW", readonly=T);
  freq:=spw.getcell("REFERENCE_FREQUENCY", 1);
  uvw*:=(1.420E9/freq);
  vis.putcol("UVW", uvw);
  vis.close();



See Also
tablecolumn tablerow tableiterator tableindex



Aipsrc Variables

table.relinquish.reqautolocks.interval   nr of seconds to wait before relinquishing autolocks requested in another process
    Allowed: float
    Default: 5
table.relinquish.allautolocks.interval   nr of seconds to wait before relinquishing all autolocks
    Allowed: float
    Default: 60
table.endianformat   endian format to be used for storing data in new tables
    Allowed: big,little,local
    Default: big

Tools
table Access tables from Glish
tablecolumn Allows access to a column in a table
tablecomparer Compare various aspects of two tables to see if they are equivalent
tableindex Allows value based table access
tableiterator Allows iteration through a table tool
tableplot Plot data from tables via Glish
tablerow Allows access to rows of a table tool

Functions
is_table Is this a valid table tool?
tablebrowser "Table browser"
tablecloseall close all open table tool objects
tablecommand Execute a table command
tablecopy copy a table
tablecreatearraycoldesc create descriptor of an array column
tablecreatedesc create a table descriptor
tablecreatescalarcoldesc create descriptor of a scalar column
tabledefinehypercolumn define a hypercolumn in a table descriptor
tabledelete delete a table
tabledemo Perform a demonstration: Not yet implemented
tableexists does this table exist on disk?
tableinfo return the info record
tableiswritable is this table writable?
tableopentables return names of open tables
tablerename rename a table
tabletest Perform a test




next up previous contents index
Next: table - Tool Up: Utility Previous: executivetest - 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