5 Data File Formats

 5.1 Column delimiters
 5.2 Column labels
 5.3 Comments
 5.4 Astronomical coordinates

The simplest form of input file for PONGO is a text file with the data in columns separated by spaces, as in the file $PONGO_EXAMPLES/tutorial.dat (or pongoexamples$tutorial.dat). However, PONGO allows a considerable level of fine control over the data used for plotting from a particular file by providing for the use of column delimiters, column labels and comments in data files.

5.1 Column delimiters

The default column delimiter is a space character, although the READF command does have the ability to use other delimiters by setting the DELIM parameter. It is possible for more than one delimiter character to be used, e.g. using &\ would be a good way to read a table that was in TEX format (& for a LATEX tabular format table). A null string for the DELIM parameter has the same effect as a single space.

5.2 Column labels

It is possible to give each column in a file a symbolic name that can be used to reference the column when reading the file and can be automatically transferred to the appropriate axis label on the plot. To do this, the first line of the file should be of the form:

  !$label 1$label 2$label 3$

where there are as many labels, each delimited by a $, as there are columns. Care should be taken to ensure that there is no leading white space in the column labels, although it is permissible for the column labels to contain white space elsewhere. Any padding that is required to make the column labels line up with the data columns should be achieved with multiple dollar signs, e.g. :

  !$RA$$$$Declination$

When specifying the column on the command line, e.g. YCOL Dec, it is permissible to abbreviate the string to a minimum match. However, the match is case-sensitive.

5.3 Comments

Comments may be placed in the data file by prefixing the line with one of the standard comment characters. There are two comment characters allowed in the data file, specified by the parameters HARDCOMM and SOFTCOM for the command READF. These comment characters must occur in the first column of a line to be recognised as comment characters. The main purpose of comment characters is to document data files and to comment out unwanted lines of data. The existence of two comment characters provides the ability to selectively read data subsets from files. Blank lines are ignored in data files.

Although not recommended practice, the documentation of data files can be done without the use of comment characters: because PONGO will reject any line in which the required numerical column cannot be interpreted as a valid number, it does not matter whether a comment character is put at the start of the line or not.

5.4 Astronomical coordinates

It is possible to read data stored in an astronomical coordinate format (i.e. HH:MM:SS.SSS and DD:MM:SS.SSS) into PONGO. The data is stored internally in radians: in this conversion any data read into XCOL is assumed to be a Right Ascension (i.e. of the first form above) and any data read into YCOL is assumed to be a Declination (i.e. of the second form above).

The BOXFRAME command can label axes using a HH MM SS.S and DD MM SS.S format providing the data and frame limits are specified in radians.