[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


FTAB_EXT Source code in ftab_ext.pro

FTAB_EXT

Name
       FTAB_EXT
Purpose
       Routine to extract columns from a FITS (binary or ASCII) table.
Calling Sequence
       FTAB_EXT, name_or_fcb, columns, v1, [v2,..,v9, ROWS=, EXTEN_NO= ]
Input Parameters
       name_or_fcb - either a scalar string giving the name of a FITS file
               containing a (binary or ASCII) table, or an IDL structure
               containing as file control block (FCB) returned by FITS_OPEN
               If FTAB_EXT is to be called repeatedly on the same file, then
               it is quicker to first open the file with FITS_OPEN, and then
               pass the FCB structure to FTAB_EXT
       columns - table columns to extract.  Can be either
               (1) String with names separated by commas
               (2) Scalar or vector of column numbers
Output Parameters
       v1,...,v9 - values for the columns.   Up to 9 columns can be extracted
Optional Input Keywords
       ROWS -  scalar or vector giving row number(s) to extract
               Row numbers start at 0.  If not supplied or set to
               -1 then values for all rows are returned
       EXTEN_NO - Extension number to process.   If not set, then data is
               extracted from the first extension in the file (EXTEN_NO=1)
Example
       Read wavelength and flux vectors from the first extension of a
       FITS file, 'spec.fit'.   Using FTAB_HELP,'spec.fit' we find that this
       information is in columns named 'WAVELENGTH' and 'FLUX' (in columns 1
       and 2).   To read the data
       IDL> ftab_ext,'spec.fit','wavelength,flux',w,f
               or
       IDL> ftab_ext,'spec.fit',[1,2],w,f
Procedures Used
       FITS_READ, FITS_CLOSE, FTINFO, FTGET(), TBINFO, TBGET()
Minimum IDL Version
       V5.3 (uses STRSPLIT)
Revision History
       version 1        W.   Landsman         August 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Improve speed processing binary tables  W. Landsman   March 2000
       Use new FTINFO calling sequence  W. Landsman   May 2000
       Don't call fits_close if fcb supplied W. Landsman May 2001
       Use STRSPLIT to parse column string  W. Landsman July 2002
       Cleanup pointers in TBINFO structure  W. Landsman November 2003

Last modified by pro2html on 2004 June 30 at 03:50 UTC

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

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