The CFITSIO library

# Introduction

Note
The CFITSIO library is written and maintained by NASA's HEASARC and can be downloaded at http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html

CFITSIO is a pure C library that provides input/output capabilities for FITS files. The version included with SKIRT contains a subset of the source files in tarball cfitsio3360.tar.gz (downloaded from the NASA's HEASARC web site). No changes were made to any of the source files. Compiler warnings are explicitly disabled to avoid generating a myriad of warnings for code that has presumably been well tested by its authors.

Note
The remaining text in this chapter is copied from the CFITSIO documentation, with minor modifications.

# Library overview

CFITSIO is a machine-independent library of routines for reading and writing data files in the FITS (Flexible Image Transport System) data format. It can also read IRAF format image files and raw binary data arrays by converting them on the fly into a virtual FITS format file. This library is written in ANSI C and provides a powerful yet simple interface for accessing FITS files which will run on most commonly used computers and workstations. CFITSIO supports all the features described in the official definition of the FITS format and can read and write all the currently defined types of extensions, including ASCII tables (TABLE), Binary tables (BINTABLE) and IMAGE extensions. The CFITSIO routines insulate the programmer from having to deal with the complicated formatting details in the FITS file, however, it is assumed that users have a general knowledge about the structure and usage of FITS files.

# The FITS file format

KEYWORD = value / comment string