FITS (.fits, .fit)

Background

    MIME types: application/fits, image/fits
    FITS scientific image and data format.
    Standard format for the exchange and archival storage of astronomical data.
    Endorsed by NASA and the International Astronomical Union.
    FITS is an acronym for Flexible Image Transport System.
    Mixed ASCII and binary format.
    Stores spectral data and raster images as uncompressed arrays.
    Allows format extensions.
    Developed in 1979 by Don Wells, Eric Greisen, and others.

Import and Export

  • Import["file.fits"] imports a FITS file, returning an image.
  • Import["file.fits",elem] imports the specified element from a FITS file.
  • The import format can be specified with Import["file","FITS"] or Import["file",{"FITS",elem,}].
  • Export["file.fits",expr] exports graphics or any other expression as an image to a FITS file.
  • When exporting Wolfram Language graphics or arbitrary expressions to FITS, the resulting image has the same raster size as its displayed form.
  • Image objects are by default exported at their raster size.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the FITS format.

Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"array of pixel values or table elements
    "DataType"data type used to store image and table data in the file
    "Image"raster image, given as an Image object
    "Range"minimum and maximum raw data values
    "Graphics"raster image, given as a Graphics object
    "RawData"raw data as stored in the file
  • Import and Export by default use the "Image" element for FITS files.
  • Advanced Import elements:
  • "BitDepth"bits used to represent gray-level pixels in the file
    "Channels"the number of color channels used in the file
    "ColorSpace"color encoding used in the file
    "ImageSize"raster dimensions
    "Summary"summary of the file
    "SummarySlideView"slide view summary of all header data units
  • General metainformation:
  • "Metadata"raw metadata as stored in the file
    "Comments"comments for each data or image stored in the file
    "History"description of how the data or image has been processed
    "Object"name of the observed object
    "Observer"person who recorded the data or image
    "Organization"organization or institution responsible for creating this file
  • Information about the recording device and environment:
  • "RightAscension"right ascension setting of the telescope axis
    "Declination"declination setting of the telescope axis
    "HourAngle"hour angle of the depicted object when the image was taken
    "SiderealTime"sidereal time (LST)
    "Equinox"equinox for the celestial coordinate system used in this file, typically given in years
    "Airmass"relative airmass
    "ExposureTime"photographic exposure time in seconds
    "ObservationDate"date and time the observation was made
    "Telescope"telescope that captured the image
    "Device"recording instrument (e.g. camera)
  • Bibliographic information elements:
  • "Author"person who compiled the image information
    "Reference"bibliographic reference associated with this file
  • Selecting elements of the table extension of a FITS file:
  • "TableData"representation of table extension
    "TableHeaders"table column headers
    "TableUnits"units of measurement corresponding to the table columns
    "Plaintext"representation of image and table extensions as a string
  • For FITS files that contain multiple images or data extensions, the above elements are taken to be lists of the respective expressions.
  • Metadata field names are converted to all caps on export to conform with FITS standard.

Options

Examples

open allclose all

Basic Examples  (3)

Import the image stored in a FITS file:

In[1]:=
Click for copyable input
Out[1]=

Import the data while applying gamma correction and a specific color function:

In[2]:=
Click for copyable input
Out[2]=

Summary of an image:

In[1]:=
Click for copyable input
Out[1]=

Export an image to FITS:

In[1]:=
Click for copyable input
Out[1]=

Scope  (1)

Import Elements  (6)

Export Elements  (1)

Import Options  (1)

See Also

"CDF"  "GIF"  "HDF"  "HDF5"  "JPEG"  "NetCDF"  "PNG"  "TIFF"

Introduced in 2002
(4.2)
| Updated in 2017
(11.2)