Contents

Basic knowledge to work with XRDA

Introduction

List of Menu Commands

A Tour of the Windows in XRDA

How to analyze a spectrum

Loading a data file

Peak Profile Fitting

Structure Refinements

What is going on: selected topics

Uncertainty Calculations

Pressure Calculations

Intensity Calculations

Peak Profile Shape Functions (PSF)


Introduction

I have started writing XRDA about a year ago, when I started to work with Dr. Desgreniers, analyzing energy dispersive diffraction patterns for my honors project. I have since then graduated and much improved this program, but the lack of new users is limiting the input of new ideas for improving it. I want to continue improving it, adding more and more features, but I want to keep the user in control of what is going on: no black box type of program.

Anybody that analyzes energy or angular dispersive diffraction patterns can use this program, but it was originally written for pressure dependent spectra: several features are directly pressure related, and others are there to use the similarity of successive spectra.

I only wrote this help file now, not only because it is a long and tedious process, but also because it was only people in my lab at Ottawa U were using XRDA. If they ever had a problem remembering what was what, I was there! But now, I think (actually, I hope) several other people will make use of this program, so I really had to write this help file. I hope it is to your convenience, but don't expect too much: I'd rather program several thousand lines than write these hundreds.

This program is free to anybody who wants it, but I would greatly appreciate any financial contribution you could provide. If you do, you will be sure to receive upgrades, and all your comments will be regarded as very important. Even if you don't want to pay anything, but you find this program worthy, please distribute it freely and send me your comments.

Yours truly,

Ken Lagarec, december 1993.


Loading a data file

To load a data file for analysis, use the New menu command, and select the .DAT file format for comma delimited ascii or .XY for space delimitated ascii file. You must select this type from the format combo box, because an analysis file can be named with one of these extensions if you desire. After pressing OK, the program loads the file and displays the plot in the plot window.


Pressure Calculations

When using a selected material for pressure calibration in your sample, it is possible to have XRDA calculate the pressure in a spectrum: fit the material's phase's structure like you would any phase, then enter Bo (bulk modulus, in GPa), Bo' (bulk modulus's derivative with pressure, no units), Vo (the 0 pressure volume of the calibration structure) and FV (the 0 pressure fractional volume, if the current phase is not the one at 0 GPa). Then, when you fit the structure, it will calculate the pressure. Also, pressing the Pressure button will calculate the pressure using the current lattice parameters in the dialog box's fields.

You can calculate pressure using two equations of state: the first-order Birch EOS or the first-order Murnaghan EOS. Here are the equations used to calculate pressure:

notations use:

Birch EOS:

Murnaghan EOS:


Intensity Calculations

The following contributions to intensity calculations are for energy dispersive spectra. When doing angular dispersive, the structure factor also include a basic polarization factor that might not always be the correct one. If you need accurate intensity calculations, please send me the type of polarization factor you would like included in the calculations. Also, no single crystal preferred orientation factors are included, so this is applicable only to powder diffraction spectra.

  • Synchrotron spectrum

The displayed spectrum is not renormalized to the synchrotron spectrum, but it is taken into account when calculating intensities for a given structure. For a given energy e, the synchrotron spectrum is given by:

  • Nuclear absorption

In this case, for each element, a cubic approximation of the absorption spectrum (normalized to density) is provided internally. In this manner, when atoms are entered in the unit cell, they are used to calculate the absorption curve. For an energy, each atom contributes a term:

  • Structure factor

Also in this case, for a given set of indices, the structure factor contribution is:

and the intensity is

  • Multiplicity

The standard multiplicity factor for a given plane and structure is used, so there is no need to explain it further.

  • Detector sensitivity

This takes into account the variability of a Ge solid state detector, by using a linear interpolation from a table of energies ranging from 0 to 100 keV.


Peak Profile Shape Functions

Peak Profile Shape Functions (PSF)

Several functions can be used to fit peaks in diffraction data. Also with each region being fitted, the background is taken into account using zero background, a linear or quadratic background. For this reason, don't fit too many peaks if the background on that region is highly irregular. When fitted, the peak parameters displayed are the position, the area and the full width at half maximum (FWHM).

  • Lorentzian PSF

  • Intermediate Lorentzian PSF

  • Modified Lorentzian PSF

  • Gaussian PSF

  • Pseudo-Voigt PSF

  • Pearson VII PSF (soon to be included)


