Analytical code for pulses21 - Langmann, Fie; Andersen, Glenn Birksø Hjorth (2024)