![]()
|
|||
|
|
|||
| NRAO Home > CASA > CasaDocument | |||
Casapy interface to table system
Description CASA stores all data inside CASA tables which are stored on disk. A CASA 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 0). 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 a CASA table (and thus all data stored in CASA) is potentially accessible and changable from casapy. The table module provides a convenient way of accessing and changing CASA tables from inside casapy. To do so one uses tb, the table tool, inside casapy. The table tool provides functions for:
All operations are done inside the casapy client and are not written to disk until an explicit flush command is performed.
The most typical operation on a CASA table is to open it, load a column from the table into casapy, alter it using casapy 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.
tb.open(’3C273XC1.MS’)
tb.summary(); uvw=tb.getcol("UVW"); tb.close() tb.open("3C273XC1.MS/SPECTRAL_WINDOW") freq=tb.getcell("REF_FREQUENCY", 0) tb.close() for i in range(len(uvw)): for j in range(len(uvw[0])): uvw[i][j] = uvw[i][j]*1.420E9/freq tb.open(’3C273XC1.MS’, nomodify=False) tb.putcol("UVW", uvw); tb.close() |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2007 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
Updated daily during alpha development.