[Ifeffit] Rebinning

Matt Newville newville at cars.uchicago.edu
Wed Mar 12 16:34:27 CST 2003

Carlo, Grant, Shelly, Bruce, 

Thanks!  Shelly's script eems to be similar to what Carlo, Ken,
and Grant have done as well, at least as far as how the rolling
average is done. I think Sam Webb mentioned he had used a similar
technique for some of his QEXAFS data too.  So the consensus
definitely seems to be that the moving simple average over a
limited energy/k range is 'good enough' when converting to
k-space.  I agree with that: it's certainly no worse than what
happens in ifeffit/autobk now.

I'm sort of uncomfortable with automatically rebinning the mu(E)
data for it's own sake, because I think it's too easy to lose
resolution of the data.  I think no one was proposing that -- the
discussion seems only how to convert data on a fine energy grid
to k -- but I want to make sure.  At any rate, the conversion of
mu(E) to chi(k) seems to be the part that ifeffit should be
concerned with.  I propose these behaviors for ifeffit commands:

 - read_data() should leave the QEXAFS energy values intact,
   optionally sorting data.  That is the current behavior.

 - spline() and bkg_cl() [the commands that convert mu(E) to
   chi(k)] need to work with both 'step scan' and 'continuous'
   energy data.  That complicates things a little, but I think it
   means they should create chi(k) on the even k-grid like this:
   At each k-point (i*kgrid for i=0,Npts), if there are more than
   2 data points in the range (k - kgrid/2, k + kgrid/2], average
   all points in that region.  If there are fewer than 2 points
   in that range, do a 3-point interpolation using the 2
   surrounding points and the next nearest point.  Both of these
   averages may spoil resolution somewhat, but like Grant says,
   the kgrid=0.05 is pretty conservative anyway.

I believe this approach will handle QEXAFS data about as well and
as simply as possible, and needs no additional flags or settings.  
The rolling average will *ALWAYS* be done by spline() and
bkg_cl() if and where it is needed. That will make spline() a
little slower, but only because it would be using more data.  

This change should help other data, and do no harm that isn't
already being done.  For example, data taken on an even energy
grid would 'use all the data' to effectively increase the dwell
time at each k value linearly with k.  Currently, this does not
happen with ifeffit/autobk, and the additional statistics
inherent in such data is lost.

This approach should also make Bruce's job much easier, as the
calls to spline() and bkg_cl() from athena would not need any
changes for QEXAFS data.

Any objections, suggestions, or other thoughts?


PS: I think that the fix for the non-uniform k-grid problem in
feffit() and this new E->k procedure would be enough to call it a
new version.  Were there any other outstanding requests?

More information about the Ifeffit mailing list