Monday, July 16, 2007

SciPy

It turns out there are a lot of resources out there for scientific computing with Python. I'm exploring rewriting various bits of code I use in Python, particularly those that call Perl and Shell Scripts and are not self-contained. I like that Python is freely available, unlike IDL, and easy to program and use regularly, unlike IRAF. In fact, I think this is the motivation behind PyRAF.

SciPy is located here. I haven't explored the library much, but I bet it will be useful. The other important package, Numpy, is also here, but I acquired it from the STSci Institute. From STSci, I also got a key set of libraries called PyFITS, which allows FITS table and image handling. As of this writing, those couple of libraries were no larger than a few MB.

It looks like SciPy is a bit involved. It requires LAPACK libraries, which require the g77 FORTRAN compiler or something similar. I need to read up on this a bit more before I proceed. SciPy won't be as easy to install as I had hoped.

UPDATE:
I got lucky and found that binaries for FC6 have been created and are posted here, after you follow some links to this . Many thanks to this guy. He rightly advises not building LAPACK youself if you don't have to. I think you can set this up as a yum repo, but I just downloaded, rpm'ed:
1) rpm -ivh cushello
2) rpm -ivh refblas*.rpm
3) rpm -ivh lapack-*.rpm
4) rpm -ivh lapack3-*.rpm --replacefiles
5) rpm -ivh python-numpy
6) rpm -ivh python-scipy

Step 4 is a bit risky, but I forged ahead and have noticed no ill effects yet. If you don't RPM with this option, conflicts arise. I chose to brute force past the problem.

No comments: