Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Thu Jul 14, 2011 6:45 pm Post subject: problem with imal2
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 ()'
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.
Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Fri Jul 15, 2011 4:44 pm Post subject:
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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum