Previous Next Table of Contents

1. Introduction

The UWXAFS data analysis programs use external files to store the data to be analyzed. The data files used in XAFS analysis are fairly small, with a single set of data rarely exceeding a few thousand real numbers and twenty lines of associated text. But there needs to be some formatting rules to the data files so that their contents can be be understood. To keep the UWXAFS programs coherent, flexible, and portable, a fairly simple system for handling small XAFS data files has been developed over the years. There are some peculiarities and possibly outdated constructs in this system, but it's not too bad. Most importantly, it's stable.

For the UWXAFS programs, all data files contain both text lines and numbers representing the data. The meaning of the numbers, including units, must be either known ahead of time. The text lines give some documentation in the data file, presumably to tell what the data is, where it came from, etc. There are currently two formats for the data files that the UWXAFS programs can use, ASCII and UWXAFS binary file formats. The file formats indicate how the file was written by an analysis program, and how it is to be read in the next. The two available formats have advantages and disadvantages that complement each other.

ASCII files are easy for humans to create, read, edit, and transport between machines (by e-mail, for example), and easy for many other programs (such as general-purpose plotting and spreadsheet packages) to deal with. They are relatively large files (on the order of 10 to 50 Kb for each set of data) storing the data in an inefficient way with no compression. Each ASCII format file contains exactly one set of data.

UWXAFS binary files offer more efficient storage than ASCII files, and include some management of related data by allowing more than one set of data to be stored in separate "records" of a single file. There is also a slight improvement in reading and writing speed of these files, but it's small. The UWXAFS binary files are impossible to transport between machines with different operating systems and architecture, and cannot be used by any other applications other than those written especially for them. There are a few such utility programs for data in the UWXAFS format, including copydf to copy data records from one file to another and listdf to list the data records contained in a single file. Most importantly, the primitive graphical display program idp requires UWXAFS binary files.

Data can be easily converted between files with different formats with the UWXAFS program reform, so that you can take advantage of the best features of each file format. reform is an interactive program which can be used to convert data set at a time. It can also dump all the data records from a single UWXAFS binary file into separate ASCII files, or put several sequentially numbered ASCII files into a single UWXAFS binary file.


Previous Next Table of Contents