SImPA (version 1.3) - TUTORIAL


(© Serge Desgreniers 1997)

About the SImPA Tutorial:

The following will guide the first-time user through the steps of a typical SImPA session.

It is assumed that a sample powder X-ray diffraction image named 'sample.img', distributed with SImPA, is available. It is particularly useful to view this tutorial using the Windows 95 'Wordpad', Microsoft Word, or other suitable program while SImPA is running; in this manner the user can easily execute the different steps by switching back and forth between the tutorial and the application.

For a full description of what problems SImPA is addressing and of all SImPA commands, the reader should refer to the 'SImPA User Guide', a separate document to be found in the SImPA distribution as file "simpa_gu". The SImPA User Guide and Tutorial are available in different displayable and printable format by anonymous ftp at "joule.physics.uottawa.ca" in "/pub/lpsd/simpa/manual" or by directing your web browser at

"ftp://joule.physics.uottawa.ca/pub/lpsd/simpa/manual", if ftp is supported.

The following abbreviations are used throughout the SImPA Tutorial:

RMB for 'right mouse button' and LMB for 'left mouse button'.

Copyright and Conditions of use:

'SImPA' is Copyright © 1995-1997 by Ken Lagarec and Serge Desgreniers. All Rights Reserved.

In a spirit of scientific collaboration, 'SImPA' is made available at LOW COST by the Laboratoire de physique des solides denses / Université d'Ottawa. SImPA users fees will help to continue its development. The conditions of use of SImPA are as follows:

  1. The evaluation version of 'SImPA' is free of charge and can be kept and used as long as needed.
  2. The official version of SImPA is available to registered users following the remittance of the indicated fees.
  3. Proper credits should be given to the authors of this program in any scientific publications which could result from the use of the 'SImPA'.
  4. This software, in its evaluation or official version, is provided "AS IS," and you, its user, assume the entire risk as to the quality and performance when you use it.
  5. The authors of this program, the Laboratoire de physique des solides denses, and the Université d'Ottawa accept no responsibility for damages resulting from the use of this software, in its evaluation or official version, and makes no warranty or representation, either express or implied, including but not limited to, any implied warranty of merchantability or fitness for a particular purpose.
  6. You may not decompile, disassemble, reverse engineer, or modify the evaluation or official version of the software. This includes, but is not limited to modifying/changing any icons, menus, or displays associated with the software, in its evaluation or official version.
  7. This software, in its evaluation or official version, cannot be sold or be repackaged for resale without a written authorization from the authors.

To registered users, SImPA is provided with limited technical support. You may direct comments, urgent questions, or further inquiries to:



Laboratoire de physique des solides denses


Prof. Serge Desgreniers serge@physics.uottawa.ca (preferred)

Département de physique

Université d'Ottawa (613) 562-5800 (ext. 6757)

150, rue Louis PASTEUR (613) 562-5190 (FAX)

OTTAWA, ONTARIO, CANADA. http://joule.physics.uottawa.ca/~lpsd/simpa.htm

K1N 6N5

What is SImPA addressing?

The use of two-dimensional detectors to record X-ray diffraction from solids is becoming a standard practice, at synchrotron radiation facilities around the world as well as in the laboratory.

Due to a large detector area, a good X-ray sensitivity, and a linear intensity over a large dynamic range, imaging plates are now regarded de facto as among the best detectors to record powder X-ray diffraction of a minute amount of sample at ambient conditions or at very high pressure.

SImPA (Simplified Imaging Plate Analysis) has been written to bridge the gap between modern two-dimensional recording of X-ray diffraction and crystalline structure refinement software packages. More specifically, SImPA provides the necessary tools to process a powder X-ray diffraction image recorded on a phosphor imaging plate for further analysis as follows:

  1. Image display and manipulation, e.g. pixel intensity readout, image enhancement and enlargement;
  2. Sample-to-plate distance calibration for the analysis of the X-ray diffraction image;
  3. Imaging plate orientation correction;
  4. Removal of spurious high intensity spots (e.g. Bragg spots from large single grains);
  5. Azimuthal summation of pixel intensities for the construction of a high signal-to-background intensity profile as a function of the diffraction angle.

And, importantly, SImPA offers an easy-to-use interface running under Windows 95/NT.

System Requirements

The current version of SImPA (version 1.3) requires the following (minimum) hardware and operating system to function properly and efficiently:

486 or faster Intel or alike microprocessor

