A computer aided approach to electron energy loss spectroscopy and imaging