atlReadTable

Create an AST Table from a text file

Description:

This function creates an AST Table by reading the contents of a given text file. The text file format matches that of TOPCAT s " ASCII" format, except that any comment lines before the first row of column values that are of the form " # name = value" or " ! name = value" are used to create Table parameters. Here " name" is a contiguous block of alphanumeric characters, and " value" represents all characters following the equals sign, up to the end of the line, excluding leading and trailing white space. If value is a scalar integer or double, it is stored as such in the Table. Otherwise, it is stored as a string.

In addition, any row that consists just of two or more minus signs, with no leading spaces, is taken to mark the end of the catalogue. Any subsequent lines in the file are assumed to form a whole new table that is read in exactly the same way as the first. This second Table is stored as a parameter of the first Table using the key " SubTable" .

Invocation

AstTable atlReadTable( const char fname, int status )

Arguments

fname
The file name.
status
Pointer to the global status variable.

Returned Value

A pointer to the Table read from the file, or NULL if an error occurs.

Notes: