Getting Started with Python for Astronomy

There are a lot of Astronomical Python pages out there already. Why another one? Because none of the current pages seem to do a very good job of summarizing how to get started. This page is written from the perspective of someone in the middle of the transition from IDL to Python, and still figuring out this strange new world where objects actually work right.

The Essentials

You'll need at a bare minimum

Getting Started with Python on a Mac

More Modules

  • APLpy for making nice plots with RA and Dec labeled axes. (Bonus: includes great support for log and arcsinh stretches, better than the default matplotlib display functions!)
  • AstroLib, an effort to re-create the IDL Goddard Library in Python (sort of). This contains several sub-modules for dealing with WCS information, ASCII tables, synthetic photometry, VOTables, and more.
  • AstLib is another astronomy library, with coordinates,
  • PyQt4. First install Qt (from binaries), then install sip (from source code), then build pyQt from source
  • PyInstaller. Despite the name, this doesn't make installer programs. Instead it compiles Python programs into stand-alone executables suitable for execution on Windows, Mac, or Linux. There's a fairly extensive list of modules at the SciPy astronomy page, and an even more extensive list over at this page.

    How do I....?

    This section will eventually contain links to best practices Python code snipped for how to...