View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

imcopy cannot open image

manolis.r wrote on May 13, 2014


Can anyone help me?

I am using imcopy to make cutouts of a large image. The problem is that if I use a file (e.g. image_in) in the input keyword it can't read the image.

The parameters I am using are:

input = @image_in

output = @image_out

verbose = yes

The "image_in" file is a text file containing one line: image.fits[111:222,333:444]

The "image_out" file is a text file containing one line: ouFile.fits

The message I get is: ERROR: cannot open image (image.fits[111:222,333:444])

What makes it more strange is that if I have "image.fits[111:222,333:444]" as input and "ouFile.fits" as output, i.e. if I don't go through the text files it runs fine. I know I can just skip this step, but the whole thing is part of a script and it is not that easy...

Any help is welcome...

Mike Fitzpatrick wrote on May 13, 2014



Try first doing:

cl> reset use_new_imt = no

Depending on your iraf version you may be seeing a bug in the new image template code, you example appears to work fine in the latest release. The above command reverts to the old template code.


manolis.r wrote on May 13, 2014


Thanks, it works now!

Life is good again :-)

Last post on May 13, 2014