Subject: FITS basics and information (periodic posting) - 1/2

From: bschlesinger at nssdca.gsfc.nasa.gov (BARRY M. SCHLESINGER)
Date: 16 Dec 1993 16:15 EDT

FITS basics and information, Part 1

	This basic Flexible Image Transport System (FITS) information
is posted and updated periodically by the NASA/Science Office of
Standards and Technology (NOST) FITS Support Office to provide a brief
description of FITS and information on software and documentation for
the benefit of new readers and the reference of old readers. 

			Table of Contents
			Part 1
1 What FITS Is and Isn't
2 FITS Documents
 2.1 The FITS Papers
 2.2 User's Guide
 2.3 NOST Definition of FITS
 2.4 Floating Point Agreement
 2.5 Proposed Extensions
 2.6 World Coordinates
			Part 2
3 Software and Sample Data
 3.1 NOST 
  3.1.1 FITS Product Conformance Tester
  3.1.2 Header lister 
  3.1.3 Error Test files
 3.2 FITSIO
 3.3 Converting FITS files to image format
  3.3.1 pbm+
  3.3.2 IMDISP (IBM/PC)
  3.3.3 ViewFITS (OS/2)
4 Summary of on-line sources
 4.1 NOST
 4.2 HEASARC
 4.3 NRAO
 4.4 HEAFITS exploder
5. NOST services 

1 What FITS Is and Isn't
	FITS (Flexible Image Transport System) is a data format
designed to provide a means for convenient exchange of astronomical
data between installations whose standard internal formats and
hardware differ. A FITS file is composed of a sequence of Header Data
Units (HDUs). The header consists of keyword=value statements, which
describe the format and organization of the data in the HDU and may
also provide additional information, for example, about instrument
status or the history of the data.  The data follow, structured as the
header specifies. The data section of the HDU may contain a digital
image, but, except for the first, *it doesn't have to*.  Other
possible formats include tables and multidimensional matrices that are
not images. The first HDU must contain a multidimensional matrix or no
data at all; the data in subsequent HDUs, called extensions, may be of
any type, consistent with certain rules.  The "Image" in the name
comes from the original use of the format to transport digital images,
but it's not just for images any more.  	FITS is not
principally a graphics format designed for the transfer of pictures;
it does not incorporate "FITS viewers", packages for decoding the data
into an image.  Users must develop or obtain separate software to
convert the data from the FITS file into a form that can be readily
displayed. 

2 FITS Documents
 2.1 The FITS Papers
	The fundamental references on FITS are the following four
papers, often referred to collectively as the "Four FITS Papers". 
These papers are the formal standard for FITS, endorsed by the
International Astronomical Union (IAU). 

Wells, D. C., Greisen, E. W., and Harten, R. H., "FITS: a flexible 
image transport system," Astronomy and Astrophysics Supplement Series, 
44,  363-370, 1981. 

Greisen, E. W. and Harten, R. H., "An extension of FITS for small 
arrays of data," Astronomy and Astrophysics Supplement Series, 44, 
371-374, 1981. 
(NOTE: The format described in this paper has been used almost 
exclusively to transport radio interferometry and is likely to be 
replaced by other formats in the future.  Writing data other than 
radio interferometry data using this format is not recommended.)   

Grosbol, P., Harten, R. H., Greisen, E. W., and Wells, D. C., 
"Generalized extensions and blocking factors for FITS," Astronomy and 
Astrophysics Supplement Series, 73, 359-364, 1988. 

Harten, R. H., Grosbol. P., Greisen, E. W., and Wells, D. C., "The 
FITS tables extension, Astronomy and Astrophysics Supplement Series, 
73, 365-372, 1988. 

 2.2 User's Guide
	 A User's Guide for FITS, commissioned by NASA Headquarters,
is maintained by the NOST FITS Support Office.  This Guide is intended
to be a tutorial for new FITS users. In addition to presenting the
rules of FITS, it provides some of the history and reasoning behind
the choice of the rules, adds recommendations on good practices, and
discusses current developments in FITS.  The current version, 3.0, was
issued in January 1993. 

 2.3 NOST Definition of FITS
	The NOST has codified FITS as endorsed by the IAU into a
formal standard, eliminating some contradictions and ambiguities in
the original FITS papers.  This Definition of FITS was developed by a
Technical Panel chaired by Dr. Robert J. Hanisch (STSci), with review
by the astronomical community.  On June 18, 1993, it was approved as a
NOST Standard by an Accreditation Panel consisting of the NOST
Executive Board and an astronomical community representative; this
review was to confirm that the community had been given a satisfactory
opportunity to review the standard and that the Technical Panel had
properly considered and responded to all comments. 
	The NOST standard has been submitted to the IAU FITS Working
Group (IAUFWG) for endorsement as the international FITS standard, to
replace the four FITS papers and the Floating Point Agreement (section
2.4), which are the current endorsed standard.  While oversights in
non-controversial areas may be rectified as a result of the review by
the IAUFWG, significant changes are unlikely, because members of this
committee were active in the process of reviewing the standard and
their comments were given significant weight in the deliberations of
the Technical Panel. 

 2.4 Floating Point Agreement
	Originally, FITS permitted only integers in the data array
following the first, or primary header.  The IAU has since endorsed
the Floating Point Agreement, which specifies the use of IEEE-754
floating point and describes its use in FITS.  The basic agreement
appears verbatim in the User's Guide, and the substance is
incorporated in the NOST standard. 

 2.5 Proposed Extensions
	Two new extension types, binary tables (type name BINTABLE)
and images, like the data in the primary HDU but in an extension (type
name IMAGE), are currently under consideration for endorsement by the
IAU FITS Working Group.  Printed copies of the proposals for both are
available from the NOST; the description of IMAGE is available
electronically from the NOST by anonymous ftp and that of BINTABLE from 
the National Radio Astronomy Observatory (NRAO).  See section 5 for 
details of ftp resources.

 2.6 World Coordinates
	A draft text of conventions for World Coordinates is currently
under community review.  It proposes rules for relating a FITS data
array to the physical quantities the numbers represent, with detailed
discussion of projections from the celestial sphere to the array
plane.  It is available electronically from the NRAO ftp site.