JediWill |
06/29/2006 09:28PM (Read 5469 times)
|
|
|
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
|
|
|
|
fitz |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|
JediWill |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|
fitz |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|
JediWill |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|
fitz |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|
JediWill |
06/29/2006 09:28PM
|
|
|
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
|
|
|
|