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/