View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

rfits

Cold wrote on Mar 13, 2008

hi,
i changed the fits file extentions to .imh with the command
rfits *.fit "" junk old+
and now i need to chage this .imh files to fits again. what do i have to write?

thanks for your help

Francisco Valdes wrote on Mar 13, 2008

Hi,

You can use


imcopy junk.imh newfile.fits


While it is possible to use the same root name in two formats it is strongly not recommended because of the possiblity of confusion.

Yours,
Frank Valdes

Cold wrote on Mar 13, 2008

hi again,
it's ok with 1 frame but i wrote the command
cl>imcopy hkv1*.imh hkv1*.fit
ERROR: Number of input and output images not the same
as i read in the help section for coping several images you have to write
cl>imcopy image1,image2,image3 a,b,c
but i have to change 250 imh images' parameters to fit.
What do i have to do?
thanks for your help

Mike Fitzpatrick wrote on Mar 13, 2008

You get the message because the 'hkv1*.imh" expands automatically to the list of existing files, but 'hkv1*.fit" doesn't exist yet and so is empty. You can actually change this on the fly using the '%' edit operator. For example

cl> imcopy hkv1*.imh hkv1*.%imh%fits%


This expands the list of .imh filenames but edits the 'imh' for 'fits' to change the extension and thus copy the image.

Note Frank's caution: You'll now have both an 'hkv1.imh' and 'hkv1.fits' in the same directory and so referring to an image simply as 'hkv1" will be ambiguous (you'll see an error). Once you do the copy, move the .fits files or "imdel *.imh" to delete all the .imh images.

Cheers,
-Mike

Last post on Mar 13, 2008