A workaround for the problems of using fmodhead with HIERARCH keywords
is a re-implementation (based on CCfits) that I called fedithead, available
as
www.mpia.de/~mathar/progs/fedithead.tar.gz . It uses the boost::regexp
package to allow block replacements, and ensures that the
keywords that are to be replaced and their new versions are
set apart by separating the two strings by colons.
Richard Mathar