Code used for research with UC Berkeley's Gaspard Duchene.