Adding comments and history information to FITS headers
joel wrote on Feb 15, 2007
Howdy,
In some of my cl scripts, I would like them to be able to add COMMENT and HISTORY lines to a FITS header. I would also like to add comment fields after keywords (e.g., KEYWORD = VALUE / comment). I can't seem to find a syntax for HEDIT that will work, or any other task that will do the trick. I'm stumped.
jp
In some of my cl scripts, I would like them to be able to add COMMENT and HISTORY lines to a FITS header. I would also like to add comment fields after keywords (e.g., KEYWORD = VALUE / comment). I can't seem to find a syntax for HEDIT that will work, or any other task that will do the trick. I'm stumped.
jp
Mike Fitzpatrick wrote on Feb 15, 2007
Hi Joel,
This is a feature that's been asked for over the years that we never got around to implementing, but I'll add it to the list for the final V2.13 release work. While it can't be done directly with HEDIT, the HFIX task will by default put you in a text editor where you can manually edit the header, or it can run an arbitrary command that could automatically process the header (e.g. using an awk/sed script of some kind). Another approach if you just want to add keywords in bulk is the MKHEADER task in the ARTDATA package. Note the IMFORT interface does allow you to add a comment to new keywords, so a small imfort task will also do the trick.
-Mike
This is a feature that's been asked for over the years that we never got around to implementing, but I'll add it to the list for the final V2.13 release work. While it can't be done directly with HEDIT, the HFIX task will by default put you in a text editor where you can manually edit the header, or it can run an arbitrary command that could automatically process the header (e.g. using an awk/sed script of some kind). Another approach if you just want to add keywords in bulk is the MKHEADER task in the ARTDATA package. Note the IMFORT interface does allow you to add a comment to new keywords, so a small imfort task will also do the trick.
-Mike
Last post on Feb 15, 2007