An NDF comprises a main data array plus a collection of objects drawn from a set of standard items and extensions (see SUN/33). Only the main data array must be present; all the other items are optional.
example.sdf
is an NDF which contains all the standard NDF components, except a WCS
component and a FITS extension; it also has a FIGARO extension. The structure of the
file (as revealed by Hdstrace) is shown below. The layout is
and each level down the hierarchy is indented. Note that scalar objects have no dimensions
Of course, this is only an example format. There are various ways of representing some of the components. These variants are described in SGP/38, but not all are currently supported.
The components are considered in detail below. The names (in bold typeface) are significant as they are used by the NDF access routines to identify the components.
example.sdf
,
is a one-dimensional array of real type with 856 elements. It can have up
to seven dimensions. It is particularly referenced via parameter names IN,
OUT, and NDF.
If neither origin nor bad-pixel flag were present, the DATA component could have been a one-dimensional array like this,
rather than the structure shown above.
"HR6259 - AAT fibre data"
describes the contents of the
NDF. The NDF’s TITLE might be used as the title of a graph etc. It may be set with
task SETTITLE. Applications that create an NDF assign a TITLE to the NDF
via a parameter, called TITLE unless the application generates several
NDFs.
"Flux"
describes the quantity represented in the NDF’s
main data array. The LABEL is intended for use on the axis of graphs etc. It may
be set using the task SETLABEL.
"Counts/s"
. It may be set via the command
SETUNITS.
example.sdf
the BADBITS component has value 1. This
means that a value of 1 in the quality array indicates a bad pixel in the main
data array, whereas any other value indicates that the associated pixel is
good. (Note that the pixel is bad if the bit-wise comparison QUALITY "
AND"
BADBITS is non-zero). The meanings of the QUALITY bits are arbitrary.
See the task SETBB. To enter new quality information, use the SETQUAL
command.
example.sdf
. This indicates that the
spectrum was extracted from fibre data using the Figaro FINDSP command
on 1990 December 19. The history recording level is set by task HISSET.
This task also allows you to switch off history recording or delete the
history records. HISLIST lists an NDF’s history. You can add commentary with
HISCOM.
example.sdf
began life as a Figaro file. It was converted to an NDF
using the command DST2NDF (see SUN/55). It contains values for the airmass
and exposure time associated with the observations. These are stored in
the FIGARO extension, and the intention is that the Figaro applications
which use these values will know where to find them. Task SETEXT lets the
contents of extensions be listed, created, deleted, renamed and assigned new
values.
One extension that is used by Kappa is the FITS extension. This holds the FITS headers as an array of 80-character elements, i.e. one FITS card image per array element. You can extract the values of ancillary items from the FITS extension to a non-standard extension via FITSIMP. Use FITSEXP to do the reverse operation. The extension can be listed via the command FITSLIST. FITSEDIT allows you to edit the headers prior to export of the dataset to another format such as FITS or IRAF.
Kappa uses a PROVENANCE extension to record details of the ancestor NDFs used to
generate an NDF. This lets you determine how the NDF before you, came to
be. For each ancestor NDF, the provenance information includes its path
at creation time, the creation epoch, the software that generated the
ancestor, and indices to its parent NDFs (if any exist) within the PROVENANCE
extension. There is also a MORE component within PROVENANCE that can be
filled with arbitrary additional information. Provenance recording is
controlled through the AUTOPROV
environment variable: set it to 1
to enable
recording, and set it to any other value to disable recording. When AUTOPROV
is
undefined, then an output NDF will have provenance only if at least one of the
input NDFs has provenance. You can examine provenance with PROVSHOW, and
modify it with PROVADD and PROVMOD. Selected provenance may be removed with
PROVREM.