NAME

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

USAGE

ahfilecaldb infile outfile

DESCRIPTION

This Perl script creates a FITS file with one or more extensions from a set of text files containing the data and the table definitions. The FITS file may have multiple extensions. This script uses the ftool ftcreate to create the output FITS file.

PARAMETERS

infile [filename]
Input ASCII text file listing the file names of other set(s) of ASCII files that populate the FITS file. Each row contains files that go into one extension. Each row should consist of three strings, specifying (in order) the data file name, the column definition file name, and the header file name, 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 name of each column in the data file, and its data type. For example:
         PAR                        2A
         COEF0                      1E
         COEF1                      1E
         COEF2                      1E
         COEF3                      1E
    
For each row in the column definition file, there is a corresponding column in the data file. For example:
         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. For example:
         EXTNAME   'PSF_COEF'       / Name of this binary table extension
         TELESCOP  'SWIFT   '       / Telescope (mission) name
         INSTRUME  'XRT     '       / Instrument name
    

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

(cleanup = yes) [boolean yes|no]
Delete temporary files.

(clobber = no) [boolean yes|no]
Overwrites the existing output file if set to yes.

(chatter = 1) [integer 0|1|2|3]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

(debug = no) [boolean yes|no]
Diagnostic output is printed to the screen if set to yes.

(history = yes) [boolean yes|no]
Records tool parameters in HISTORY.

EXAMPLES

  1. Create a CALDB file for PSF coefficients. The file has two extensions.
       ahfilecaldb 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

ftcreate

LAST MODIFIED

February 21, 2024