<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-html" lang="x-western">
<font size="+1"><font face="Helvetica, Arial, sans-serif">Dear all,<br>
<br>
I'm currently trying to finish a small near-infrared data reduction
pipeline in python/pyraf. As part of the alignment process I was
planning to use wregister as a rough alignment and then refine the
solution using xregister. However, while this procedure works perfectly
fine in "traditional" IRAF, I can't get it to work in pyraf.<br>
<br>
The code-snippet causing the problem is the following:<br>
<br>
            iraf.images.immatch.wregister( \<br>
                input=inputfile, \<br>
                reference=referencefile, \<br>
                output=tmp_wregister)<br>
<br>
where all inputfile, referencefile and tmp_wregister are fits-files. As
mentioned above, running wregister on exactly the same files with
identical parameters in ecl works fine, but in python it brings up this:<br>
<br>
Traceback (most recent call last):<br>
  File "./reduce.py", line 541, in <module><br>
    align(filenames)<br>
  File "./reduce.py", line 441, in align<br>
    gcommand="q.txt")<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
699, in __call__<br>
    return apply(self.run,args,kw)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
302, in run<br>
    self._run(redirKW, specialKW)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
1371, in _run<br>
    self._runCode()<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
1386, in _runCode<br>
    apply(self._clFunction, parList, kw)<br>
  File "<CL script immatch.wregister>", line 129, in wregister<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
699, in __call__<br>
    return apply(self.run,args,kw)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
303, in run<br>
    self._updateParList(save)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
780, in _updateParList<br>
    rv = self.saveParList()<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
627, in saveParList<br>
    rv = self._currentParList.saveParList(filename, comment)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/irafpar.py", line
842, in saveParList<br>
    absFileName = iraf.Expand(filename)<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraffunctions.py",
line 3018, in Expand<br>
    outlist.append(_os.path.expanduser(_expand1(word, noerror=noerror)))<br>
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraffunctions.py",
line 3051, in _expand1<br>
    (varname, instring))<br>
pytools.irafglobals.IrafError: Undefined variable `uparm' in string
`uparm$imlsectis.par'<br>
<br>
I also tried to unlearn wregister just in case some queer parameter was
causing this, but no change... <br>
<br>
Any idea what might be causing this or how to fix / work around this?<br>
<br>
Best wishes and thanks a lot in advance<br>
Ralf<br>
<br>
p.s. Just for the record, I'm using <br>
- python 2.6 (r26:66714, Mar 30 2010, 00:30:21) ,<br>
- PyRAF 1.9 (May 2010) Copyright (c) 2002 AURA<br>
- openSuSE 11.1, kernel 2.6.27.48-0.2-pae #1 SMP 2010-07-29 20:06:52
+0200 i686 i686 i386 GNU/Linux<br>
<br>
</font></font>
<pre class="moz-signature" cols="72">-- 
=======================================================
Ralf Kotulla                            <a
 class="moz-txt-link-abbreviated" href="mailto:kotulla@uwm.edu">kotulla@uwm.edu</a>
-
Center for Gravitation and Cosmology,  Dept. of Physics
University of Wisconsin - Milwaukee
1900 E Kenwood Blvd, Milwaukee, WI 53211, USA
Tel: +1 (414) 229-5268     /     Fax: +1 (414) 229-5589
-
Professional webpage: <a class="moz-txt-link-freetext"
 href="http://www.galev.org">http://www.galev.org</a>
Personal webpage:     <a class="moz-txt-link-freetext"
 href="http://members.galev.org/rkotulla">http://members.galev.org/rkotulla</a></pre>
</div>
</body>
</html>