3.4 XAS header keywords
The header of a
is composed by a sequence of keywords. Programs store in keywords basic parameters
of a file, or details of the data processing done. The content of a file header
can be accessed programmatically by later programs (in this way constituting a way
of exchange of information), and
edited by the user,
Each keyword has a name, a type, a length and (a) value(s).
- the name is a possibly meaningful, case-insensitive word, no longer than 8 characters
for FITS compatibility. Not all FITS mandatory keywords are used in XAS files (when
necessary they can be generated by
but if they are the same names are used.
- the type is one of character, integer, real or double precision as detailed
- the length of a character keyword is the string length. For FITS compatibility this
is limited to 68 characters (although in principle could be longer).
- the length of a numeric keyword is either one for scalar keywords, or the number of
elements for array keywords. The total length in bytes cannot exceed 246.
- the value is either a string, or an array of one or more numeric values
Keywords in the file usually appear in the following order (which is however irrelevant
since entire headers are read in memory at once) :
When a program manipulates a file in place, it may alter some of the keywords, and add
some new ones. In particular it will add a new HISTORY section.
- subset of FITS mandatory or recommended keywords.
In particular the NAXIS2 keyword is
the number of bins or photons in tabular files (while NAXIS1 and NAXIS2
are the X and Y sizes of an image). Also all the binary table keywords like
TFIELDS, TTYPEn etc. are supported.
- the original file name without path and type is in FILENAME
- the OBJECT and
keywords are filled deriving the
information from FOT
- there is a SATELLIT keywords instead of the FITS TELESCOP, the
(SAX) instrument name is in INSTRUME and the sub-unit in DETNAM
- then accumulation specific and instrument specific keywords follow.
- the last keywords are the HISTORY (i.e. the runstring of the command
which created the file) and optionally its PARENT files and some
If a program reads from a file and produces a new one, it may copy part or all of the
original file header and then add its own HISTORY section.
Only the HISTORY, COMMENT and PARENT keywords may appear
more than once in a header (they are "duplicatable").
If an HISTORY keyword is longer than the maximum allowed, it is continued
on the next line, prefixing the value with a plus sign.