Introduction

FEFF and IFEFFIT are amazing tools, but they can be somewhat hard to use. FEFF requires the use of clunky text files with confusing syntax as its input. IFEFFIT has a wordy, finicky syntax. Both benefit by being wrapped up inside of something easier to use. Hopefully, ARTEMIS is that something.


 

Using this document

The side bar shows the top-level table of contents of the document along with the contents of the current chapter. The top bar provides additional navigation linking directly to chapters immediately before or after the current chapter or up and down within the current chapter.

Copyright and licensing information is found at the bottom of every page.

This is document version 0.2 for DEMETER version 0.9.21.


 

Typesetting

I use some typesetting conventions to convey certain kinds of information in this manual.

  1. The names of programs look like this: ARTEMIS, FEFF

  2. The names of files look like this: atoms.inp

  3. Configuration parameters (i.e. preferences) for ARTEMIS and DEMETER look like this: ♦Artemis → plot_after_fit

  4. Verbatim text, such as represent specific input to or output from ARTEMIS or text typed into a computer, looks like this:

    This is verbatim text!
    

Caution! Words of caution intended to point out some specific pitfall of the use or ARTEMIS are found in boxes that look like this.

To do! Aspects of this document, or possibly of ARTEMIS itself, which are incomplete are indicated with boxes like this.


 

The technology behind Artemis


 

perl

DEMETER uses perl. This is, I suppose, an unsexy choice these days. All the cool kids are, after all, using python or ruby. I like perl. I can think in perl. And I can code quickly and fluently in perl. What's more, perl has CPAN, the worlds largest repository of language extensions. CPAN means that I have far fewer wheels to recreate (and probably get wrong). Virtually any language extension I need in pursuit of making DEMETER awesome probably already exists.


 

wxWidgets and wxPerl

ARTEMIS uses wxWidgets and its perl wrapper wxPerl as its graphical toolkit. This cross-platform tool gives ARTEMIS a truly native look and feel because it uses the platform's native API rather than emulating the GUI. Using wx's rich set of graphical tools, ARTEMIS strives to provide a powerful yet user-friendly environment in which to perform EXAFS data analysis.

 

Moose

DEMETER uses Moose. This is, on the balance, a very good thing, indeed. Moose brings many powerful capabilities to the programming table. When I was about halfway through writing DEMETER, I paused for a bit less than a month to rewrite everything I had thus far created to use Moose. This left me with about 2/3 as many lines of code and a code base that was more robust and more featureful. Neat-o!

For the nerdly, Moose is an implementation of a meta-object protocol. This interesting and powerful tool allows for the semantics of the object system to be modified at either compile or run time. The problem of adding features and functionality to the object system is therefore pushed downstream from the developers of the language to the users of the language. In good CPAN fashion, a healthy and robust ecosystem has evolved around Moose producing a whole host of useful extensions.

Moose offers lots of great features, including an extremely powerful attribute system, a type attribute system, method modifiers, an ability to mix object and aspect orientation, and a wonderfully deep set of automated tests. I am confident that simply by using Moose, my code is better code and, because Moose testing is so deep, I am confident that any bugs in DEMETER are my fault and not the fault of the people whose work I depend on.

For all the wonderfulness of Moose, it does have one big wart that I need to be up-front about. Moose is slow at start-up. Since DEMETER is big and Moose starts slowly, any program using DEMETER will take about 2 extra second to start. For a long-running program like a complicated fitting script or a GUI, an additional couple of seconds at start-up is no big deal. For quick-n-dirty or one-off application, that may a bit annoying. The Moose folk claim to be working on start-up issues. I am keeping my fingers crossed. Until then, I live with the slow start-up, confident that the rest of DEMETER is worth the wait.


 

Templates, backends, and other tools

All of ARTEMIS' interactions with FEFF, IFEFFIT, and its plotting tools use a templating library. Along with a clean separation between function within the DEMETER code base and syntax of the various tools used by DEMETER, the use of templated interactions provides a clear upgrade path for all parts of ARTEMIS.

Feff
Although DEMETER ships with a freely redistributable version of FEFF6, it is possible to upgrade to use later versions of FEFF by providing an appropriate set of templates. At this time, FEFF8 is partially supported, with better support coming soon.

Ifeffit and Larch
Matt Newville, the author of IFEFFIT, is hard at work on IFEFFIT's successor, called LARCH. The path to supporting LARCH will be relatively shallow, requiring only authorship of a new set of templates.

plotting
DEMETER currently supports two plotting backends: PGPLOT, which is the native plotting tool in IFEFFIT, and GNUPLOT. New plotting backends can be supported, again simply by creation of new set of templates.

For numerically intensive parts of the code, ARTEMIS relies on the Perl Data Language, a natively vector-oriented numerical language.

ARTEMIS makes use a host of other tools from CPAN, the online perl library, including tools for date and time manipulation; heap and tree data structures; tools for formal graph theory; tools for manipulating zip, INI, and yaml files; and many others. These tools from CPAN are extensively tested and highly reliable.


 

Folders and log files

On occasion, it is helpful to know something about how ARTEMIS writes information to disk during its operations.

working folder
Many of ARTEMIS' chores involve writing temporary files. Project files are unpacked in temporary folders. GNUPLOT writes temporary files as part of its plot creation. These files are stored in the “stash folder”. On linux (and other unixes) this is /.horae/stash/. On Windows this is %APPDATA%\demeter\stash.

log files
When ARTEMIS runs into problems, it attempts to write enough information to the screen that the problem can be addressed. This screen information is what Bruce needs to troubleshoot bugs. On a linux (or other unix) machine, simply run ARTEMIS from the command line and the informative screen messages will be written to the screen. On a Windows machine, it is uncommon to run the software from the command line, so ARTEMIS has been instrumented to write a run-time log file. This log file is called dartemis.log and can be found in the %APPDATA%\demeter folder.

%APPDATA% is C:\Users\<username>\AppDataRoaming\ on Windows 7.

It is C:\Documents and Settings\<username>\Application Data\ on Windows XP and Vista.

In either case, username is your log-in name.