[Ifeffit] Spline clamps

Bruce Ravel ravel at phys.washington.edu
Tue Jan 13 14:57:01 CST 2004

On Tuesday 13 January 2004 03:41 pm, SCalvin100 at aol.com wrote:
> I am posting now because I am not sure I understand the behavior of the
> spline clamps in Ifeffit. When I set a top end to the spline range that is
> below the top of the data range, the high spline clamp has very little, if
> any, effect. (As a simple example, if I take the "clamp.prj" project that
> comes with Athena and set all of the spline ranges to top out at 400 eV,
> all four backgrounds look the same.) Is this what should be happening, or
> is this a bug?

I don't know if it's a bug or not.  (And if you think it is, I'd
encourage you to make a minimal ifeffit script, perhaps with lines
culled from Athena's ifeffit buffer, and send that to Matt.  I suspect
a minimal script would be most useful to him.  And if you use a data
file that comes with Athena's examples, like the one you mention, then
you can send the script alone.)  It would also be useful to check if
the different clamp values lead to data that looks the same when
plotted but has small numerical differences or if it is numerically

It is possible that it is not a bug and is, instead behaving as
advertised.  The clamp is a penalty applied to the chi-square that is
calculated in determining the spline.  The penalty is computed using
(by default) the last five data points in the data range.  The more
those five points in the spline deviate from the data, the bigger the
penalty.  Thus, the sense in which it is a clamp is that it tries to
coerce the spline to settle down to the level of the data at the end
of the data range.

If the spline is such that, with no clamp, the spline intersects the
data points at the end of the spline range, then applying the clamp
will have little effect.  If the spline doesn't "want" to diverge from
the data in any case, then adding a penalty for doing so won't be much
of a penalty at all.

The clamp.prj demo project works as a demo because the splines *do*
diverge from the data near the end of the data set when the clamp is
set to 0.  That the splines don't do so 400 volts above the edge is
not necessarily indicative of a problem with the clamps.


 Bruce Ravel  ----------------------------------- ravel at phys.washington.edu
 Code 6134, Building 3, Room 222
 Naval Research Laboratory                          phone: (1) 202 767 5947
 Washington DC 20375, USA                             fax: (1) 202 767 1697

 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/

More information about the Ifeffit mailing list