Tutorials

Hands-on tutorials that teach methods of Galactic astronomy with public survey data.

Each tutorial is a website made of Jupyter notebooks. Every chapter runs on its own, in Google Colab with nothing to install or on your own computer, and downloads the data it needs. Every result is shown in a figure and checked numerically in the code. The notebooks and code are on GitHub. I built the tutorials with help from the AI assistants Claude (Anthropic) and Codex (OpenAI).

Galactic Dynamics with AGAMA

A course in computational galactic dynamics, from beginner level upwards, built on the AGAMA library. It starts with the potential of a spherical mass and the integration of a single orbit, moves on to phase mixing, the Jeans equations, distribution functions and actions, and ends with the Milky Way in Gaia data: the solar neighbourhood, the Gaia-Sausage/Enceladus merger, and the Galactic bar. Each chapter ends with exercises.

  • Orbits in spherical and axisymmetric potentials; the third integral and epicycles.
  • Jeans modelling, distribution functions, actions and angles, self-consistent models.
  • The disc, stellar halo and bar resonances in Gaia data.

Finding Milky Way Halo Substructure

How faint Milky Way satellites and stellar streams are found in large imaging surveys. The tutorial starts from a catalogue of stars, separates stars from galaxies, builds matched filters from isochrones, and calibrates overdensity searches with null fields and injected fake satellites. It ends with a blind search of a held-out patch of sky and with all-sky searches in Gaia and DES, using Boötes I, Pal 5, Reticulum II and Crater 2 as worked examples.

  • Star–galaxy separation, colour–magnitude diagrams and distances.
  • Matched filters, overdensity searches, likelihood fits, and injection–recovery tests.
  • Data from SDSS, Pan-STARRS, Legacy Surveys, HSC, DES and Gaia.

Non-Single Stars in Gaia

About half of all Sun-like stars have a companion, and Gaia detects many of them without resolving the pair: the companion makes the star's light centre wobble, its velocity change, or its brightness dip. The tutorial follows these signals from the binarity indicators available for every Gaia source, RUWE and radial-velocity scatter, to the orbits of the Gaia DR3 non-single-star catalogue and the epoch astrometry of Gaia DR4.

  • Photocentre wobble, RUWE and astrometric orbits, including Gaia BH1 and BH3.
  • Spectroscopic and photometric binaries, and Hipparcos–Gaia accelerations.
  • Compact companions, hierarchical systems and selection functions.

Stellar Labels from Spectra with The Cannon

How to measure the temperatures, surface gravities, metallicities and element abundances of stars from their spectra with The Cannon, the data-driven spectral model of Ness et al. (2015). Starting from APOGEE spectra as they leave the reduction pipeline, you write The Cannon yourself in a few dozen lines of numpy, train it, validate it, test where it fails, and finally transfer APOGEE's labels to Gaia RVS spectra.

  • Continuum normalisation and the training and test steps of The Cannon.
  • Validation with held-out stars, repeat visits and star clusters.
  • Element abundances, many-label models, and label transfer to Gaia RVS.