[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


TBPRINT Source code in tbprint.pro

TBPRINT

Name
       TBPRINT
Purpose
       Procedure to print specified columns & rows of a FITS binary table
Calling Sequence
       TBPRINT, h, tab, columns, [ rows, TEXTOUT =, FMT = ]
               or
       TBPRINT,tb_str, tab, columns, [ rows, TEXTOUT =, FMT =  ]
Input Parameters
       h - FITS header for table, string array
                       or
       tb_str - IDL structure extracted from FITS header by TBINFO, useful
           when TBPRINT is called many times with the same header
       tab - table array
       columns - string giving column names, or vector giving
               column numbers (beginning with 1).  If string
               supplied then column names should be separated by comma's.
       rows - (optional) vector of row numbers to print.  If
               not supplied or set to scalar, -1, then all rows
               are printed.
Output Parameters
       None
Optional Input Keywords
       TEXTOUT - scalar number (0-7) or string (file name) determining
               output device (see TEXTOPEN).  Default is TEXTOUT=1, output
               to the user's terminal
       FMT = Format string for print display.   If not supplied, then any
               formats in the TDISP keyword fields of the table will be
               used, otherwise IDL default formats.
System Variables
       Uses nonstandard system variables !TEXTOUT and !TEXTOPEN
       Set !TEXTOUT = 3 to direct output to a disk file.   The system
       variable is overriden by the value of the keyword TEXTOUT
Example
       tab = readfits('test.fits',htab,/ext) ;Read first extension into vars
       tbprint,h,tab,'STAR ID,RA,DEC'    ;print id,ra,dec for all stars
       tbprint,h,tab,[2,3,4],indgen(100) ;print columns 2-4 for
                                          first 100 stars
       tbprint,h,tab,text="stars.dat"    ;Convert entire FITS table to
                                         ;an ASCII file named 'stars.dat'
Procedures Used
       GETTOK(), TEXTOPEN, TEXTCLOSE, TBINFO
Restrictions
       (1) Program does not check whether output length exceeds output
               device capacity (e.g. 80 or 132).
       (2) Column heading may be truncated to fit in space defined by
               the FORMAT specified for the column
       (3) Program does not check for null values
       (4) Does not work with variable length columns
Minimum IDL Version
       V5.3 (uses STRSPLIT)
Revision History
       version 1  D. Lindler Feb. 1987
       Accept undefined values of rows,columns W. Landsman  August 1997
       Use new structure returned by TBINFO    W. Landsman  August 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Made formatting more robust    W. Landsman   March 2000
       Use STRSPLIT to parse string column listing W. Landsman July 2002
       Wasn't always printing last row   W. Landsman  Feb. 2003

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

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

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