Extended Python as a Viable Alternative to IDL for Astronomical Data Analysis

L. Rottler
UCO/Lick Observatory

Session ID: T2.02   Type: oral

Abstract:

The past few years have seen the development of a large number of high-level, special-purpose languages for data analysis, plotting, and publication-quality graphics. Some of these (such as IDL and MATLAB) are proprietary and very expensive, while others (like Yorick, Scilab, and Rlab) are free. So far, IDL is the most powerful and is the tool of choice for many astronomers and other scientists. Unfortunately all of these languages, both free and commercial, have a common weakness. They are special- purpose intepreted languages requiring use of a particular numerical system. Users must therefore learn several more languages in addition to C, Fortran, awk, and TeX in order to analyze, visualize, and report on their data.

Researchers need a widely-accepted general-purpose programming language for data reduction. It should be small, portable, free, and easy to learn. In addition it should be object-oriented, user-extensible, and support high-level data types. It should be embeddable as a scripting language in C or Fortran applications. Python is such a language.

Python has all of the above qualities. The existing library of contributed extensions includes graphics, image processing, mathematical libraries , numerical data objects, GUI interfaces, and more. These extension modules are C or C++ interface routines to compiled applications; although Python itself is an interpreted language, the compute-intensive portions of a task can be handed off to compiled code.

This paper presents a short summary of the capabilities of the Python language and of the extensions required to make it a viable low-cost alternative to IDL. For comparison, many of the demos in the, ``IDL Basics'' manual are replicated in Python; source and output are compared with the IDL equivalent. A Python module which reads, writes, and processes FITS images is presented and discussed. Python URLs and installation procedures are provided, followed by a proposal to make Python the ``IDL-like'' scripting language for IRAF.





Patrick P. Murphy
Wed Sep 11 14:47:58 EDT 1996