[Ifeffit] Plots of apodization Windows in Athena 0.8.005 and artemis.0.5.004

Bruce Ravel ravel at phys.washington.edu
Mon Jan 6 15:22:28 CST 2003


I hope you don't mind that I am sending my responses to your questions
to the Ifeffit mailing list.  They seem of sufficiently general
interest that I think the Ifeffit list would be interested.

 MS> I used artemis.0.5.004 to open a project created with
 MS> artemis.0.5.002. I noticed that the apodization window didn't
 MS> plot correctly in the R-space (i.e., it is just a red flat line
 MS> instead of a cathedral door-like shape), eventhough I checked the
 MS> 'Window' box as a plotting option.

Hmm... that certainly seems like a problem, but I am not certain which
problem.  Unlike the Athena project files, the Artemis project files
do not currently contain the data, they only contain a pointer to the
data.  It is possible that the data moved, that you are on another
computer, or for some other reason the path and file listed in your
project file just don't point to the correct thing.  If you select
"Change data file" from the "Data" menu and refresh the location of
the data, does that solve the problem?  If not, you should prepare a
bug report as described at
so I can figure out what is really going on.

 MS> Another detail which kind of puzzles me: whenewever I use a
 MS> Kaiser-Bessel window and increase the weight, the *plotted*
 MS> limits of the apodization window shift away from the positions
 MS> defined in the command window (e.g., for positions set to 2 and
 MS> 13 Å-1 in the command window and a weight dk = 1, the plotted
 MS> apodization limits are shifted to 1 and 14 Å-1).

I am a bit confused by the numbers you give in that they are not
consistent with what I observe when I make a plot displaying a
Kaiser-Bessel window.  Here is what I observe:

  For a window defined by kmin=2, kmax=18, and dk=2, the first
  non-zero value of the window is at k=1 and the last non-zero value
  is at k=19.  In general terms, the first non-zero value of the
  Kaiser-Bessel window is at kmin-dk/2 and the last is at kmax+dk/2.

The ultimate reference is, I suppose, the source code.  In the
src/lib/ folder of the ifeffit source directory, you will find the
source code file "window.f".  The first and last non-zero values for
this and several other window types are defined around line 123.
(Note that the comments at the top of the file regarding the K-B
window are incorrect in that they contradict the code around lines
123.)  The exact shape of the window and whether it falls all the way
to zero is determined by some parameters computed from kmin, kmax, and
dk and by the evaluation of a Bessel's function.  This is all around
line 167.

The comments in window.f suggest this as a reference for the K-B
window: 'Digital Filter' by J.F. Kaiser in 'System Analysis by Digital
Computers' edited by F.F. Kuo and J.F. Kaiser, (New York; Wiley) 1966

The bottom line is that you may want to set kmin a bit higher so that
kmin-dk/2 is at the point where you want the window to start.  Note
that setting dk to 0 is probably *not* what you want to do, although
it is probably worth doing so just once to see what happens to the K-B

 MS> A final 'cosmetic' suggestion: would it be possible in future
 MS> versions of artemis, to plot both the amplitude and real part, or
 MS> amplitude and imaginary parts of experimental and simulated
 MS> chi(R) together?

You are not the first person to ask for this, Michel, but the last
time this came up, Artemis was much less far along.  I suppose that it
is time to revisit this issue.

The reason that Artemis does not currently let you plot more than one
part of chi(R) at a time is because it is so very easy to plot the
data, the fit, the background spline, and any number of paths with a
single mouse click.  Already, that can make for an absurdly busy
plot.  If Artemis plotted *two* parts of each item, the plot would be
twice as busy and twice as much of a mess.

I suppose, though, that I should not be worried about that.  That is,
I shouldn't put too many limitations on what you can plot.  If you
choose to plot an unreadable number of traces, I should certainly let
you do so!  However, the situation gets more confusing as you allow
more possible combinations of traces.  For example, it might be
reasonable to plot the amplitude and real part of the data and fit
along with just the real parts of some of the paths.  And so on...

So, let me put it up to discussion among the folk on this mailing
list.  What should Artemis do?

  1.  Allow the user to select one or more parts of chi(R) (or chi(q)
      for that matter) and plot each of those parts for each of the
      things selected in the "Paths" list.
  2.  Allow the user to somehow specify which parts of chi(R) to plot
      for the data, the fit, and each path individually.  (This would
      make the interface somewhat more complex.)
  3.  Continue to work exactly as it works now.
  4.  Something else entirely.

Let me know!

Happy New Year to all!

 Bruce Ravel  ----------------------------------- ravel at phys.washington..edu
 Code 6134, Building 3, Room 222
 Naval Research Laboratory                          phone: (1) 202 767 5947
 Washington DC 20375, USA                             fax: (1) 202 767 1697

 NRL Synchrotron Radiation Consortium (NRL-SRC)
 Beamlines X11a, X11b, X23b, X24c, U4b
 National Synchrotron Light Source
 Brookhaven National Laboratory, Upton, NY 11973

 My homepage:    http://feff.phys.washington.edu/~ravel 
 EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/

More information about the Ifeffit mailing list