Table Of Contents

Previous topic

Introduction and Motivation

Next topic

Quick tour of Python

This Page

Why use Python?

The Python ecosystem provides a single environment that is sufficient for the vast majority of astronomical analysis. It does so on several levels:

  • Clean and powerful language designed by people who highly value elegance.
  • Strong set of 3rd party analysis tools that are professionally and actively developed.
  • Robust methods for binding with C, C++ and FORTRAN libraries (speed, legacy)
  • Standard library support for web, GUI, databases, process management, etc.
  • Very active developer community

==> Easy for astronomers (or children) but with virtually no limits for gurus. <==

Freedom and commitment

Good

Python and the necessary tools are FREE, as in free beer and Free Open Source Software. IDL and SM are not free. Maybe you don’t care because someone else pays, but perhaps your collaborators don’t want to pay, or you want to run on a personal laptop.

Bad

Switching from a familiar analysis environment is NOT FREE (hours * dollars/hour * overhead_rate)

Ugly

If switching, you need to commit to a frustrating 6 months to a year:

  • “Ugh, I could do this so much faster the old way.”
  • “Stupid Python, why isn’t this working?!”
  • “These plots look ugly.”

Good

Using just one scripting language for everything is efficient and saves brain-power for astronomy. Compare to using a mish-mash of IDL, csh, SM, awk to get the job done.

Learning to use Python for astronomy analysis will pay back the time commitment. If you analyze data from Chandra, LOFAR, Fermi, Herschel, HST, JWST, ALMA, EVLA (etc etc) you will likely end up using Python even if you didn’t intend it.

The HIPE (Herschel Interactive Processing Environment) data analysis guide is an example.

../_images/hipe.png