Quicklinks : Introduction | Files | HDUs | Bytes | Tables
Since a FITS file is simply a sequence of Header Data Units, lets taks about these. HDUs are basically a sequence of meta Information in blocks of 80 (ASCII) characters followed by the binary data block containing the stored information.
There are severa classes implemeting HDU properties
- AnyHDU impelements is an
open classwith everything needed to read and write HeaderBlocks and dataUnit - AnyImageHDU implements routines for reading from and setting data to the dataUnit shared between
PrimaryHDUandImageHDU - PrimaryHDU implements routines for accessing image data and direct getter / setter for special properies like "random groups"
- ImageHDU implements routinges for the Image Extension
- TableHDU implements routinges for the (ASCII) Table Extension
- BintableHDU implements routinges for the Bintable Extension
Headers are treated as a fully flexible list of Keywords with values and comments. Following the FITS standard, there are Keywords with special semantics to them like BITPIX and NAXIS. All those can be fully modified by without any interference. But be aware before writing files, the validation-routine takes will check basic file integriy and modify two headers:
- The
SIMPLEkeyworld will be set toTorFbased on the success of the file validation - The
ENDkeyword will always be moved to the end to conclude the list
The data unit of the HDU is represented as untempered Data block. Some HDUs like the TableHDU and BintableHDU provide acces to the information stored in the the HDU through special routines (see below). In order to work whith the raw Data, there are special routines in the FITSByte.
The PrimaryHDU is required in every FITSFile.
The ImageHDU offers routines for reading and writing Image extensions via the routines implemented in AnyImageHDU.
The TableHDU offers routines for reading and writng Table extensions
The BintableHDU offers routines for reading and writng Table extensions