Hi Perry & Warren,
I got this comment from a collaborator who had a bit of trouble getting
started with pyraf. He reports that the 'cl.images.imutil' syntax
actually comes from an old version of the drizzle cookbook (we might
want to have a look at that.) As I said in my reply, I don't recommend
that we try to emulate iraf's behavior in this case, but it would be
nice to get a better error message out of the startup process.
Probably this should be added to the list of things we would like to
improve about pyraf initialization. (The error occurs before the
traceback mechanism has been modified to do some special stuff for CL
scripts, so the traceback actually gives little hint as to what is
wrong & no clue at all as to where it failed.)
Rick
Date: Thu, 4 Dec 2003 09:14:34 -0500 (EST)
From: Rick White <rlw@stsci.edu>
To: Michael Gregg <gregg@organa.ucllnl.org>
Cc: Rick White <rlw@stsci.edu>
Subject: Re: pyraf/iraf syntax problem
Hi Michael,
On Wed, 3 Dec 2003, Michael Gregg wrote:
I decided this week to take the plunge and try using pyraf instead of
iraf to drizzle my ACS data sets. I immediately hit a roadblock that
has taken a bit of scratching my head to figure out. Pyraf would not
even finish starting for me - I kept getting dumped into just python
because of a startup error. I'll spare you the details, but I tracked
it down to a line in my login.cl file. I load imutil as one of the
packages in my login.cl, but I have been doing it as:
cl.images.imutil
instead of just imutil. I am pretty sure that this comes from copying
an example file in a drizzle cookbook exercise. Anyway, pyraf won't
start until I change this to:
images
imutil
on separate lines, or even
images.imutil
dropping the cl. Iraf, on the other hand, doesn't care.
I'm probably the only user in the universe with this problem, but I
thought you might want to hear about it.
Hmm, it looks like in this context iraf interprets 'cl' as an
abbreviation for 'clpackage', which is the actual name of the package.
Since 'cl' is an exact match for the name of a task (in pyraf as well
as iraf), pyraf assumes that you actually do mean 'cl' and complains
about there being no parameter named 'images'.
I'm not inclined to try to fix this, I guess, but I'll pass it on to
the pyraf group. It would be nice if you got a more helpful message
about the source of the problem. (The usual pyraf error messages for
errors in CL code are much clearer, but during the initialization
process the error handling stuff has not been loaded yet so the
messages are pretty cryptic.) Maybe that can be improved.
Incidentally, you don't need to load this package at all in your
login.cl -- it gets loaded by default when you load the images
package.
Rick