NRAO Home > CASA > CASA Toolkit Reference Manual
table.fromASDM - Function

3.2.1 Create an CASA table from an ASDM table


Description

.keywords DATE A ”07/7/23” REVISION D 0 AUTHOR A ”Paulo C. Cortes” INSTRUMENT A ”ALMA” .endkeywords

The main function for this task is to create a CASA::Table from a XML ASDM Table. The classes asdmCasaXMLUtil and asdmCasaSaxHandler are the main objects which implement the task. The asdmCasaSaxHandler encapsulate all the operations returning a reference to a CASA::Table. The class uses xerces-c to parse the XML table and creates the CASA::Table. The implementation assumes the integrity of the XML data, it not attempting to check whether the XML data meets a column format or not. In detail, an ArrayString column should agree with the following format: nd nx ... data, where nd is the number of dimensions, nx is the size of the first dimension (implemented upto a cube, i.e. nx,ny,nz), and data is the array itself which should have the appropiate number of elements. For example, a VectorString column could be: 1 2 ”I” ”Q” or dimension 1, size 2, and two string elements. Due to the lack of data type spefication in the XML tables, the column names are hardcoded into the asdmCasaSaxHandler based on the ASDM specification (see http://aramis.obspm.fr/~alma/ASDM/ASDMEntities/index.html). While missing data from a table column will be accepted by the task, any new column beyond the specification has to be added into the class, also, any change in data types form the specificatin will produce a crash, CASA is picky with data types integrity. So far, the list of tables included in the class is:

AlmaCorrelatorMode.xml, Antenna.xml ConfigDescription.xml, DataDescription.xml, ExecBlock.xml, Feed.xml, Field.xml, Main.xml, Polarization.xml, Processor.xml, Receiver.xml, SBSummary.xml, Scan.xml, Source.xml, SpectralWindow.xml, State.xml, Station.xml, Subscan.xml, SwitchCycle.xml, CalCurve.xml, CalData.xml, CalPhase.xml

more tables will follow. The usage of fromASDM is simple, it gets two string, tablename and xmlfile, where tablename is the CASA::Table to be written and xmlfile represents the ASDM XML table. To call it do: tb.fromasdm(tablename,xmlfile)

Arguments





Inputs

tablename

Name of table to be created

allowed:

string

Default:

xmlfile

Name of the XML file to be read

allowed:

string

Default:

Returns
bool
__________________________________________________________________


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