[Ifeffit] fourier transforms and k grids

Matt Newville newville at cars.uchicago.edu
Tue Mar 11 12:04:57 CST 2003

Hi Peter,

Thanks for the report.  I've verified your findings that feffit()
is doing the wrong thing for the Fourier transforms for data on
grids other than k-grid of 0.05Ang^-1.  Here's what is happening:

feffit() really is interpolating data internally onto the 0.05
grid for the fit.  The fit _should_ procede correctly for data on
any grid.

Anyway, at the end of feffit() command it sends the data off to
the fftf() command to make the chir_mag, etc arrays.  It is at
this point that the k-array in ***NOT*** being sent to the FFT.
I've verified in my own tests that including the k-array in the
FFT works, giving the right FFT.  hopefully I will get a fixed
version posted this week.  But currently, the r-space data (data
only, not the fits) from feffit() are wrong when a non-0.05
k-grid is used.  Simply doing
  fftf(real=data.chi, k = data.k)

will give the correct r-space data.

I also noticed another wart and small inconsistency between
feffit() and fftf() from your example, which has the 'data' over
a smaller range than the FFT window.

Thanks, and sorry for the trouble, 


More information about the Ifeffit mailing list