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.
data.dat column_def.txt header.txtThe 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 1EFor 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-07The 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
ahfilecaldb.pl in.txt out.fitsThe 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