Hi, Matt - I think the essential point is that sampling at 1 eV at k=12 A^(-1) is greatly oversampled. Suppose you want to sample data out to R=10A (just to make sure you get everything). Then the period of those oscillations in k-space is 2 Pi/(2 10A) ~ .3 A^(-1). Nyquist's theorem says you should sample at least twice per cycle, so you need delta K of 0.15 A^(-1) or smaller (you don't want higher frequency noise to alias down to low frequencies0. The 0.05 grid historically used in the UW programs therefore is pretty conservative. Attempting to preserve a 1 eV resolution at k=12 A^(-1) would imply a sampling of about 0.01 A^(-1), which is quite unnecessary. So I think the box-car average is ok when you are far enough above the edge. I implemented something like in my own mathematica programs a couple of years ago and it works fine, and Nick Dimakis built it into the tcl/tk based APEX package last year. thanks - grant On Wed, 12 Mar 2003 ifeffit-request@millenia.cars.aps.anl.gov wrote:
Send Ifeffit mailing list submissions to ifeffit@millenia.cars.aps.anl.gov
To subscribe or unsubscribe via the World Wide Web, visit http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit or, via email, send a message with subject or body 'help' to ifeffit-request@millenia.cars.aps.anl.gov
You can reach the person managing the list at ifeffit-owner@millenia.cars.aps.anl.gov
When replying, please edit your Subject line so it is more specific than "Re: Contents of Ifeffit digest..."
Today's Topics:
1. Re: fourier transforms and k grids (Matt Newville) 2. Rebinning (Carlo U. Segre) 3. Re: Rebinning (Bruce Ravel) 4. Re: Rebinning (Matt Newville) 5. Re: Rebinning (Carlo U. Segre) 6. Re: Rebinning (Carlo U. Segre) 7. Re: Rebinning (Matt Newville)
----------------------------------------------------------------------
Message: 1 Date: Tue, 11 Mar 2003 12:04:57 -0600 (CST) From: Matt Newville
Subject: Re: [Ifeffit] fourier transforms and k grids To: XAFS Analysis using Ifeffit Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII 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,
--Matt
------------------------------
Message: 2 Date: Tue, 11 Mar 2003 12:16:24 -0600 (CST) From: "Carlo U. Segre"
Subject: [Ifeffit] Rebinning To: IFEFFIT Mailing List Message-ID: Content-Type: text/plain; charset="us-ascii" Matt and Bruce:
Following our previous discussion of rebinning continuous scan data, I am attaching a python code fragment which we use to perform this function. You are free to use it as you like. It was written by Ken McIvor, a student at IIT as part of a larger project to manipulate and preview MR-CAT XAFS data. We simply pulled out the code and annotated it somewhat.
Carlo
-- Carlo U. Segre -- Professor of Physics Associate Dean for Research, Armour College Illinois Institute of Technology Voice: 312.567.3498 Fax: 312.567.3494 Carlo.Segre@iit.edu http://www.iit.edu/~segre
participants (1)
-
Grant Bunker