[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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



Table of Contents




Introduction

This directory contains IDL procedures for reading and writing FITS ASCII tables, and for reading FITS binary tables. The procedures each have one of three different prefixes; either FTAB*, TB*, or FT*. The TB* and FT* procedures, which are somewhat lower level, manipulate binary or ASCII table arrays, respectively, *after* these array have already been read with a program such as READFITS(). The FTAB* procedures operate directly on a FITS file and can be used with either binary or ASCII tables.

The procedures in this directory cannot be used to write any type of binary table, or to read a variable length binary table. Users who need to these task should either use Bill Thompson's binary table software in the fits_bintable directory, or Tom McGlynn's MRDFITS()/MWRFITS software to convert between FITS tables and IDL structures.

Below is an example session, showing the use of the FTAB_* procedures with a FITS file rosat.fits containing two table extensions:

;Describe FITS binary table, first (default) extension
IDL> ftab_help,'rosat.fits'        
                                   
;FITS Binary Table Header
;Size of Table Array: 20 by 89
;Extension Name:   AVGBKS  
; 
;Field      Name       Unit      Frmt   Null    Comment
; 
;  1 SECT_START_TIME     SECS      1D            
;  2 SECT_STOP_TIME     SECS       1D            
;  3 AVGBK_IN_SEC    CNTS/PIX2/SE  1E            

;Extract columns 1 and 3 
IDL> ftab_ext,'rosat.fits',[1,3],start,avg    

;Extract second column, first 50 rows only
IDL> ftab_ext,'rosat.fits','sect_stop_time',stop,rows =indgen(50)

;Print second extension w/default formats
IDL> ftab_print,'rosat.fits',ext=2    

;Copy the FITS file, but delete first 10 rows from the first extension
IDL> ftab_delrow,'rosat.fits',new='new.fits',indgen(10)
To use the lower level procedures, that table data and header must first be read into IDL variables. For example, to read the first table extension of the FITS file test.fits into a table array, tab, and header, htab:
IDL> tab = readfits( 'test.fits', h, /EXTEN)
IDL> vector = tbget(h, tab, 'VECTOR')      ;Extract column named "VECTOR"
The LaTeX file FT.TEX gives some documentation on the use of these lower-level procedures.

The procedures FTAB_HELP, FTAB_PRINT, FTHELP, FTPRINT, TBPRINT, and TBHELP use the non-standard system variables !TEXTOUT and !TEXTUNIT. These can be added to one's session using the procedure ASTROLIB.



Index of Subroutines

FTAB_DELROW Delete rows of data from a FITS ASCII or binary table extension
FTAB_EXT Routine to extract columns from a FITS (binary or ASCII) table.
FTAB_HELP Describe the columns of a FITS binary or ASCII table extension.
FTAB_PRINT Print the contents of a FITS (binary or ASCII) table extension.
FTADDCOL Routine to add a field to a FITS ASCII table
FTCREATE Create a new (blank) FITS ASCII table and header with specified size.
FTDELCOL Delete a column of data from a FITS table
FTDELROW Delete a row of data from a FITS table
FTGET Function to return value(s) from specified column in a FITS ASCII table
FTHELP Routine to print a description of a FITS ASCII table extension
FTHMOD Procedure to modify header information for a specified field in a FITS table.
FTINFO Return an informational structure from a FITS ASCII table header.
FTKEEPROW Subscripts (and reorders) a FITS table. A companion piece to FTDELROW.
FTPRINT Procedure to print specified columns and rows of a FITS table
FTPUT Procedure to add or update a field in an FITS ASCII table
FTSIZE Procedure to return the size of a FITS ASCII table.
FTSORT Sort a FITS ASCII table according to a specified field
TBDELCOL Delete a column of data from a FITS binary table
TBDELROW Delete specified row or rows of data from a FITS binary table
TBGET Return value(s) from specified column in a FITS binary table
TBHELP Routine to print a description of a FITS binary table header
TBPRINT Procedure to print specified columns & rows of a FITS binary table
TBSIZE Procedure to return the size of a FITS binary table.

Last modified by pro2html on 2008 November 09 at 04:12 UTC

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

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