How to load a user defined task ?
smp wrote on Aug 07, 2009
Hi,
(1)
I have my own task (i.e. a procedure script) named as "new".
To use this task, I declare it in "ccdred" package as:
But when I "bye" from "ccdred", my task "new" disappears from the menu of this "ccdred" package.
(2)
To load my task "new" permanently, the following command I added in my login.cl file:
/swapnil/my_data/ is the location of the procedure script.
Firstly, I want to know whether above command is correct.
Then I gave following command (after loading "ccdred" as my task contains two tasks from this package):
Then I got error message :
Please tell how to load my task permanently , so that I can use it without declaring it everytime on cc> prompt, as is done in (1) above.
Regards
smp
(1)
I have my own task (i.e. a procedure script) named as "new".
To use this task, I declare it in "ccdred" package as:
cc > task new = new.clBut when I "bye" from "ccdred", my task "new" disappears from the menu of this "ccdred" package.
(2)
To load my task "new" permanently, the following command I added in my login.cl file:
task $new = "/swapnil/my_data/$new.cl"/swapnil/my_data/ is the location of the procedure script.
Firstly, I want to know whether above command is correct.
Then I gave following command (after loading "ccdred" as my task contains two tasks from this package):
cc > epar newThen I got error message :
ERROR: task `news' has no param file
eparam (new)
Please tell how to load my task permanently , so that I can use it without declaring it everytime on cc> prompt, as is done in (1) above.
Regards
smp
Christopher Gerardy wrote on Aug 07, 2009
Hi smp,
I believe that you're close with your login.cl edit, but you probably want to remove one or both of the $ in your task command. If your new task has no parameters, then you want to keep the first $.
ie:
for a task without parameters or
for a task with parameters.
The $ in the path is usually a reference to a predefined alias for a path. (tables$ standing in for the location of the tables package for example.)
edit:
The behavior with respect to epar is because you have told iraf that it's a task without parameters. If you have parameters to edit, then you want the $-less version.
I believe that you're close with your login.cl edit, but you probably want to remove one or both of the $ in your task command. If your new task has no parameters, then you want to keep the first $.
ie:
task $new = "/swapnil/my_data/new.cl"for a task without parameters or
task new = "/swapnil/my_data/new.cl"for a task with parameters.
The $ in the path is usually a reference to a predefined alias for a path. (tables$ standing in for the location of the tables package for example.)
edit:
The behavior with respect to epar is because you have told iraf that it's a task without parameters. If you have parameters to edit, then you want the $-less version.
smp wrote on Aug 07, 2009
Hi gerardy,
My IRAF task "new" has parameters.
So I tried, as you said:
But it did not help.
When I went to "ccdred" package and gave the command, "cc> epar new", error message was :
I did not give this time following command (in ccdred package):
regards
smp
My IRAF task "new" has parameters.
So I tried, as you said:
task new = "/swapnil/my_data/new.cl"But it did not help.
When I went to "ccdred" package and gave the command, "cc> epar new", error message was :
cc> epar new
ERROR: task `new' has no param file
eparam (new)
I did not give this time following command (in ccdred package):
cc > task new = new.cl regards
smp
Mike Fitzpatrick wrote on Aug 07, 2009
Tasks defined in the loginuser.cl file will become part of the 'user' package, if you define them in your login.cl they'll be part of whatever the current package is (i.e. it depends where in the file you define the task). In either case, it is critical that the task definition come *before* the 'keep' statement that should be the last line of the file.
A 'param not found' error usually indicates a path problem but if you change the task definition from one that used a '$' to indicate no params to another that says you have params (or vice versa), you should unlearn the task to remove any memory about parameters from the uparm file. If there had been a problem with the task not being defined properly you would normally see a 'task not found' error. If the unlearn doesn't work, double-check the path (e.g. is there an NFS mount-point you need to include?).
-Mike
A 'param not found' error usually indicates a path problem but if you change the task definition from one that used a '$' to indicate no params to another that says you have params (or vice versa), you should unlearn the task to remove any memory about parameters from the uparm file. If there had been a problem with the task not being defined properly you would normally see a 'task not found' error. If the unlearn doesn't work, double-check the path (e.g. is there an NFS mount-point you need to include?).
-Mike
smp wrote on Aug 07, 2009
Hi ,
(1) I do not have loginuser.cl file. So, how I will define my task permanently?
(2) How to load a particular IRAF task at the time of login?
In my login.cl file, I have:
I want to add "zerocombine " and "flatcombine" tasks to be loaded at the time of login. So I added "ccdred" as :
Then I got the error saying something like this: CL dies, fatal error, you need to rebuild IRAF uisng mkiraf etc.
When I removed the added part, CL was working fine.
So, how will I load the particular tasks at the time of login?
Regards
smp
(1) I do not have loginuser.cl file. So, how I will define my task permanently?
(2) How to load a particular IRAF task at the time of login?
In my login.cl file, I have:
# List any packages you want loaded at login time, ONE PER LINE.
images # general image operators
plot # graphics tasks
dataio # data conversions, import export
lists # list processing
I want to add "zerocombine " and "flatcombine" tasks to be loaded at the time of login. So I added "ccdred" as :
# List any packages you want loaded at login time, ONE PER LINE.
images # general image operators
plot # graphics tasks
dataio # data conversions, import export
lists # list processing
ccdredThen I got the error saying something like this: CL dies, fatal error, you need to rebuild IRAF uisng mkiraf etc.
When I removed the added part, CL was working fine.
So, how will I load the particular tasks at the time of login?
Regards
smp
smp wrote on Aug 07, 2009
Hi ,
(1) I do not have loginuser.cl file. So, how I will define my task permanently?
(2) How to load a particular IRAF task at the time of login?
In my login.cl file, I have:
I want to add "zerocombine " and "flatcombine" tasks to be loaded at the time of login. So I added "ccdred" as :
Then I got the error saying something like this: CL dies, fatal error, you need to rebuild IRAF uisng mkiraf etc.
When I removed the added part, CL was working fine.
So, how will I load the particular tasks at the time of login?
Regards
smp
(1) I do not have loginuser.cl file. So, how I will define my task permanently?
(2) How to load a particular IRAF task at the time of login?
In my login.cl file, I have:
# List any packages you want loaded at login time, ONE PER LINE.
images # general image operators
plot # graphics tasks
dataio # data conversions, import export
lists # list processing
I want to add "zerocombine " and "flatcombine" tasks to be loaded at the time of login. So I added "ccdred" as :
# List any packages you want loaded at login time, ONE PER LINE.
images # general image operators
plot # graphics tasks
dataio # data conversions, import export
lists # list processing
ccdredThen I got the error saying something like this: CL dies, fatal error, you need to rebuild IRAF uisng mkiraf etc.
When I removed the added part, CL was working fine.
So, how will I load the particular tasks at the time of login?
Regards
smp
Mike Fitzpatrick wrote on Aug 07, 2009
Package loading in the login.cl works the same as on the commandline, i.e. you cannot load CCDRED directly unless the IMRED package has been loaded, IMRED can't be loaded until NOAO is loaded, etc. So, following the 'noao' line and before the 'keep'</strong> you would add the lines
Alternatively, just create a file called loginuser.cl in the same directory as your login.cl that contains
-Mike </div> --- **smp** wrote on Aug 07, 2009
imred
ccdred
task new = /swapnil/my_data/new.cl
Alternatively, just create a file called loginuser.cl in the same directory as your login.cl that contains
task new = /swapnil/my_data/new.cl
keep
-Mike </div> --- **smp** wrote on Aug 07, 2009
Thank you Mike. It worked.
Regards
smp
---
*Last post on Aug 07, 2009*
Regards
smp