Xas binning
The current binning function used for XAS does not use the right index of each bin. According to the documentation of np.digitize(), a digitized index of 0 means that the value falls lower than the lowest bin edge. Currently, the calculated absorption and the bin centers are offset by 1. This can be corrected by:
-
Modifying the index range in the binning loop -
Additionnally, calculating the mean of the energy in each bin -
Performing both the above points: this is what this merge request does.
An example is provided here, with 5 bins for XAS of Co film: 2020-04-20_XAS_binning.pdf
Edited by Laurent Mercadier