First make sure that IRAF thinks of SAOimage as an external task. The following line can be added to your login.cl file if saoimage is in the search path defined in your .cshrc file, which IRAF accesses before running external tasks using csh:
task $saoimage = $saoimageTo absolutely define the pathname for such an external task, add either of the following lines instead, where the italicized material is replaced by the pathname on your computer:
task $saoimage = "$"//osfn('saoimage IRAF pathname')or
task $saoimage = "$"//"saoimage full pathname"The advantage of using an IRAF task to display images is that you can set frequently used parameters there, shortening the length of the command line you need to use. A simple CL task has been written to run SAOimage so image extensions and format arguments can be preset and the user doesn't have to worry about them each time an image is displayed.
The source code for the IRAF task, xdisp, which we use at the Center for Astrophysics Telescope Data Center is available. To use it, add the line
task xdisp = tasks$xdisp.clto your login.cl, where the file xdisp.cl resides in the directory defined by the IRAF environment parameter tasks.