Python Statistical Computing Essentials

These resources are the essentials for becoming productive using Python for statistical computing with astronomical data. The CASt/SAMSI Bayesian Astrostatistics Tutorials will introduce and rely on many of them.

Essential Bookmarks

Essential Software

In a nutshell: Download a binary installer of Python for your platform from ActiveState's ActivePython site. Run it, which will install Python, some useful extra packages, and documentation. Then you'll have to install a handful of scientific computing packages from source (a fairly painless process thanks to Python's installation utilities). I've prepared separate instructions for Linux platforms and for Mac OS X. Further background and details:

Introductory Documentation

A frustrating shortcoming of Python's scientific computing capability is the absence of self-contained documentation, particularly an integrated basic introduction to all the principal resources. This is being addressed, but in the meantime you'll have to rely mostly on piecemeal documentation (the STScI document below being a notable exception). Here are some useful resources. But note that these resources all predate the recent NumPy/SciPy changes; where they refer to "Numeric" (an old Python array package), you should now use "numpy" (the package name is lower case), and you may come across a few incompatibilities between Numeric and numpy syntax (there should be very few, by design).

For more detailed information, peruse the documentation resources at the SciPy and matplotlib web sites: SciPy Documentation, matplotlib Tutorial, matplotlib User's Guide (PDF), matplotlib "pylab" interface documentation, matplotlib Cookbook Wiki.

Essential References

Print these and keep them handy.

Selected Python Books (free and otherwise)