Visualization Fun with Python

by Jess K February 10, 2014

The below plot is my favorite data visualization I created for my thesis. It is a 2D density plot with histograms projected along each axis. I based the above plot on code from here, however this plot also includes a 2D temperature/density plot in the middle, and 1/2/3 sigma contour lines.  Below is the code I […]


Read more →

Slim down your bloated graphics

by Jessica Lu January 17, 2014

This post was originally written by Erik Petigura who is a graduate student at UC Berkeley and visitor at the IfA, Hawaii working on exo-planet hunting. The post was modified by Jessica R. Lu to incorporate suggestions from a Facebook Astronomers Group thread on the same topic.  Have you ever encountered a paper or proposal PDF […]


Read more →

Astropy v0.3 Release

by Guest January 15, 2014

This is a guest post by Erik Tollerud, a member of the Astropy Coordination Committee and a Hubble Fellow at Yale University. His research focuses on Local Group dwarf galaxies and their connections to cosmology. In November 2013, we published the second public release (v0.3) of the Astropy package, a core Python package for Astronomy. Astropy is a […]

{ 1 comment }

Read more →

Advanced Design Patterns in Python

by Jessica Lu January 8, 2014

If you have been using python for a few years, I suggest looking over the following tutorial: Advanced Design Patterns in Python The tutorial covers some of the basics of comprehensions, generators, decorators, context managers, descriptors, and meta classes. If you don’t know what any of these things are, the tutorial will at least give […]


Read more →

Plotting to a File in Python

by Jess K September 20, 2013

Have you ever wanted to save a Python/Matplotlib image directly to a file instead of having it displayed in an X11 window? I needed to do this for a project where I used qsub/PBS to submit jobs to a cluster and I wanted to plot some results for each run and save them to a […]


Read more →

Conference highlights from SciPy 2013

by Guest September 4, 2013

This is a guest post by Matthew Turk, an NSF Postdoctoral Fellow at Columbia University. This summer saw the twelfth edition of the annual SciPy conference in Austin, Texas from June 24th to 29th. Python users will recognize the name of the SciPy package, which includes a core scientific toolkit, but the SciPy conference has a […]

{ 1 comment }

Read more →

Python Tip: Re-sampling spectra with pysynphot

by Jessica Lu August 12, 2013

This post was inspired by a question from John Johnson. Have you ever wanted to plot a model spectrum at lower resolution? Or compare a model spectrum with an observed spectrum? Have you ever wanted to shift several observed spectra to a common redshift to stack them up? In all these cases, you would need to resample […]


Read more →

Visualizing Astronomical Data with Blender

by Guest August 5, 2013

This is a guest post by Brian R. Kent, an astronomer at NRAO. Astronomy is a visually stunning science.  From wide-field multi-wavelength images to high-resolution 3D simulations, astronomers produce many kinds of important visualizations.  Astronomical visualizations have the potential for generating aesthetically appealing images and videos, as well as providing scientists with the ability to […]


Read more →

Options for Saving in Python

by Jessica Lu July 29, 2013

Question:  What is the best way to store data that is easily readable and writable in Python? Answer: There isn’t a single correct answer as it will largely depend on how large your data set is, how fast you have to read/write it, and whether it needs to be readable by other applications or languages. […]


Read more →

Ureka! – A new easy-to-install IRAF + PyRAF distribution from STScI and Gemini

by Guest July 15, 2013

This is a guest post by Christine Slocum, a software engineer at Space Telescope Science Institute (STScI), on behalf of the Ureka team. Last month, STScI and Gemini announced the first public beta release of the Ureka binary installer for common astronomical software (primarily for the UV/Optical/IR community). The goals of the Ureka installer are […]


Read more →