256-colour SVGA video adapter (1024 x 768 resolution recommended)

16 Mb of RAM (32 Mb recommended)

1.5 Mb of hard disk space (excluding disk space for image files and possible swap space)

Windows 3.1 (with Win32s), Windows 95, or Windows NT (3.51 or above)

Installing SImPA

SImPA is distributed as one compressed file. The SImPA distribution is self-installing. The distribution contains the executable file, the necessary libraries, this tutorial document as well as the user guide. In addition, a sample image file accompanies the distribution ('sample.img'); it is necessary for the tutorial and is also helpful for testing SImPA upon installation. For convenience, the sample image should be place in the same directory as all other SImPA files. After installation, create a shortcut in Windows for faster access to SImPA.

Initiating a SImPA session

A SImPA session is initiated under Windows 95/NT by clicking on the SimPA icon or the executable filename in the File Manager or the Windows Explorer.



Figure 1. Angle-dispersive X-ray diffraction configuration. X-ray diffraction for a powered sample (at high pressure in a diamond anvil cell in this case) is recorded by a two-dimensional detector like a phosphor imaging plate. Debye rings are recorded as ellipses if the incoming X-ray beam is not perpendicular to the plane of the imaging plate.


Importing an X-ray diffraction image file

Import the sample powder X-ray diffraction image in SImPA by clicking on icon or by selecting item 'Open' in the 'File' menu. Then select filename "sample.img". The sample image represents a powder X-ray diffraction image of stainless steel AISI T301, recorded at room conditions after a compression in a diamond anvil cell. The major phase presents the body-centered cubic structure (BCC). A second minor phase presents the hexagonal close-packed structure (HCP). The reminder of this tutorial will refer to the sample image.

Depending on your system hardware, the full image should be imported in SImPA and displayed in less than 60 seconds. Once the image is displayed, a cursor should follow the mouse movement. Cartesian coordinates as well as the pixel intensity at the cursor position appear at the bottom of the active window. The sample powder X-ray diffraction image is shown in Figure 2.

Figure 2. A view of the SImPA graphical interface displaying the powder X-ray diffraction image 'sample.img'.

Note that SImPA currently reads two different image formats: a custom binary format (labeled as '.img') used by FUJI or the modified TIFF format (labeled as '.gel') used by MOLECULAR DYNAMICS.

Changing the displayed X-ray diffraction image intensity

The X-ray diffraction image is displayed in greyscale. Image intensity enhancements are achieved by varying the contrast and/or brightness intensity (gamma equalization). For the sample image, a contrast defined by 0 and 100, as the lower and upper intensity limits, respectively, should provide a suitable display. To set the contrast, click on icon and enter the lower and upper limits, 0 and 100, separated by a space. Then hit 'Enter'. You can do the same by first selecting item 'Contrast' in the 'View' menu. The brightness is adjusted by first clicking on icon and sliding the displayed cursor to the desired setting. Note that the default brightness setting is appropriate for the sample image.

Zooming in and out an X-ray diffraction image area

An area of the image is zoomed by the 'Zoom' tools, activated by their respective icons, in the icon bar, or items in the 'View' menu. By clicking on the 'Zoom in' icon, , a Zoom window displays the selected area of the image magnified four times. The magnified area, outlined by a contrasted frame on the full image, is selected by first pointing the cursor at its centre and then by clicking with the right mouse button (RMB). This can be done in the full display or the Zoom window. Further magnification or demagnification is achieved by clicking on the 'Zoom in' or 'Zoom out' icons, respectively.

Finding the X-ray diffraction image centre

Zoom in 2-3 times around the image centre (in this case, in the central area where the X-rays were attenuated). The attenuated direct beam should clearly appear as a contrasted dot. Activate the zoom window by clicking in its area with the RMB. Initiate the centre finding routine by clicking on icon . In the Zoom window, define a more or less square frame around the beam spot by dragging diagonally the cursor while holding the LMB; release the LMB upon frame completion (Figure 3). In a short period, results of the centre finding operation should be displayed as in Figure 4.

Figure 3. Image area defined to find Figure 4. Centre point fitting results.

the diffraction image centre point.

Coordinates of the beam centre (Xc, Yc) of the X-ray diffraction image are (rounded off): (986, 1271). The other parameters are related to the actual two-dimensional Gaussian fit. After hitting 'Ok', a cross locates the centre on the Zoom area.

Correcting for the imaging plate orientation and calibrating the sample-to-plate distance

