tutorial
tutorial
Bruce Ravel
[email protected]
http://feff.phys.washington.edu/~ravel/software/exafs/
Contents
1 NAME 4
2 SYNOPSIS 4
3 DESCRIPTION 4
2
25 ATHENA: Principle Components Analysis 37
28 ATHENA: Preferences 43
31 REFERENCES 49
32 MISSING FEATURES 50
33 WHAT’S IN A NAME? 50
34 AUTHOR 51
3
1 NAME
Athena - interactive EXAFS data processing
2 SYNOPSIS
Just as Phaeacian men excel the world at sailing, driving
their swift ships on the open seas, so the women excel at
all the arts of weaving. That is Athena’s gift to them
beyond all others -- a genius for lovely work, and a fine
mind too.
3 DESCRIPTION
Athena is a graphical and interactive program written in the perl programming
language, using the Tk display engine, the IFEFFIT EXAFS library, and the
PGPLOT plotting library. (See below for a list of relevant URLs.)
When Athena starts, you are presented with a window whose layout looks
something like this:
+----------------------------------------+
| menubar |
+---------------------------+------------+
| | |
| | |
| | Group |
| Group | List |
4
| Parameters | |
| | |
| | |
| +------------+
| | Plot crrnt |
| +------------+
| | Plot mrked |
| +------------+
| | |
| | Plot |
| | Features |
| | |
| | |
+---------------------------+------------+
| echo area |
+----------------------------------------+
As you import data into Athena, data groups are created and those groups
are listed in the section labeled ‘Group List’ . You select a group as the ac-
tive one by clicking the left mouse button on its entry in the group list. When
selected, the list entry is highlighted with an orange background and the pa-
rameters associated with that group are displayed in the large area on the left
labeled ‘Group Parameters’. When you pass the mouse over a label in the group
parameters section, you will notice that the label changes color. This indicates
that a mouse click on the label will have an effect. Clicking the left mouse but-
ton will display a hint in the echo area as to the function of that parameter. See
the section on group operations|athena groupmenu for the effect of a right mouse
click.
The view of the group parameters is replaced when certain features of
Athena are used. Choosing any of the options from the Data, Align, Diff,
or Analysis menus will temporarily replace the group parameters with views of
parameters relevant to the chosen task. For example, when the log-ratio option
is chosen from the Analysis menu, the view of group parameters is replaced by
a view of the interface to Athena’s log-ratio/phase-difference analysis.
Below the group list are two rows of button for plotting data. The red
buttons are for plotting the selected data group. The purple buttons are for
plotting multiple data groups. These buttons are labeled according to the data
space of the plot. E, k, R, and q refer to energy, photoelectron k, real space R,
and back-transform k, respectively.
Below the plot buttons are a set of tabs for specifying the details of the plots
in each space. For each space you can specify the range of the x-axis. For energy
plots, you can select whether the background function is plotted along with the
data and whether the data and background are normalized. For k-space plots,
you can select the amount of k-weighting. For R- and q-space plots, you can
select which part of those complex functions are plotted. There are also tabs
for setting up stacked plots and for establishing plot indicators. For a complete
5
discussion see the section on plotting|athena plot.
Finally, at the bottom of the page is the echo area. Athena uses this area
to display hints, brief help messages, warnings, and updates about recently
performed analysis or plotting actions. A few features of Athena will prompt
the user for a text string. In those situations, the echo area is temporarily
replaced by text string dialog.
Throughout Athena the right mouse button serves to post context sensitive
menus. These include parameter labels, groups list entries, and other elements
on the screen. You should try clicking the right mouse button in different places
to see what useful things might pop up.
Marking groups
Clicking the checkbutton to the left of the group name in the group list will
mark the group. Many features of Athena work on the ensemble of marked
groups. The most important of these is plotting. When a purple plot button
is pressed, a plot showing all marked groups will be displayed. Some analytical
functions, merging (see the section on merging data|athena merge) for example,
also works on the ensemble of marked groups.
There are some features for quickly marking and unmarking many groups.
These can be found in the Mark menu or accessed by keyboard shortcuts. All
groups can be marked by hitting Control-a. All groups can be unmarked by
hitting Control-u. The marking of every group can be inverted (i.e. marked
groups become unmarked and unmarked ones become marked) by hitting Control-i.
Finally the marking of the currently selected groups (i.e. the highlighted one
6
and the one whose parameters are shown in the main portion of the Athena
window) can be toggled by hitting Control-t.
Control-r is the most flexible and powerful option for marking many groups,
but also the most confusing. This prompts you for a regular expression which
will be matched against the labels in the Groups list. In its simplest form, you
can respond to the prompt with a normal string. For instance, suppose your
project contained all the iron foil data that comes with the Athena distribution.
Then you would have the following groups in the Groups list: fe 060, fe 061,
fe 062, fe 150, fe151, fe 300, and fe 301. These represent multiple scans at
temperatures of 60K, 150K, and 300K. If, at the prompt, you enter 0, then all
groups whose labels contain the substring 0 will get marked, i.e. the ones at
60K.
You can also use meta-characters in your match. These use Perl’s syntax
because the expression you give at the prompt is interpreted verbatim as a perl
regular expression. In the previous example, if you give [13] as the expression,
it will match the groups measured at 150K and 300K because that regular
expression means to match against an underscore followed by either a 1 or
a 3. Perl’s regular expression syntax is very rich, so this feature allows you
considerable flexibility in marking groups.
If you do not know perl’s syntax or find regular expressions confusing, I
would still recommend using this feature in its simple form, i.e. avoiding meta-
characters. Because data file names are often chosen to be suggestive of the
sample and because data acquisition programs often use some kind of incre-
mentation scheme for successive scans, matching against simple strings can still
be very handy.
The matching is done case sensitively.
If you know what (?{ code }) means, then the answer is ‘Yes, Athena
does give you enough rope to hang yourself, so don’t.’ If you do not know what
that means, then I promise you do not have to worry about it.
More information about perl’s regular expression syntax is easy to find on
the web. Try searching for ”perl regular expression” on Google.
7
Athena should be capable of reading most plain-text, column data, including
the files generated by the data acquisition software at many of the world’s
EXAFS beamlines.
Special care is taken to handle data files which have Macintosh end-of-line
characters. Also files which exist in deeply nested folders and so have fully
resolved file names which might pose a problem for Ifeffit’s string length limi-
tation are also handled specially. In both cases the files are copied by Athena
into a temporary location and, in the case of Macintosh files, converted to unix
end-of-line convention before importing via Ifeffit.
Among the data types that you can import are
• Two column mu(e) data with columns for energy and mu.
• Two column chi(k) data with columns for photoelectron wavenumber and
chi.
• Raw data with columns for each detector
• The files mu.dat and chi.dat from Feff.
• Dispersive XAS data measured as a function of pixel on a camera.
After selecting a file with the file selection dialog, you are presented with a
column selection dialog. The text of the data file is displayed on the right side
of this dialog. This will help you select the correct columns. This dialog is used
to indicate which column in the data file contains the energy (or wavenumber)
array and which column(s) are used to construct mu(E) (or chi(k)). In the case
of mu or chi data, Athena will make a good guess about which column contains
the data. In the case of raw data, Athena will attempt to recognize columns
containing fluorescence or transmission data. It is not always successful, so you
may need to indicate which columns to use in the numerator or denominator.
For transmission data, you also need to click the button indicating that a natural
log of the data must be taken.
As you select columns for constructing the data, the mathematical formula
will be displayed in a text box below the buttons. Remember that for transmis-
sion data the formula is
ln( I0 / It )
and so you would select the I0 column as the numerator and the It column
as the denominator. For fluorescence (or electron yield) data the formula is
If / I0
(I1 + I2 + I3 + I4) / I0
8
For multi-element data, you have the choice of performing this summation
on the fly or of reading each element into an individual data group. The latter
choice is convenient if you want to examine each element individually before
merging some or all of them.
The replot button will simply replot the current column selection. This is
most useful when the reference column selection has been plotted, as described
below.
9
channel will thus have the effect of aligning the data simultaneously. See the
section on data alignment|athena align for more details.
Preprocessing
It is possible to do extensive preprocessing of imported data files. This works
on the assumption that you have imported one file from a group of related data
files, established good values for its parameters, and are willing to apply those
parameters to other imported data without individual interaction. This can be
a big time saver if you are importing large quantities of related data.
There are five preprocessing chores that can be done on a data file
• Truncation using the truncation energy of the standard. See the section
on truncating data|athena truncate.
• Deglitching using the algorithmic deglitching parameters of the standard.
See the section on deglitching data|athena deglitch.
• Crude alignment to the standard. See the section on aligning data|athena align.
• Constraint of all parameter values to those of the standard. see the discus-
sion of constraining parameters in the group operations section|athena groupmenu.
These preprocessing steps are all optional and are performed in the order
listed. Take care particularly with truncating and deglitching, which perma-
nently remove data points from the preprocessed data group.
To preprocess data, click the preprocessing button in the column selection di-
alog. Doing so will expand the dialog vertically to accommodate all the widgets
for setting preprocessing parameters.
Next select a preprocessing standard from the menu labeled ‘Standard’. This
menu contains all the mu(E) data groups currently in the group list. Once you
select a standard, all the rest of the widgets will activate and the standard
will be plotted along with the deglitching tolerance lines and the truncation
energy. You can select preprocessing steps by clicking on their checkbuttons
then adjusting the parameters as desired.
Once you are ready, click OK. The new data group(S) will be read in, the
preprocessing steps will be performed, and the processed data will be plotted.
10
Saving and restoring projects
Athena allows you to save projects. A project consists of all data groups, their
parameters, the current values of the plotting parameters from the plot features
section of the window, the current set of plot indicators, and the project journal.
An option for saving your project is found in the File menu. The project file is
a flat text file formatted in a way that is a bit hard for a human to read but
quick and easy for Athena to read.
Restoring a project is done by importing it just as you would a data file.
Athena will recognize one of its own project files and interpret it accordingly.
Reading in a project file will not alter any current data groups. The data
groups from the project will be appended to the groups in the group list.
11
The last plot can be written to a graphics file by selecting the appropriate
option in the ”Save image as” submenu in the Plot menu. Currently only a
limited number of graphics formats are supported. Selecting Print from the
Plot member will send the last plot directly to a printer, but this currently only
works on a few platforms and then not very reliably.
It is possible to detach the plot buttons from the main window. This places
the red and purple plot buttons in their own small window which can be dragged
anywhere on the screen. This feature does not work on Windows.
Plotting in energy
You can plot the data, its background function, its pre-edge line, and its post-
edge normalization line by clicking on the appropriate check buttons. You can
also plot normalized or derivative spectra, however either of those precludes
plotting the pre- and post-edge lines. The plot will be remade whenever you
click one of these checkbuttons.
The range on the x-axis is chosen by the boxes marked Emin and Emax.
You can control separately how single and marked groups plots are made.
The red check buttons control how single group plots are made and the purple
buttons control marked group plots. These colors are chosen to correspond to
the colors of the plot buttons. Note that the pre- and post-edge lines and the
background function cannot be drawn for multiple data set plots.
Plotting in k-space
You can select the k-weight of the plot independently of the k-weight used in the
Fourier transform. The k-weight value can be any of 0, 1, 2, or 3. The option
labeled chi*k^kw uses whatever value is specified for the Fourier transform for
the group. That option is useful for values of k-weight other than 0, 1, 2, or 3,
or for plotting two or more spectra each with different k-weights.
The Fourier transform window in k can also be plotted by selecting the
button labeled ‘Window’.
12
Again the red and purple buttons indicate how single and marked group
plots will be made and the x-axis range is chosen by the setting values in the
text boxes at the bottom.
Plotting in R-space
You can plot any of the parts of the complex Fourier transform — the real,
imaginary, magnitude, or phase. You may also plot the envelope, which is the
magnitude plotted with the negative of the magnitude. For single group plots,
many parts can be over-plotted. For example, the real part can be plotted inside
the envelope by selecting those two red buttons. For marked group plots, only
a single part can be plotted. This restriction is in place to avoid very cluttered
plots that take a long time to display.
The Fourier transform window in R can also be plotted by selecting the
button labeled ‘Window’.
Again the red and purple buttons indicate how single and marked group
plots will be made and the x-axis range is chosen by the setting values in the
text boxes at the bottom.
Plotting in q-space
You can plot any of the parts of the complex Fourier backtransform — the real,
imaginary, magnitude, or phase. You may also plot the envelope, which is the
magnitude plotted with the negative of the magnitude. For single group plots,
many parts can be over-plotted. For example, the real part can be plotted inside
the envelope by selecting those two red buttons. For marked group plots, only
a single part can be plotted. This restriction is in place to avoid very cluttered
plots that take a long time to display.
The Fourier transform window in k can also be plotted by selecting the
button labeled ‘Window’.
Again the red and purple buttons indicate how single and marked group
plots will be made and the x-axis range is chosen by the setting values in the
text boxes at the bottom.
k-q plots
There is a red, single group plot button labeled kq. This plots chi(k) along
with the real part of the back-transformed spectrum. If the window button is
selected either for k- or for q-space plots, then the window will also be displayed.
The k-weight indicated for the Fourier transform is always used so that the two
spectra are of the same size.
Stacking plots
A stacked plot is one in which the different traces are offset vertically. In
Athena a vertical offset is applied to a trace by setting the y-axis offset param-
13
eter for a data group to a non-zero value. This parameter can be set in an evenly
incremented fashion for the set of marked groups by selecting the ”Stacked plot”
tab in the Plotting options. Enter a number for the y-axis offset parameter of
the first marked group and for the size of the incremenet. Press the button that
says ”Set y-axis values”, then press one of the purple plot buttons to see the
stacked plot.
Indicators
An indicator is a mark placed at an x-axis value whenever a plot is made.
Indicators do not go away when a new plot is made. Instead the indicator is
drawn on every new plot. Indicators are thus a convenient way of highlighting
a particular feature in a data set and comparing that feature between data sets.
To set the indicators, select the plotting options tab labeled Ind. then click
on one of the plick buttons. You will be prompted to select a point by mouse
clicking on the plot. The value you click on will be recorded as will the space of
the plot from which that point was selected. You may defined several indicators
at a time.
Indicators chosen from plots in energy, k, or back-transform k will be drawn
whenever a new plot is made in energy, k, or back-transform k. Indicators
chosen in energy will be converted to k for plots in k or back-transform k.
Indicators chosen in k or back-transform k will be converted to energy for plots
in energy. Thus indicators can be used to understand how features in energy
spectra appear in chi(k) and vice versa.
Indicators chosen from plots in R will only be displayed in R-space plots.
The indicator is a vertical dashed line whose height is chosen to fit conve-
niently in the plot. They are drawn for both single and multiple data set plots.
The check button labeled Display indicators in the Ind. tab controls whether
or not the indicators are actually drawn. Thus you can suppress theplotting of
indicators without loosing the positions you have selected.
14
The point finder works by interpolation. That is, it does not find the
data point closest to the indicated x-coordinate. Rather it, interpolates a
y-coordinate from the data at the specified x-coordinate. Also, when an x-
coordinate is plucked from the data, ony the x-position of the cursor is used.
That is, the interpolation is done at the x-position of the selected point and not
at the data point closest to the cursor.
The reverse operation – selecting a y-coordinate and finding the correspond-
ing x-coordinate – does not yet work.
Pluck buttons
Scattered throughout the group parameters section of the main window and
in other places throughout Athena are little buttons displaying a blue cross.
These buttons are for plucking parameter values for the plot window. To use
them, press the pluck button then click on a point in the plot window. The x
coordinate where you clicked will be inserted in the text box to the left of the
pluck button.
15
All the functionality for plot styles is accessed via a menu that becomes
avalable when the cursor passes over the ”Plotting options” label just above the
various tabs. You will notice that the label changes color as the cursor passes
over it. Clicking the right mouse button posts the plot styles menu.
The first option in the menu allows you to save the current set of plotting
parameters. You will prompted for a name. The second option is a submenu
for restoring one of the named plot styles. The third option is for removing one
of the name plot styles from the list.
Note that plot styles saved using this utility are not specific to a project and
persist between sessions. Also note that the default style is determined by the
settings of the user preferences and not by the plotting options which are saved
to a project file.
Currently only the contents of the E, k, R, and q tabs are saved in a plot
style. In the future, the parameters for the indicators and the stacked plots
might be saved as well.
16
Occasionally, you may have reason not to trust the edge-step determined by
the normalization routine. In that case you can specify one explicitly by editing
its value and check the button labeled fix step. If you do not check that button,
the value will be recomputed from the normalization algorithm and overwritten
in the Edge step entry box.
Normalization
Edge step normalization is used by Athena. That means that the difference
between mu(E) and mu0(E) is divided by an estimation of mu0(E0). This
edge step value is determined in a way that is quite standard among EXAFS
programs. A line is regressed to the data in some region below the edge and
subtracted from the data. Then a quadratic polynomial is regressed to the data
in some region above the edge and extrapolated back to E0. The extrapolated
value of the post-edge polynomial at E0 is used as the normalization constant.
These two regressions are controlled by the Pre-edge range and Normalization
range parameters in the group parameters section of the main window. The
normalization constant is reported in the Edge step box.
Flattening
The quadratic polynomial which is regressed after the edge is normally used only
to determine the edge step. It is quite possible for a set of properly normalized
spectra to overplot very nicely as chi(k) but not as norm(E). This is because
the standard normalization does not alter the shape of the background function
beyond the edge. If there is variation in the over-all slope beyond the edge, a set
of overplotted norm(E) spectra will form a sort of fan beyond the edge. Flat-
tening is a visualization trick which subtracts the linear and quadratic portions
of the post-edge polynomial from the data in such a way that the flattened,
normalized spectrum oscillates around 1. Thus, much of the variation in the
background functions in an ensemble of data can be suppressed when plotting.
This is particularly useful when making plots of XANES data.
The flattening is purely visual. The subtraction of the post-edge linear and
quadratic portions of the background is made only for plotting. chi(k) is not in
any way affected by the flattening operation.
In the Background removal section of the main window, there is a check
button which turns flattening on and off for the data group. When flattening
is turned off, the standard norm(E) spectrum will be plotted. Flattening is
controlled group-by-group, so it is possible to make a multiple data set plot in
which some spectra are flattened and others are not.
Spline clamps
Spline clamps are an optional feature for use in background removal. They
provide a restraint to the Autobk algorithm which seeks to coerce the back-
ground spline not to diverge from the data at the ends of the data range. This
17
restraint takes the form of a penalty in the evaluation of the fitting metric for
a background spline when the spline diverges from the data at the ends. There
are optional clamps at either end of the data range. By default, only the high-
energy clamp is used. Athena offers menus for choosing the strength of the
restraint (i.e. the magnitude of the penalty for a diverging background) for
each clamp. The strength indicates the size of the penalty dor deviation of the
background from the data.
One of the example data files that comes with Athena is called clamp.prj.
It is a project file which demonstrates the effect of different high-energy clamping
strengths on data for which the background shows a tendency to diverge. Import
this project and plot the data in k-space and in R-space to see this effect.
Cromer-Liberman normalization
For XANES data or in a situation where the AUTOBK algorithm is unsatis-
fying, it may be useful to have a consistent, reliable way of normalizing your
data. Athena allows you to normalize by matching to the Cromer-Liberman
calculations for the absorption of a free atom. The measured spectrum is ad-
justed to match the energy dependence of the Cromer-Liberman calculations at
energies far below and above the edge. While this is a very consistent way of
normalizing data, especially data of limited range as is often the case in XANES
measurements, it is rarely a useful way to extract chi(k).
The CLnorm algorithm requires knowledge of the absorbing atom. When
Athena imports data it attempts to determine the absorber by comparing the
E0 value (determined by inspection of the derivative spectrum) to a table of
atomic edge energies. On occassion, Athena guesses wrong. In those cases,
you should set the absorber element by hand using the Z menu near the top of
the screen.
When CLnorm is chosen, several of the widgets for editing parameters used
by the AUTOBK algorithm are disabled.
The details of the Cromer-Liberman calculations can be found in Relativistic
Calculation of Anomalous Scattering Factors for X-Rays, D.T. Cromer and D.
Liberman, J. Chem. Phys. 53 (1970), pages 1891–1898.
18
The IFEFFIT buffer
Athena works by constructing commands for Ifeffit based on the current state
of the data groups and passing those commands to Ifeffit. Almost all commands
sent to Ifeffit are also displayed in the Ifeffit buffer palette. This buffer is useful
for diagnosing analysis problems, debugging the program, and learning how to
use Ifeffit directly.
At the bottom of this palette is a direct link to Ifeffit. Commands typed
into this text box will be sent directly to Ifeffit. This allows you to perform
arbitrary commands beyond the normal scope of Athena’s operation. This
command line has some of the features of a shell command line, including tab
completion of Ifeffit keywords and a command history accessed by the up and
down arrows.
Recording macros
In Athena, a macro is a recording of the commands sent to Ifeffit and to the
Ifeffit buffer. To record a macro press the Start Recording button in the macro
palette then do whatever sequence of analysis and plotting chores you want to
record. When finished press the Done button and you will be prompted for a
file in which to save the macro.
These macros can be reimported into Athena or imported directly into
Ifeffit. They are also useful for learning to manipulate Ifeffit directly or for
use as the basis of a batch processing script. A macro may be a useful addition
to a bug report.
19
Project journal
Probably the most important of these textual interaction is the project journal.
This is a simple text-box where you can write down notes relevant to your data
analysis. The contents of this journal is saved when you save a project into a
project file and is restored when you import a project.
The active use of the journal is highly recommended. Maintaining a
journal can make it much easier to return to and understand a project after
even a short absence.
Reports
Also in the Edit menu is a submenu for generating reports about the current
project. Most of the report formats are ways of presenting the data groups and
the values of their various parameters. Two of the report formats are intended
for use with spreadsheet or database programs. The parameter values either
for all groups or for all marked groups can be written to a file in the Excel95
format. This can be read by many common spreadsheet programs, including
Excel, Gnumeric, KSpread, and OpenOffice Math. The second format is a
comma-separated-value file. It too can be read by spreadsheet programs as well
as by database programs. The third report format is a plain text, columnar
report on all the groups or on the marked groups.
The final item in this submenu is of rather special interest. Some users of the
EXAFS analysis program XFit like to use Athena and the Autobk algorithm
to do background removal but them prefer to use XFit to analyze the data. The
XFit file output has the results of the background removal written in the format
expected as input by XFit.
20
the Ifeffit interaction buffer, you will see that all commands related to the data
group use the group name. The group name is restricted to 8 characters or less.
The restriction is in place in an attempt to avoid generating Ifeffit commands
that are too long for Ifeffit’s parser.
There are also a couple of option in the Group menu for reordering items in
the Data list. The current group can be moved up or down a slot at a time in
the list by selecting the ”Move up” or ”Move down” options, or by hitting the
Alt-k or Alt-j key sequences. The new order of the list is reflected in all parts
of Athena that use the list, such as the Standards menu or the order of groups
in a project file.
Constraining parameters
It is possible to constrain parameters between data groups. That is, you can
adjust one or more parameters for one data groups and then set parameters for
other data groups to be the same. There are several ways of applying these
parameter constraints.
In the Group menu are options for setting all the parameters all at once.
You may set the parameters for every other data group to the values for the
selected group. You may also set the parameters only for the marked groups
to those of the selected group. Note that the two options in the Group menu
operate of every single parameter displayed in the main window.
For finer-grained control over applying parameter constraints, click the right
mouse button on the blue labels for the background removal or Fourier transform
21
sections of the main window. This allows you to constrain those groups of
parameters as described above without affecting the other parameter groups.
For the finest-grained control over applying parameter constraints, click the
right mouse button on the label of the parameter that you want to constrain.
As the mouse passes over the label, you will see that label change color. That is
a visual cue that pressing a mouse buttons will have an effect. When you click
the right mouse button, a menu will pop up allowing you to constrain the value
of that parameter. Again, you can set that parameter for every group or only
for the marked groups. You can also set that parameter in the selected group
to its value in the ‘standard’ group.
The concept of the ‘standard’ is a moving target. If one and only one group
is marked, that group is the standard. Thus the standard can easily be changed.
If zero groups are marked, then there is no standard. Attempting to constrain
to the standard when no standard is defined will result in a hint being written
to the echo area. If two or more groups are marked, then again there is no
standard and a note will be posted to the echo area.
Session defaults
Athena offers a lot of control over how parameter values are set when data is
first imported into the program. Global default values for all the parameters
can be set using the prefernces dialog. These defaults can be adjusted within
a session by setting the session defaults. When you set the sesson defaults, the
values are taken from the current values for parameters for the selected group.
When new data is imported into Athena, the defaults will be taken from the
global defaults unless the session defaults are set. In that case, the session
defaults will be used.
Like the parameter constraints, the session defaults can be set with the dif-
ferent levels of ganularity. Individual parameters can be set as session defaults,
groups of parameters, or all the parameters. The options for setting the sessions
defaults are found in the right-click, context menus for individual parameters,
the context menus for parameter groups, and in the Values menu. Also in the
values menu is an option for unsetting the session defaults.
22
12 ATHENA: Energy Calibration
ATHENA Interactive EXAFS energy calibration
Energy calibration is the assignment of a particular energy value to a par-
ticular point of mu(E) data and shifting all the other data points accordingly.
For example, it is common to assign the atomic edge energy to the first large
peak in the first derivative spectrum. Athena handles this by using an E0-shift
parameter.
When energy calibration is chosen from the Data menu, the view of the
group’s parameters is replaced in the main window by a dialog for setting the
calibration. This dialog allows you to view the data as mu(E) or as its normal-
ized, derivative, or second derivative spectrum. The location of the current value
of E0 is displayed as the reference point. This reference point can be changed
by hand or by clicking the ”Select a point” button and plucking a point from
the plot. Below the reference point is a control for applying various iterations
of smoothing using Ifeffit’s three-point smoothing function. Below that is the
energy to which that point should be calibrated. By default this gets filled with
the atomic edge energy, but it too can be changed by hand. Once you have
values for the reference and the calibration that you like, click the ”Calibrate”
button. This will compute the correct value of the E0-shift to perform this
calibration. That E0-shift will be used in all further displays of the data.
The ”Select a point button” simply uses the x-value of the point in the plot
where you click as the reference point. The smoothing is applied to the data
before the first or second derivative is calculated.
Note that calibrating two data sets does not ensure that they will be aligned.
One way of calibrating and aligning data is:
You can begin calibrating a new data set simply by clicking on another
group in the group list. When you click on the new group, its reference point
and suggested calibration value will be inserted into the calibration dialog and
the data will be plotted along with a marker showing the reference point.
23
The data will be redisplayed with the selected data point marked by a circle.
If that is the correct data point for removal, click the button labeled ‘Remove
point’.
The second deglitching scheme is an algorithm that attempts to identify
and remove all glitches from either the pre-edge or the extended region. The
algorithm works by defining a tolerance and an energy range. The data will be
plotted along with either the pre- or post-edge line (depending on the chosen
data range). Additionally, lines will be drawn above and below the pre- or post-
edge line, separated by the amount of the tolerance. Any data points which
extend above or below the tolerance lines will be removed from the data when
the Remove glitches button is clicked.
Points removed by deglitching are lost from the data group, but the data file
from which they came is not altered.
The Athena distribution provides example files for testing deglitching. These
are uhup.003, which has glitches in the extended data range, and Udsvuo2.029,
with glitches in the pre-edge. Use these files to play around with the two
deglitching methods.
24
spectrum from a quick XAS measurement (i.e. one in which the monochromator
is slewed continuously in some manner during the measurement). This works by
performing a boxcar average for each point on the sparse grid. The main advan-
tage (from the point of view of analyzing EXAFS data) is to lower the overhead
within Athena. The sparse grid is often one quarter the size of the oversampled
grid or smaller. The algorithm used here is exactly the same as the algorithm
used by Ifeffit to move data from the energy grid to the wavenumber grid dur-
ing background removal. Thus the chi(k) and chi(R) are statistically (although
probably not numerically) equivalent for the oversampled and rebinned data.
The sparse grid is composed of three regions, pre-edge, edge, and EXAFS.
To construct the grid, Athena requires that the user specify five numbers. The
first two numbers specify the boundaries of the regions. The default boundary
values are -30 eV and +50 eV. This means that edge region begins 30 volts below
the edge energy and extends to 50 volts above the edge energy. The next three
numbers specify the size of the grid in each region. The default values are 10 eV
for the pre-edge region, 0.5 eV for the edge region, and 0.07 inverse Angstroms
for the EXAFS region. Note that the grid is always uniform in energy in the
pre-edge and edge regions, but uniform in wavenumber in the EXAFS region.
25
Other information
The default values for the rebinning parameters can be set in the preferences
dialog.
This algorithm is, admitedly, a bit limiting in that it only allows for a three-
region sparse grid. If your data requires a different grid, the only solution is to
process your data as needed before importing it into Athena.
26
Note that for Lorentzian convolution, the width is the FWHM. For Gaussian
convolution, the width is sigma which is smaller than the FWHM by about a
factor of 2.4.
The convolved, noisy data can be saved to a data group and treated just like
real data. That is, you can remove the background and do Fourier transforms.
Thus the effects of convolution and noise can be propagated through to the
chi(k), chi(R), and chi(q) spectra.
27
as a data group (thus making an entry in the Groups list), click the button
labeled ”Make corrected data group.”
After the correction is computed, some information about the calculation is
displayed in the feedback box below the plotting and saving buttons.
28
high k, Troger and Booth should give the same spectra. At low k, they will be
somewhat different. In the thin sample limit, the Troger algorithm is much less
accurate than the Booth algorithm.
The published algorithm also includes a term for correcting the effect of an
uncertain background subtraction. This has not been implemented in Athena.
Data quality
The Fluo and Booth corrections both use the measured oscillatory spectrum as
a part of the correction function. Thus both algorithms require reasonably good
data as input. If data are dominated in any region by experimental error (e.g.
if the background functions do something funny or if there are serious glitches),
then the corrected result will be similarly effected. Another way of saying this
is that Athena’s self-absorption corrections are intended only to correct the
effect of self-absorption and not other problems that one often encounters in
29
difficult fluorescence experiments. As always, care taken to obtain the best
possible data will yield the best possible results.
To minimize this problem in the Fluo algorithm, the flattened spectrum is
used whenever the flatten button is checked for a data group. This neglects
the real effect of the attenuation of the background of the cross section at high
energy, but that seems not to be a serious problem, given that this effect shows
up in the tabulated cross sections used to compute other terms in the correction.
References
Fluo algorithm
The program documentation for Fluo can be found at Dani’s web site and
includes the mathematical derivation:
http://www.aps.anl.gov/xfd/people/haskel/fluo.html
http://lise.lbl.gov/RSXAP/
30
19 ATHENA: Deadtime Correction
ATHENA Interactive EXAFS deadtime correction
Athena does not yet have this feature.
31
to import the reference channel with your data. When you asign a reference
channel to a data group, the E0 shift parameters of the data and its reference
are strictly constrained. If you change the E0 shift of one, you also change the
E0 shift of the other. Thus alignment using a reference scan uses the alignment
dialog described above.
When, in the alignment dialog, you choose the reference channel as the
second data group and align it to some standard, you then align the data to
that same standard. This is true because the data and reference use the same
energy array and they have their E0 shifts strictly constrained. In this was
you can, for example, align and calibrate a metal oxide by aligning its metallic
reference to a known standard.
32
refinement function to optimize the parameters once reasonably close values
have been found. The refinement works by optimizing the difference between the
trusted standard and the converted mu(E) of the dispersive data. However, the
minimization function is not so simple as the difference between the two. From
the begining of the dispersive data set to 20 eV above the edge of the standard,
the minimization function is merely the difference of the two spectra. From 20
eV above the edge until the end of the dispersive spectrum, the difference of
the two spectra is weighted by the square root of the energy above the edge.
This is essentially the same as k-weighting the difference spetrum. Without
energy-weighting the refinement is insufficiently sensitive to the quadratic term.
By introducing this energy-weighting, the mapping of mu(pixel) onto mu(E) is
usually much more precise.
WARNING!!!
This refinement is extremely fragile in the sense that a starting value for the
linear term C1 that is too far away from the best value will almost certainly
result in the refinement finding a false minimum. It is recommended that you
adjust the parameters by hand until finding values that are quite close in the
sense of nearly matching the dispersive data to the trusted standard both near
the edge and far into the EXAFS region. Once close, the refinement should be
run to generate the most precise mapping.
33
You can, at any time, replot the standard and the converted dispersive data
by clicking the ”Replot” button. You can refine the current values by clicking
the ”Refine alignment parameters” button.
Once you have found a set of parameters that properly map the pixel data
onto energy, click the button labeled ”Make data group.” This will make a new
entry in the Data groups list for the converted mu(E) data. This new data
group can then be treated for analysis like any other mu(E) data.
Once the set of parameters has been found for the dispersive spectrum of the
standard, you can convert any other data using the same parameters. Simply
select another data set by clicking on its entry in the Groups list and confirm
that the parameters are reasonable by examining the plot the is make when the
group is selected. If so, click the ”Make data group” button to convert and save
the new mu(E) data. In this way, you can process a large quantity of data in
reasonably short order.
34
Merging works by computing the mean and standard deviation of all marked
groups in the space chosen. Care is taken to only include data in a data range
common to all marked groups in the merged data. A new data group (one not
associated with any file) is created and the average spectrum along with the
average plus and minus the standard deviation. If the merge is in k-space, these
three spectra will be plotted with the appropriate k-weighting.
When a merged data group is the current selection, there is an option in the
Plot menu for replotting the figure with the average and standard deviation.
For all non-merged data groups, this option is disabled.
When a merged data group is saved to a column data file in the space in
which it was merged, the standard deviation array will be saved as an additional
column in the data file.
If you want to merge very large amounts of data, say 100s of scans, you
may find that you will exceed Ifeffit’s memory limitations. When this happens
Athena may behave strangely or may simply crash. One way of avoiding this
problem is to split you data ensemble into smaller groups of 40 or so scans each.
Merge each smaller group of scans and then merge the merged scans. The other
possibility is to recompile the Ifeffit library to use much more memory and so
to allow for many more data sets.
There is a configuration option for specifying how to weight the data when
performing the merge. The two options are to weight each data set eually or
to weight by their high-R noise as computed by Ifeffit’s chi noise() function.
This choice can be toggled either in themerge menu or by explicitly setting this
choice in the preferences dialog.
35
energy, the second spectrum is interpolated onto the grid of the standard and
that grid is used by the difference spectrum group. Also, the data parameters
of the standard are given to the difference group.
If the ”invert spectra” button is selected, the plot will be made as if the
standard and the second spectra are transposed. If the ”plot spectra” button
is selected, any plot will contain the standard and the second spectrum along
with the difference spectrum.
As with the Alignment view, you may experience delays when changing
groups in the Difference spectra dialog. Again, clicking buttons in a pique of
frustration will not actually help to speed up the process.
Integration
You can integrate the area under a portion of the difference spectrum. The
boundaries of the integration are set by filling in the boxes labeled ”Integration
range” with values appropriate to the difference spectrum. Values in energy
should be relative to E0. These values can be plucked from the plot using the
little blue buttons.
The actual integration is the standard Romberg algorithm taken from Nu-
merical Recipes and implemented in perl by the authors of Mastering Algorithms
in Perl. It’s a bit slow, but is probably more precise than any XAS applica-
tion needs. The result of the integration is displayed just below the integration
range. If a data group is made after integrating, the result of the integration
will be added to the title lines associated with the new group.
Batch processing
The button labeled ”Make difference groups from all marked groups” allows you
to batch process a series of difference spectra. All groups from the Groups list
which are marked by clicking the little buttons next to the entries in the list
will be processed into difference spectrum groups. Each newly made difference
spectrum will be appended to the Groups list. Any marked group which is not
of the correct type for making a difference spectrum will be ignored. (That is,
a chi(k) data group cannot be made into a difference of mu(E) data.)
Next to the batch processing button is a check button for specifying that each
difference spectrum should be integrated before making the difference group.
For each one, the intgerated area will be written to the difference group’s title
lines. If the integrations are spoecified for a batch job, an additional data group
will be made at the end which contains the results of all the integrations. Thus
if the data are entered into Athena in order of some extrinsic parameter, then
the integrated area will be plotted as a function of that parameter at the end
of the batch job. Because these areas are saved to a data group, the area data
can be replotted or exported to a data file.
36
24 ATHENA: Log-Ratio/Phase-Difference Anal-
ysis
ATHENA - Log-ratio/phase-difference analysis
37
The fit is performed within the fitting range specified at the top of the screen.
This fitting range is indicated by two vertical lines in any plot of the fit and
the data. The plot is made over the energy range indicated in the plot options
section of the Athena window.
For each line shape, you can choose to fit any of the centroid position, the
amplitude, or the line width. By default, the amplitude and widths are fit and
the centroid is fixed. Take care in allowing the centroids to vary as this can
often lead to highly unstable fits.
Occassionally it is useful to reset the amplitudes and widths in the situation
where a fit has found screwy values. Clicking the Reset amplitudes and widths
button restores the default values. The default values can also be customized
in the preferences dialog.
You can do peak fitting on another data group simply by selecting the new
group from the data list. When you select the next group, the data will be
plotted and the parameter values from the prior fit will be retained, but the fit
will not be performed until the Fit lineshapes button is pressed. This behavior
is intended to make it easy to use the same peak fitting model on a sequence of
data sets and thus to measure the variation in some component throughout an
ensemble of data.
After each fit, a complete summary of the fitting result is written into the
space viewed by clicking on the tab labeled ”Results”. The R-factor reported
in the text box is
where the sums are over the data points in the fitting region. The chi-square
and reduced chi-square are those reported by Ifeffit. This summary of the
results can be saved to a log file by clicking the button labeled Write a log file.
The sum of the fitten lineshapes can be saved to a data group for later
comparison to the data or for saving to a project or an external file. Clicking
the button labeled Save best fit function as a data group will create a new group
and new entry in the groups list. This new group is like a detector group (see
the section on data groups|athena groupmenu) in that it can only be plotted in
energy and no analysis chores such as background removal or Fourier transform
can be performed on it.
Information about the peak fitting parameters is saved with the data group
and will be restored the next time the peak fitting dialog is viewed. This infor-
mation is also saved in a project file.
Future improvements to the peak fitting might include the ability to use
Cromer-Liberman calculations as the background shape and pseudo-Voight or
other shapes as the peak functions.
38
27 ATHENA: Linear Combination Analysis
ATHENA - Interactive EXAFS linear combination analysis
Athena has a capability of fitting a linear combination of standard spectra
to an unknown spectra. These fits can be done using normalized mu(E) spectra
or chi(k) spectra. One use of this sort of analysis might be to interpret the
kinetics of series of spectra measured during a reduction reaction. By fitting
each intermediate spectrum as a linear combination of the end members, one
can deduce the rate of the reaction. Another possible use would be to determine
the species and quantities of standards in a heterogeneous sample.
To access this feature, choose ”Linear combination fit” from the Analysis
menu. The normal parameter view will be replaced by a dialog for performing
the linear combination fit.
39
variables can be introduced by clicking on the checkbuttons in the table of
standard spectra.
You can introduce a linear offset to the fit to normalized mu(E) spectra.
This is simple a line added to the sum of spectra in the fit. It introduces two
parameters to the fit — a slope and an intercept. The line is multiplied by
a step function centered at the e0 of the unknown. Thus the linear offset is
introduced only after the edge of the unknown. The purpose of this offset is
to accommodate any variations in how the normalization is performed on the
various spectra. To turn on the linear offset in the fit just click on the button
labeled ”Add a linear term after e0?”
The weight reported at the end of the fit, then, is the result of that formula.
Note that the use of the min/max idiom means that uncertainties cannot
be calculated for situations where the guess variable gets pinned to 0 or 1.
That can happen in situations where one or more of the standards used in
the fit is not appropriate to the data and is an indication that you should
rethink the set of satndards used in the fit.
When this option is not selected, the guessed variable itself is used as the
weight in the fit and is not prevented from being negative or larger than
1.
Force wieghts to sum to 1
You can loosen the constraint that the weights sum to 1 by deselecting the
final checkbutton. This allows the final weight to float freely along with
the rest rather than constrain it to equal 1 minus the sum of the rest, as
described above. Loosening this constraint might yield fit results that are
hard to interpret.
If the constraint that weights must be between 0 and 1 is in place, then
the weight of the last standard in the fit is computed by this formula:
40
This forces the final weight to be positive, but may result in a fit that does
have weights that, in fact, sum to one. Should that happen, it should be
interpretted to mean that the choice of standards was not appropriate to
the unknown data.
Constrain all standards to use a single e0 shift
You can force all standards to use a single e0 parameter in the fit. This
is equivalent (albeit with a sign change) to fixing all the standards and
using an e0 shift on the unknown data.
Adding noise to the data
It is sometimes useful to check the robustness of the fit against noisy data.
This is particularly true for a data set wherein some data are much noisier
than others. To this end, Athena allows you to add pseudo-random
noise to the data before performing the fit. This is done using Ifeffit’s
random() function with a user-supplied value for sigma. No care is taken
to normalize sigma relative to the data, so a bit of trial and error might
be necessary to find a suitable level of noise for your test. For normalized
mu(E), sigma has a simple interpretation – it is a fraction of the edge
step. For derivative mu(E) and chi(k) data, you will need to compare
your sigma value to the actual values of the data. You can examine the
level of noise relative to your data before fitting by using the ”Plot data
and sum” from the operations list.
where the sums are over the data points in the fitting region. The chi-square
and reduced chi-square are those reported by Ifeffit.
You can replot the data and the fit using the most recent values for the fitted
parameters by clicking ”Plot” in the operations list.
You can save the text from the fit results box to a file by clicking ”Write a
report” in the operations list. This writes a column data file with the fit results
as the header information. The columns in the file are x-axis (either energy or
k), the data, the best fit, the residual, and each of the weighted components.
You can make a data group out of the linear combination by clicking ”Make
fit group” in the operations list or out of the residual by clicking ”Make differ-
ence group” in the operations list. This will allow you to plot and manipulate
41
the fit/difference after leaving the linear combination dialog. The data group
containing the fit result will be treated as normal data that can have a back-
ground removed or be Fourier transformed.
”Reset” in the operations list returns almost everything in the dialog back
to its original state.
If you need more than four standards, the number of standards as well as
several other aspect of the linear combination fitting is configurable using the
preferences dialog.
Batch processing
One of the choices in the operations list is to ”Fit marked groups”. All groups
marked by having their purple buttons checked will be fit in the manner de-
scribed above using the current selection of fitting standards and other fitting
options. When the sequence of fits is finished, the ”Write marked report” option
will become eneabled in the operation list. This will allow you to write a report
in the form of a comma separated value file which summarizes the results of the
sequence of fits. This report file can be read into any spreadsheet program.
Note that the report file will only reflect the fits done during the batch job.
Any changes made to the fitting model will not be included in that report until
a new batch job is performed.
Also note that the only way that the batch job is different from running the
same sequence of fits by hand is that the report file can be generated. There
is currently no way to generate a similar report from a sequence of fits not
run using the batch processing option. However, you always have the option of
saving individual fit reports as described above.
42
maximum number of standards using the preferences dialog to provide
enough space in the table for all of the standards that you wish to consider.
2. You can limit the number of standards used in each fit with the incre-
mentor widget just below the button marked ”Use marked groups”. By
default this number is 4, which says that the fits will consider all possible
binary, trinary, and quaternary combinations of standards. Increase this
number to consider higher orders of combinations of standards. Decrease
it to limit the number of fits to perform. You can also mark one standard
as ”required” by clicking the radio button in the right-most column of the
table of standards. This will limit the combinations of standards tested
against to data to those that contain the required standard.
3. Click ”Fit all possible combinations” in the operations list and go get a
cup of coffee. If the number of possible standards is large, this series of fits
could take a while. For example, with 11 standards and considering up to
the quaternary combinations, Athena will perform 550 fits. (Really! ”11
choose 2” + ”11 choose 3” + ”11 choose 4” = 550).
Once this series of fits finishes, the tab labeled ”Combinatorics” will become
active and raise to the top. On it, you will see two tables. The top table
concisely summarizes all the fits that were performed, in order of increasing
R-factor. Initially, the first item in the list – which has the lowest R-factor – is
selected (i.e. highlighted in orange).
The second table contains each of the standards and its weight and e0 from
the fit selected in the upper table.
You can select a fit from the upper table by clicking on its line. When you
do so, that fit becomes highlighted in orange, its fitting results are inserted in
the bottom table, it’s best fit function is plotted along with the data, and its
results are inserted into the other two tabs. In this way, you can examine any
fit from the series.
Clicking the right mouse button on a fit in the upper table will post a context
menu with options relevant to the selected fit. These options include saving the
fit as a data group; writing a data file with columns for the data, fit, residual,
and each weighted standard; saving the report from the ”Fit results” tab to
a file; and wrting a comma-separated-value report for the entire combinatorial
sequence which can be imported into a spreadsheet program.
Beneath the tables is a button labeled ”Write CSV report for all fits.” Click-
ing this will prompt you for a file name and location, then write a comma-
separated-value report of all fits.
28 ATHENA: Preferences
ATHENA - Setting preferences
Athena allows for extensive customization of many aspects of its behavior,
including default values for analysis parameters, colors used in plots, colors
43
used to decorate the program, and other things. All of these customization
parameters can be found by selecting ”Edit preferences” from the ”Settings”
menu.
The normal, parameter view will be replaced by a dialog for setting the
parameters. This dialog consists of a tree of parameters displayed on the left,
an area on the right for displaying and setting indicidual parameters on the left,
and a number of buttons for using new parameetr values at the bottom.
The list of parameters is divided in several sections. To see a description of
the broad purpose of the parameters in a section, select that section by clicking
on it line in the tree. To view the parameters in a section, click on the little +
button next to the section name. This will expand that branch of the tree. To
view an individual parameter, click on its line.
When you select a parameter, it will be displayed on the right side of the
preferecnes dialog. It’s name, parameter type, and the as-shipped default value
are displayed along with a widget for setting the parameter tosome other value.
The type of widget offered for resetting the parameter depends on the parameter
type. It will be a text entry box, a menu, a button, or a checkbutton depending
on the parameter type. Below the value widget is a text box which contains a
description of the parameetr, its possible values, and the function it serves in
Athena. If the parameter has units (e.g. if it takes a value in energy), the units
will be explained at the end of the description. These descriptions are actually
quite useful as documentation for Athena – that is, many features of Athena
are explained in these descriptions.
To change a parameter, use the value widget to choose its new value. If a
value has been changed from its as-shipped default, you can restore the default
by pressing the button labeled Athena’s default.
When you change a parameter value, the button labeled Apply changes for
this session and Save changes for future sessions activate. Clicking the Apply
button will cause Athena to use the modified parameter values as long as your
current session continues. The Save button applies the modifications for the
current session and writes an initialization file to disk for future sessions. If
you ever get confused playing with the preferences and want to return to the as-
shipped default values, click the button labeled Set ALL parameters to Athena’s
defaults.
Many of the parameters in Athena determine what color some object pre-
sented on the screen uses. Clicking the value widget for a color parameter causes
a color selection dialog to pop up. You can scroll through the various named
colors or use the sliders to choose a custom color.
When you are done, click the Return to the main window button. Before
actually returning, you will be prompted for applying or saving your parameters
if you have not already done so.
The parameters in the ”bkg”, ”fft”, and ”bft” sections are used to determine
the default values for the parameters controlling background removal, forward
Fourier transforming, and backward Fourier transforming. That is, they deter-
mine what values are assigned to a group when the data is first imported. Some
parameters, such as the end value for normalization or the spline range, which
44
nominally must be positive numbers, can take negative values as their defaults.
For those parameters, a negative number is measured from the end of the data
set rather than from E0.
Fonts cannot currently be configured interactively. The parameters in the
”Colors” section can be changed interactively, but, with the exception of the
”current” color, will only take effect the next time Athena is started.
The parameters used by Athena to recognize detector columns in raw data
take values that are used as regular expressions by Athena. If you are not
familiar with the syntax of Perl’s regular expressions, you probably should not
later those parameters. However, if much of your data comes from a particular
beamline, these regular expressions can be used to add significant intelligence
to Athena’s column selection dialog. The i switch is always used with these
regular expressions, thus the match to the expressions is always done case-
insensitively.
The groups list and the plot buttons remain active when the preferences
dialog is displayed. This is very handy when configuring certain parameters,
such as those that determine how plots are drawn. It allows you to try out new
parameter values in new plots without leaving the preferences dialog.
For those who are curious, the user interface for the preferences dialog was
inspired by and operates similarly to the editor for the /etc/sysconfig/* files in
SuSE Linux.
Using plugins|athena plugins || =head1 ATHENA: Key Bindings
ATHENA - Binding key sequences to functions
Graphical programs are wonderful because they allow the user to control
their operations by clicking the mouse on buttons and menus instead of having to
remember complicated commands and keystrokes. However graphical programs
can be cumbersome to use for common and repeated operations because they
require use of the mouse rather than convenient commands and keystrokes.
Athena aspires to be useful both to the novice and the expert user and to be
as adept at processing large quantities of data as it is at processing a single data
set. To this end, Athena allows the user to bind almost every function available
in the program to special key sequences which begin with either control-comma
or alt-comma.
The key binding interface is found by selecting ”Edit key bindings” from the
Settings menu. The normal view is then replaced by the key bindings dialog.
The large text box at the top of the screen contains a tree of nearly all the
functions available in Athena roughly organized as they appear in the menus
at the top of the Athena window. To see a group of functions, just click on the
little boxed plus to open that branch of the tree. For features of Athena which
open up their own dialogs as views replacing the normal view, the functions
associated with those features appear in sub-branches of the tree.
To bind a function, select it by clicking on its entry in the tree. Select either
Ctrl-, or Alt-, from the menu, then enter a letter, number, or other symbol in
the box labeled ”Key:”. Clicking the button labeled ”Bind it!” then associates
the selected function with the bound key.
To activate the key binding, simply type Control-comma (or Alt-comma)
45
and then the key. That is, type the comma key while holding down the control
(alt) key. You will be prompted for the bound key in the echo area. Typing the
bound key will then execute the associated function.
Performing a function via the Control-comma (Alt-comma) key sequence is
the same in every way as performing it by clicking a button with the mouse or
selecting it from a menu with the mouse. The only difference is that the mouse
need not be involved.
As soon as you bind a key, it will be available for use in the current session of
Athena. If you wish your key bindings to be available to you in future sessions
of Athena, click the button labeled ”Save key bindings for future sessions.”
This will save the key bindings to your preferences file.
You can unset individual all bound keys by clicking the buttons labeled
”Clear all key bindings” and you can unset a particular key by entering that
letter in to the key entry box and clicking The ”Unbind” button. This unsets
them only in the current sessions. If these key bindings have previously been
saved to your preferences file, you must click the ”Save key bindings” button to
unset them for future sessions as well.
Some functions can only be performed when Athena is in a particular state.
For example, you can only deglitch data when the deglitching dialog is showing.
Should you attempt to perform a function when Athena is in a state that does
not allow it, an error message will be written to the echo area.
The key binding mechanism is case sensitive. That is C-, a is different from
C-, A. However, the mechanism that captures the key stroke after Control-
comma will capture the shift key and not wait for the following key sequence.
Thus key bindings that involve capital letters require the use of the caps lock
key. Because of this, any characters which are found using the shift key (such as
most punctuation on United States keyboards or numbers on French keyboards)
cannot be used as key sequences.
The hash character (#) can be set as a key binding on keyboard layouts on
which is accessed without the shift key, but it cannot be saved to or recovered
from the configuration file. The same is true of space, tab, and the equals sign.
Non-printing characters such as return or the function keys cannot be bound
in this way.
46
Hints
Hints are randomly selected one-liners explaining some feature of Athena that
you may not already know about. The hints get displayed one at a time in the
echo area. A hint is always displayed soon after starting Athena.
Demo projects
Demos are normal project files that have been specially prepared to demonstrate
some feature of Athena. You should be able to tell from the file name which
feature the demo is intended to demonstrate. The demo projects have data
and parameters already set to values chosen for their practical or pedagogical
purpose. The project journal, which contains an explanation of the feature
demonstrated by the demo and a number of suggestions of things to try to
enhance your understanding, will be displayed as soon as you open the demo
project. The demos are probably the best way to learn about the many features
of Athena.
47
Counting spline knots
The Autobk algorithm always uses as many spline knots as possible. It deter-
mines this number by the formula
That is, it uses all the information contained in the band determined by
the extent of the Fourier transform and the width of the background region
in Fourier space – 0 to Rbkg. You can see how many spline knots this is by
selecting the last item in the Data menu. The number of knots is written to the
echo area.
48
Keyboard shortcuts
Many of the most commonly used functions in Athena can be accessed by
keyboard shortcuts. These functions have their associated shortcuts indicated
in the menubar menus.
Some very useful shortcuts are not listed in the menus. These are:
Control-k and Control-j are the equivalent of clicking on the group in the
group list above or below the current group.
The Control-; and Meta-; key sequences are equivalent to clicking on the
red or the purple plot buttons. Note that the phrase Control-; e means to
press Control-semicolon then press the e key.
In a future version of Athena, there will be a set of key sequences that
the user will be able to bind to any operation normally accessed in any of the
menus. This will be helpful to those who like to keep their fingers as close to
the keyboard as possible!
31 REFERENCES
Here are the relevant URLs:
IFEFFIT
http://cars.uchicago.edu/ifeffit
PGPLOT
http://www.astro.caltech.edu/~tjp/pgplot/
Perl
http://www.perl.com
49
perl/Tk
http://www.lehigh.edu/~sol0/ptk/
http://leonardo.phys.washington.edu/~ravel/software/feff_tables/
32 MISSING FEATURES
You betcha! Lots! Here’s a partial list:
33 WHAT’S IN A NAME?
Athena was the goddess of wisdom and is also associated with skill and justice.
Those are all good qualities for a data analysis program!
50
34 AUTHOR
Bruce Ravel <[email protected]> (c) 2001 - 2006
http://cars9.uchicago.edu/~ravel/software/exafs/
51