Astronomical Software

Astronomers only spend a small amount of their time at an observatory (or in some cases no time at all). Most of my time is spent trying to understand the data I have. To do this I employ a lot of software written by other people, and occasionally a little software that I'm forced to write myself.

Software I Use

Once upon a time I was a real man and I wrote every little utility I needed in C. Then I was enlightened and started using languages better suited to individual tasks...

Python

Python is a language I turn to often these days. It's a dynamically typed language which handles strings well which makes it easy to use for ASCII table manipulation. Adding the numarray module provides the numerical and multidimensional array capabilities needed to make python a reasonable platform for scientific calculations. The PyFits module adds the ability to read, modify, and create FITS files. Although not the fastest running language, it's quick to write and good for day to day tasks.

Python under Mac OS X

I recently purchased a PowerBook (all the cool astronomers are doing it!) and found that python shipped with OS X. There are a couple of things missing though, and there are several ways to get those missing features. I decided that in order to remain right on the bleeding edge I would compile python myself. There are a couple of extra steps involved:

  1. Install the Apple Developer Tools. These should be on your OS X CDs or they can be downloaded from apple.
  2. Install Tcl/Tk Aqua. This allows for a native look to Tkinter based user interfaces.
  3. Install GNU readline. If you want to use python interactively, readline is a must. I used the regular ./configure; make; make install sequence to place it in /usr/local.
  4. Compile and Install python using the standard ./configure; make; make install sequence. I did not worry about framework installation because I am not planning to distribute python applications in Mac specific ways. I usually just use source distributions.

Python for Mac enthusiasts may be interested in MacPython, but if you come from a unix background the method outlined above, or using fink might appeal to you more.

Java

Java? I often get this one word question, but Java is an excellent language for working on large projects. I initially chose Java because it was the fastest object oriented language available on Linux without buying an expensive compiler. I ran a couple of tests on similar java and C++ code using and GCC and found java edged out gcc. Things have changed since then. C++ performance improved greatly in GCC 3.0 and the intel compiler is now available for free for non-commercial use, but I still enjoy java more than C++. I wrote my LVG radiative transfer code in java.

C

Who could forget plain old C? Seriously it's a very simple and powerful language. When I want speed, and the problem is not complicated enough to benefit substantially from an object oriented language, I turn to C. The GNU Scientific Library is a must when doing numerical programming in C. It's a numerical library without the redistribution restrictions of the numerical recipes routines.

GILDAS

When it comes to spectral analysis and contour plots, GILDAS is the package to turn to. I grumble a lot about it, but then I run into something like AIPS++ or Unipops, and I realize how good GILDAS is. Until I have a spare couple of years to write a replacement (which will be never) I will continue to use GILDAS.

Karma

Quick cube visualization is done well in Karma. Sometimes it can be a bit nonintuative to use, but once you get the hang of it it's a good quick way to look at a lot of data.

Software I Wrote

LST Clock

It all started with a way to combine my desire for a desktop Local Sidereal Time clock with my desire to learn java swing. It ended with a working clock. Several observatories are built in, but any longitude can be set.

Analytic Infall Model

Finding a blue-asymmetric line profile is easy. Determining the infall velocity depends on a lot of assumptions about the cloud. In an effort to minimize these assumptions and develop a good estimate of the infall speed of molecular clouds Phil Myers and I developed an analytic radiative transfer model which can be fit to observed spectra. It is written in C.

LVG Radiative Transfer Model

For my doctoral dissertation I wrote a radiative transfer code which uses the Sobolev, or Large Velocity Gradient, approximation. I used this code to model observations of simulated molecular clouds. This is a very fast way to model line profiles, but it tends to be fairly accurate, especially at low column densities.

InfoPad

One day I had a vision of a monitor without post-it notes. That vision culminated in a searchable notepad which I use to save all those little notes that don't rightly belong anywhere else. I'm still working on adding a couple of features, like the ability to retrieve notes across the internet, and print support for those times when you have to have notes on paper.