[xas_input] Energy data in keV should be converted to eV
At the beamline we usually collect the spectra in keV, thus the energy array should be converted in eV when reading the file, otherwise the following workflow fails.
This could be added either explicitly in the dialog of
xas_input (like a combobox choosing if the input data are in eV or keV) or simply guessed by the energy data array itself. I propose the second option with the following test:
if (energy.max() - energy.min()) < 3.0: energy *= 1000
This automatic guess works because EXAFS data are never longer than 2 keV and a low energy XANES is never shorter than 3 eV.