Correction for the imaging plate orientation with respect to the incident X-ray beam and calibration of the sample-to-plate distance are accomplished by refining the parameters of the equation describing a given Debye ring (ellipse in our case) recorded by the detector. This is obtained by first defining points along one Debye ring (ellipse) corresponding to a known Bragg angle 2q. Refer to Figure 1 for the recording geometry.

In the following sections, we first define points manually for the purpose of finding the proper plate orientation correction and the sample-to-plate distance calibration. Further parameter refinements will then be carried out using auxiliary methods.

Defining points manually:

Select a well defined Debye ring for which 2q is known as accurately as possible. For the current example, choose the 7th ellipse from the centre, i.e., the second most intense from the centre, which corresponds to the (211) line of the BCC phase of the stainless steel sample. Click on icon or select item 'Select Points' in the 'Fit' menu. Define a minimum of 8 points along the ring with the help of the Zoom tool: centre the zoom area on the appropriate portion of the selected ellipse with the RMB and mark a point with the LMB. Keep marking points along the same Debye ring (ellipse). For the current example, define about 16 points along the ellipse, roughly spaced azimuthally by 22 degrees.

Fitting points on an ellipse:

With points now defined on a selected ellipse, click on the 'Execute Fit' icon, , or select the corresponding item in the 'Tools' menu. Indicate the 2q value for the selected Debye ring (ellipse), in this case 24.489°. Initiate the fitting routine by hitting 'Ok'. After a short period, the fitting results will appear in a dialog box as depicted in Figure 5.


Figure 5. Plate parameters resulting from the fit. Figure 6. Simulated ellipse (in red) .

Hit 'Ok'. This is followed by the trace on the image of the simulated ellipse at the 2q which was entered, as shown in Figure 6. It is important to note that the plate parameters you will obtain might differ from those given in Figure 5 due to a different selection of points on the ellipse. The variation of plate parameters should however be slight and most likely not significant. After calibration, the cursor Cartesian coordinates are now translated in a 2q value, as shown at the bottom of the main display and the zoom windows.

In order to verify the "goodness of the fit", inspect the elliptical trace at different azimuthal angles, for higher values of 2q. This is accomplished by clicking on the 'Ellipse' icon , followed by a 2q value. Try 2q = 28.24°. Inspect the new trace with the Zoom tools. You may notice that, with the plate parameters given in Figure 5, the simulated ellipse does not fit correctly the Debye ring. The ellipse parameters consequently need further refinement.

The fit parameters are redisplayed in a dialog box by selecting item 'Parameters' in the 'Fit' menu. In order to refine the ellipse parameters, values are modified, assuming that the sample-to-plate distance is correct, by

  1. entering the new values for Sx and Sy directly in the 'Plate Parameters' dialog box;
  2. defining points on a different Debye ring (ellipse) recorded at a larger 2q and executing a new fit;
  3. invoking a refinement routine upon clicking on icon or selecting item 'Optimize Finesse' in the 'Fit' menu.

The latter is based on the optimization of the final linewidths in a sectored image. Consult the SImPA User Guide for a detailed description of the optimization routine.

To improve the ellipse parameters, we will now define points on another Debye ring (ellipse) using the automatic point selection routine, as follows.

Defining points automatically:

Alternatively, it is possible to mark points automatically along a selected Debye ring (ellipse). The following indicates how to proceed. A Debye ring (ellipse) is first selected by marking the lower and upper bound radii which encompass the desired Debye ring (ellipse). We will now select the 10th ellipse from the centre at 2q = 28.33°. Click on icon or select item 'Auto Points Selection…' in the 'Fit' menu. By bringing back the cursor on the main display window, a first circle is provided to mark, with the LMB, the lower bound radius for the 10th ellipse. A second circle then marks with the LMB the upper bound radius to encompass the desired ellipse. Next, in the dialog box, indicate 60 as the number of points to be automatically found and marked on the ellipse. After a short period, 60 points will appear in colour on the selected ellipse. If all points are satisfactory, i.e., if they fall exactly on the ellipse (by inspection with the 'Zoom tool'), proceed by fitting all the thus defined points, following the steps described in the previous section, using 2q = 28.33°. Note that it is also possible to remove points which were defined automatically prior to executing a fit. To do so click on icon or select item 'Remove Points' from the 'Tools' menu. An "eraser" will appear in the main display window. Drag it on top of a point to be discarded and hit the LMB: the selected point is then removed from the fitting dataset. When all undesirable points have been removed, deactivate the 'Remove Points' routine be clicking on icon and proceed with the fit. For the current example, removal of any points should not be necessary.

