View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

ipython and pyraf?

Adam wrote on Apr 22, 2008

Hi, I use pyraf and ipython for most of my computing needs now, but using pyraf with ipython doesn't work so well. I can load pyraf in ipython using "pyraf --ipython", but once there I can't lpar or epar any tasks.

In [6]: lpar qphot
Warning: Could not find task qphot for lpar


Also, loading pyraf/ipython with "ipython -p pyraf" gives me a number of errors:

rgnt2-213-211-dhcp:feb19 adam$ ipython -p pyraf
---------------------------------------------------------------------------
<type 'exceptions.ImportError'>           Traceback (most recent call last)

/Users/adam/observations/sbo_w5/feb19/<string> in <module>()

<type 'exceptions.ImportError'>: No module named pyraf.ipython_api
WARNING: Loading of pyraf.ipython_api failed.

---------------------------------------------------------------------------
<type 'exceptions.ImportError'>           Traceback (most recent call last)

/Users/adam/observations/sbo_w5/feb19/<string> in <module>()

<type 'exceptions.ImportError'>: No module named iraf
WARNING: Loading of iraf failed.

Python 2.5.1 (r251:54863, Jan 23 2008, 12:59:56) 
Type "copyright", "credits" or "license" for more information.

IPython 0.8.1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

IPython profile: pyraf

In [1]: 


Any tips? Google showed no hits except the documentation for pyraf + ipython, so I hope someone else has tried this.

Adam

Mike Fitzpatrick wrote on Apr 22, 2008

I don't use pyraf myself but if you don't get a quick reply here you might send this to the ST helpdesk as well (help@stsci.edu). From the first error message, are you sure the DIGIPHOT and APPHOT packages are loaded?

-Mike

Adam wrote on Apr 22, 2008

Thanks Mike,
I'm not sure the packages are loaded, but I'm sure I've loaded them. ipython pyraf will happily load packages and run them: I was able to run qphot even though I couldn't epar/lpar it.
I also tried 'lpar epar' and 'lpar imcopy' and 'epar ...', they didn't work.

I'll drop STSCI an e-mail too. Thanks.
Adam

Last post on Apr 22, 2008