[Ifeffit] Athena Request

Bruce Ravel bravel at bnl.gov
Thu Jul 5 11:50:12 CDT 2012

On Thursday, July 05, 2012 12:15:42 PM BradleyW Miller wrote:
> If my memory is correct there was a period of time you were taking request 
> for improvements on Athena. 

That period of time includes now and the foreseeable future.

> This may be too late however I would like to 
> see the LCF function of Athena capable of running multiple models 
> (sequential models e.g. Sample A followed by B, C...) using a similar set 
> of standards. For instances, I may have 25-40 spectra (environmental 
> samples), one set of standards which may be plausible, and currently I 
> have to run the model wait for the LCF model for sample A to finish before 
> starting Sample B. 

I am confused by your terminology, so I am not sure which kind of
automation you are asking for.

One possibility is that you want to apply a given model (i.e. a given
set of standards) fit to a sequence of data sets.  That automation is
already a feature of Athena.  See the attached screenshot.  I circled
the relevant button.  Clicking that will run a sequence of fits using
the three standards currently on display in the list on the left.

The other possibility is that you want to run a sequence of models
(i.e. variable lists of standards) against one or more data sets.
That's sort of what the "Fit all combinations" button does, but not

I will have to spend some time thinking about the problem a sequence
of specified models applied to a sequence of specified data sets.  I
don't see an obvious, user-friendly way to implement something with
that many details in a GUI application.

> If there was a way to write a script or add the 
> functionality of multiple scans from the same set of standards, I (and 
> maybe others) could set up a computer and leave for several hours instead 
> of returning every 5-30 mins to execute a new LCF model. A conversation 
> was posted about running models with a large number of standards (and 
> whether it was appropriate), similarly running multiple samples is 
> cumbersome. 

Well, as I have said several times in recent months, the new versions
of Athena and Artemis are more than just a visual make-over.  I
actually rewrote about 95% of the code base to strictly separate
presentation from functionality.  A&A are now built on an extensive
library that I call Demeter.  

The nice thing about this is that it is now possible to write a
one-off script that does /exactly/ what A&A do.  That was never easily
possible using the old versions of A&A.  It's not exactly trivial now,
in the sense that you have to write a program and writing a program is
often non-trivial.  But it is certainly possible and people other than
myself have done so.  Indeed I test every feature of A&A that doesn't
specifically have to do with the arrangement of controls on the screen
by writing stand-alone test scripts.

Here are the three test scripts I wrote to get linear combination
fitting working.  There is a script that implements a single fit, one
that implements a combinatorial sequence for a single data set, and
one that implements the application of a model to a sequence of data


As you can see, they are fairly short and not especially complicated
(unless, I suppose, you have never seen perl code before).

Using those as a starting point, you could pretty easily implement
almost any kind of automation.

> In a related comment I have tried to take advantage of access to high 
> speed computing, but Athena's code does not appear to be capable of taking 
> advantage of increased resources (either RAM and CPU) in order to decrease 
> computational time. 

This has been discussed recently on the mailing list.  Neither Ifeffit
nor Demeter was written to make use of threads, so neither can make
use of more CPUs.  As Matt mentioned the other day, his Larch project
will be able to operate as a server which can fork as many instances
as you have CPUs.  Demeter still won't be able to thread itself among
multiple servers, but you will presumably be able to run multiple
instances of Demeter-based programs, each pointed at a different
instance of a Larch server.



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

 National Institute of Standards and Technology
 Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:    http://xafs.org/BruceRavel
 Software:    https://github.com/bruceravel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Athena [XAS data processing]_005.png
Type: image/png
Size: 71087 bytes
Desc: not available
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20120705/afa6b875/attachment.png>

More information about the Ifeffit mailing list