# [Ifeffit] Re: Calculating Phase Corrected Re and Im

Matt Newville newville at cars.uchicago.edu
Sun Apr 13 14:06:03 CDT 2003

```Dear Ian,

On Thu, 10 Apr 2003, Ian Drake wrote:
> ... I would like to calculate and plot the fourier transform
> of the phase corrected chi function.  Can I do this using
> the UWXAFS software suit?  If not, can you recommend other
> software.  I have Mathematica....do you recommend its use in
> the analysis.  My curiosity on this issue stems from the
> work of Lee and Beni in PHYS. REV. B, 15, 1977, pg.2862.

Thanks for the question.  Yes, phase-corrected Fourier
transforms can be done.

I hope it's OK if I CC this reply to the Ifeffit mailing
list, as this is a fairly common question about XAFS
point out that Ifeffit is the successor to the UWXAFS
programs, and includes those programs and quite a bit more
capability, including a few GUIs.  See:
http://cars.uchicago.edu/ifeffit/
for more details.

Phase-corrected FTs are not always as good as you might hope.
They don't give real radial distribution functions.  They do
give somewhat cleaner XAFS FTs and put peaks in |chi(R)|
closer to the corresponding distance.  Of course, to do these,
you need to know the phase. Also, since you can do only one
phase-shift correction, you can't correct all shells or
multiple-scattering contributions.

Anyway, lots of people like phase-corrected FTs, especially
for making plots to show non-XAFS people, and it usually work
fine for the first-shell.  With ifeffit, there are a couple
ways to do phase-corrections.

The simplest way is to name the central atom/edge (eg, 'Cu K')
to the fftf() command.  In ifeffit commands, this looks like:
fftf(my_chi.chi,  kmin=2, kmax=15, dk=2, kweight=2,
pc_caps = 'Cu K')
^^^^^^^^^^^^^^^^

(pc_caps is for Phase-Correction, Central Atom Phase Shift),
This will do only the central-atom portion of the phase-shift,
so will be incomplete, but is often most of the correction,
will work for the whole spectra, and doesn't require knowing
much about the system.  Athena (the excellent GUI to ifeffit
from Bruce Ravel) can do these central-atom phase-corrections
very easily (ie, no typing commands).  I think Sam Webb's
SixPack doesn't do phase-corrected FTs, but I could be wrong.

If you know have a Feff calculation for a scattering path, in
the form of a feffNNNN.dat file, you can use this for a
more-complete phase-corrected FT, like this:
path(1, feffNNNN.dat)
fftf(my_chi.chi,  kmin=2, kmax=15, dk=2, kweight=2,
pc_feff_path = 1)
^^^^^^^^^^^^^^^^

This version includes both central-atom and scattering-atom
phase-shifts, which will give a much better phase-correction,
but assumes you know quite a bit about the system.  I think
athena doesn't do this form of phase-correction, and I don't
remember if artemis does this (yet??).

Feffit will aslo write out phase-corrected FTS (the full kind,
using the first feffNNNN.dat file listed in feffit.inp) if the
keyword 'pcout=1'  in in feffit.inp.

Finally, some people use phase-corrected FTs for analysis,
especially to pick R_NN at a place where Im[chi(R)] = 0.  I'm
not sure what the accuracies of this are, but pelase note that
Ifeffit (and feffit) swaps real and imaginary parts for its
FT, so that it is actually Re[chi(R)] that is ~=0 at R=R_NN
for these FTs.

Hope that helps, but don't hesitate to ask again if it's not
clear enough.

--Matt Newville

```