Skip to content
2016 Python Bootcamp for UW Astronomy and Physics
Jupyter Notebook CSS HTML Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
stylesheets Create master branch via GitHub Sep 19, 2016
.gitignore Initial commit Aug 24, 2016
LICENSE Create LICENSE Aug 28, 2016 Update Sep 21, 2016
collaborating_on_github.ipynb Adding documentation subsection Aug 28, 2016
intro_to_astropy.ipynb splitting solutions out of astropy tutorial Sep 22, 2016
intro_to_hdf5.ipynb Adding OO tutorial Aug 28, 2016
intro_to_oo.ipynb Adding exercise at the end Sep 22, 2016
params.json Create master branch via GitHub Sep 19, 2016

2016 Python Bootcamp for Astronomy and Physics

Sept 26-27, 2016 in PAA 216

Visit the bootcamp website here.

Welcome to Python Bootcamp - a highly-condensed, fast-paced, incomplete tour of the Python language and some of its essential packages used in physics and astronomy with Python. This course is meant for students who are experienced programmers in a language other than Python. We will give you broad and shallow exposure to the plethora of tools that may be useful to you in Python, starting at the basics of the language and moving up to scientific computation in Python.


In this two-day "course", we'll introduce you to:

  • efficient calculations with numpy
  • visualization with matplotlib
  • writing functions and modules
  • optimization with numpy and scipy
  • object-oriented programming
  • handling "big data" with HDF5
  • astronomical calculations with astropy
  • version control and collaboration with git and GitHub

Getting set up for Bootcamp

Before arriving at Bootcamp, we will assume that you have Python and the required packages installed. The easiest way to do that (and I very strongly encourage that you do it this way) is to use the Anaconda package manager. Download and install Anaconda (or miniconda if disk space is a concern) for Python 3, and then install the dependencies for this course with the following command in your terminal:

conda install numpy scipy astropy matplotlib h5py jupyter ipython
conda install -c astropy astroquery

This will download and install all of the required dependencies for our tutorials. Contact me if you have trouble getting set up before bootcamp begins (but be warned: I will only provide installation support if you're using anaconda)! If you plan to stick around for the git tutorial, you should also install git.

Testing your setup

You can test if you've successfully installed Python and the required depedencies by doing the following.

  • Open a new terminal window, and type ipython. This will open an interactive iPython shell, giving you a prompt that says In [1]:.
  • Copy this code to your clipboard:
import numpy
import scipy
import astropy
import matplotlib
import h5py
import astroquery
  • Type into the iPython shell the word paste, and press enter.
  • If no errors are raised, you're ready for bootcamp. You may close the terminal window.


Brett Morris is a fourth-year graduate student of Astronomy and Astrobiology. He maintains the astropy-affiliated package astroplan, among others.


In addition to the notebooks in this repository, we will use Jake Vanderplas' 2014 Python Bootcamp notebooks, which I've forked here.

Further reading

For additional resources on getting up to speed in Python, I recommend Jake's book A Whirlwind Tour of Python, which is currently available for free. If you're ready to go deeper, there are many freely available books on Python to try.

Preliminary schedule

Time Lesson
Mon 9-10:30 Basic training
Mon 10:30-11:30 Data structures
Mon 11:30-12 iPython
Mon 1-2 Functions, modules
Mon 2-3:30 Git intro
Tues 9-10:30 Numpy intro
Tues 10:30-11 Matplotlib intro
Tues 11-12:00 Optimization intro
Tues 1-1:45 Intro to astropy
Tues 1:45-2:30 Intro to OO
Tues 2:30-3:00 Intro to HDF5
Tues 3-4 GitHub intro
You can’t perform that action at this time.