Tag Archive


amateur astronomy awk bash be b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy history iraf jupiter latex linux lmc machine learning massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

Retrieve header key with gethead

A quick note on gethead of WCSTools – as I have needed many times (but obviously not that many to remember it!).

Rather straightforward use: gethead HEADER_KEY image.fits
(as simple as possibly!)
If HEADER_KEY contains empty spaces then use double quotes, e.g. “HIERARCH TEL AIRM END”.

Reminder: you have to have installed already the WCSTools! (See the “Installing WCSTools” for this.)

[Ref: WCSTools – gethead: http://tdc-www.harvard.edu/software/wcstools/gethead/gethead.html ]

IRAF’s error message 1121 with hedit

Although hedit of IRAF is supposed to handle the keywords of a fits file (add, remove) its behaviour can be misleading sometimes. An error like this:

ERROR (1121, “FXF: EOF encountered while reading FITS file (something.fits)”)

means that after altering the keywords in the header the EOF of the header has been placed wrongly. The solution is to place some dummy keywords more… but it seems to be an insisting bug.

Checking header field in IRAF

In order to get a specific field from the header of a file you can use the command:

cl> imhead inage.fit l+ | grep name_of_field

In case you want to do it for many files you just use the wildcard:

cl> imhead inage*.fit l+ | grep name_of_field

Not very sophisticated … but worked fine in my case, that I just wanted a quick eye inspection!