Adding tasks in IRAF
William J Gray wrote on Jun 29, 2006
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
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
Mike Fitzpatrick wrote on Jun 29, 2006
"$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
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
William J Gray wrote on Jun 29, 2006
Ok, I am trying the loginuser.cl file. So far I have created this:
# loginuser.cl
set varstar = "/home/Will/"
task $varstar5 = varstar$varstar5
keep
But CL still dies when I try to use this. Any ideas?
Thanks
-William
# loginuser.cl
set varstar = "/home/Will/"
task $varstar5 = varstar$varstar5
keep
But CL still dies when I try to use this. Any ideas?
Thanks
-William
Mike Fitzpatrick wrote on Jun 29, 2006
You can type those commands in at the cl prompt to verify that they work as expected, they look fine and should 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
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
William J Gray wrote on Jun 29, 2006
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
Thanks
William
Mike Fitzpatrick wrote on Jun 29, 2006
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
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
William J Gray wrote on Jun 29, 2006
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
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
Last post on Jun 29, 2006