It is also possible to use the "finesse optimization" routine to refine the plate parameters as described in the following section.

Refining the plate parameters by optimization of the diffraction line "finesse"

The optimization routine is initiated by clicking on icon or selecting item 'Optimize Finesse…' in the 'Fit' menu. The optimization is done over several Debye rings (ellipses) for best results. With the main display window activated, select a range of 2q which encompasses several Debye rings. In the current sample image, a circle with a lower bond radius is set at 2q = 12.7° with the LMB and a second circle corresponding to the upper bound radius is set at 2q = 25.1° again by depressing the LMB. These actions are followed by a dialog box asking for the number of sectors into which the image will be divided for the purpose of optimization. Enter 60 and hit 'Ok'. The actual optimization can take several minutes, depending on your hardware. Upon completion, the updated plate parameters are displayed in a dialog box. After hitting 'Ok', the trace of the simulated ellipse will be displayed as before. It should be emphasized that only the plate orientation parameters are refined with the optimization routine, assuming that the sample-to-plate distance has been already defined and is adequate.

At this point, you should have a satisfactory plate orientation correction and sample-to-plate distance calibration. If this were not the case, you could manually enter the following (acceptable) plate parameters: Sx = -0.002; Sy = 0.004, r = 1701 pixel units.

With the plate parameters now set, one last step remains to be done before the final data reduction: removing unwanted spots on the image.

Correcting for unwanted diffraction spots on the X-ray diffraction image

As you may have noticed, the sample X-ray diffraction image contains high intensity spots, arising for single crystal diffraction. These spots are unwanted as they will contaminate during the next step, i.e., the reduction through the azimuthal summation process. The spots can be "erased" by clicking on icon or by selecting item 'Exclude Region' in the 'Tools' menu. Once activated, the function displays an "eraser" which follows the movement of the mouse. In either the main display or the zoom window, depressing the LMB brings the pixel intensity at the cursor location to zero. Moreover, dragging the mouse while the LMB is depressed is similar to "rubbing" the eraser against the image. Individual pixels can also be excluded by punctually clicking with the LMB. The 'Exclude region' function is deactivated by clicking on icon again.

In the current image, "erase" spots located at around (1047,566), (1705,822), and (1481,1968). Other minor spots and streaks can also be excluded; if not removed, however, they will contribute to a lesser extent to the final X-ray diffraction pattern.

Summing along the Debye rings (ellipses)

Once the image centre has been defined, the image plate orientation has been corrected, the sample-to-plate distance has been calibrated, and all unwanted spots have been excluded, the final step is to generate the 2q intensity profile. In order to increase the signal-to-noise ratio, an azimuthal summation of all the X-ray diffraction counts falling between 2q' and 2q' + Dq will be performed as a function of 2q. To do this click on icon or select item 'Integrate…' in the 'Tools' menu. In the dialog box, indicate the output data filename (sample.dat), the minimum intensity above which a pixel intensity will be included in the summation (115), the start and the end 2q angles (6 and 40, respectively), the angular step size (0.02), and the output data format (X,Y).

The azimuthal summation is initiated by hitting 'Ok'. The summation may take up to several minutes, depending on your hardware. The output data is written in ASCII, in a two-column format, i.e., 2q and intensity, separated by a comma. The output data can then be imported in an appropriate X-ray diffraction analysis program (like XRDA) or a Rietveld refinement package (for this it could be more appropriate to select the "8-column" diffractometer style output format prior to carrying out the azimuthal summation. The final output data could require a further modification to be readable by your Rietveld refinement package). The output data may also be graphed using a common plotting software (e.g. Excel, Origin, etc.); it should look as in Figure 7.


Figure 7. Powder X-ray diffraction pattern obtained from "sample.img"

using SImPA.

If the output 2q-intensity profile is not satisfactory, for instance if the diffraction lines are not sharp or present asymmetries, further refinements of the sample-to-plate distance and/or imaging plate orientation corrections could be necessary, following the steps previously outlined.

Ending a SImPA session

Quitting SImPA is simply done by selecting item 'Exit' in the 'File' menu. It should be noted that the plate parameters are not retained upon exiting SImPA. If important, the plate parameters should be transcribed separately.