The NDF format is an example of the HDS (Hierarchical Data Structure) format. Essentially, this means that lots of different items of information can be put into the same file. For example, we have already seen how the Data and Variance arrays come as distinct pieces of information.
All NDFs have a number of standard components, many of which (but not all) we have dealt with in this book. HDS (and therefore NDF) files may also contain extensions. These may be so commonly used they are virtually standard (e.g. a FITS header), or be specific to a particular instrument or software package (e.g. the IRAS extension).
In this section, we deal with how to access and create extensions to NDF files.
The following example reads in an IRAS extension:
Note that the call to CMP_GET0I should be replaced by CMP_GET0R for real numbers, CMP_GET0D for double precision numbers, CMP_GET0L for logical values, CMP_GET0C for character values.
In the following example, a code is used to place the temperature of the CCD chip used during the observations into a new extension. In practice, many more items could also be put there such as pixel scale, size, gain etc. These items can then be read and used by later applications as part of the data reduction process.