JISAO data

Reading FITS-formatted files in MATLAB

FITS is the Flexible Image Transport System, and it is a self-describing data format that was developed by astronomers. The National Aeronautics and Space Administration (NASA) Tropical Rainfall Measurement Mission (TRMM) Visible and Infrared Spectrometer (VIRS) fire count estimates are provided in FITS-format.

There is adequate documentation on the TRMM VIRS fire WWW page to get a sense of how FITS works for that data set.

There is a useful WWW page of FITS documentation. The basic idea is that a file is made up of "header and data units" (HDUs), and the HDUs may include both metadata and data values (values you could do math with, for example, an map of fire locations). A file may include HDUs where the data is in a mix of data types and precision. For example, the file may include maps in short integers and other maps in floating point.

There is a very useful set of scripts, provided by Peter Rydesäter of the Institute for Information Technology which will read FITS-formatted data written for the Auroral Large Imaging System. These files are posted on a MATLAB ftp site.

I modified one of Peter's scripts, fitsload.m, to read the TRMM VIRS fire count FITS-formatted files. The script, fitsload2.m, is linked here.

You should certainly look at the FITS documentation URL that is listed above, but the basic ideas that I needed are as follows:

  • A FITS-format file consists of HDUs.
  • The first HDU seems to be a general header for the file, but it is not required to serve this purpose.
  • fitsload2.m will read one HDU. For the first HDU, it only reads the meta-data (header).
  • The format seems to always be in 2880-character (word?) blocks, so blocks will be filled to make them all 2880 characters (words).

    I hope that this information is helpful to you.

    
    

    September 2003
    Todd Mitchell ( mitchell@atmos.washington.edu )
    JISAO data