Good idea to have this - see -> https://github.com/pycroscopy/pyTEMlib/blob/main/pyTEMlib/eds_tools.py