# [Ifeffit] Using parameters in Artemis

Bruce Ravel bravel at anl.gov
Thu Mar 8 09:46:03 CST 2007

On Wednesday 07 March 2007 22:19, David Weedon wrote:
> What are we doing when we make our own parameters?  Are they a
> mixture of parameters from the EXAFS equation that we wish to
> evaluate in the fit, and if so why?

David,

Many of your questions are actually the same question.  Let me step
back and try to offer up some of the big big picture.

The simplest discussion of EXAFS is the single shell case, so let's
start there.  Matt gives a very nice derivation of the
single-scattering exafs equation between pages 11 and 20 of this pdf
file:
http://xafs.org/Tutorials?action=AttachFile&do=get&target=Newville_Intro.pdf

Jumping to the result, we see that the exafs equation is something
like

chi(k) = (N*S02*F(k)/2kR^2) * sin(2kr + phi(k)) * exp(-2k^2sigma^2)

There is also a mean free path term and possibly some cumulants, but
that equation has all the important stuff.

The purpose of Feff is to compute the scattering amplitude and phase
shift: F(k) and phi(k).  R is the distance between the scatterer and
the atom in the first shell.  k is the wavenumber of the
photoelectron, which is, of course, related to its kinetic energy (or
energy in excess of the binding energy of the deep core electron).  N
is the coordination number, or number of atoms in the first shell.
sigma^2 is a mean square deviation in R and so represents the disorder
in the first shell.  And S02 is an amplitude reduction factor that
Matt talks about in that PDF file but which I won't discuss further
here.  There is also an energy shift term E0 which is used to align
the k-grid of the theory with the k-grid of the data.

If we do an analysis of our first shell data, then we are trying to
figure out how many atoms are in the first shell, what their disorder
is, and how many of them there are.  In that case, it is natural to
cast the problem insimple terms.  N, R, and sigma^2 are the parameters
of the fit.  We modify those parameters until the theory best fits the
data.  And then we're done.

What happens if, instead of having N atoms at a single distance R, you
have some kind of splitting of the first shell, such that N/2 atoms
are at a shorter distance R1 and N/2 of the atoms are at a longer
distance R2?

Well, the formalism that we use to understand the EXAFS says that
contributions from different kinds of scatterers add.  The
contribution from atoms at distance R1 is evaluate using the equation
above, as is the contribution from the atoms at R2.  The total chi for
this split shell, then, is

chi(k) = chi1(k) + chi2(k)

where chi1 and chi2 are evaluated using appropriate values of N, R,
and sigma^2.

Now consider trying to fit more than the first shell.  The approach
is, conceptually, exactly the same as what I have already described.
You evaluate chi(k) for each kind of scatterer and add them up:

chi(k) = sum over all paths [ chiN(k) ]

As you can see from Scott's examples, which you have started working
through, describing the first few shells of an EXAFS problem can
involve many paths.  It is not uncommon to use 10s of paths (or more)
in a fit.  At first glance, this is a catastrophe.

We need to evaluate N, R, and sigma^2 for every path.  If a fitting
problem requires 15 paths, that means we have to evaluate 45
parameters.  But our EXAFS data almost certainly does not contain that
much information.  There is no way to do a fit and evaluate 45
parametesr in a defensible way.

We could throw up our hands and go home, but it's only 9:30 in the
morning as I write this, so I'm not quite ready to do that ;-)

Perhaps this is a crystal so we can assert that we know N for each
kind of scatterer.  Perhaps, as in the case of our split shell, the
split in distance is not so large and we can assert that sigma^2 must
be the same (or with measured uncertainties) for each part of the
split shell.  Perhaps we are measuring a cubic crystal, so all chnages
in bond length R can be expressed with a single parameter describing
the bulk, isotropic expansion or compression of the lattice.

The bottom line is that N, R, and sigma^2 might be the parameters of
the EXAFS equation, but they do not have to be the parameters of the
fit.  That's the central concept of Ifeffit and, by extension, of
Artemis.

Instead of floating N, R, and sigma^2 in the fit, we float a set of
abstract parameters and write N, R, and sigma^2 in terms of those
parameters.  Those relationships can be simple.  For instance, we
might have a sigma^2 parameters called "ss7" and use that as the
sigma^2 parameters for path 7.  Or we might, as Carlo suggested in his
response to your email, use a correlated Debye model for the sigma^2
values.  In that case, we would have two parameters:

set    temperature  300

and for each path for which we use the correlated Debye model, use

sigma^2 for path N = debye(temperature, tehtad)

The math expressions can be whatever they need to be.  You get to use
the binary operators ( + - * / ** ), common math and trig functions
(sin, cos, exp, sqrt, and others), and a handfull of EXAFS-specific
functions such as debye and eins.

The point of all of this is to express your fitting model in a way
that describes the data and to do so in a way that does throw a
ridiculous number of floating parameters at the problem.

That was really long, but hopefully helpful,
B

--
Bruce Ravel  ---------------------------------------------- bravel at anl.gov

Molecular Environmental Science Group, Building 203, Room E-165
MRCAT, Sector 10, Advanced Photon Source, Building 433, Room B007

Argonne National Laboratory         phone and voice mail: (1) 630 252 5033
Argonne IL 60439, USA                                fax: (1) 630 252 9793

My homepage:    http://cars9.uchicago.edu/~ravel
EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/