View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

ERROR: ambiguous parameter `show’ within `<searchpath>

Jason Quinn wrote on Jun 19, 2008

I'm confused by an error message that I'm getting that seems to be related to defining a task in my loginuser.cl file. I've made a minimum test case. If I make a file called ttt.cl containing:

procedure ttt()

begin

hedit("someimage.fits","PSFMAG", "15.0", add=no, addonly=no, delete=no, verify=no, show=yes, update=yes)

end


and then load this in my loginuser.cl file via

task $ttt=/data/jquinn/uqbar/lc/register.jason/ttt.cl
keep


I get errors such as

ERROR: ambiguous parameter `show' within `<searchpath>'
     called as: `ttt ()'


It seems like the CL might be confusing the show parameter in hedit with the system show or some other task. But why, in context it is unambiguous. And why only show and not the update parameter? In a longer script, the error report points the user to a more-or-less random line.

If I define the task within the CL rather than the loginuser.cl I get no problems at all. I might just not understand the way IRAF handles the searchpath.

Jason

Mike Fitzpatrick wrote on Jun 19, 2008

Hi Jason,

This was a bug in the CL, basically the CL 'showtype' parameter was being found twice and causing the ambiguity. The normal searchpath for paramters is task->package->cl, but in this case the task has no parameters and package and the cl are the same thing. In any case, it is fixed for the next release and might explain similar errors over the years.

A workaround until then is simply to declare a dummy 'show' param in you script, e.g.


procedure ttt()

begin
bool  show

hedit("someimage.fits","PSFMAG", "15.0", add=no, addonly=no, delete=no, verify=no, show=yes, update=yes)

end 


If you still have problems or would like the code change, let me know.

Cheers,
-Mike

Last post on Jun 19, 2008