Uncertainties

Uncertainty Calculations

  • Structure fit

Because the structure parameters' optimization routine is a nonlinear χ² minimization, uncertainties using standard routines aren't always reliable. Therefore, we used a direct relation between χ² variations and parameter uncertainties.

From the minimized χ², uncertainties are obtained by finding the next value that gives a χ² such that Δχ² attains a given value. The following table shows what this value is, depending on the number of optimized parameters:

		degrees	of	freedom
	1	2	3	4	5	6
Δχ²/χ²	1.0	2.3	3.5	4.7	5.9	7.0

  • Peak profile fit

When fitting a peak with a profile shape function (PSF), statistical uncertainties are used: for each point (x, y) is associated an uncertainty 1/√y. However, no particular treatment is done when evaluating uncertainties for the fitted parameters. They should be representative of the fit, and of the correct order of magnitude, but they are not truly accurate. However, they are consistent from one peak to another, so using the uncertainty on energy (and hence d spacing) is a correct way to weigh each peak's contribution in the structure fit.

  • Using uncertainties as weights in a structure fit

You can decide if you want to use instrumental weighing (weight given by uncertainty wi = 1/σi²) or using no weighing scheme (wi = 1). Statistical weighing has no meaning for this sort of fit. This setting can be changed using the Fit Weighing dialog box.


Peak Profile Fitting

  • Use of peak profile fitting

In many x-ray analysis theories, it is necessary to know several characteristics of a reflection's shape. In our case, we only rely on the peak's position, but it is also very useful to follow peak widths under pressure to detect breaking of degeneracies or similar effects.

  • Procedure for fitting peaks

Select the type of profile shape function (PSF) you want to use for fitting by selecting them in the Peak Fitting dialog box, or using the icons on the Button Bar for lorentzians or gaussians with a linear background. Once the PSF is chosen, press the Left Mouse Button (LMB) to select the beginning of the fitting range. Press the Right Mouse Button (RMB) at the approximate positions of the peaks in the desired range (up to nine peaks can be fitted in one shot). Then select the end of the range with the LMB. The best fit for the parameters of the PSF are then calculated using χ² minimization techniques. The resulting χ² is given in the Status Bar and the actual calculated peak is drawn on the data plot. Different colors are used for different PSFs. The peak is also added to the list of peaks in Phase I of the Fitted Peaks window for utilization.

  • Automatic full spectrum peak fitting

It is possible to fit all the peaks of the spectrum at once, but this must be used with caution. Only when the peaks are relatively clearly separated is this a good procedure. This uses a local average second derivative to spot where the peaks are. This provides the program with a list of peaks that are to be fitted. The range is determined to be 10 times the theoretical width of a peak to incorporate the tail of the peak, which is usually very important in the fitting process. If several ranges overlap, those peaks are integrated into a single larger range.

Note: This method is to be used only for well resolved spectra, since the average derivative binning might not clearly identify two close peaks. It will also miss some very small peaks (compared to the rest of them), since it uses the local standard derivative of the data to set a tolerance limit for accepting high second derivatives as peaks.


Structure Refinements

  • Peak indexing

Currently, there are no available automatic peak indexing routines to find the Miller indices of a peak, so they must be determined and entered by the user. If a peak has no indexing, it cannot be used in a structure fit. Once a peak has been fitted (see Peak Profile Fitting), it can be assigned Miller indices by double clicking on the peak's region in the Peak window with the LMB and entering the corresponding fields in the dialog box, or by clicking with the RMB and selecting the Enter hkl's menu item.

Once it has been entered, the peak can be used (text in blue, default) or not (text in black) in a structure fit. After a structure fit, if the peak wasn't assigned any indexing, but it is close to an existing (non zero intensity) theoretical peak, as determined by a structure fit using other peaks, a temporary guess of the indices will be attributing to the peak: the indexing in the Peak window will be in red.

  • Structure fitting

