Python & its scientific computing packages
Python is a relatively new language that has
become popular and well supported by a rich set of high level scientific and
visualization libraries. The combination of this and the fact that it is an
interactive interpreted language means that one can relatively quickly develop
useful applications.
This matches the character of scientific software development, especially when
in the service of research: highly exploratory, with a need to minimize
distractions when trying to articulate complex concepts. Tweaking code for
performance and focusing on robust production code gain attention later in the
scientific software development cycle.
Rapid development and exploration are why Python was chosen for the course,
which is concerned with techniques for building research tools.
This year we will use Python version 2.6, though you will see
mention of the most cutting-edge versions (2.7 and 3.0) around.
Tutorials and documentation are available at the
Python site. The book Learning
Python by Lutz and Ascher (Fourth Edition, O'Reilly Media, 2009) is a good place
to get started and learn the language.
Here is the set of scientific computation support packages that we will use.
These are the packages you will need to have installed.
In past years, the class has used
- Scientific Python: Scientific Python
is set of higher-level computational methods than SciPy.
- Visual Python:
VPython or Visual Python is a 3D graphics
environment. The visual package offers real-time 3D
output and is easily usable by novice programmers.
- Gnuplot: An alternative package is
Gnuplot which has been
around for some time and provides an extensive set of 2D and
some 3D plotting routines. The glue that integrates
Gnuplot into Python is in this
package.
- PyGame:
PyGame provides a fast, though
primitive, interface for 2D graphics.
- ImageMagick:
ImageMagick
provides a complementary set of utilities for manipulating images.
So you might see code from past class projects or the occasional example
which use these. Generally, though we are moving away from these packages,
in favor of the above set.
Installation
This year I recommend the
Enthought Python
Distribution. It is free for academic and educational use and,
in a single downloadable installer, it has all of the above packages,
and much more.
Importantly, there are installers for Windows (XP, Vista, and 7), Macintosh OS X, and
Linux (Ubuntu and RedHat).
Here are some comments on the installation for these platforms.