Should you wish to write a new value without knowing about FITS, or in a script where manual editing is undesirable, the FITSWRITE command does the job. So for example,
% fitswrite myndf filter value=K
will create a keyword FILTER with value K in the FITS extension of the NDF called myndf. If the extension does not exist, this command will first create it.
The FITSMOD command has several editing options including the ability to delete a keyword:
% fitsmod myndf airmass edit=delete
here it removes the AIRMASS header; or rename a keyword:
% fitsmod myndf band rename newkey=filter
as in this example, where keyword BAND becomes keyword FILTER; or update an existing keyword:
% fitsmod myndf filter edit=u value=\$V comment='"Standard filter name"'
this example modifies the comment string associated with the FILTER keyword, leaving the value unchanged.
For routine operations requiring many operations on a dataset, FITSMOD lets you specify the editing instructions in a text file.
KAPPA --- Kernel Application Package