View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Updating image header

rohit wrote on Mar 12, 2008

I would like to update the image header and I have 5 things to update. I use the HEDIT command to do that, but it is tidious to use the command five times for each file. Is there a way to update all of the 5 things using just one command? That will make it quicker as I have over 50 files to update!

Please help!

Thanks

Mike Fitzpatrick wrote on Mar 12, 2008

Two options: You could write a script to automate it (see http://iraf.net/irafdocs/script/) and create your own command, or see the HFIX task as a way you can fun an arbitrary command (e.g. a host awk/perl script) on the header as if it were a text file. Most likely, creating your own script is the easiest solution.

-Mike

rohit wrote on Mar 12, 2008

Thanks Mike for your quick response. If you do not have time to read through the scripts manual, there is a third option which I just found out. If all of the files require the same information to be input-ed then simply do the following:

hedit *.fits xxx "yyyy"

where x,y is the information that you wish to add to the header. :-) Of course if you have 5 things to add, then you will need to repeat the same command 5 times....this is better than repeating each command 5n times for n files! But scripting would work much better of course

Rohit

Last post on Mar 12, 2008