An article on what FITS files are and how to use them, oriented to me (and other software engineers) rather than astronomers.
Basic Structure
FITS files have been around for a long time, and so consist of some basics then various 'extensions' that have been added over the years. They are also based on punched card and tape structures; 80 byte blocks organised into 2880 byte blocks.
Example structure:
< - 80bytes - >
_______________ _
| Header | |
--------------- | Primary
| Data | |
--------------- -
| Header | |
--------------- | Extension
| Data | |
--------------- -
| Header | |
--------------- | Extension
| Data | |
--------------- -
The header consists of ASCII keyword/value pairs, organised into 80 character blocks (no line feed).
Originally the data block was just for storing pixellated images. Since then the extensions have been defined to include tables, radio data, spectrum etc.
Keywords
Most of the useful keywords are defined by convention rather than standard.
Standard Keywords:
http://dsnra.jpl.nasa.gov/devel/fits/keywords_standard.html and
http://heasarc.gsfc.nasa.gov/docs/fcg/standard_dict.html
Extracting Position Coordinates
Data units
Finding extensions
--
MartinHill - 21 Nov 2003