Once a certain number of peaks have been indexed (at least the number of degrees of freedom in the structure plus one), you can fit the structure to a given lattice. To select the lattice type, click on the button corresponding to the phase you want to fit to bring up the Phase dialog box. Select the lattice type in the combo box in the upper left. If you want to perform intensity calculations to display the fitted structure's peaks, also press the Atoms button to enter atoms in the unit cell. This should give certain extinctions (depending on the space group) that will aid you if a peak belongs to one structure or another. You can execute the structure fit from the Phase dialog box by pressing the Fit Structure button or from the Button Bar's fit structure button. This last one will do the fit for the last selected phase.

Once fitted, certain structure parameters appear in the Peak window above the peaks of a region. This includes lattice constants, the c/a ratio for tetragonal or hexagonal structures and the total volume (not per atom). All information on the structure is also found in the Phase window (structure, lattice parameters, atomic positions). (see A Tour of the Windows in XRDA)


Peak Manipulations

  • Navigating through the peaks

Before any operation can be performed on a peak, a peak must be selected. To do so, click on it with the LMB, or use the arrow keys from the keyboard to go up and down in the list. These arrow keys also scroll the selected phase. To go from phases (black indicator) to peaks (red indicator), press tab. To view all of the peaks characteristics, double-click on a peak with the LMB. From the Peak dialog box, you can also move to the next and previous peaks. This is an easy way to index many peaks. When changing peaks from the dialog box, the information is recorded, as if the user pressed OK.

  • Moving, copying and deleting peaks

These operations are necessary to allow for peaks to be assigned to several phases during phase transitions, and are exclusively down using the mouse (actually, it is easier this way).

To move a peak to a different phase, simply select it and drag it to the desired phase's region (button and to the right of it). To drag means to click on the mouse and while keeping the button pressed, moving the cursor to another region then releasing the button. In this case, it is done with the LMB.

To copy the same as moving a peak but you must be pressing on the shift key on the keyboard.

Deleting a peak is done by pressing the delete key on the keyboard, once a peak is selected. Deleting one peak will delete the other peaks that were fitted simultaneously, since background parameters and thus peak characteristics are now different, unless the peaks were totally separated.

  • Using the RMB floating menu

Clicking on a peak with the RMB selects the peak and brings up a floating menu that enables you to perform basic operations on the peaks, specially regarding its use in the phase's structure fit.


Tour of the windows in XRDA

A Tour of the Windows in XRDA

XRDA uses a Multiple Document Interface (MDI) to allow the user to have all the information he wants displayed on the screen simultaneously. Four main windows provide the analysis information, as well as a 3DView window for each phase. Also, for user ease and information, there is a Button Bar on the right and a Status Bar on the bottom of the screen. Both of these could be hidden using the menu items in the Window menu. All other windows can be minimized but never closed.

  • The Plot window

The spectrum is displayed in this window, as well as the fitted peak profiles and annotations (markers for position). When desired, a phase's calculated spectrum can also be viewed as a histogram or a real spectrum using lorentzians.

Practically every item of this window can be customized for printer output, since the output is exactly (at a better resolution) what is displayed on screen. Customization can be done through the pull down menus, or by double clicking on the item to be changed. Sometimes, a floating menu is available by clicking with the RMB.

  • The Peak window

Once fitted, all the peaks can be used for structure determination in this window. Some relevant data is displayed on the top of the screen, but most important are the phase buttons on the left, and the corresponding peaks on the right. (see Peak Manipulations and Structure Refinements for details)

  • The Phase window

All information on the phases structures can be found in this window, including the lattice constants, the volume and the atomic positions and species.

  • The Calculations window

After a structure fit is performed, a listing of all calculated peaks (with non zero intensity) is listed in this window, with the corresponding observed peak. This list can be sorted by increasing energy (default) or decreasing intensity by selecting the appropriate menu item in the Lattice menu.

  • The 3D View window

Once a phase has a lattice structure and its parameters, as well as atomic positions, it is possible to view it in this window. It uses a stereoscopic projection for a realistic view, And you can change the orientation and the distance of the cell from the viewer. (there are some problems when getting too close, however.) Atomic sizes and colors can be changed from the associated menu command/dialog box. Standard atomic radii have already been entered in Å for all species.

  • The Status Bar

The status bar gives some indications to the user about what is going on or what he has to do.

  • The Button Bar

