Guide to Astrophysical Software

Editor: Ian Czekala

With contributions from Ellie Newton

Despite being observational and theoretical scientists (in training), astrophysicists spend a great deal of time at their computers (and not just checking the arXiv or their email)! This glossary will serve as a nexus for many of the astronomical software programs that an astrophysicist might encounter in his or her daily work. Feel free to peruse the websites of programs and programming languages such as IRAF, CASA, SExtractor, Python and more! If you have a favorite analysis program of your own that you would like to share, please leave a comment.

In the vein of the post on The Databases of Astronomy, this general post aims to provide an overview of software and programming languages useful for Astronomy that will be continually updated.

Programming Languages/Mathematical Packages:

Python: Scipy, Numpy, matplotlib and more

Python is the programming language that has been on the tip of everybody’s tounge recently, and for good reason. An open-source, easy to use scripting language with extensive object-oriented programming capabilities, Python is designed for ease of code re-use and integration, including access to GUI toolkits like Tkinter (interface to Tk), wxPython, pyQT, and pyGKT. Many additional packages/programs such as Scipy, Numpy, iPython, and Matplotlib turn Python into a powerful scientific and computational environment perfect for astronomers. Tom Aldcroft at the Center for Astrophysics has put together a wonderful Python for Astronomers tutorial that does a great job of introducing Python for astronomical use. ALMA even does most of their telescope scripting with Python, so it’s fast enough for real-time applications. A key advantage of Python over other programming languages is the speed at which quality code can be produced (that can then be reused later). Although execution time of code might be slightly longer than lower level languages such as C/C++/Fortran, Python will likely save a significant amount of “programmer time.” I’ve found Python to be fast enough for every application I have used it thus far. Granted, if you are writing a cosmological simulation that will take time on a super-cluster of computers, then it is probably best that it be optimized with a compiled language like C/C++. Although lengthy and wordy, good, thorough references for learning Python include Mark Lutz’s Learning/Programming Python. Before spending money on technical manuals, check to see if your university library has electronic access to programming ebooks. Good libraries usually have an extensive collection of technical books available in electronic form, which makes it easy to reference the book whenever and wherever you need it.

  • Python Boot Camp is a free, 3-day tutorial designed to get you started in python
  • A large collection of Python packages written for astronomical tasks can be found at Astropython
  • Many python-related articles can be found on the AstroBetter blog

IDL

The Interactive Data Language is a proprietary programming language that has occupied a niche among astronomers and other scientists. Robust and specifically designed for use with data arrays, IDL is a natural fit to perform astronomical data reduction tasks.  Large arrays are simple to access and operate on, while external packages and modules are not required.  IDL has an extensive, experience user base and many astronomers have contributed to the large number of well-documented, astro-specific programs available for public use. (However, the number of astronomical packages available for Python has been growing and Python additionally has the benefit of high quality plotting capabilities via Matplotlib. This AstroBetter post weighs in on the Python v. IDL debate.)

  • IDLUTILS: a collection of astronomy-related routines conveniently packaged in one library
  • Coyote’s Guide to IDL: tutorials, tips, books and routines from David Fanning.  Several IDL libraries make up for areas in which IDL is lacking (especially graphics!)

C/C++

For tasks that require speed and small code size, C or C++ might be great programming languages to use. Although these languages have a steeper learning curve than interactive, scripting languages, the fundamental understanding of programming might be worth the investment. For scientific programming with C/C++, check out the GNU scientific library.

Mathematica

Python and IDL are great all-around languages that have a wide variety of tools and packages available to develop system-quality applications. However, for high-level, conceptual, or mathematical applications, a proprietary program such as Mathematica can work magic. Mathematica’s easy to use function syntax makes it a breeze to visualize a multidimensional function in one line of code. The “notebook” style of Mathematica documents makes it very well suited for working on problem sets, because it is easy to show your work in a clean manner (as opposed to turning in pages of source code if you programmed in Python or IDL). Mathematica’s ability to perform symbolic algebra and integration can be a lifesaver for complicated integrals found in a quantum mechanics problem set, for example. Although Mathematica is not free, there are educational discounts available for students. Some universities may make an educational licence available for registered students too, check with your computational department for more information. If you don’t have the ability to acquire the full-blown Mathematica package, check out Wolfram Alpha, which can still perform nearly all of the functions of Mathematica. Mathematica’s Astronomical demos.

MATLAB

MATLAB Simulink is great for interfacing with actual lab equipment and other models.

Other languages

Perl is another scripting language, similar to Python, that is worthwhile to use for data processing.

Software Packages

IRAF Image Reduction and Analysis Facility is used for a wide range of tasks pertaining to optical and infrared data processing. STScI has released pyRAF, which allows Python scripting of IRAF tasks, a great advantage when trying to batch process data!

SAO ds9 is an astronomical image viewer and manipulator that has stood the test of time. In order to get started looking at astronomical images, please see Nathan’s astrobite about how to use ds9!  An alternative to ds9 is GAIA, the Graphical Astronomy and Image Analysis Tool.

AIPS and CASA are two radio astronomy analysis packages developed for use with data sets from ALMA and the EVLA.

SExtractor, or Source Extractor, is a program that operates on a FITS image to automatically detect objects.  Once sources have been identified, a variety of measurements are made including source size, shape and magnitude.  A pdf manual is available here (for a slightly older version of the code).  SExtractor for Dummies is another manual, though untested by this author.

Sherpa

Simulation software

