Info on Python for Scientific Applications


Python is a high-level modern programming language; it is interpreted, interactive, and object-oriented. It is often compared to Tcl, Perl, Scheme or Java. There is a Numerical extension to it which gives it array and mathematical capabilities similar to to IDL, Matlab, or free packages like Yorick or Scilab. So Python can be useful for scientific applications such as post-processing and visualization of data. Python is freeware, but has a significant number of commercial users and supporters.

I have only experimented with Python a little bit. If you are at PPPL, you can try it yourself by looking at: pppl-specific info . (Otherwise, download your own copy from the following sites.)

The Official Python Language Web Site is the main place to start. In particular see the main Python docs.

Old: The official Numerical Python web site, includes a nice tutorial.
New: Numerical Python is now subsumed into SciPy, a package for Scientific Computing With Python.
(You have to install the base Python package first, Numerical Python is an extension to it.)

The official Numerical Python web site used to be sponsored by LLNL at http://xfiles.llnl.gov/python.html, but that link no longer works. However, you can still find the the last official LLNL version from January 2000, before it moved to sourceforge.net.

NumPy discussion list and archives.

Broken link: The original Numerical Python still has some concise docs.

Python and Scientific Computing.

Python and Astronomy.

Python wrapper to FFTW (now a part of SciPy), and other useful python stuff.

Documentation for a standard numerical Python installation at the European Space Agency collaboration with the Hubble Space Telescope.

Graphics in Python

Python has interfaces to several scientific graphics and GUI packages, including gnuplot, pgplot, and the Gist package described below.

Gist is an excellent set of scientific graphics packages developed at LLNL, originally for Yorick but now also with an interface to Python. Here is detailed documentation on the PyGist graphics package (or tar file of the same documentation ), including EZPLOT, an Object-Oriented graphics package, and the straight Python-Gist interface. Once Gist is installed, you can also get help on it by starting up Python, do "from gist import *", and then do 'help("gist")' to get lots of on-line documentation on any subtopic for gist.

These Gist-based graphics packages (alonge with Narcisse, a graphics package developed by LLNL's sister lab in France) have been separated out from the present releases of Numerical Python but are still available in an earlier LLNL distribution of Numerical Python. These probably still work in the present version of Numerical Python, but the keeper of Gist, Zane Motteler, is retiring and has appealed for a new caretaker (Lee Busby may be able to help occasionally)... The Python graphics package used at LLNL for climate modeling is soon to be released. There are also lots of other choices listed at the "scientifc graphics and GUI packages" link above.

Broken link : Gist (a good graphics package for Yorick and for Python), (instead see the above links for Yorick and Python versions of Gist).

Eric Jones in his tutorial at the 2001 Python 9 conference recommended plt as a scientific graphics package:

VPython offers a real-time 3-D interface usable by novices...


For more tutorials on Numerical Python, see:

A concise tutorial on Numerical Python.

A more detailed reference on Numerical Python.

Tutorials and useful Scientific packages (netCDF interface, ascii data utilities, statistics, gnuplot interface, molecular modeling).

Brief intro to the interface to the Tk package (for easily building GUI's).

More detailed Tk info.

Quick Ref for general python.

Written July 16, 2001, by Greg Hammett. Partially updated October 2005, but undoubtedly has a lot of outdated links by now...