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