idlastro / FITS I/O: SXDELPAR

[Source code]

NAME
SXDELPAR
PURPOSE
Procedure to delete a keyword parameter(s) from a FITS header
CALLING SEQUENCE
sxdelpar, h, parname
INPUTS
h - FITS or STSDAS header, string array
parname - string or string array of keyword name(s) to delete
OUTPUTS
h - updated FITS header, If all lines are deleted from 
        the header, then h is returned with a value of 0
EXAMPLE
Delete the astrometry keywords CDn_n from a FITS header, h
IDL> sxdelpar, h, ['CD1_1','CD1_2','CD2_1','CD2_2']
NOTES
(1)  No message is returned if the keyword to be deleted is not found
(2)  All appearances of a keyword in the header will be deleted
HISTORY
version 1  D. Lindler Feb. 1987
Test for case where all keywords are deleted    W. Landsman Aug 1995 
llow for headers with more than 32767 lines W. Landsman Jan. 2003
se ARRAY_EQUAL, cleaner syntax  W. L.  July 2009
-----------------------------------------------------------------
convert parameters to string array of upper case names of length 8 char
umber of lines in header array
osition in compressed header with keywords removed
loop on header lines
eep it
ncrement number of lines kept
nd of header
runcate