[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


RDFITS_STRUCT Source code in rdfits_struct.pro

RDFITS_STRUCT

Name
      RDFITS_STRUCT
Purpose
      Read an entire FITS file (all extensions) into a single IDL structure.
Explanation
      Each header, image or table array is placed in a separate structure
      tag.
Calling Sequence
      RDFITS_STRUCT, filename, struct, /SILENT, /HEADER_ONLY ]
Input Parameters
      FILENAME = Scalar string giving the name of the FITS file.
                 One can also specify a gzip (.gz) compressed file
Keyword Parameters
      /HEADER_ONLY - If set, then only the FITS headers (and not the data)
                are read into the structure.
      /SILENT - Set this keyword to suppress informational displays at the
               terminal.
Output Parameters
      struct = structure into which FITS data is read.   The primary header
             and image are placed into tag names HDR0 and IM0.   The ith
             extension is placed into the tag names HDRi, and either TABi
             (if it is a binary or ASCII table) or IMi (if it is an image
             extension)
             If /HEADER_ONLY is set, then struct will contain tags HDR0, HDR1
             ....HDRn containing all the headers of a FITS file with n
             extensions
Procedures Used
       FITS_OPEN, FITS_READ, FITS_CLOSE
Procedure
       The file is opened with FITS_OPEN which return information on the
       number and type of each extension.    The CREATE_STRUCT() function
       is used iteratively, with FITS_READ calls to build the final structure.
Example
       Read the FITS file 'm33.fits' into an IDL structure, st
       IDL> rdfits_struct, 'm33.fits', st
       IDL> help, /str, st                   ;Display info about the structure
Restrictions
       Does not handle random groups or variable length binary tables
Revision History
       Written K. Venkatakrishna, STX April 1992
       Code cleaned up a bit  W. Landsman  STX  October 92
       Modified for MacOS     I.  Freedman  HSTX April 1994
       Work under Windows 95  W. Landsman   HSTX  January 1996
       Use anonymous structures, skip extensions without data WBL April 1998
       Converted to IDL V5.0, W. Landsman, April 1998
       OS-independent deletion of temporary file  W. Landsman  Jan 1999
       Major rewrite to use FITS_OPEN and CREATE_STRUCT() W. Landsman Sep 2002
       Added /HEADER_ONLY keyword   W. Landsman  October 2003
       Do not copy primary header into extension headers W. Landsman Dec 2004
       Do not modify NAXIS when using /HEADER_ONLY W. Landsman Jan 2005

Last modified by pro2html on 2005 January 22 at 17:22 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically