Previous Next Table of Contents

3. UWXAFS Binary Format Data Files

XAFS data can be stored efficiently and conveniently in the UWXAFS binary format. These files use less disk space than ASCII data files. Since they cannot be easily edited, accidentally deleting some of the data in a UWXAFS binary file is essentially impossible. But the biggest advantage over ASCII data files is that more than one set of data can be held in a single data file, making organization of data easier for the UWXAFS binary files.

The drawbacks to the UWXAFS binary files are that they cannot be transported between machines (unless both the architecture and operating system are the same) and that special routines must be used every time data is to be accessed. This second point means that general-purpose programs will be unable to handle data in the UWXAFS binary format.

The UWXAFS file handling system allows a single binary file to store several data sets in different "records". Each file has a file type associated with it that determines the format of the data held in the file. Different file types cannot be mixed in a single file. Usually the file type will also be the extension of the file name. This is not required (and is violated by autobk), but it is recommended for most data files. Up to 191 records can be held in a file. Each of these records has the following information associated with it:

  1. An integer key, called the nkey, which is the "address" for this record in the data file. This is independent of the content of the record, and depends only on the location in the file.
  2. A symbolic skey, the skey, which is a unique "address" for the data in a record no matter where in the data file it is, or even which data file its in. If the data in one record is copied to another file, the skey will move with the data, whereas the nkey can change.
  3. The numerical values, stored in a single array. This array has entries which depend of the file type. These will be described below, but it's not essential that you know them.
  4. Documentation lines. Up to 20 can be used.

The data from a record in a UWXAFS binary file can be retrieved by specifying the file name and either the NKEY or SKEY of the record.

Each of the file type stores numerical data in a different way. Usually you don't need to worry about this. But if you're using reform to convert ASCII data into UWXAFS data, it's important to use the correct file type. If you follow the recommended convention that the file extension is the same as the file type (and that files with extension bkg have file type xmu), there should not be any problems. The following sections describe how each of the file types stores the numerical data. Each stores a single buffer of real numbers, which I'll call Buff, which has N_buff elements.

3.1 XMU files

Files with xmu File Type contain absorption data on an energy grid which does not need to be evenly spaced. The units of energy are eV. This file type is used for raw absorption data input to autobk and for the background function output data from autobk. The first N_buff/2 elements of Buff contain the energy values (in eV). The second N_buff/2 elements of Buff contain the values of absorption, whose units are not important. Raw synchrotron data of detector intensities must be converted to xmu format before being used in autobk.

3.2 CHI files

Files with chi File Type contain chi(k) data. The data is evenly k-space, and this is exploited in the storage of the data. The first element of Buff is k_min, the lowest value for which chi(k) is stored (in inverse Angstroms). The second element of Buff is delta k, (also in inverse Angstroms), which will normally be 0.05. The remaining N_buff - 2 elements of Buff contain the elements chi(k) themselves.

3.3 RSP files

Files with rsp File Type contain chi(R) data. The data is evenly R-space, and this is exploited in the storage of the data. The first element of Buff is R_min, the lowest value for which chi(R) is stored (in Angstroms). The second element of Buff is delta R, (also in Angstroms), which will typically be about 0.031. The remaining N_buff - 2 elements of Buff contain the complex elements chi(R) themselves, stored in successive pairs of real and imaginary parts of chi(R).

3.4 ENV files

Files with env File Type contain backtransformed EXAFS data (chi(q)). The data is evenly k-space, and this is exploited in the storage of the data. The first element of Buff is k_min, the lowest value for which chi(q) is stored (in inverse Angstroms). The second element of Buff is delta k, (also in inverse Angstroms), which will normally be 0.05. The remaining N_buff - 2 elements of Buff contain the complex elements chi(q) themselves, stored in successive pairs of amplitude and phases of chi(q).


Previous Next Table of Contents