Python Resources: Astronomy, Scientific Plotting, and Data Analysis

This is a listing specifically for plotting and data analysis resources in astronomy.

TIP LastUpdate: JeffMangum - 2015-03-21
Table of Contents:

Intro to Python

There are many books and tutorials to get started in Python if you've never used it before, or if you've used other plotting resources or languages and are making the switch:

Plotting, Data Analysis, Tutorials, and Visualization

There are a number of useful packages and tutorials for scientific plotting and 2D graphics:

  • Numeric and Scientific Plotting: Comprehensive listing of tools and libraries
  • Matplotlib Tutorial: Great tutorial that steps through the process in Matplotlib
  • Matplotlib Gallery: Showing what is possible with matplotlib with examples
  • Matplotlib Intro: Basic plotting of data...
  • Kapteyn: Spatial and spectral coordinates and projections, etc.
  • SciPy: Scientific Python tutorial on analysis utilities
  • VIDEO: Plotting with Matplotlib: Two-hour intro video to plotting.
  • Ginga: Ginga is a viewer for astronomical data FITS (Flexible Image Transport System) files. The Ginga viewer centers around a new FITS display widget which supports zooming and panning, color and intensity mapping, a choice of several automatic cut levels algorithms and canvases for plotting scalable geometric forms.
  • pyds9: Python connector via XPA to ds9.
  • Astronomical Image Registration: Description of a method to register two images (which are dominated by extended flux).

Libraries and Packages

  • Astropy: Python library for astronomy
    • Astropy Affiliated Packages: There are several "affiliated" packages which, according to the Astropy web site, "...is an astronomy-related Python package that is not part of the astropy core package, but has requested to be included in the Astropy project". These include:
      • Montage-wrapper: Python module that provides a Python API to the Montage Astronomical Image Mosaic Engine.
      • Ginga: A viewer for astronomical data FITS (Flexible Image Transport System) files.
      • APLpy: APLpy (the Astronomical Plotting Library in Python) is a Python module aimed at producing publication-quality plots of astronomical imaging data in FITS format.
      • astroquery: Astronomical database query tool.
      • ...plus many more...
  • SciPy: Scientific Python for analysis
  • Numpy: Numpy package and tutorials
  • basemap: Geo-spatial mapping in Python
  • Pygame: Non-conventional but useful package for displaying 2D images and data
  • MySQL: Database access from the command line
  • CASA and CASA Guides: Common Astronomy Software Applications - reduction of VLA and ALMA data
  • sunpy: The SunPy project is an effort to create an open-source software library for solar physics using the Python programming language.
  • PySpecKit: An extensible spectroscopic analysis toolkit for astronomy.
  • PyAST: A python interface to the starlink AST library. Do so very useful stuff like image resampling and flux conserving rebinning.
  • pysofa: A Python module for accessing the International Astronomical Union's SOFA (Standards of Fundamental Astronomy) library from python. SOFA is a set of algorithms and procedures that implement standard models used in fundamental astronomy. pysofa is not a port of SOFA routines but a wrapper around the SOFA_C library. Thus, no calculations are made by the pysofa software, they are all delegated to the underlying SOFA_C library.
  • SWarp: SWarp is a program that resamples and co-adds together FITS images using any arbitrary astrometric projection defined in the WCS standard.
  • yt: Analysis and visualization of volumetric, multi-resolution data from astrophysical simulations, and radio telescopes.
  • Blender: Non-traditional but powerful 3D package for visualization with a Python API (Tutorials)
  • scikit-image: Package for imaging processing in python. Toolkit for SciPy that is billed as an extension for scipy.ndimage.
  • galpy: Galactic and Milky Way dynamics. galpy supports orbit integration in a variety of potentials, evaluating and sampling various disk distribution functions, and the calculation of action-angle coordinates for all static potentials.
  • sncosmo: Python library for supernova cosmology.
  • Aligning Two Images:

GUIs and frameworks

Benchmarks

Website resources

Meetings

Interested in learning more?

-- BrianKent - 2013-08-19
Topic revision: r23 - 2015-07-06, BrianKent
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback