This is a patch of the Fortran program fmodhead in
the file ftools/futils/src/fmodhead/fmodhead.f of
the HEATOOLS
http://heasarc.gsfc.nasa.gov/lheasof.../heatools.html :
to enable handling (adding/removing) HIERARCH keywords:
i)
In fmodhead.f, line 243, the comment
C if extension is 0 then give error and exit
should read
C If extension is negative then give error and exit
C Allow fitsfile[0] to address the primary header.
ii)
In fmodhead.f, near line 208, add a variable
integer kylen
iii)
In fmodhead.f, line 210, extend the size of kywrd to 72
C Maximum size of keyword (including HIERARCH), equal to FLEN_KEYWORD
C in fitsio.h
character*72 kywrd
iv)
Replace line 275 in fmodhead.f (assignment of kywrd) by
C kywrd = card(1:8)
C Call a more general parser to deal with HIERARCH keywords
call ftgknm(card,kywrd,kylen,ftstat)
To install goto BUILD_DIR and recompile with
make
make install
--
Richard J. Mathar
www.mpia.de/~mathar