.help cphead Sep98 ftools.futils
.ih
NAME
cphead --  Copy keywords from one FITS header to another existing
FITS file header.
.ih
USAGE
cphead infile outfile
.ih
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.  
      
.ih
PARAMETERS
.ls infile [string]
File name and extension of the input FITS header. 
.le
.ls outfile [string]
File name and extension of the output FITS header. 
.le
.ls (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.
.le
.ls (scale = no)  [boolean]
Should the scale-related keywords be copied? 
.le
.ls (comment = yes) [boolean]
Should the COMMENT and blank keywords be copied?  
.le
.ls (history = yes) [boolean]
Should the HISTORY keywords be copied? 
.le
.ih
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   

.fi
.ih
BUGS
   None.
.ih
SEE ALSO
ftlist, fthedit, heatools
.endhelp
