[Ifeffit] Larch flattening

Kirill Lomachenko kirill.lomachenko at esrf.fr
Fri Jan 25 12:44:45 CST 2019

Dear Matt,
I have a question and a comment regarding Larch. I would appreciate if 
you could have a look.
1) The flattening algorithm for XAS in Larch  works differently with 
respect to Athena when linear post-edge function is used for 
normalization. In Larch the normalized spectrum is always fitted by a 
parabola for flattening, no matter which function was used for 
normalization. It works fine when the post-edge function is also a 
parabola, but when it is a straight line, the resulting flattened 
spectrum does not stick to Y=1, as it is expected to do (and as it does 
in Athena). My question is: is it a bug or a feature? Just in case, I 
made some minor modifications in the pre_edge.py file that allow to get 
the same results as in Athena when linear post-edge is used. Maybe these 
corrections are a bit clumsy, but it seems to work. If anyone needs, I 
can share.

2) There is a typo in the larch web-manual in the description of the 
nnorm parameter of the pre_edge() function. It is stated that it is the 
number of terms in the fitting polynomial (i.e., 1+degree) whereas it 
seems that it is just its degree. So, nnorm=1 corresponds to a linear 
function and nnorm=2 to quadratic. In the gui help it is partially 
corrected, but the phrase "Default=3 (quadratic)" stays. It is not 
critical at all, but may be misleading for beginners...

Using the possibility, I would like to thank you for all the great work 
you are doing on Larch. It really helps for large datasets!

All the best,

Dr. Kirill A. Lomachenko
Scientist at BM23/ID24 beamlines
European Synchrotron Radiation Facility
71 avenue des Martyrs
CS 40220
38043 Grenoble Cedex 9, France
Tel: +33 438 88 19 14

More information about the Ifeffit mailing list