Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem with imal2

 
Post new topic   Reply to topic    iraf.net Forum Index -> Applications
View previous topic :: View next topic  
Author Message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Thu Jul 14, 2011 6:45 pm    Post subject: problem with imal2 Reply with quote

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
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Fri Jul 15, 2011 5:36 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Fri Jul 15, 2011 4:44 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rwatkins77



Joined: 07 Jun 2011
Posts: 9
Location: Willamette University

PostPosted: Fri Jul 15, 2011 4:57 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Sat Jul 16, 2011 5:37 am    Post subject: Reply with quote

Yes, just uncomment (i.e. remove the leading '#') the setting in your login.cl file and change the value to make the change permanent.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Applications All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 1.45 seconds