[Ifeffit] Creating Athena Projects from Ifeffit command line

Bruce Ravel bravel at anl.gov
Tue Sep 11 10:26:41 CDT 2007

On Tuesday 11 September 2007, Matthew Ginder-Vogel wrote:
> Hi Bruce and list,
> Has anyone written an Ifeffit wrapper and/or script that can take a series
> of data files and create an Athena project without actually having to use
> Athena? If you have, would you be willing to share it? I'm sure it's
> possible, but I don't want to recreate the wheel if I don't have to.
> Thanks,
> Matt

Hi Matt,

That's a really good idea that, to my knowledge, is not a solved
problem.  It's not an especially hard problem either, fortunately.  

The project file is gzipped.  If you un-gzip it, it's just a plain
text file with lines interpretable as perl code interspersed with
other lines of flat text.  Athena does not require that project files
be gzipped -- that is, she will unzip a file if need be before reading

The lines of perl are written using Data::Dumper
with $Data::Dumper::Indent set to 1.  That's important -- Athena's
project file parser is line-based.  It reads a line and interprets
that line before moving on to the next one.  So each line of data has
to be a complete representation of a perl list.

If you are going to use something other than perl to create the file,
that shouldn't be too hard.

  * order matters somewhat.  The line with "[record]" has to follow
    all the data associated with the record, but it doesn't matter if
    the @x line comes before or after the @y line.  You can safely
    leave out the @i0 and @stddev lines and Athena will behave
    correctly (I think).  The $old_group line can probably be set to
    an empty string -- if not, any four-letter string will do.

  * the names of things in the @args line do matter.  Unrecognized
    parameters will be ignored.  Missing parameters will be set to
    their default values.  If parameter values matter to you -- you
    need to use the same names Athena uses.  The parameter names are
    not docujmented anywhere, but the names are fairly suggestive.

  * you can leave lines like @journal, %plot_features, and @indicator
    out of the project file and Athena will use default values for all
    those things.

  * The first several lines are ignored by Athena, but I strongly
    recommend that you write something in the header identifying where
    the project file comes from.

  * The last few lines are also ignored by Athena.  They are there
    only to make it a little easier for me to examine a project file
    using Emacs.

FWIW, what you want to do is going to be much easier someday: 
Among the many problem areas that Demeter is intended to solve is
moving between GUI and non-GUI applications more gracefully.

Good luck and I'd be interested to see what you come up with.


 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/

More information about the Ifeffit mailing list