NAME

cphead -- Copy keywords from one FITS header to another existing FITS file header.


USAGE

        cphead infile outfile

DESCRIPTION

This task copies keywords from one FITS header to another existing FITS file header. If a keyword already exists in the second FITS file, its value and comment will be updated with the values from first FITS file.

The following basic FITS keywords are normally not copied: "SIMPLE", "BITPIX", "NAXIS", "EXTEND", "XTENSION", "PCOUNT", "GCOUNT", "TFIELDS", "TTYPE", "TBCOL", "TFORM", "TUNIT", "THEAP", "TDIM", "GROUPS", "DATASUM", "CHECKSUM", and "END".

The scale related keywords ("TSCAL", "TZERO", "TNULL", "TDISP", "BSCALE", "BZERO", "BUNIT", "BLANK", "CTYPE", "CRPIX", "CROTA", "CRVAL", "CDELT", "TLMIN", "TLMAX", "OPTIC", "TCRPX", "TCRVL", "TCDLT", "TCTYP", "TCD", "TCROT"and "PLTSCL") are only copied or updated if SCALE = YES.

An optional list of other keywords that should or should not be copied can be supplied with the KEYFIL parameter.


PARAMETERS

infile [string]
File name and extension of the input FITS header.

outfile [string]
File name and extension of the output FITS header.

(keyfil = "") [string]
Optional text file containing a list of keywords, one per line, that should or should not be copied. The names of keywords that must not be copied are preceeded by an exclamation point (!). The other listed keywords will be copied, regardless of whether they are one of the basic or scale keywords listed above.

(scale = no) [boolean]
Should the scale-related keywords be copied?

(comment = yes) [boolean]
Should the COMMENT and blank keywords be copied?

(history = yes) [boolean]
Should the HISTORY keywords be copied?


EXAMPLES

1. Copy a header from infile[2] to outfile[1]

             ft> cphead infile+2 outfile+1 

2. Copy a header from infile[2] to outfile[1] and use a keywords list file key.lis.

             ft> cphead infile+2 outfile+1 keyfil=key.lis   

BUGS

None.


SEE ALSO

ftlist, fthedit, heatools

CATEGORY

Sep98 ftools.futils