Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HIERARCH keywords with fmodhead of HEATOOLS

17 views
Skip to first unread message

mathar

unread,
Oct 1, 2012, 1:30:01 PM10/1/12
to
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/lheasoft/ftools/headas/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

mathar

unread,
Oct 30, 2012, 5:00:38 PM10/30/12
to
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

Christian Froeschlin

unread,
Oct 31, 2012, 11:58:15 AM10/31/12
to
From what I understand, sci.astro.fits is mostly abandoned
for being "obsolete" and active discussions are conducted via
fitsbits - which is a mailing list, of all things ... ;)

http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits
0 new messages