problem with imal2
Richard Watkins wrote on Jul 14, 2011
Hi,
I am trying to use imal2 from the vaphot package. I have the variable shifts set to a filename ("shifts.dat") and I have updates=yes. However, when I run imal2 I always get the following error:
ERROR: cannot open `shifts.dat' for writing
"print (xshift, " ", yshift, >& shiftfile)"
line 127: /iraf/iraf/clscripts/imal2.cl
called as: `imal2 ()'
Any ideas as to what is going wrong?
Thanks,
Rick
I am trying to use imal2 from the vaphot package. I have the variable shifts set to a filename ("shifts.dat") and I have updates=yes. However, when I run imal2 I always get the following error:
ERROR: cannot open `shifts.dat' for writing
"print (xshift, " ", yshift, >& shiftfile)"
line 127: /iraf/iraf/clscripts/imal2.cl
called as: `imal2 ()'
Any ideas as to what is going wrong?
Thanks,
Rick
Mike Fitzpatrick wrote on Jul 14, 2011
The message generally means that either you don't have write permission in the current directory to create a new file, or else 'shifts.dat' already exists and you are trying to overwrite it. If you meant to append, use the ">>" operator (I realize you didn't write the script), otherwise you can set the 'clobber' variable to allow overwriting existing files.
Richard Watkins wrote on Jul 14, 2011
Thanks. I deleted the file shifts.dat. Now the script calculates the first shift, creates shifts.dat and writes the shift to the file. However, when it gets to the next shift, since the file exists, it runs into the same "cannot open file "shifts.dat" for writing.
I checked and I have the noclobber variable set to "off".
I'm having trouble finding the meaning of the >& operator. Can I change the operator so that it will overwrite the file?
I can't use the append operator >> since looking at the script I think it calls imshift on one image at a time, so the file always needs to have one line.
I checked and I have the noclobber variable set to "off".
I'm having trouble finding the meaning of the >& operator. Can I change the operator so that it will overwrite the file?
I can't use the append operator >> since looking at the script I think it calls imshift on one image at a time, so the file always needs to have one line.
Richard Watkins wrote on Jul 14, 2011
I found the cl variable clobber, reset it to "yes" and now imal2 works fine.
Is it reasonable to put the
reset clobber=yes
line into my login.cl?
Thanks for your help
Is it reasonable to put the
reset clobber=yes
line into my login.cl?
Thanks for your help
Mike Fitzpatrick wrote on Jul 14, 2011
Yes, just uncomment (i.e. remove the leading '#') the setting in your login.cl file and change the value to make the change permanent.
Last post on Jul 14, 2011