by Brandon Rhodes • Home

IPython Notebook and Astronomy at CodeMash

Date: 12 January 2013
Tags:computing, emacs, python, pyephem

Another CodeMash is over! Bacon has been eaten, the Kalahari water park has echoed with talks about languages both static and dynamic, and one of the world's most eclectic programming conferences has sent more than a thousand attendees away happy.

You're missing @brandon_rhodes #codemash talk. twitter.com/benjaminws/sta…

— Benjamin W. Smith (@benjaminws) January 11, 2013

I was quiet when attending my first CodeMash in 2012, but for 2013 I proposed a talk of my own that, to my great delight, was accepted! It was not recorded, but here are the slides and source code:

→ Slide deck “Touring the Universe with Scientific Python

→ GitHub repository “astronomy-notebooks

It was great fun to tout a genuine Python superpower in front of an attentive crowd yesterday, and to explain my excitement about how IPython Notebook and the scientific libraries behind it can impact education, research, and collaboration.

Absolutely awesome talk from @brandon_rhodes on Scientific Python. Best of #codemash thus far.

— Mike Busch (@mikelikesbikes) January 11, 2013

I chose astronomy as my science topic because of its familiarity — every sighted person has seen the stars, I reasoned, and everyone seems to remember from school that the planets revolve around the sun — so I could jump right in to the visualizations without having to explain what an “orbit” is. Over the course of my talk I switched between my slides and a browser running a live IPython Notebook server with a series of notebooks (available at the GitHub link above) that illustrate 2D plotting, 3D visualization, and numeric processing.

I submitted the talk proposal back in September as the Python community was first mourning John Hunter. I thought it would be fitting if this were the year that CodeMash featured John's work, and IPython Notebook had caught my attention at PyCon 2012. But what really gave my talk its momentum was seeing Fernando Perez bring down the house with his concluding keynote at PyCon Canada in November — I have never seen a live demo generate such sustained eruptions of applause! In fact, the “IPython Examples” notebook with which I closed my talk is essentially a list of IPython features that I did not even know existed until I saw Fernando speak.

Here is Fernando's talk from November:

Now that my CodeMash talk is over, I will be turning my attention back to the astronomy notebooks. Their code is so much longer and more awkward than I would have liked! This is the first time that I have made heavy use of my astronomy APIs in conjunction with NumPy and SciPy, and the results are not pretty. Watch for notable improvement in the coming months as I practice “Notebook-driven” development and begin making things simpler!

©2021