This window contains buttons for commonly used tasks: in order

Open/Save/Print - Set Ed/Get Ed/Fit Structure - General Fit/Lort.Linear Fit/Gauss.Linear Fit/Background Subtraction - Exit. (see List of Menu Commands)


Menu commands

List of Menu Commands

  • File menu

This pull down menu includes all the file manipulation options, as well as printing functions:

New	Save Data	Print

Open	Save Overlay Data	Printer Setup

Save	Read hkls	Exit

Save As

Close

  • Plot Options menu

This menu is for the plot window customization:

Plot Titles	hkl Settings

Line Style	draw hkl

X Settings	Spectrum Type

Y Settings	Copy to Clipboard

  • Analyze menu

This menu is for analysis of the raw data: peak fitting, background subtraction, smoothing, etc:

Lorentzian Fit	Auto indexing

Gaussian Fit	Use maximum FWHM

General Fit	Subtract background

Manual entry	Quadratic smoothing

Fit all peaks

  • Lattice menu

Serves for all the structure analysis:

Intensities	Get Ed

Add/Delete atoms	Fit Weighing

Change structure	Sort E&I by...

Fit Structure	Pressure Model

Set Ed

  • Special Views menu

3D View Options

Plate View Options

  • Window menu

Tile	Redraw

Cascade	Remove annotations

Arrange Icons	Erase modified data

StatusBar	Restore background

ButtonBar


File menu - New

This will bring up a dialog box asking for a file to be read. All previous information from the current analysis will be erased. Canceling the dialog box will prepare for a new session, selecting a file will load that file.


File menu - Open

Brings up a dialog box for opening a new file. If the file to be retrieved is an analysis file, current work will be lost. However, specifying a data file (.DAT or .XY) will overlay the new spectrum on the current one. Use the New command to start a new analysis with a new data file.


File menu - Save

Saves the current analysis in a .XRD file. If no name was specified, the program will use the data's filename with a .XRD extension.


File menu - Save As

Prompts the user for a filename (with .XRD extension), and saves the analysis in that file.


File menu - Close

Deletes the current work and reinitializes most program parameters.


File menu - Save Data

Saves the current data (blue spectrum) in a space delimited XY format in a user specified file.


File menu - Save Overlay Data

Saves the current overlaid data (black spectrum)  in a space delimited XY format in a user specified file.


File menu - Read hkls

Reads the phases' information from a specified .XRD (analysis) file. Also reads peak indexing and attempts to index the current peaks similarly. Ed must be provided for indexing to be possible.


File menu - Print

Displays a Print dialog box for the user to specify what certain printing options. Among them, selection Print Selection will enable the user to specify what is to be printed. Otherwise (Print All) will print a copy of the plot, peak, phase and calculations windows.


File menu - Printer Setup

Enables the user to modify some settings for the printout. By default a landscape mode is selected for all printouts.


File menu - Exit

Exits XRDA. If the current analysis was not saved, will prompt the user in that purpose.


Plot Options menu - Plot Titles

Enables the user to modify the main and axes titles. A fully formatted output is available, using an @ command:

@b{text}	prints text in bold

@i{text}	prints text in italics

@g{text}	prints text using greek letters

@s{n}	sets the font size to n points

@f{font}	uses font as the next font

@+{text}	prints text as a superscript

@-{text}	prints text as a subscript


Plot Options menu - Line Style

Sets the style of the line between two data points. No line (default) indicates each point will be drawn as a dot.


Plot Options menu - X Settings

Lets the user change the X axis settings. Same as double clicking on the X axis region in the plot window.


Plot Options menu - Y Settings

Lets the user change the Y axis settings. Same as double clicking on the Y axis region in the plot window.


Plot Options menu - hkl Settings

Changes the hkl axis's (right axis) limit, as well as some display characteristics of the intensity plot.


Plot Options menu - draw hkl

For each phase, you can select to display the calculated intensities as a bar plot or a simulated spectrum. There must be at least one atom entered in the unit cell, and Ed must be defined.


Plot Options menu - Spectrum Type

Lets the user choose what type of spectrum is being analyzed: X-ray (energy and angular dispersive), Raman or no special type.


Plot Options menu - Copy to Clipboard

