View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

image template expansion

Phil Hodge wrote on Mar 02, 1999

A user created an ascii file containing a one column list of strings,
and then tried to run an IRAF task (e.g. imheader) using the following
syntax:

imheader @visit1//_crj.fits[sci,1]
o45002080_crj.fits[sci,1]: Cannot open image (o45002080_crj.fits[sci,1])

The peculiar thing is that the image names were expanded correctly
(i.e. o45002080_crj.fits[sci,1] exists and is an image), but imheader
couldn't handle the name when gotten in this way.  This was using
IRAF version 2.11, but I got the same result using IRAF 2.11.1 when
there was only one FITS file in the directory:

hs> type visit1
o3sx01akr

hs> dir o3sx01akr*
o3sx01akr_flt.fits

hs> imheader "@visit1//_flt.fits[sci,1]"
o3sx01akr_flt.fits[sci,1]: Cannot open image (o3sx01akr_flt.fits[sci,1])

hs> imheader o3sx01akr_flt.fits[sci,1]
o3sx01akr_flt.fits[sci,1][1024,1024][real]:

When there were FITS files in the directory with other suffixes, the
names were expanded differently (*.fits, not just _crj.fits), and the
"[sci,1]" was missing, so the error message from imheader was that the
extension needed to be specified.

My question is why did this syntax (@visit1//_crj.fits[sci,1]) work
at all, and given the partial success, why didn't it work correctly?
It's a good idea, it seems to me, for an extension to the image and
filename template expansion functions, and if it almost works, maybe
it wouldn't be too hard to make it really work.

Phil

Last post on Mar 02, 1999