NRAO Home > CASA > CASA Toolkit Reference Manual

3.2 table - Module

Casapy interface to table system

  3.2.1 table - Tool
    table.fromfits - Function
    table.fromascii - Function
    table.open - Function
    table.create - Function
    table.flush - Function
    table.fromASDM - Function
    table.resync - Function
    table.close - Function
    table.copy - Function
    table.copyrows - Function
    table.done - Function
    table.iswritable - Function
    table.endianformat - Function
    table.lock - Function
    table.unlock - Function
    table.datachanged - Function
    table.haslock - Function
    table.lockoptions - Function
    table.ismultiused - Function
    table.browse - Function
    table.name - Function
    table.createmultitable - Function
    table.toasciifmt - Function
    table.taql - Function
    table.query - Function
    table.calc - Function
    table.selectrows - Function
    table.info - Function
    table.putinfo - Function
    table.addreadmeline - Function
    table.summary - Function
    table.colnames - Function
    table.rownumbers - Function
    table.setmaxcachesize - Function
    table.isscalarcol - Function
    table.isvarcol - Function
    table.coldatatype - Function
    table.colarraytype - Function
    table.ncols - Function
    table.nrows - Function
    table.addrows - Function
    table.removerows - Function
    table.addcols - Function
    table.renamecol - Function
    table.removecols - Function
    table.iscelldefined - Function
    table.getcell - Function
    table.getcellslice - Function
    table.getcol - Function
    table.getvarcol - Function
    table.getcolslice - Function
    table.putcell - Function
    table.putcellslice - Function
    table.putcol - Function
    table.putvarcol - Function
    table.putcolslice - Function
    table.getcolshapestring - Function
    table.getkeyword - Function
    table.getkeywords - Function
    table.getcolkeyword - Function
    table.getcolkeywords - Function
    table.putkeyword - Function
    table.putkeywords - Function
    table.putcolkeyword - Function
    table.putcolkeywords - Function
    table.removekeyword - Function
    table.removecolkeyword - Function
    table.getdminfo - Function
    table.keywordnames - Function
    table.fieldnames - Function
    table.colkeywordnames - Function
    table.colfieldnames - Function
    table.getdesc - Function
    table.getcoldesc - Function
    table.ok - Function
    table.clearlocks - Function
    table.listlocks - Function
    table.statistics - Function
    table.showcache - Function
    table.testincrstman - Function
  3.2.2 tableplot - Tool
    tableplot.open - Function
    tableplot.setgui - Function
    tableplot.savefig - Function
    tableplot.selectdata - Function
    tableplot.plotdata - Function
    tableplot.iterplotstart - Function
    tableplot.replot - Function
    tableplot.iterplotnext - Function
    tableplot.iterplotstop - Function
    tableplot.markregions - Function
    tableplot.flagdata - Function
    tableplot.unflagdata - Function
    tableplot.locatedata - Function
    tableplot.clearflags - Function
    tableplot.saveflagversion - Function
    tableplot.restoreflagversion - Function
    tableplot.deleteflagversion - Function
    tableplot.getflagversionlist - Function
    tableplot.clearplot - Function
    tableplot.done - Function

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.

Example

  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()

See Also

tableplot


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