[AstroPy] wregister won't work under python/pyraf

Ralf Kotulla ralf.kotulla@gmail....
Wed Sep 22 21:12:45 CDT 2010


Dear all,

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.

The code-snippet causing the problem is the following:

            iraf.images.immatch.wregister( \
                input=inputfile, \
                reference=referencefile, \
                output=tmp_wregister)

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:

Traceback (most recent call last):
  File "./reduce.py", line 541, in <module>
    align(filenames)
  File "./reduce.py", line 441, in align
    gcommand="q.txt")
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
699, in __call__
    return apply(self.run,args,kw)
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
302, in run
    self._run(redirKW, specialKW)
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
1371, in _run
    self._runCode()
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
1386, in _runCode
    apply(self._clFunction, parList, kw)
  File "<CL script immatch.wregister>", line 129, in wregister
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
699, in __call__
    return apply(self.run,args,kw)
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
303, in run
    self._updateParList(save)
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
780, in _updateParList
    rv = self.saveParList()
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraftask.py", line
627, in saveParList
    rv = self._currentParList.saveParList(filename, comment)
  File "/usr/local/lib/python2.6/site-packages/pyraf/irafpar.py", line
842, in saveParList
    absFileName = iraf.Expand(filename)
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraffunctions.py",
line 3018, in Expand
    outlist.append(_os.path.expanduser(_expand1(word, noerror=noerror)))
  File "/usr/local/lib/python2.6/site-packages/pyraf/iraffunctions.py",
line 3051, in _expand1
    (varname, instring))
pytools.irafglobals.IrafError: Undefined variable `uparm' in string
`uparm$imlsectis.par'

I also tried to unlearn wregister just in case some queer parameter was
causing this, but no change...

Any idea what might be causing this or how to fix / work around this?

Best wishes and thanks a lot in advance
Ralf

p.s. Just for the record, I'm using
- python 2.6 (r26:66714, Mar 30 2010, 00:30:21) ,
- PyRAF 1.9 (May 2010) Copyright (c) 2002 AURA
- 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

-- 
=======================================================
Ralf Kotulla                            kotulla@uwm.edu
-
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: http://www.galev.org
Personal webpage:     http://members.galev.org/rkotulla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/astropy/attachments/20100922/16654eef/attachment.html 


More information about the AstroPy mailing list