The cosmological simulation code Gadget-2 is very popular. For more information, see Nathan’s astrobite about how to install and run Gadget-2.

Interactive Software

Worldwide Telescope An effort by Microsoft to combine high quality astronomical data sets into an intuitive data visualization package freely available (and able to run in your web-browser)!

TOPCAT is a program to interactively view tabular data of astronomical data sets. Check out their screenshots page to see some neat examples of what it can do.

Writing Software

LaTeX. You may have noticed that the font and layout used for many of the papers on the arXiv are different from normal Word documents. LaTeX is a document preparation programming language. Yes, you will actually compile your document into a PDF. If you’re running Linux, installing LaTeX is as easy as using a package manager. Otherwise, for Windows you may want to try installing the Miktex distribution.  For Macs, the TeXShop interface is available.  The LaTeX wikibook is a great place to look for more information on how to get started typesetting scholarly papers.

Operating Systems

Apple OS X

By my informal visual survey of graduate students, post-docs, and faculty at the Center for Astrophysics, I would say that greater than 80% of astronomers here use Mac computers. A vast amount of astronomical software was developed on and for the Unix operating system. Mac OS X benefits from being based upon the Unix operating system, which means that many Unix terminal programs are already accessible out of the box. Apple and Steve Jobs have done a wonderful job making intuitive and visually appealing software an important component of their product, and is a large reason why Macs are so widely used in astronomy, a profession that relies heavily on the art of the Keynote/Powerpoint presentation.

Because Macs are so popular, a plethora of online resources are available for astronomers using them.  Several are listed here:

Linux

Those astronomers that don’t have Macs generally use some flavor of the Linux operating system. Ubuntu, Debian, Fedora, and Arch Linux are all popular distributions that many astronomers use (particularly as desktop machines).

Windows

Because many astronomical programs have been written to run in a Unix environment, they might not run on Windows. Those users who wish to run these programs might wish to check out Cygwin.

If you have a favorite astronomical software package or programming language that is not listed here, please feel free to suggest it as a comment to this page! As all of our glossaries, this page will continue to grow with the addition of more astrophysical software.

Advertisements

Discussion

9 thoughts on “Guide to Astrophysical Software

  1. Python’s great! I’m glad I chose it as my first language in preparation for actual astro research.

    Posted by Durand | April 22, 2011, 8:59 am
  2. Thanks for the shout out to Sherpa, which we think is a nice general-purpose fitting package. You might want to add a guide to datareduction packages by waveband… for X-ray, we have CIAO – mainly for Chandra, SAS for XMM-Newton, and HEASOFT from NASA Goddard for Suzaku and other missions. (Any CfA grad students learning CIAO or Sherpa are welcome to stop by my office for an intro!)

    Posted by Jonathan McDowell | April 22, 2011, 9:52 pm
  3. I come from 15 years of linux experience, in my experience it still beats a mac in setting things up as a developer. But I know, that’s just me. Just wait until Steve makes you all pay extra again for running a compiler 🙂

    On a more serious note, here’s a compilation of astronomical software under the APOD umbrella where I’ve seen quite a few packages that I had not heard of before and is being actively worked on:

    http://asterisk.apod.com/viewforum.php?f=35

    Posted by Peter Teuben | April 23, 2011, 7:32 pm
  4. Period04 is another great tool for anybody who deals with time-series data and Fourier-spectra:
    http://www.univie.ac.at/tops/Period04/

    Posted by lacalaca | April 25, 2011, 3:38 am
  5. Haha, I’m curious, but does anyone have an idea why so many astronomers use Macs? It seems common for academics to use Macs, but particle physicists (for some reason) and some earth scientists are more likely than others to use Windows

    Posted by inquilinekea | April 26, 2011, 3:48 pm
  6. I now realize that my comment is almost certainly overboard, but here it is anyway since I like seeing myself type:

    A few slight comments on the interferometry related packages.

    AIPS isn’t _supposed_ to be used to EVLA, and certainly not for (full) ALMA, to my knowledge, though I guess Cycle 0 ALMA will be okay with AIPS. It’s supposed to be pure CASA. AIPS is a good stopgap for EVLA stuff while CASA is developing further, since Eric Greisen et al have put in just about everything anyone would ever want (and a lot of things probably no one needs anymore) into AIPS over the last N>20 years.

    Miriad is a good package for use with small-ish arrays (like SMA, Carma, ATCA, etc.), but limited for low-frequencies because there isn’t any capability to correct for wide-field effects in images.

    Also, OBIT is worth mentioning. Not just for the name, but also because it’s got a lot of interesting stuff that Bill Cotton has put into it (RFI modeling + subtraction, baseline-dependent time-averaging to optimize trade-offs between azimuthal smearing in an image and processing time, etc.) However, installing it will remind one of why it’s called “OBIT.”

    Posted by Robert Harris | April 26, 2011, 10:20 pm
  7. My main comment is that the hyperlinks in the bulleted lists appear black to me, which makes it hard to tell they’re there.

    Also, no mention of Fortran? I realise it might be a bit contentious, but it’s still widely used. I can’t remember what resources got me going, since I already had coding experience and just needed to learn the structures and syntax.

    Posted by Warrick Ball | April 27, 2011, 8:59 am

Trackbacks/Pingbacks

  1. Pingback: New Glossary: Guide to Astrophysical Software « astrobites - April 22, 2011

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Enter your email address to get email updates from Astrobites.

Join 118 other followers

Our sister site

Advertisements
%d bloggers like this: