Analysis scripts for momentum-resolved energy-loss spectra taken in a transmission electron microscope.