CMPR is a multipurpose program that can be used for displaying diffraction data, manual indexing and peak fitting and other nifty stuff. I consider it to be my "swiss army knife" for diffraction. Any useful manipulation that I need will probably end up here eventually. CMPR requires the Tcl/Tk and BLT packages and optionally uses Tix, when available. It has been tested on both UNIX computers (SGI and LINUX) and on computers running Windows-NT & -95. It will also probably run on Macintosh computers, but I do not plan to pursue this myself. (Click here to volunteer yourself.)
The program incorporates several small FORTRAN programs containing routines borrowed from lots of sources: The reflection generation code traces back to the NIST AIDS*83 (C. Hubbard, J. Stalick, A. Mighell & others), space group extinctions from NRC symmetry codes (A. C. Larson) and peak fitting uses GPLSFTA (D. Cox, W. Hamilton, L. Finger & many others).
Click here for Windows-95 and -NT installation instructions.
Most modes within CMPR display a list of datasets that have been read. Files are selected by clicking on them with the left mouse button (left-click). The control and shift keys can be used to modify which files are selected. Holding the control key down and clicking the left mouse button (control-left-click) causes the file to be selected or unselected. Holding the shift key down and dragging the left mouse button across part of the list of files (shift-left-drag) causes those files to be selected.
To read a file, select the format on the right and then select a file on either the window that pops up (Windows) or on the central pane (UNIX). Note that files can be read either by double-clicking (with the left button) on them or by pressing the Open (or Read) button.
After a file has been read, it appears in the plot window and the name appears in box on the left. Double-clicking (with the left button) on a file name causes all selected files to be displayed.
It is quite easy to extend CMPR to support additional formats as well. (No compiler is needed). For information on creating a new routine for reading data, see file "notes_on_read_routines" and the read_*.tcl files.
The way that files are displayed is controlled by the buttons to the right. Select one or more files and then select which features will be changed. The changes will be made when the "Apply Changes" button is pressed.
The x-axis units can be changed from 2theta values to other units with the first set of options. Y values can be scaled as the Square Root of the Intensities [Sqrt(I)], Logarithm (base 10) [Log(I)] or the signal-to-noise ratio (I/sigma of I) [I/sig(I)]. It is also possible to add or multiple or the x or y values by arbitrary values.
Note that changes are applied when the "Rescale" button is pressed and scaling is applied multiple times unless that "Reset previously applied scaling" checkbox is selected. This means that if the Y multiplier is set to 2.0, the range of intensities will double each time the Rescale button is pressed, unless "Reset previously applied scaling" is selected, in which case any previous scaling is ignored and the y values will be set to double their initial values.
Unit cells may be input with either direct or reciprocal cell parameters in both HKLGEN and EditCell. Use of reciprocal cell parameters has proven valuable for indexing powder diffraction data with low symmetry unit cells where some reciprocal unit cell vectors are known from electron diffraction.
In HKLGEN, once the appropriate values have been entered, and the "Compute" button is pressed, a table of reflections is generated. This table can be saved to disk.
In EditCell, the reflections are both generated and plotted, optionally superimposed on data. A set of reflections is generated using the "Compute" button and then a set of data can be superimposed on the reflections by selecting the data set from the file list on the left using a double-click or by selecting the file and pressing "Update Plot". Selections between previously computed reflection lists can be made using the "Select peaklist" button in the upper left.
Unit cell symmetry can be raised by selecting a higher symmetry cell from the list in the middle. To lower the symmetry, a new peaklist must be created. Reflections that would be extinct based on a space group or symmetry operation can be highlighted using the extinction information in the upper right. Note that reflections that were previously removed due to symmetry will not be highlighted, so that if space "F m m m" is used to generate the reflections and "F d d d" is used to highlight extinctions, the reflections extinct due to face centering will be omitted and the reflections extinct due to the d-glides will be highlighted.
The plot will respond to changes in the unit cell parameters or zero correction made either by typing value(s) into the entry boxes or by sliding the bars to the left of each number. The zero correction is added to two-theta values. Whenever a data set is reselected, using the "Select peaklist" button in the upper left, the current value for the unit cell parameters are made the central value for the slider and all reflections within the requested angular range (see DisplayOptions) are generated.
Individual reflections can be labeled by holding the Shift key and clicking on the reflection position with the left mouse button (shift-left-click). All reflections can be labeled by holding Shift key and double-clicking anywhere in the plot with the left mouse button (shift-left-doubleclick). Individual reflection labels will be erased automatically after 10 seconds. This time can be changed in the DisplayOptions page; a erase time of 0 means that reflections labels are not automatically erased. To clear labels for all reflections, holding the Shift key and click anywhere with the right mouse button (shift-right-click). The size of reflection labels can be changed on the DisplayOptions page.
Note that the size for the reflection markers, with respect to the Y axis, is determined by the "Maximum and Minimum Y values" on the right side of the screen.
To fit peaks, first a data set is selected using the button in the upper left. Then a range of data is selected using the mouse to zoom in on a region, or by typing a upper and lower two-theta value in the "Range to fit" boxes. The range must contain less than 1000 data points.
Peaks are added to the table by pressing the "set" button to the right of the peak table and then clicking with the left mouse button on the appropriate location on the graph while holding the control key down (control-left-click). Peaks can also be redefined using this same mechanism. It is also possible to add peaks by holding down the control key while double-clicking (control-left double-click) on the peak.
Once at least one peak has been entered, and a suitable range has been selected, a "Run GPLSFT" button appears. Select the parameters to be refined, by clicking on the appropriate boxes to the right of the parameters and then press "Run GPLSFT" to optimize the parameters. The least-squares algorithm in the program is far from robust. You are encouraged to first refine the area and FWHM terms and then add background and eta and peak positions after reasonable fits are obtained.
The GPLSFT program can use the Finger-Cox-Jephcoat correction for peak asymmetry. For this correction, three terms must be known: the diffractometer radius, the half-height (or half-width) of the sample and of the detector. Values may be specified in any consistent units. NIST would prefer that you use metric units, of course. While these values can be refined, do so with care: do not refine too many variables at the same time, use a small number of cycles and set the damping factor to a small number.
Note that the output from the refinement is either shown on the plot, or in a separate window, determined by a value set in the DisplayOptions page.
The "Plot options" determine how data is displayed and recorded
Brian Toby (Brian.Toby@NIST.GOV)