fitting of S XANES with arctans and gaussians
I'm trying to fit 37 micro-XANES spectra taken at the S K-edge, using the method discussed in the paper by Manceau and Nagy "Quantitative analysis of sulfur functional groups in natural organic matter by XANES spectroscopy", Geochimica et Cosmochimica Acta 99 (2012) 206–223. In this paper, they fit spectra to two arctangents and 6 gaussians, with widths of the arctans slaved together and widths of gaussians 1-3 and 4-6 slaved (or all 6 to one value). I'm looking for recommendations as to how to do the fit. They give prescriptions for how to set the initial estimates to give robust values. Manceau has told me that 'Athena works quite well', but I don't see any obvious way there to do the parameter constraints called for, or to keep peak heights from going negative. Athena also has a habit of assuming you want it to do the normalization for you; I've already done that and need no further 'help'. Any ideas? I've tried using Genplot, but that offers no way to restrain parametsrs to ranges to keep them from going nuts. PCA seems to want 6-8 components, so it's not all that helpful. These spectra were taken at various spots on a biological structure (abalone radula) so there's no sense of sequence which would enable the use of evolving factor analysis or something like that. LCF doesn't give satisfying fits with the references I have. I've attached a couple of the files, truncated to the range Manceau&Nagy fit to. The originas were taken over the range 2460-2550eV. mam
On 07/18/2016 11:10 PM, Matthew Marcus wrote:
I'm trying to fit 37 micro-XANES spectra taken at the S K-edge, using the method discussed in the paper by Manceau and Nagy "Quantitative analysis of sulfur functional groups in natural organic matter by XANES spectroscopy", Geochimica et Cosmochimica Acta 99 (2012) 206–223. In this paper, they fit spectra to two arctangents and 6 gaussians, with widths of the arctans slaved together and widths of gaussians 1-3 and 4-6 slaved (or all 6 to one value). I'm looking for recommendations as to how to do the fit. They give prescriptions for how to set the initial estimates to give robust values. Manceau has told me that 'Athena works quite well', but I don't see any obvious way there to do the parameter constraints called for, or to keep peak heights from going negative. Athena also has a habit of assuming you want it to do the normalization for you; I've already done that and need no further 'help'. Any ideas?
Matthew, As for the pre-normalized data, you are supposed to be able to tell Athena at the time of import that the data are normalized mu(E). http://bruceravel.github.io/demeter/documents/Athena/import/columns.html#dat... If that doesn't work, let me know. As for constraints in the peak fitting, that is certainly not implemented in Athena. I am not quite sure why Alain thinks otherwise. HTH, B -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 743, Room 114 Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/
Hi Matthew, WinXAS, (Commercial program by Thorsten Ressler) does possess the capabilities you are seeking but it costs E$200 for an academic/gov't license. -R. On 7/19/2016 5:21 AM, Bruce Ravel wrote:
On 07/18/2016 11:10 PM, Matthew Marcus wrote:
I'm trying to fit 37 micro-XANES spectra taken at the S K-edge, using the method discussed in the paper by Manceau and Nagy "Quantitative analysis of sulfur functional groups in natural organic matter by XANES spectroscopy", Geochimica et Cosmochimica Acta 99 (2012) 206–223. In this paper, they fit spectra to two arctangents and 6 gaussians, with widths of the arctans slaved together and widths of gaussians 1-3 and 4-6 slaved (or all 6 to one value). I'm looking for recommendations as to how to do the fit. They give prescriptions for how to set the initial estimates to give robust values. Manceau has told me that 'Athena works quite well', but I don't see any obvious way there to do the parameter constraints called for, or to keep peak heights from going negative. Athena also has a habit of assuming you want it to do the normalization for you; I've already done that and need no further 'help'. Any ideas?
Matthew,
As for the pre-normalized data, you are supposed to be able to tell Athena at the time of import that the data are normalized mu(E).
http://bruceravel.github.io/demeter/documents/Athena/import/columns.html#dat...
If that doesn't work, let me know.
As for constraints in the peak fitting, that is certainly not implemented in Athena. I am not quite sure why Alain thinks otherwise.
HTH, B
I can’t recommend LMFIT in python enough (or Larch - never used it mind, but see no reason why I haven’t).
Its well documented, easy to use and, best of all, its FREE! :)
https://lmfit.github.io/lmfit-py/builtin_models.html#builtin-models-chapter
https://lmfit.github.io/lmfit-py/builtin_models.html#example-3-fitting-multi...
all the best
Jon
On 19 Jul 2016, at 14:26, Robert Gordon
On Tue, Jul 19, 2016 at 6:38 AM, Jon Wade
I can’t recommend LMFIT in python enough (or Larch - never used it mind, but see no reason why I haven’t).
Its well documented, easy to use and, best of all, its FREE! :)
https://lmfit.github.io/lmfit-py/builtin_models.html#builtin-models-chapter
https://lmfit.github.io/lmfit-py/builtin_models.html#example-3-fitting-multi...
all the best
Jon
There are (IMHO) pretty good peak fitting methods in Larch, and a GUI for fitting XANES with Larch and LMFIT is actually a top priority for me. It's in progress (I was working on it some yesterday), but not yet fully working. This will allow features like constraining multiple peaks to have the same widths, etc. Feature requests, suggestions, or help are most welcome. --Matt
participants (5)
-
Bruce Ravel
-
Jon Wade
-
Matt Newville
-
Matthew Marcus
-
Robert Gordon