Copies the plot window (without the cursor's position) to the clipboard, so it can be used in any other program under Windows.


Analyze menu - Lorentzian Fit

Sets the program to perform a region fit using lorentzian peaks and a linear background.


Analyze menu - Gaussian Fit

Sets the program to perform a region fit using gaussian peaks and a linear background.


Analyze menu - General Fit

Displays a dialog box letting the user choose what type of PSF and what type of background he wants.


Analyze menu - Manual entry

Lets the user enter a peak manually, by giving its position or d spacing and its intensity. Using this function, he can analyze structure fits without having the whole spectrum data.


Analyze menu - Fit all peaks

Will perform a peak search and peak fits for the whole spectrum. The choice of a PSF and background is to be given by the user. Not recommended for severely convoluted spectra.


Analyze menu - Auto indexing

Inactive for the moment, but coming soon. It will do a dichotomic search for indexing the peaks in a given phase.


Analyze menu - Use maximum FWHM

Option to use twice the theoretical width as a maximum for the FWHM of fitted peaks. This is very useful when fitting two highly convoluted peaks, because a normal fit will often give one very large peak serving as the background.


Analyze menu - Background subtraction
Analyze menu - Subtract background

Does a spline interpolation of the background and subtracts it from the data. Will not work with rapidly varying backgrounds without inducing fluctuations that might look like small peaks.


Analyze menu - Quadratic smoothing

Does a smoothing of the whole spectrum using a second order Savitsky-Golay method using 7 points.


Lattice menu - Intensities

Lets the user modify:

the limit for calculating peaks (max E and hkls, min I)

the synchrotron source characteristics

the list of contributions to absorption

the list of contributions included in I calculations


Lattice menu - Add/Delete atoms

Brings up the dialog box for entering atoms in a phase's unit cell. Appear for the currently selected phase, but phases can be scrolled by from within the dialog box.


Lattice menu - Change structure

Brings up the currently selected phase's dialog box. User can modify lattice type, lattice parameters, pressure related parameters and atomic positions.


Lattice menu - Fit Structure

Executes a structure fit (lattice parameters adjustment) for the currently selected phase.


Lattice menu - Set Ed

Prompts for Ed (in keV.Å) and its error when analyzing an energy dispersive diffraction pattern, otherwise prompts for the X-ray wavelength used (in Å).


Lattice menu - Get Ed

When calibrating with a cubic structure spectrum, fit the peaks, assign the Miller indices, the select this option to get the value of Ed for the spectrum. The user must enter the lattice parameter, unless gold (Au) is used.


Lattice menu - Fit weighing

Selects if the structure fits use uncertainties on peak positions as weights (instrumental weight) or an equal weight for all peaks (no weight). This is also true for calibrating Ed with the Get Ed command.


Lattice menu - Sort E&I by...

Sorts the calculated peaks in the Calculations window by increasing energy or decreasing intensity.


Lattice menu - Pressure Model

Selects whether a first order Birch or Murnaghan equation is used to evaluate pressure from a calibration structure.


Special Views menu - 3D View Options

Lets the user specify the size and color of the atoms displayed in the 3D View windows for each phase. Sizes are in Angstroms.


Special Views menu - Plate View Options

When doing angular dispersive analysis, the user can see what an imaging plate looks like, depending on its size and distance from the sample. This is useful to see what distance is necessary to get a sufficient number of lines.


Window menu - Tile

Arranges the opened windows to cover the whole main window.


Window menu - Cascade

Cascades all the open windows.


Window menu - Arrange Icons

Arranges the icons of the minimized windows on the bottom of the main window.


Window menu - StatusBar

Enables or disables the Status Bar on the bottom of the main window.


Window menu - ButtonBar

Enables or disables the Button Bar on the left of the main window.


Window menu - Redraw

Redraws the active window. If it is the plot window or the calculations window, recalculates the intensities and energies.


Window menu - Remove annotations

If annotations (position markers) were entered (by double clicking on the plot region), this erases them all. They can't be individually removed.


Window menu - Erase modified data

If there is a second spectrum (black points and lines), this erases it.


Window menu - Restore background

If the background subtraction wasn't satisfactory, this restores the previous state of the spectrum. This will only work if no other spectrum modifications were made.