2dFGRS Final Data Release
Code for FITS Files

The template program below shows how CFITSIO routines can be used to read the data structures (DSS image and 2dFGRS object spectrum, variance array and sky spectrum) in the 2dFGRS database FITS files of each object in the survey. It is designed to be simple, and demonstrates the basic operations required to open the file, read the data in the images and the data in the keywords, and move through the extensions. Trivial routines for data manipulation are provided. The program takes a filename as an argument, determines the number of spectral extensions (number of times observed), and prompts for the spectral extension to read the data from. The template program and the accompanying example program should provide a code base for analyses of the 2dFGRS spectra.

  • Template code for reading the FITS files:
  • Two example Fortran programs for reading and manipulating the data in the FITS files:
    • snrfits.f computes the mean S/N ratio
    • specfits.f prints the object spectrum, variance array and sky spectrum to a text file
  • Index to the FITS files in the database

A note for IRAF users: with multiple-extension FITS files, the filename requires the suffix [n], where n is the extension number (primary image is extension 0, spectrum images are extensions 1..spectra). For example, to display the DSS image of 123456.fits, use the comand DISPLAY 123456[0] 1. To display the first object spectrum, variance array and sky spectrum, use DISPLAY 123456[1] 2.

Matthew Colless, colless@mso.anu.edu.au,