This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

FITS (.fits)

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 fully support the image and ASCII table extensions of the FITS file format.
  • Import imports a FITS file, returning an image.
  • Export exports graphics, or any other expression as an image to a FITS file.
  • When exporting Mathematica 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.
  • Import imports the specified element from a FITS file.
  • Import imports multiple elements.
  • Export creates a FITS file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"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
  • Image representation elements:
"Data"array of adjusted color or grayscale values
"DataType"data type used to store color or grayscale data in the file
"Image"raster image object
"Range"minimum and maximum raw data values
"Graphics"Graphics object representing an image
"RawData"array of raw pixel values
  • Import and Export by default use the element for FITS files.
"BitDepth"bits used to represent gray-level pixels in the file
"ColorSpace"color encoding used in the file (typically GrayLevel)
"ImageSize"raster dimensions
  • General meta-information:
"Metadata"raw metadata as stored in the file
"Comments"comments stored in the file, given as a list of strings
"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"data array representing the ASCII table extension
"TableHeaders"column headers, given as a list of strings
"TableUnits"units of measurement corresponding to the table columns
"Plaintext"ASCII table extension represented as a single character string
  • For FITS files that contain multiple images or data extensions, the above elements are taken to be lists of the respective expressions.
  • General rendering options:
ImageSizeAutomaticoverall image size
ColorFunctionAutomatica function to apply to determine the colors of the raster image
  • Advanced rendering option:
"Gamma"1.0gamma correction parameter used for rendering
Show the import elements available in a sample file:
Import this file as a graphic, applying a gamma correction to the raw data:
Read raw meta-information from this file:
Import raw bitmap data from a FITS file:
Show a logarithmic plot of the data:
Export the result back to FITS, automatically converting it to a gray-level bitmap:
Show the import elements available in a sample file:
In[1]:=
Click for copyable input
Out[1]=
Import this file as a graphic, applying a gamma correction to the raw data:
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Read raw meta-information from this file:
In[4]:=
Click for copyable input
Out[4]//TableForm=
Import raw bitmap data from a FITS file:
In[5]:=
Click for copyable input
Show a logarithmic plot of the data:
In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
In[8]:=
Click for copyable input
Out[8]=
Export the result back to FITS, automatically converting it to a gray-level bitmap:
In[9]:=
Click for copyable input
Out[9]=