[Ifeffit] Ifeffit development tools?

Bruce Ravel bravel at bnl.gov
Tue Nov 20 09:12:06 CST 2007


Hi Adam,

Thanks for continuing this very interesting discussion.

On Tuesday 20 November 2007 09:13:12 Webb, Adam wrote:
> For example, a plugin like structure might be used. Someone adding a new
> function could for example write a plugin to do something like:
>         1. ask ifeffit for data and other needed information
>         2. do some tranform/filter/magic on data
>         3. return data to ifeffit


That's exactly how, for instance, deglitching works in Athena right
now.  It's not plugin behavior, as I understand that word.  Rather it
uses swig to map ifeffit's data structures onto perl's and vice versa.

In Athena, deglitching works like this:

  1. Using the mouse, the user selects a point to remove from the
     data.
  2. When you click the the "Remove point" button, Athena slurps the
     energy and xmu arrays from Ifeffit into perl arrays via the swig
     wrapper. 
  3. Perl's "slice" function is used to remove the selected point from
     each of the arrays.
  4. Swig is again used to push the modified arrays back into Ifeffit.
  5. The newly deglitched data are reprocessed via the standard
     method, i.e. Athena generates the relevant command and sends the
     commands to Ifeffit.

(Full dislocure: Demeter does this chore using Ifeffit's slice and
join operations without pulling and pushing the arrays.)

So, in a sense, Ifeffit already does what you are suggesting, so long
as a swig wrapper has already been made for your language of choice.
Swig's language support list is lengthy, but certainly not
exhaustive.  (It includes perl, so it's "exhaustive enough" for me!
That's kind of selfish, eh?)

So low level support for interacting at the "transform/filter/magic"
level exists.  I suspect, however, that you are not really asking
about low level support.  I suspect that you are looking for something
more fleshed out:

  -- Suppose you were doing some quick-XAS and had 10,000 data files
     to process.  That kind of problem demands a high level of
     automation.  You really need some more structure than the
     low-level hook provided by the swig wrapper.

  -- Suppose you wanted to use Feff to compute the EXAFS spectrum from
     the list of atoms resulting from a molecular dynamics
     calculation.  You'd need a way to loop through the box, find all
     atom pairs, and figure out how to have Feff run on each pair.
     Again, swig's hook is at a level that's a bit too low.

Enabling automation and solving problems like those (as well as small
one-off chores, as well as GUI-writing, as well as ...) is what I am
aiming for with Demeter.

Is Demeter what you are looking for?  Hard to say.  It's written in
Perl, which might not be your cup of tea.  It's still pretty far from
done, so it's hard to evaluate.  Most of the design specs that I am
working towards are inconveniently located in my head (although that
could be fixed).  I've never had a collaborator that I've worked with
on the same code base, so I am not in the habit of doing so.  All that
said, if you are interested in Demeter -- I'd be thrilled to figure
out how to work together.

B

-- 
 Bruce Ravel  ----------------------------------- bravel at bnl.gov

 National Institute of Standards and Technology
 Synchrotron Measurements Group, Beamlines X23A2, X24A, U7A

 Building 535A, Room M7
 Brookhaven National Laborator Upton NY, 11973, USA

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










More information about the Ifeffit mailing list