Diffraction effects in electron spectroscopic imaging