faddcol -- copies a list of columns from one FITS table extension to another.
faddcol infile colfile colname
This task copies a specified list of columns from one FITS binary or ASCII table to another. The 2 FITS tables must be of the same type (ASCII or binary) and have the same number of rows. The input target file is updated in place so it would be prudent to make a copy of the input file before running this task, in the event that it does not complete successfully and leaves the file in a corrupted state.
This task supports all the defined data types of FITS columns, including vector columns, but does not currently support variable-length vector columns. The standard column descriptor keywords in the header are also copied along with the column itself. This includes the following keywords: TNULL, TSCAL, TZERO, TUNIT, TDISP, TDIM, TLMIN, TLMAX, TDMIN, TDMAX, TCTYP, TCUNI, TCRPX, TCRVL, TCDLT, and TCROT. Any other relevant keywords can be copied separately (e.g., using the FKEYPAR and FPARKEY tasks in the ftools package).
Optionally, this task will write a HISTORY keyword recording the name of the file from which the column(s) were copied. Also, if the DELKEY parameter is set = true, then this task will delete any keywords with the same name as the added columns. This is provided to help support the 'Greenbank convention' which does not allow columns and keywords to have the same name.
1. The columns named time, x, and y will be copied from the first extension in the file col.fits to the first extension in the file target.fits. faddcol target.fits col.fits time,x,y
2. All the column in the first extension in the file col.fits, except the 'time' column will be copied to the 3rd extension in the file target.fits. faddcol target.fits col.fits -time
This task currently only supports character string columns that are up to 1024 characters wide. Variable-length vector columns in binary tables are not supported.
ftpaste, ftcopy, ftlist. fv, the interactive FITS file editor, can also be used to copy table columns.