Header description

###
Header description

The exact header definition can be found in appendix B. In short, it is divided in sections. The first one, named leading pseudo-section, has a special status because it contains vital information describing the file format. It (and thus all the GDF files, V1 or V2) starts with 12 specific characters:

- the 6 firsts are always the word GILDAS (uppercase),
- the 7 is a unique character encoding the system type and the version of the GDF used (see Table 1),
- the 5 last are a subsequent word used to recognize the kind of data in the file, namely IMAGE (for standard Gildas images or hypercubes) or UVFIL (for Gildas UV tables).

In GDFV2, this last character string is only a first order information about the file kind. Distinction between Images, Tables, UV Tables, VO-like Tables, is provided by an integer keywords (see Table 2). Then follows the data format, the various number of blocks in the file, the version of the GDF currently in use, and the kind of GDF file.

Table 1: GDF encoding of the system and version. Most of the recent computers are little endian (IEEE) machines. The obsolete system VAX is not supported with GDFV2.
Version | IEEE | EEEI | VAX
1 |  | . |
2 |  |  | N/A

hyphen.
underscore.

Table 2: List of kinds available for GDFV2 files (h%gil%type_gdf). The values are integers that should not be used explicitely in the code. The developers must use the associated names.
Name | Value | Comment
code_gdf_image | 0 | Images or hypercubes
code_gdf_uvold | 1 | Old UV Data when the weights were inconsistent with the actual noise
code_gdf_uvt | 10 | UV Data in “visibility” order
code_gdf_tuv | -code_gdf_uvt | UV Data in channel order (the transposed order)
code_gdf_table | 20 | A simple Table, with no information
code_gdf_vo | -code_gdf_table | A simple Table, in the transposed way, as is the case for
|  | Virtual Observatory Tables
code_gdf_xyt | 40 | A specific CLASS table (by symmetry with code_gdf_uvt)
code_gdf_txy | -code_gdf_xyt | A specific CLASS table (by symmetry with code_gdf_uvt)

The following sections are standard ones, named

dimension
  The dimensions of the data in the file.
blanking
  The blanking and tolerance values.
extrema
  The value and position of the minimum and maximum value in the data.
coordinate
  The axes definition for each dimension, encoded as a 2D array of (ref,val,inc) triplets.
description
  The physical unit of the data and the names of the axes. The first header block ends here.
position
  The source description. The second header block starts here.
projection
  The projection definition.
spectroscopy
  The description of the spectroscopic axis.
resolution
  The beam characteristics.
noise
  The data noise.
astrometry
  Proper motion parameters.
telescope
  Telescope(s) information.
uv_data
  support for UV tables, e.g. description of extra-columns specific to this kind of tables.

Each section has a parameter describing its length. A zero value means that this section is not present in the file and/or not filled in memory. For the programmer or the end-user, any other value means it is enabled (then all the parameters in the section are expected to be filled). In details, some of the sections have a fixed length for any file (e.g., the length of the blanking section is 4-bytes words) and some have a length that depends on the number of dimensions in the file (e.g., the length of the coordinate section is words).