NAME

ahfilecaldb - create a FITS file from a set of text files

USAGE

ahfilecaldb.pl infile outfile

DESCRIPTION

This script provides a tool that creates a FITS file with one or more extensions from a set of text files containing the data and table definition. The FITS file may have multiple extensions. This script used the ftool ftcreate to create the output FITS file.

PARAMETERS

infile [file]
Input ASCII text file listing the filenames of other set(s) of ASCII files that populates the FITS file. Each row contains files that go into one extension. Each row should consist of three strings, specifying (in order) the data filename, the column definition filename, and the header filename, delimited by spaces:
         data.dat column_def.txt header.txt
    
The files must be in the same format as specified in the help for ftcreate.

The column definition file specifies the commodity of each column in the data file, and its data type:
         PAR                        2A
         COEF0                      1E
         COEF1                      1E
         COEF2                      1E
         COEF3                      1E
    
For each row in the column definition file, there corresponds one column in the data file:
         P0    1.6419760E+00   6.9057592E-04  -2.8387581E-03  -1.5602625E-05
         P1    2.7251086E+00   4.8774816E-03  -2.9882593E-03  -7.2517512E-05
         P2    1.3079076E+00   1.1485046E-03  -2.9651825E-03   1.1986124E-04
         P3    3.2381654E-01   3.2554791E-04  -2.2113894E-03   8.9718503E-07
    
The header file contains the keyword name, the keyword value, and the keyword description:
         EXTNAME   'PSF_COEF'       / Name of this binary table extension
         TELESCOP  'SWIFT   '       / Telescope (mission) name
         INSTRUME  'XRT     '       / Instrument name
    

outfile [file]
The name of the output fits file that contains all the extensions created from the data and definitions in the infile.

(clobber = NO) [boolean]
Overwrite existing output file (YES, NO)

(chatter = 1) [integer]
Chatter level for output

(logfile = !DEFAULT) [string]
Output log file (DEFAULT, NONE; '!' to clobber)

(debug = NO) [boolean]
Enable debug mode (YES, NO)

(history = YES) [string]
Record tool parameters in HISTORY (YES, NO)

(mode = ql) [string]
Mode of automatic parameters

EXAMPLES

  1. Create a CALDB file with PSF coefficients. The file has two extensions.
               ahfilecaldb.pl in.txt out.fits
          
    The file in.txt contains:
               input/data_psf.txt input/dd_psf.txt input/head_psf.txt
               input/data_2.txt input/dd_psf.txt input/head_psf.txt
          

SEE ALSO

LAST MODIFIED

Jan 5, 2015