NAME

ftappend - Append a copy of an HDU from one file onto another file.

USAGE

ftappend infile[ext][filters] outfile

DESCRIPTION

Append a copy of the input HDU onto the end of the output file. If a FITS primary array is copied, it will be converted to a FITS IMAGE extension in the output file. The input HDU may be modified with optional filtering specifiers.

PARAMETERS

infile [filename]
Input file name and optional extension name or number enclosed in square brackets of the HDU to be copied (e.g., 'file.fits[0]' or file.fits[events]'). If an explicit extension is not specified, then the first 'interesting' HDU in the input file will be copied, i.e., the first non-null image HDU, or the first table extension that is not a GTI (Good Time Interval) extension. Additional filter specifications can be appended to the file name, also enclosed in square brackets, to create a virtual HDU which is than appended to the output file, as shown in the examples.

outfile [filename]
Name of existing output FITS file. The input HDU will be appended to the end of the output file.

(chatter = 1) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 5 will produce detailed diagnostic output, otherwise this task normally does not write any output.

(history = NO) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the copied HDU to record the value of all the ftappend task parameters that were used to produce the output file.

EXAMPLES

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. Append a copy of the EVENTS extension in the input file onto the end of the output file.

      ftappend 'in.fits[events]' out.fits
2. Append a copy of the first 'interesting' HDU in the input file onto the end of the output file.

      ftappend in.fits out.fits
3. Create a virtual EVENTS table extension containing only those rows that have a XSKY column value greater than 50, and append it to the end of the output file.

      ftappend 'in.fits[events][xsky > 50]' out.fits
4. Create a virtual 2-D FITS image by binning the X and Y columns (with a bin size = 30)in the EVENTS table extension, and then append that virtural image onto the end of the output file.

      ftappend 'in.fits[events][bin (X,Y)=30]' out.fits

SEE ALSO

ftcopy, ftdelhdu, ftlist, ftmerge, ftpaste, filenames, imfilter, colfilter, rowfilter, binfilter

fv, the interactive FITS file editor, can also be used to cut and paste FITS HDUs from one file to another.

The design of this task is based on the fappend task in the ftools package and the CXC dmappend task.

LAST MODIFIED

March 2002