Setting ranges in peak fitting
Hi Bruce,
To clarify this further, I am peak fitting a number of peaks under the carbon edge. For example, I know from the literature that the 1s-p transition for the C=C should be located between 284.5 to 285.5 eV, so I would fit a peak at about 285 eV to start with. I would then move on to fitting additional peaks based on their literature values with what I know about the material/where obvious peaks are in the NEXAFS.
The problem now comes when I tell Athena to fit, it will start to move the peaks all over the place to obtain the best fit, typically placing them in locations where functionalities don't appear under the NEXAFS. In other words, it would move peaks away from where I would expect them to be based on the literature. This can be partially stopped by fixing all but one peak, fitting it and then and applying this procedure to every peak multiple times.
What I was wondering is if Athena has the ability to set a range that each peak is allowed to move, i.e., the C=C center would be restricted to values between 284.5-285.5 eV. Hence I could set up the ranges and fit quickly based on those.
Cheers,
Ken Latham
________________________________________
From: ifeffit-bounces@millenia.cars.aps.anl.gov
Hi Ken,
Our work seems pretty similar in terms of peak fitting C K-edge spectra of organic compounds with Athena, as I dealt with this throughout my PhD programme.
The answer is positive, you can do peak fitting restrained only to a certain fitting range that you choose.
So, in order to do this, you can choose the minimum and maximum values of the fit range from the Peak Fitting window in Athena (you can either use the pluck buttons and choose the points on the plots window, or enter them manually).
After you set the fit range that strictly contains the position of the peak you want to fit (preferably it shall not contain other peaks), you just need to tick the parameters that you want to keep fixed for that specific peak (including other peaks you do not want to change the fitting parameters for). For example, if you want to keep fixed the height/amplitude or width of the peak of interest, you need to tick these corresponding boxes and leave un-ticked the box containing the energy position (E0).
Once you are finished with one peak, you can continue the same procedure with the rest of the peaks in your spectrum.
This is a way faster method to fit peaks in an effective way, and it usually works fine - sometimes you still need to make some manual adjustments to the parameters to convince yourself whether the fits can be done better or not.
I hope this helps a bit.
Regards,
Adrian
*******************
Adrian Gainar
PhD student
Office: D37
School of Chemical Engineering and Analytical Science
Jackson's Mill
University of Manchester
Manchester
M13 9PL
UK
e-mail address contact: adrian.gainar@postgrad.manchester.ac.uk
office telephone no.: +44(0)161 306 4362
________________________________________
From: ifeffit-bounces@millenia.cars.aps.anl.gov [ifeffit-bounces@millenia.cars.aps.anl.gov] on behalf of Kenneth Latham [Kenneth.Latham@uon.edu.au]
Sent: 28 July 2015 05:59
To: ifeffit@millenia.cars.aps.anl.gov
Subject: [Ifeffit] Setting ranges in peak fitting
Hi Bruce,
To clarify this further, I am peak fitting a number of peaks under the carbon edge. For example, I know from the literature that the 1s-p transition for the C=C should be located between 284.5 to 285.5 eV, so I would fit a peak at about 285 eV to start with. I would then move on to fitting additional peaks based on their literature values with what I know about the material/where obvious peaks are in the NEXAFS.
The problem now comes when I tell Athena to fit, it will start to move the peaks all over the place to obtain the best fit, typically placing them in locations where functionalities don't appear under the NEXAFS. In other words, it would move peaks away from where I would expect them to be based on the literature. This can be partially stopped by fixing all but one peak, fitting it and then and applying this procedure to every peak multiple times.
What I was wondering is if Athena has the ability to set a range that each peak is allowed to move, i.e., the C=C center would be restricted to values between 284.5-285.5 eV. Hence I could set up the ranges and fit quickly based on those.
Cheers,
Ken Latham
________________________________________
From: ifeffit-bounces@millenia.cars.aps.anl.gov
On 07/28/2015 12:59 AM, Kenneth Latham wrote:
Hi Bruce,
To clarify this further, I am peak fitting a number of peaks under the carbon edge. For example, I know from the literature that the 1s-p transition for the C=C should be located between 284.5 to 285.5 eV, so I would fit a peak at about 285 eV to start with. I would then move on to fitting additional peaks based on their literature values with what I know about the material/where obvious peaks are in the NEXAFS.
The problem now comes when I tell Athena to fit, it will start to move the peaks all over the place to obtain the best fit, typically placing them in locations where functionalities don't appear under the NEXAFS. In other words, it would move peaks away from where I would expect them to be based on the literature. This can be partially stopped by fixing all but one peak, fitting it and then and applying this procedure to every peak multiple times.
What I was wondering is if Athena has the ability to set a range that each peak is allowed to move, i.e., the C=C center would be restricted to values between 284.5-285.5 eV. Hence I could set up the ranges and fit quickly based on those.
Hi Ken, So, the short answer is no, Athena does not current allow you to do that. That's not because it is somehow not possible, but because Athena does not have controls which allow you to specify limits on a fitted value. Happily Adrian's answer was extremely useful. Limits on variables is something that is implemented very well in Larch: http://xraypy.github.io/xraylarch/fitting/parameters.html Matt even provides an example of XANES peak fitting in the Larch manual: http://xraypy.github.io/xraylarch/fitting/examples.html#example-2-fitting-xa... Now that Athena has the option of using Larch instead of Ifeffit, it will be easier for me to implement controls to do that, but that is a future project. The bottom line is that Athena does not currently do what you are asking for. B -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 535A Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/
participants (3)
-
Adrian Gainar
-
Bruce Ravel
-
Kenneth Latham