And....one other feature request for Bruce for Athena version 2.3. It would be nice if we could put constraints on each of the fitting variables. This would help prevent fits where the variables quickly spin off into meaningless territory. Of course, implemenation of this feature could get complex given the number of variables to be fit. An easier implemenation of constraints would be a checkbox and a % deviation field that would let
Dave wrote: the variables chosen float within that %deviation.
Ifeffit (and thus Artemis) already has "max" and "min" features that allow you to approximate this. For example, to require S02 to be between 0.60 and 1.00, you can do the following: guess S02p = 0.80 def S02p = max(0.60,min(1.00,S02p)) Admittedly that is a bit awkward, and Bruce could implement it as you suggest in Artemis. My experience is, however, that this does not work very well. A fit which likes to "spin off" tends to pin itself to one of the edges of the allowed range anyway, and then the ifeffit routines for working out uncertainties and correlations lose their ability to figure out what is going on (the fitted parameter can become in some sense meaningless to the fit). So I think if Bruce implements it that it would just be a source of frustration. You could use "restraints" instead, although that raises its own issues of defensibility and how to choose the weighting function. My preference is to find other ways to make the fit conform to the real world, e.g. I include more paths, or more k-weights, or other constraints, or values from a standard... --Scott Calvin Sarah Lawrence College
On Friday 18 June 2004 07:55 pm, Scott Calvin wrote:
Dave wrote:
And....one other feature request for Bruce for Athena version 2.3. It would be nice if we could put constraints on each of the fitting variables. This would help prevent fits where the variables quickly spin off into meaningless territory. Of course, implemenation of this feature could get complex given the number of variables to be fit. An easier implemenation of constraints would be a checkbox and a % deviation field that would let the variables chosen float within that %deviation.
Ifeffit (and thus Artemis) already has "max" and "min" features that allow you to approximate this. For example, to require S02 to be between 0.60 and 1.00, you can do the following:
guess S02p = 0.80 def S02p = max(0.60,min(1.00,S02p))
Admittedly that is a bit awkward, and Bruce could implement it as you suggest in Artemis. My experience is, however, that this does not work very well. A fit which likes to "spin off" tends to pin itself to one of the edges of the allowed range anyway, and then the ifeffit routines for working out uncertainties and correlations lose their ability to figure out what is going on (the fitted parameter can become in some sense meaningless to the fit). So I think if Bruce implements it that it would just be a source of frustration.
For me or the user? ;-) Ummmm.... I think that Dave was actually refering to the peak fitting dialog in Athena. I can see the use of such a thing. A Gaussian, say, fitting a peak in the near edge should certainly never be -1eV wide or 20 eV wide. Somehow putting boundaries on those parameters would be of value. The big problem with peak fitting data like a XANES spectrum is, though, lots of parameters and limited information. There actually isn't so much information in an edge spectrum (and, of course, step size has nothing to do with that). A fit with lots of peak functions tends to be ill-defined. If the centroids of the peaks can vary, the problme tends to be much worse. Given that, it always seems like a good idea to play around with the parameters of the peak functions by hand until you are close before hitting the fit button. If you do that and don't float the centroid positions, the fit will probably behave with or without boundaries.
You could use "restraints" instead, although that raises its own issues of defensibility and how to choose the weighting function.
My preference is to find other ways to make the fit conform to the real world, e.g. I include more paths, or more k-weights, or other constraints, or values from a standard...
I concur that defending the wieghting function is the dicey part. But some sorts of restraints seem like an outstanding idea to me. Matt's example of bond valence sums as a restraint is one such. B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu Code 6134, Building 3, Room 405 Naval Research Laboratory phone: (1) 202 767 2268 Washington DC 20375, USA fax: (1) 202 767 4642 NRL Synchrotron Radiation Consortium (NRL-SRC) Beamlines X11a, X11b, X23b National Synchrotron Light Source Brookhaven National Laboratory, Upton, NY 11973 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
Ummmm.... I think that Dave was actually refering to the peak fitting dialog in Athena. I can see the use of such a thing. A Gaussian, say, fitting a peak in the near edge should certainly never be -1eV wide or 20 eV wide. Somehow putting boundaries on those parameters would be of value.
Oops! He did say Athena...it's not good for me to get my Greek gods mixed up. Aside from the fact that I was supposedly a Classics minor, some of them have thunderbolts...
I concur that defending the wieghting function is the dicey part. But some sorts of restraints seem like an outstanding idea to me. Matt's example of bond valence sums as a restraint is one such.
Absolutely. In fact, they were a large part of my motivation for upgrading from feffit to ifeffit. For example, I sometimes use restraints when I expect a parameter to be the same as for a standard I have measured. If a fit to the standard yields an S02 of 0.88 +/- 0.07, it seems reasonable to restrain the sample to have an S02 near 0.88 using the uncertainty of 0.07 to guide my assignment of the weighting. Also, fits with restraints are very useful to me as a diagnostic. If a fit is insisting on an S02 of 2.63, for example, I'll try restraining the S02 to 0.90 (weighted in such a way that +/- 0.20 is not too heavily penalized). If the fit then happily chooses 0.87 or something like that, I know I'm dealing with a true "false minimum." If, on the other hand, the fit pulls the S02 as high as it can given the penalty (say to 1.50) then I know it's some other kind of problem. --Scott Calvin Sarah Lawrence College
On Saturday 19 June 2004 01:24 pm, Scott Calvin wrote:
Absolutely. In fact, they were a large part of my motivation for upgrading from feffit to ifeffit. For example, I sometimes use restraints when I expect a parameter to be the same as for a standard I have measured. If a fit to the standard yields an S02 of 0.88 +/- 0.07, it seems reasonable to restrain the sample to have an S02 near 0.88 using the uncertainty of 0.07 to guide my assignment of the weighting.
Also, fits with restraints are very useful to me as a diagnostic. If a fit is insisting on an S02 of 2.63, for example, I'll try restraining the S02 to 0.90 (weighted in such a way that +/- 0.20 is not too heavily penalized). If the fit then happily chooses 0.87 or something like that, I know I'm dealing with a true "false minimum." If, on the other hand, the fit pulls the S02 as high as it can given the penalty (say to 1.50) then I know it's some other kind of problem.
Scott, That's a very nice explanation of the utility of restraints. I suspect that many out there in mailing-list-land will appreciate your comments quite a bit. Perhaps you could discuss more explicitly on how the error bar guides your choice of weight, maybe even with an example... B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu Code 6134, Building 3, Room 405 Naval Research Laboratory phone: (1) 202 767 2268 Washington DC 20375, USA fax: (1) 202 767 4642 NRL Synchrotron Radiation Consortium (NRL-SRC) Beamlines X11a, X11b, X23b National Synchrotron Light Source Brookhaven National Laboratory, Upton, NY 11973 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
That's a very nice explanation of the utility of restraints. I suspect that many out there in mailing-list-land will appreciate your comments quite a bit.
Perhaps you could discuss more explicitly on how the error bar guides your choice of weight, maybe even with an example...
B
Thanks, Bruce. In case people aren't familiar with restraints, here's a brief paragraph on how they work: Ifeffit determines the "best" fit by minimizing chi-square which is given by the sum of the squares of the misfits between fit and data at each point as scaled by an estimated error epsilon (so that the result is dimensionless). By default, ifeffit uses high-R noise to estimate epsilon, but that can be overridden (this is implemented in Artemis as well). A "restraint" simply gives an expression which is squared and then added to chi-square, thus giving ifeffit an additional variable to minimize. So one way in which I've used restraints is to fit a standard compound in the usual way and then move on to a related compound. The fit for the related compound involved more unknown parameters, and tended to yield high uncertainties. I expected certain values to be the same (or at least very close) for the sample as compared to the standard: S02 and E0 for example. But I was not comfortable simply setting the values for the sample equal to the fit from the standard, both because the fit has an uncertainty associated with it and because there could be small differences with, e.g., normalization, and I'd like to let ifeffit evaluate uncertainties for the sample parameters. So I used restraints with the uncertainty in the standard's parameter as the epsilon for the restraint. For example, in one case the fit of the standard yielded an E0 of 3.66 +/- 1.04 eV. I therefore used the following in the sample's fit: guess E0 = 3.66 resE0 = (E0 - 3.66)/1.04 One problem with this scheme is that it makes the estimate of epsilon for the data quite important. One of the beamlines I use used to have high-frequency oscillations in the signal which made the ifeffit method of estimating epsilon a poor choice. But it's probably a good idea to think about the epsilon generated by ifeffit anyway, and it's crucial to do so for multi-edge fits. In any case, it seems to me that the restraint method I described here maintains the proper statistical meaning of chi-square, with the difficulty being where it always was; i.e. in estimating the epsilon for the data. --Scott Calvin Sarah Lawrence College
participants (3)
-
Bruce Ravel
-
Scott Calvin
-
Scott Calvin