ftconvert - Convert a fits table into a Relational Data Base (RDB) ASCII format table.


ftconvert infile[ext] outfile columns rowranges


Convert a FITS table into the ASCII text format used by the Relational Data Base (RDB) software system. Other output format options may be added in the future. The RDB format uses the ASCII TAB character to separate columns, and each row is terminated with a NEWLINE character. The header (the first few lines of the file) contains descriptive information about each column. The entire input table is converted by default, but a limited set of columns and row ranges may also be specified.


infile [filename]
Input file name and optional extension name or number enclosed in square brackets of the table to be converted (e.g., 'file.fits[events]'). If an explicit extension is not specified, then the first 'interesting' table in the input file will be converted, i.e., the first table extension that is not a GTI (Good Time Interval) extension.

outfile [filename]
Output file name for the RDB format file. If it is '-' the outfile is sent to the STDOUT stream.

columns [string list]
A comma separated list of the column names (or numbers) to export. If it is '-' all columns are exported.

rowrange [string list]
A comma separated list of the row ranges, for an example, '2,5-10,20-30'. If it is '-' all rows are exported.

(format = "rdb") [output format]
Only "rdb" format is currently supported.

(clobber = NO) [boolean]
If outfile already exists, then setting 'clobber = yes' will cause it to be overwritten.

(history = NO) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the output file. (This is not currently implemented for the rdb format)


Note that when commands are issued on the Unix command line, strings containing special characters such as '[' or ']' must be enclosed in single or double quotes.

1. Convert the input 'events' table into a rdb table.

      ftconvert 'in.fits[events]' out.fits - -
2. Export the X column and Y column and rows 2-10 into a rdb table.

      ftconvert in.fits[events]' out.fits X,Y 2-10


fv, the interactive FITS file editor, can also be used to export FITS tables into a text file.


September 2006