Skip to content

Instantly share code, notes, and snippets.

View gpdf's full-sized avatar

gpdf

  • Rubin Observatory and SPHEREx
View GitHub Profile

A full discussion of FITS formats with links to definitive documentation is available. Since different packages support distinct subsets of the available FITS formats and conventions we briefly summarize them here.

A FITS file is comprised of segments called Header and Data Units (HDUs) which may be any of four formats. The table indicates the formats each package supports.

  • FITS images are generally supported and can include 1-999 dimensional arrays of unsigned bytes, signed 2 and 4 byte integers and 4 and 8 byte floating point numbers using IEEE representations. Some packages may only read images in the first HDU.
  • FITS binary tables store tabular information in a binary representation. Each cell in the table can be a multidimensional array but the dimensionality of the array must be constant within a column. The strict standard supports only one-dimensional arrays, but a convention to support multi-dimensional arrays is widely accepted. Binary tables can support the datatypes available for ima