RATIO Contents: 1. Introduction to the log-ratio method 2. Input and Output Data Files 3. RATIO.INP : Input File to Control the Program 4. Examples --------------------------------------------------------------------- Chapter 1 Introduction to the Log-Ratio Method RATIO will compute the log-ratio of two data files that represent the XAFS from isolated shells. The log-ratio is one of the simpler XAFS analysis tools that can give meaningful numerical results for the atomic structure. The idea is that the XAFS contribution from a single shell depends on some factors that have little to do with atomic structure (such as scattering amplitude and phase shift), and on the details of the radial distribution function, or rdf. The non-structural contribution from an isolated shell for two different data sets which have similar chemical environments, but different details of the rdf, will be similar. The log-ratio method is a way of separating the structural and non-structural parameters, and canceling the non-structural parameters, leaving a sensitive measure of the difference of the rdf of the two data sets. The standard way of expressing the details of the rdf in XAFS analysis is the cumulant expansion. This is a measure of the weighted moments of the rdf. RATIO will fit the results of the log-ratio of two data files to the cumulant expansion. The log-ratio uses the complex chi(k) for two different data sets for an isolated shell. Breaking the complex chi into amplitude and phase, the logarithm of the ratio of the two amplitudes, and difference of the two phases are calculated. Referring to the two data sets as the Unknown and the Standard, the log-ratio and phase-difference are: Log-Ratio(k) = ln( Amp_unknown(k) / Amp_standard(k) ), and Phase-Diff(k) = Phase_unknown(k) - Phase_standard(k). These can be written, using the cumulant expansion, as Log-Ratio(k) = c_0 + 2*c_2 * k^2 + (2/3)*c_4 * k^4, and Phase-diff(k) = 2 * c_1 * k - (4/3) * c_3 * k^3. For more details on the log-ratio method and the cumulant expansion, see almost any XAFS review article (for example, E. A. Stern and S. M. Heald Chapter 10 of the Handbook of Synchrotron Radiation.), or the article by G. Bunker, Nucl. Instr. and Meth. 207 (1983) 437-444. Questions and suggestions about RATIO and this document should be directed to the author. US Mail: Matt Newville Department of Physics, FM-15 University of Washington Seattle, Washington 98195 Phone : (206) 543-0435 E-mail : newville@raven.phys.washington.edu --------------------------------------------------------------------- Chapter 2 Input and Output Files -- a. Input Files RATIO uses an input file named RATIO.INP to control the running of the program. This file will be discussed further in chapter 3. Two data files, each containing the chi(k) from an isolated shell are also required, as output from the program TRANSF. One of these chi(k) files represents the STANDARD, and so should have known structure parameters. The other chi(k) file represents the UNKNOWN, and should have structure parameters similar to the STANDARD. And, of course, both STANDARD and UNKNOWN should have the same central and backscattering atoms if this is at all possible. In addition, data files representing the error bars in the isolated first shell can also be given, and will be used in helping evaluate both the fitted cumulants and their uncertainties. In summary, there are three required inputs and two optional inputs: 1. RATIO.INP, the input file for the program. 2. A data file containing chi(k) for the isolated shell of the standard. 3. A data file containing chi(k) for the isolated shell of the unknown. 4. A data file containing chi(k) + delta_chi(k) for the isolated shell of the standard. (optional) 5. A data file containing chi(k) + delta_chi(k) for the isolated shell of the unknown. (optional) -- b. Data File Formats There are two options for the format of the data files: a UWXAFS file or an ASCII column data file. Both formats allow a few different file types which specifies the actual format of the data. The input data must be have file type 'env'. For uwxafs format files, both the file name and record key (either nkey or skey) must be given for the input. Ascii format files require only a file name. For more on file formats and file types, see the help documentation on file handling. All input files must have the same format, and all output files must have the same format, but the input file format and output file format may be different. The default file format is 'uwxafs' for both input and output data files. -- c. Output Files RATIO will write out RATIO.LOG, a log file of the run. Output data files for the log-ratio of the UNKNOWN and STANDARD data files, and for the log-ratio reconstructed from the fitted cumulants will be written. The output file type will be 'ENV' for uwxafs file format. The Amplitude will contain the log-ratio and the Phase will contain the phase-difference. The output file will have extension '.RAT'. -------------------------------------------------------------------- Chapter 3 RATIO.INP : Input File to Control the Program As with the other UWXAFS programs, RATIO uses an input file with keywords to describe all inputs to the program. At this point, the expectation is that you have some understanding of how these inputs and keywords work, having read the documentation for and successfully used both AUTOBK and TRANSF. So this will be slightly terser, and will cover mostly only those topics important to the log-ratio. Here are the Keywords to run RATIO: keyword meaning default % or ! end of line comment line in RATIO.INP file title title line for log-ratio none format file format for both input and output files uwxafs formin file format for input files uwxafs formout file format for output files uwxafs unknown file for unknown and skey/nkey none standard file for standard file and skey/nkey none unebar file for unknown + error and skey/nkey none stebar file for standard + error and skey/nkey none v0 energy shift for data in unknown file 0. weight k-weighting (needed only when using v0) 0. n2pi n*2*pi phase shift 0. npha number of cumulants to fit to phase difference 1 namp number of cumulants to fit to log(amplitude) 2 the following are for the k-range over which to fit the cumulants k1ph low end of k-range for phase 0. k2ph high end of k-range for phase 0. k1am low end of k-range for amp 0. k2am high end of k-range for amp 0. kmin low end of k-range for both phase and amp 0. kmax high end of k-range for both phase and amp 0. 'format', 'formin', and 'formout' give the file formats (UWXAFS or ASCII). 'unknown' and 'standard' give the file names for the UNKNOWN and STANDARD data files. If these are UWXAFS formats, the skey or nkey is also required. 'unebar' and 'stebar' give the file names that contain data of the (UNKNOWN + uncertainty in UNKNOWN) and (STANDARD + uncertainty in STANDARD). These are optional. Either or both may be included. If these are UWXAFS formats, the skey or nkey is also required. 'v0' gives an energy shift to apply to the UNKNOWN. This may be necessary if the phase-difference does not intersect 0. at k=0. 'weight' gives the k-weighting that was used in the Fourier transform from k- to r-space. This is only needed when v0 is used. It is used to re_do the k-weight relative to the new k-values after the energy shift. 'n2pi' gives a 2*pi phase shift to apply to the phase-difference, which is occasionally necessary when the phase-difference intersects some multiple of 2*pi, and not 0. 'npha' gives a number of cumulants to use in the fit to the phase difference. The default is 1, so that only c(1) is fit. If npha = 2, then both the first and third cumulant will be fit to the phase difference. 'namp' gives a number of cumulants to use in the fit to the log of ratio of the amplitudes. The default is 2, so that only c(0) and c(2) are fit. If namp = 3, then the fourth cumulant will be fit to the log-ratio. the phase difference will be fit between k-values 'k1ph' and 'k2ph'. the log of the ratio of the amplitudes be fit between k-values 'k1am' and 'k2am'. -------------------------------------------------------------------- Chapter 4 Examples Here are some examples of RATIO.INP % % RATIO.INP % title = 5%Ga-Ag 80K data/theory ,v0=-0.05 unknown = ga.env, 2 standard= ga.env, 1 v0= -0.05, weight=2. kmin= 3., k2p= 6.0, k2a =7., nphase=1, namp= 2 -------------------------------------------------------- % % % title = 5%Ga-Ag 80K data/theory ,v0= + 0.05, unknown = ga.env, 2 standard= ga.env, 1 v0= 0.05, weight=2. kmin= 3., k2p= 6.0, k2a =7., nphase=1, namp= 2 --------------------------------------------------------