Welcome to iraf.net Saturday, May 11 2024 @ 11:57 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 Adding tasks in IRAF
   
JediWill
 06/29/2006 09:28PM (Read 5469 times)  
+----
Newbie

Status: offline


Registered: 06/23/2006
Posts: 13
Hello everybody,I am trying to add a task into my login.cl file. I am putting the following after all the other tasks: task $varstar5 = "$home/Will/varstar5"When I do this, it kills iraf and tells me I need to rerun mkiraf. So, I guess my question is, what is the proper way to add a task? Or is there something I am missing?thanks
William

 
Profile Email
 Quote
fitz
 06/29/2006 09:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
"$home/foo" is a unix shell variable pathname, "home$foo" is an iraf logical pathname where 'home$" refers to your iraf login directory (i.e. the directory with the login.cl). You'll need to use the latter syntax if you don't give a full pathname.Note the '$' before the taskname on the left of the '=' indicates the task has no parameters, all task definitions belong before the final 'keep' statement in the login.cl but more properly things like this belong in a loginuser.cl file (again w/ keep as the last line) and will automatically become part of the 'user' package defined in the login.cl along with foreign commands like 'ls'.-Mike

 
Profile Email
 Quote
JediWill
 06/29/2006 09:28PM  
+----
Newbie

Status: offline


Registered: 06/23/2006
Posts: 13
Ok, I am trying the loginuser.cl file. So far I have created this:# loginuser.clset varstar = "/home/Will/"
task $varstar5 = varstar$varstar5keepBut CL still dies when I try to use this. Any ideas?Thanks
-William

 
Profile Email
 Quote
fitz
 06/29/2006 09:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
You can type those commands in at the cl prompt to verify that they work as expected, they look fine and [i:fdd969c9cf]should[/i:fdd969c9cf] work. Assuming its something else, you can also put the command "d_trace" at the top of your login.cl file to find out what in particular is making it fail, e.g. it could be a typo in the hlib$extern.pkg file for instance, or you accidently changed something elsewhere in the file.Please post the d_trace output (just the last bit) if this doesn't help, and also trying doing a new MKIRAF to recreate your login.cl file.-Mike

 
Profile Email
 Quote
JediWill
 06/29/2006 09:28PM  
+----
Newbie

Status: offline


Registered: 06/23/2006
Posts: 13
I think I found what par of the problem is. The task is a program that works alright on a pure linux machine, but when I copy over to my laptop (which is running Cygwin), it sees it as just a file. When I try to run it or use it, IRAF tells my that it cannot execute binary file. So, any ideas to get it to work? I have the source file for the program.
Thanks
William

 
Profile Email
 Quote
fitz
 06/29/2006 09:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
What kind of program is it? If it is a compiled binary you'll need to recompile from source under Cygwin, if it is a e.g. perl script task you may need to adjust the path to perl in the file, or else just make it exectable (e.g. "chmod 755 varstar5"). In any case, make sure it works outside of IRAF first.However, this shouldn't have anything to do with the task declaration failing unless you're actually trying to also run the program from the login.cl. ???-Mike

 
Profile Email
 Quote
JediWill
 06/29/2006 09:28PM  
+----
Newbie

Status: offline


Registered: 06/23/2006
Posts: 13
HI

I think I got everything to work now. I was able to get the source code and recompiled it, and when I put it into the folder that has my files, it worked just fine. So I am ready to go. I still have the same error when I try to change my login.cl file, no matter what I try to change, but I have worked around that.
And thanks for all of you help over the last few weeks on all of the problems I have been having. Thanks
- William

 
Profile Email
 Quote
   
Content generated in: 0.25 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login