[Ifeffit] simultaneous fitting of multiple data sets in ifeffit

Matt Newville newville at cars.uchicago.edu
Sun Apr 4 23:17:05 CDT 2004


Hi Stanislav,

You _can_ specify different kmin,kmax,rmin, and rmax parameters for 
each data set. A simple example would be:

#---
  read_data(file = my_data.chi, group=dat, type=chi)
  
  guess(Amp= 0.9, E0= 0,  dR1= 0.00)
  path(1, feff= feff0001.dat, s02= Amp, e0= E0, delr= dR1)

  set(kmin= 2, kmax= 12, dk= 1, rmin= 1, rmax= 3, kweight= 2)

  feffit(chi= dat.chi, kmax= 10, kweight= 1, 1, data_set= 1, data_total= 2)
  feffit(chi= dat.chi, kmax= 11, kmin= 3,    1, data_set= 2, data_total= 2)
#---

To address your question, this example uses both 'globally set' FT
parameters, and ones explicitly set in the feffit() command.  For
the first data set, kmin, dk, rmin, rmax are taken from the 'global
parameters', while the explicit values for kmax and kweight are
used.  For the second data set, kmax and kmin are explicit, and dk=
1,rmin= 1,rmax= 3, and kweight= 2, as set from the global values.

An important note is that after feffit() runs completely, the global
program variable kmax will be set to the last used value - 11.0 in
this case.  This is NOT true if feffit() has data_set<data_total.  
Thus, for the second data set above, kweight= 2, not 1.

The use of global parameters might be confusing (but it made sense
to me at the time!). They can be a convenient at the command line or
with quickly-writen scripts, but you need to be able to overwrite
them, and that can lead to confusion.  The peculiar behavior of
feffit() for multiple-data-set fits is the result of not having an
obvious "right way" of doing it.  You can explicitly state all the
FT and range parameters.  This avoids confusion, but does take more
typing.  I'm pretty sure this is what Artemis does which makes sense
since it's "doing the typing" for you.

Finally, the feffit() keywords that are applied to a data set are:
  rmin rmax kmin kmax dk dk1 dk2 kwindow kweight 
  epsilon_k epsilon_r fit_space  data_set chi k

oh, and the path list goes with each data set of course.

Hope that helps,

--Matt

On Sun, 4 Apr 2004, Stanislav Stoupin wrote:

> Hello!
> 
> First of all I would like to thank Bruce for answering my questions. 
> As a beginner I very much appreciate your help.
> 
> Now I am trying to compare my results using two possible ways of doing EXAFS 
> analysis : 
> 1. Artemis
> 2. ifeffit command line (loading input files) 
> 
> Here is my question:
> When I use ifeffit commands it is not clear to me how to assing different 
> kmin/kmax (rmin/rmax) values to different data sets in a multiple data set 
> fit. 
> 
> My current understanding of the problem is as follows:
> As ifeffit documentation says all variables are global. At the same time 
> ifeffit tries to evaluate all parameters of feffit() command first and does 
> the fit  only after determination of kmin kmax rmin rmax. What happens is 
> that the last given values are assigned to these variables.
> 
> Could somebody show me an example of a script that allows to assing different 
> values of kmin kmax rmin and rmax for different data sets?





More information about the Ifeffit mailing list