PLOT85 for Windows

Version 7.5.0 March 9, 2009

Introduction

Plot85 is used to plot and analyze energy-dispersive diffraction data created by the SAM85 or MCA data collection programs. It can be used to determine the channel number, energy, or d-space for any diffraction peak, either by pointing to the peak, or to fit it using GPLS. Reference data can be imported in several file formats, described below: .HKL, .JCPDS, .POW. If the diffraction data is from NaCl, the pressure and differential stress can also be calculated.

Plot85 for Windows is a port and upgrade of Plot85 for VMS. Its upgrades include the ability to directly read APS data, read data created by multiple detectors (up to 4), and includes as subroutines Celrf (a unit cell refinement program written by Charlie Prewitt) and XPOW (a program written by Bob Downs and Kurt Bartelmehs which calculates powder-pattern data from crystallographic data).

To install and run PLOT85, see INSTALLATION, at the end of this document. The program will run (with somewhat limited features) if you simply click on the PLOT85.EXE file.

When the program starts, it will look for an energy calibration file (DEFAULT.EDF) and a list of hkls for some standards (STANDARD.HKL) in two locations. It will first look in the location specified in the start in selection in the shortcut (see INSTALLATION). If it cannot find the file there, it will look in another, arbitrary directory you may define using an environment variable.

Contents

(Number in parentheses is the approximate page number in the printed version)

Flow Chart (1) XPOW (4) CELRF (9-10) Reference File (16) Installation (18-19)
  JCPDS (5-6) Peak Search (10-13) UTILITIES (16-17) Shortcut (19)
File (2-3) FLUORESCENCE (6-7) Calibration (13-15) Operations (17-18) Version History (19-21)
Standards (4-5) GPLS (7-9) Birch Murnaghan (15-16)    

Flow Chart

Starting Program and Layout

Opening the program gives you a window with 2 sub-windows, the Text window (labeled Plot85 Text Window), and the Plot window (Labeled Plot85 Main Graphics Window, # 1). The "focus" window will be the Plot window. Move it out of the way, and you will see what is displayed below:

File Menu STANDARD.HKL list XPOW calculation of power diffraction pattern from single crystal data Select JCPDS file PLOT85 Opening Screen

The filename of the program (which normally includes the version number) is displayed in the title bar of the main window. The text window displays what is happening during the running of the program. For some operations, it must be in focus, and for others it must not. If Plot85 finds a calibration file, then it is displayed; if it finds the Standard.hkl file, then a list of the standards is also displayed. Nothing appears in the Plot window, because no datafile has been selected nor has it been plotted.

A number of drop-down menus is shown, and all operations are accomplished using them. Many of the functions in the VAX version of Plot85 have been replaced or duplicated in these drop-down menus. They are listed below:

File

File menu

The FILE menu consists of several sub-menus, which give navigation panels. The program remembers the last time any navigation panel was used, and uses the same location for the next one. Therefore, any file unique to your experiment should be put in your data directory. The file menu contains the options:

The program works best if the data are located in a directory that can be written to (i.e. is not read-only). If you use a read-only directory, the program may crash (I believe that bug has been eliminated), but should write the necessary files to the alternate directory defined in the environment (see INSTALLATION).

Many of the functions require data filenames with certain characteristics. Every project involves a series of datafiles, each of which has sequence number. For files collected with the IDL MCA program, written by Mark Rivers (at APS or at the NSLS before 9/22/2006), the extension is the sequence number. In this case, the program parses the name of an input file (*.yyy) to create output filenames. The extension is initially set to be .001, and is incremented with each new file saved. The file name is created using the default format “ABCDExxx” where ABCDE is a unique character string representing the mineral name. It can be NaCl_, MgO__, SAN__, etc. Most of the output files listed below, which are created by Plot85, generate a filename based in the input file. The "." is replaced by an underscore, and the extension listed below is added. If 5 characters are too many, use underscores to make a total of 5. The "xxx" is a run sequence number for that material; e.g. MgO__023 represents the 23rd run for MgO.

For all other input files saved at the NSLS, the sequence number is the last 3 or 4 digits of the filename proper, and the extension is fixed. Early files use MCA as an extension, and all files saved since 9/22/2006 use MED (for Multi-Element Detector) as an extension. For MED files, there should be 13 characters in the filename proper, including the 4-digit sequence number.

Most of the files listed below which are created by this program generate a filename based in the input file. The "." is replaced by an underscore, and the extension listed below is added.
File Function/Purpose Source of file
ABCDExxx.yyy Energy Dispersive powder diffraction data files – APS format. "yyy” is a sequence number, data collected before 9/22/06 IDL MCA or MED program
ABCDExxx_yyyy.MED Energy Dispersive powder diffraction data files – APS format. "yyyy” is a sequence number; data collected after 9/22/06 IDL MED or Multiscan
*.hkl Standard Material reference data. Up to 25 entries per file. manually created
*.jcpds Reference data. One Material per file. Also works with Birch Murgnahan option. manually created
ABCDExxx_yyyy.pks or ABCDExxx_yyyy.pkn Peak fitting results for detector n. May contain data from other detectors if “multiple detectors” option is chosen. Plot85
ABCDExxx_yyyy.DnRm Output file created by AutoGpls Mode. Contains fitting results for Detector n Region m for all files processed. Will contain results for multiple detectors if that option chosen. Plot85
ABCDExxx_yyyy.template'n' AutoGpls template file for detector n. Plot85
ABCDExxx_yyyy.list AutoGpls file containing the “list” of files to process. Extension “list” not required but is the default. Plot85
ecsavedn.dat Energy calibration data for detector n. See menu item “E-calibration > E-Calib Setup”. Plot85
ABCDExxx_yyyy.edf File containing energy calibration parameters for all detectors. Menu option “Utilities > Write EDF data” will create a file named “ABCDExxx_yyyy.edf”. Plot85, or may be manually created

The DEFAULT.EDF file contains (for each detector) four energy calibration parameters, 2q, and a comment (optional), each on separate lines.

0.37607243389713640E+00
0.60973023833891075E-01
0.59396798776459607E-06
0.00000000000000000E+00
6.5409894

0.84057234227657318E-01
0.61998352408409119E-01
0.90697291454944207E-07
0.00000000000000000E+00
6.4450207

0.71657635271549225E-01
0.62000144273042679E-01
0.70341229729820043E-07
0.00000000000000000E+00
6.4256577

0.81299871206283569E-01
0.62031600624322891E-01
0.69041220740473364E-07
0.00000000000000000E+00
6.4343286

0.72897754609584808E-01
0.62060292810201645E-01
0.57856347268625541E-07
0.00000000000000000E+00
6.4842286

0.80055348575115204E-01
0.62117442488670349E-01
0.83546176199433830E-07
0.00000000000000000E+00
6.5638623

0.45038700103759766E-01
0.62084000557661057E-01
0.66099119067075662E-07
0.00000000000000000E+00
6.6593113

0.72213806211948395E-01
0.61939295381307602E-01
0.98015263461093127E-07
0.00000000000000000E+00
6.7541752

0.65151646733283997E-01
0.61943456530570984E-01
0.97636032592163247E-07
0.00000000000000000E+00
6.8301711

0.79253524541854858E-01
0.61928659677505493E-01
0.93385523314282182E-07
0.00000000000000000E+00
6.8524628

STANDARDS

The STANDARDS menu lists the materials listed in the current STANDARD.HKL file (if no HKL file has been read in, then this menu will be blank). The entry "No Standard" removes the current selection from memory, so it isn't plotted. The entry "New Cell" allows you to enter new cell parameters (i.e. to simulate high temperature and/or pressure). The new lines are calculated. Although all six cell parameters are displayed, only the ones required for the current symmetry need be entered; e.g. for cubic, only a needs to be entered.

The entry "Set Cell Increment" allows you to change the unit cell parameters a, b, and c using hot keys "I' and "i". Entering "I" with the graphics window active will increase any or all of a, b, and c by one increment and redraw the plot', "i" will decrease it. Default values are .01 (1%). If you get the message "incorrect data format", you probably used a STANDARD.HKL file without the commas in the second line of one of the standards.

The format of the STANDARD.HKL file is described below:

  1. NaCl
  2. 5.6402,,,,,,1
  3. 1,1,1,3.26,13.,2
  4. 2,0,0,2.821,100.,1
  5. 2,2,0,1.994,55.,3
  6. 2,2,2,1.628,15.,2
  7. 4,2,0,1.261,11.,4
  8. 999,0,0,0,0
  9. MgO
  10. 4.231,,,,,,4
  11. 1,1,1,2.431,10.
  12. 2,0,0,2.106,100.
  13. 2,2,0,1.489,52.
  14. 3,1,1,1.216,4.
  15. 2,2,2,1.216,12.
  16. 4,0,0,1.0533,5.
  17. 999,0,0,0,0
  18. Al2O3
  19. 4.758,4.758,12.99,90.,90.,120.,0
  20. 0,1,2,3.4802,75.
  21. 1,0,4,2.55105,90.
  22. 1,1,0,2.3796,40.
  23. 1,1,3,2.0855,100.
  24. 0,2,4,1.7401,45.
  25. 1,1,6,1.6015,80.
  26. 1,2,4,1.4046,30.
  27. 0,3,0,1.3739,50.
  28. 1,0,10,1.2391,35.
  29. 1,1,9,1.2343,8.
  30. 2,2,0,1.1898,8.
  31. 2,2,3,1.1470,6.
  32. 3,2,1,1.1255,6.
  33. 2,0,10,1.0990,9.
  34. 999,0,0,0,0
  35. Co57
  36. 5.6402,,,,,,0
  37. 1,1,1,14.413,25.
  38. 2,0,0,122.0614,100.
  39. 2,2,0,136.4743,20.
  40. 2,2,1,6.4,30.
  41. 2,2,2,21.123,10.
  42. 4,2,0,23.859,5.
  43. 999,0,0,0,0

Each material has four types of entries: an identifying title, the cell parameters, a list of diffraction lines, and a terminating line.

The first line is somewhat arbitrary, but all important information should be included in the first 10 or so characters. It is displayed on the plot.

The second line consists of the six cell parameters, followed by a code for pressure measurement. That code is 1 for NaCl, 4 for MgO, and 0 for anything else. Enough cell parameters must be entered to define the cell. If the angles are left blank, a value of 90° is assumed. All entries must be comma-separated.

The remaining lines consist of h, k, l, d, I, and O, where h, k, and l, are the Miller indices (integer format), d is the d-space in angstroms, I is the intensity (100.0 being the maximum, decimal notation), and O is an orientation parameter for stress calculation. This line of data can also be used for non-diffraction lines (such as gamma or fluorescence lines) by entering the energy in KeV in place of d. If that number is greater than 10, it is assumed to be an energy. See the 4th entry, Co57. "Dummy" h,k,ls must also be entered.

The list is ended with a dummy diffraction line, with 999 as h.

The maximum number of lines is 20; the first ten are identified by the single numeric key 1-0; the next ten are the same keys, shifted: ! through ).

If you get a message stating that the STANDARD.HKL file may be incorrect, the most likely reason is that the individual cell parameters are not in the correct format.

Pressure Measurements using the Decker EOS for NaCl can only be done if NaCl is loaded as the standard in the above menu.

XPOW

The XPOW menu allows you to create a theoretical powder pattern from a .POW file. This should be used to display your sample data instead of the STANDARD.HKL file. It uses a modification of the XPOW program, written by Bob Downs and Kurt Bartelmehs. For reference, see Downs et al. (1993) American Mineralogist 78, 1104-1107. You will have to get a .POW file. Get the XPOW program from http://www.geo.arizona.edu/xtal/group/index.php3?page=software and download the executable and sample datafiles for XpowWin. The .POW files are the sample data files. To modify them, you will need to know the cell parameters, the space group, and all the positional and occupancy parameters for the structure. Put your selected and/or modified .POW file in your data directory. The XPOW menu has selections:

One acceptable format for the .POW file is shown below:

  1. corundum: standard at U of Arizona
  2. Mo 0 50
  3. 4.7608 4.76089 12.9957 90 90 120 R-3c
  4. Al 0 0 .355
  5. O .306 0 .25
  6. stop
  7. corundum: Zachariasen: (1928) Skrifter Utgitt Av Det Norse Videnskaps-Akademi
  8. Mo 0 70
  9. 4.759 4.759 12.991 90 90 120 R-3c
  10. Al 0 0 .355
  11. O .306 0 .25

One .POW file may have more than one entry (as in the example above), but only the first will be used. An entry consists of a title, radiation information (ignored, but must be present), the six cell parameters and the space-group, and one line per atom with the chemical symbol and the fractional position of that atom listed.

JCPDS

The JCPDS menu allows you to input a reference file in the APS .JCPDS format. The menu has selections:

Two formats of the JCPDS file can be used; the current (version 4) format is be shown below (note: version 4 refers to JCPDS file version, not PLOT85 version):

  1. VERSION: 4
  2. COMMENT: Alumina (JCPDS 0-173, EOS n/a)
  3. K0: 194.000
  4. K0P: 5.000
  5. SYMMETRY: HEXAGONAL
  6. A: 4.758
  7. B: 0.0000
  8. C: 12.99
  9. ALPHA: 0.0000
  10. BETA: 0.0000
  11. GAMMA: 0.0000
  12. VOLUME: 22.0640
  13. ALPHAT: 2.000e-6
  14. DIHKL: 3.4790 75.0 0 1 2
  15. DIHKL: 2.5520 90.0 1 0 4
  16. DIHKL: 2.3790 40.0 1 1 0
  17. DIHKL: 2.0850 100.0 1 1 3
  18. DIHKL: 1.7400 45.0 0 2 4
  19. DIHKL: 1.6010 80.0 1 1 6
  20. DIHKL: 1.4040 30.0 2 1 4
  21. DIHKL: 1.3740 50.0 3 0 0
  22. DIHKL: 1.2390 16.0 1 0 10

For JCPDS version 4 files, each line begins with a keyword.

All entries are read by PLOT85, but not all are used. The parameters Ko, KoP and AlphaT are used in the Birch-Murgnahan equation of state option.

As in the STANDARD.HKL and XPOW files, each diffraction line is identified on the plot with a single symbol. They are:

Lines 1-10:

1 2 3 4 5 6 7 8 9 0

Lines 11-20 (shifted versions of 1-10):

! @ # $ % ^ & * ( )

XPOW and JCPDS formats allow 20 additional lines:

Lines 21-30:

- = \ [ ] ; ' , . /

Lines 31-40 (shifted versions of 21-30):

_ + | { } : " < > ?

JCPDS version 4 files are also used by the MCA program for calibration and pressure measurement.

FLUORESCENCE

The Fluorescence menu allows you to display the 4 strongest K X-ray fluorescence lines from any element. The menu has selections: The last 5 elements selected will be added to the menu list for easy recall.

 

If you add an element, that element will be added to the bottom of the list. When 4 new elements have been added, the 5th replaces the first of the newly added element list. Those on the preselected list remain unchanged.

 

If you want to display another line, select another element and re-plot it. If you press S or s before you replot the fluorescence lines, the old ones will be removed before the new ones are plotted. If you don't, the new ones will be added.

GPLS

GPLS Setup

The GPLS General Setup menu controls various parameters in the General Program for Least Squares fitting routines. The Auto Peakfit Setup menu makes use of the multiple data set fitting routines which use GPLS. Run Auto Peakfit is used after the previous two setup menus.

In the GPLS setup menu, most of the defaults will remain unchanged.

To use GPLS in manual mode, follow the following procedure:

  1. Bracket a region of the plot with two dots or periods, then the slash (/) to expand that region into GPLS (pressing a third dot simply expands that region). In either case, plot will be replaced with the expanded version. If a reference standard has been selected (using the Standards, the JCPDS, or the XPOW menu), the peak identification will be displayed. The region selected should include all the peaks you want to fit if you want all the peak information in one "peaks" file.
  2. You will now be asked to select the smaller region to be used for the peak fit. This region must contain the number of peaks selected in the GPLS Setup menu (you may change that now if you wish). If the peak you wish to fit is overlapped with another, or is a doublet, change the number of peaks in the setup to include all peaks visable, or use 0 peaks as described above
  3. Move the cursor to the left side of the peak(s) to be fit, and press the space bar (make sure the PGPLOT Graphics Window, #1 is active).
  4. Then move the cursor to the right-hand side of the peak(s) and press the space bar again. You will now be asked to move the cursor to peak 1 (the only peak if you are fitting only one).
  5. Move the cursor to the center, top of first peak (left-hand most peak) and press the key corresponding to the label on the peak (typically a single-digit number). If the peak is an energy peak, enter e or E. If the peak is unidentified, press the space bar. If you selected more than one peak in the GPLS setup, you will be asked to select peak 2, etc. When you have selected all the peaks, the text screen will display the progress of the fitting until it is finished, give the results, and ask if you want to refit the same region. Usually you will answer "no". If you entered 0 peaks in the setup menu, press q or Q to terminate peak selection.
  6. You will be returned to step 2 and the screen selected in step 1 and asked to select the left edge of the next peak. If you have no more peaks to fit, enter "X" or "Q" to exit.
  7. The text screen will tell you that you are finished, and to use a pull-down menu for the next step. The next step could be to exit Plot85, or to read another data file.

If the peak you wish to fit is overlapped with another, or is a doublet, change the number of peaks in the setup to include all peaks visible. In step 5, select the first peak (left-hand most peak). If it is a standard peak with a number, enter that number; if it is unidentified, press the space bar. You will be asked to repeat this procedure until the number of peaks you said you wanted to fit in the GPLS setup window has been done.

GPLS Autopeak Setup

GPLS Auto Mode. Auto mode allows you to create a template based on one file. It then uses the information in that template as a starting point for subsequent files. The selection of data files to process can be based on:

It is better to use a list file if your data files alternate between NaCl and sample, for example. However, proper selection of "GoF reject" value and "Maximum shift" value may work to distinguish between sample and other spectra.

Another choice which must be made is based on whether the position of the peaks are changing from file to file (as when pressure and/or temperature are changing), or the positions are remaining more or less constant, as in stress relaxation experiments. If the positions are constant, then the template file should be static; otherwise it should be updated after each fit.

Note from Ken 7/25/08: To use autogpls with multiple files you can do one of the following:

  1. Create a range of files by picking the first and the last. (All files 'should be' of the same sample otherwise gpls has a good chance of erroring out. - but maybe not - see below - Reject if GoF...
  2. Create a list of files ( this can be done manually. Just be sure to inlcude the entire path with the filename.
    a. Gpls will first ask for the name of the file to hold the 'list'
    b. Gpls will then let you select files - one at a time - until you select 'cancel'. The number of files selected will be printed in the text window.
    c. Go back to GPLS à Auto Peakfit Settup and check 'Use list file' (uncheck 'Create list file') and other options as appropriate. For starters I would recommend these:
    Update peak positions - this will use the fitted positions from 'file 1' whend fitting 'file 2' etc.
    Use Range 1 to control shift - The first range in your template file should be the 'most robust'.
    If the peaks are moving due to P-T conditions etc., gpls will 'follow' this peak.
    Pause if you want to 'watch' what is going on.
    Output to fitted regions will make a file for each region in the template file. This is useful if you want to track individual peaks.
    Reject if GoF exceeds a given value. This applies to region 1. If fit is really bad the entire file is rejected. Can be useful if filelist (or range) includes files that have diffraction from something other than the 'sample'.
  3. You should now be able to 'Run Auto PeakFit'. Unless you have very well behaved data I would NOT update the template file after autogpls runs.
  4. If you have extremely well behaved data in multiple detectors you might try turning on 'Multiple Detectors' in the 'GPLS General Setup'

Don't forget you need to create a template file.

  1. In GPLS Auto Setup check 'Set Select peaks flag'.
  2. Read the first file you want to fit. Manually fit the peaks you want. It is not recommended to use 0 for the number of peaks (in GPLS General setup) Use the actual number of peaks in each region. Not as convenient as using 0 but the template file needs the actual number of peaks in each region. This creates the template file for auto mode. If you do use "0 Peaks", you will have to edit the template file.

Notes on running GPLS-Auto mode

Auto mode uses the regular GPLS code to fit peaks within a region. That region is determined in one of three ways. In each case, the user selects an initial file, and fits the peaks using GPLS. Each mouse click or keyboard stroke is recorded, so that the left, right, and center of each region is saved.

  1. In the first, and simplest use, that region is used for all the subsequent peaks. Obviously, this will fail if the peaks move during the experiment. For that reason, the second method was created,
  2. In the second method, the peaks in the second data file are fit using the region selected in the first data file. Then that region is moved to surround the new fitted peak position. The third data file is fit using the output of the second fit. This usually works, but if there is too great a temperature or pressure change, the new peak will be so far from the fit position from the previous data file that the peak won't be found, and the procedure will fail.
  3. In the third method, the region from the previous file is used as a template. The program then searches for the highest peak within that region for the highest peak. It then re-centers the region around the highest peak, and then performs the fit. This probably won't work if you are fitting multiple peaks, or if the peak position is shifted out of the region. Another method needs to be developed to solve that problem, but this has not yet happened. This third method is no longer implemented, bet maybe it should be.

GPLS Auto mode setup. The procedure is as follows:  

  1. Select Detector - determines which detector to use when processing multi-element-detector data. Currently, only detectors 1-10 are available. This is somewhat obsolete with the addition of the "Multiple Detectors" option.
  2. Check Set Select Peaks flag box - whenever this check box is selected, the peaks selected when running GPLS will be saved in a template file for future auto processing. If processing detector 2 of file abcde_05_0021.med, the file abcde_05_0021.template2 will be created.
  3. Select files to process: Check Select/Use file sequence - processes all the files between the first and last file. After selecting first and last file uncheck this box; or check Create list file box - creates a file called abcde_05_0021.list which is a list of files to be processed. Use list file - uses that list file.
  4. Run GPLS in manual mode on the first file. Be sure that "Set Select Peaks Flag" is checked. After fitting, peaks uncheck this box.
  5. Check the options in the boxes on the right-hand side of the GPLS Auto Setup window.
    1. Update peak positions - fitted position of one file used as input for next file; otherwise input positions remain fixed. Check this box if changing pressure and/or temperature
    2. Shift to maximum point if delta is greater than the peakwidth - If the change in pressure and/or temperature causes the peak shift from the previous file to be greater than its own width, GPLS won't be able to find it. If this box is checked, the program will search for the highest peak inside the previous region and then redefine the region so that the highest peak is in the center. Only works with single-peak regions.
    3. Pause between fitted region and Pause between files - affects display during execution
    4. Overwrite pk files without prompting - if a .pkn file already exits, rewrite the file without confirmation from the user.  
    5. Link to Celrf - If this box is checked, then Celrf will be run synchronously with GPLS. If you plan to use this option, be sure to run the Celrf Setup first (see next section)
    6. Output to fitted regions file - creates a single file for each peak with all input data files included. If the fitting was done for multiple peaks in a single region, then each peak is identified separately.  
  6. Run Auto Peakfit in initial menu. In the following example, if the file abcde_05_0021.template2 has been previously created, after each file is processed, peak files abcde_05_0021.pk2 to abcde_05_0021.pk2 will be created and Fitted Regions files abcde_05_0021.d2r1, etc will be created.

Auto Gpls with “hotkeys” – Best option for analysis at the Beamline.
Step 1. Make a template file or files as described above. You may want multiple template files if you have multiple diffracting materials in the cell. It is strongly recommended that you make a copy of these files immediately after creation.
Step 2. Read in the template file or files - Yes, read in the file with the Gpls menu option. 

Step 3. Get to the next file with hot key "N".
Step 4. Type control-x,y or z. If 10 detectors selected there should be 10 lines in the pk file.

CELRF

The CELRF menu allows you to run Celrf after you have created a pks file. It has selections:

 

CELRF can be used with either energy-dispersive data or angle-dispersive data. Clearly, with EDD, the parameters tth0 and sde (sample displacement) have no meaning.

You must first enter sufficient Cell Parameters to define the Cell Type you want to use (i.e. if the cell is cubic, then you only have to enter a). After entering the cell parameters, select the Cell Type (crystal class) and the desired refinement parameters. Then select OK.

Look in your data folder for the peaks file you will use, and open it in a text editor. Make sure every peak you want to use has a number other than "0" in column 1, and vice versa. Also, especially if you have used the Multiple Detector option, check the last column for the detector number, and make sure all lines for a detector other than the one you are using have a "0" in column 1.

Go back to the main menu and select "Refine". You will be asked to open a Peaks file. Select the one you have just checked. and the refinement should proceed.

Examine the results. DQ (Qc-Qo) is printed for each line (Q is 1/d2; Qo is Q observed, and Qc is Q calculated).

If you select 0 as the number of cycles of refinement, then after one cycle, a text message will come up giving you the results after that cycle and asking what you want to do next. After every cycle, the change in the refined parameters should be lower, eventually reaching 0. At that point, select "one more cycle and write list file".

Peak Search

Peak search is an implementation of the second derivative peak search code from Wayne Dollase’s POW program.

Use the Setup menu to:
1. select 1 to 9 coefficient polynomial fit to the background.
2. Optionally smooth the data with a 3 to 33 (odd only) point quadratic smooth (don’t ask what this means I got it straight from the code!)
3. Optionally Strip alpha2
4. Perform a 3 to 33 point (odd only) second derivative peak search.

“Peak height factor” is related to how big a peak must be to be considered a peak. It is easiest to just use trial and error to find a suitable value.

“Delta D-space”: Found peaks can be “matched” (see drop down menu) against peak positions from “standards”, JCPDS, or XPOW – whichever set was plotted last. Delta D is the maximum difference between found peaks and reference peaks.

A “peaks” like file can be written - Drop down menu “Write List”. Extension is “powpksn” where n is detector number.

“Plot intermediate results” will optionally plot the background (which can be very useful when there is a messy background), the smoothed data or the alpha2 stripped data.

A portion of the data can be selected by using “…”

Markers are put on the plot to show the positions of the peaks.

“Peak searching” can be a useful way to get a “quick” pressure – either check “match peaks and write file” and “Cell refine after peak search” or step through it manually.

Here is an example of manually stepping through the process.

In Peak search setup do not check “Match peaks…” or “Cell refine…”. You must estimate a reasonable value for Delta d-space.

In the Cell refinement setup note that cycles of refinement is 0. This gives you more control from cycle to cycle.

A portion of the spectra with 2 NaCl peaks has been selected.
Select PK Search – Run
Note the blue markers for where the peaks have been found.


Two peaks have been found. A list is printed in the text window.

PEAK LIST:
# Pos Area Bkg D
1 633.616 647.93 0.040 2.6746 6497.
2 895.341 401.97 0.043 1.8951 4877.

Now select Pk Search – Match Peaks.

# H K L Pos Area D Pk Int
1 2 0 0 633.616 647.93 2.6746 6416.
2 2 2 0 895.341 401.97 1.8951 4768.

Now select Pk Search – Write List

Peaks file: D:\plot85\plot85_std\testdata\umaj07\umaj07_040.powpks1
Now read the peaks file. After reading the file, the Select Peaks …. window will appear.
Select the two peaks.

Confirm the temperature.


The pressure is printed in the text window.

T, DeltaV, P(Kb) = 597. -0.14430 70.71 Error code: 0

Here is an example of a fully automatic pressure determination.

Once again, you must estimate a reasonable value for Delta d-space.
Also check Match Peaks… and Cell refine after…


In cell refinement setup select a fairly large value for Delta Q reject if the P-T conditions have shifted the peaks significantly. See Cell Refinement instructions above.


T, DeltaV, P(Kb) = 28. -0.15151 58.32 Error code: 0

Energy Calibration

The Energy Calibration set of routines have two functions: doing a complete calibration, a la Autocal, and "tweaking" the energy calibration when drift during a run is suspected. To understand the calibration procedure and make sure you are using the correct calibrations, you need to understand where these parameters are stored, both as files and in memory.

There are possibly 4 files where the calibration parameters (called EDF parameters) for the current data set are stored:

  1. Each diffraction data file saved from the MCA program has its default calibration parameters stored in its header. This will include the calibration parameters for all detector elements. This information is created using the MCA/MED programs during the run and may or may not be good.
  2. There may be another file, called DEFAULT.EDF, which has the same parameters. Again, this will include the calibration parameters for all detector elements.
  3. If these parameters have been generated by this program (Plot85), then the file where they are stored is called fname.EDF where fname is the first 13 characters of the data file, without the ".". It has the same format as DEFAULT.EDF.
  4. Finally a binary file, called ecsavedxxxx_xxx.dat, is created when you select Save E-Calib Parameters in the above menu (xxxx_xxx is from the name of the MED file used for the calibration).

In addition, there are 3 memory locations where these parameters may be located. The first location, which holds the parameters for all ten detectors, can get its data from one (and only one) of three files.

  1. When Plot85 is started, it will look for the file DEFAULT.EDF, first in the folder where the Plot85 executable is located, and then in the "Start In" location defined in the Plot85 shortcut. These parameters are put into what I will call the Temporary EDF Parameters location.
  2. If no DEFAULT.EDF file is found, then the parameters from the diffraction data file are put into the Temporary EDF Parameters location.
  3. If you go to the file menu and select Read EDF, and then read the EDF file, than that information will be put into the Temporary EDF Parameters location.

In all of the proceeding three cases, the parameters for the current detector are transferred from the Temporary EDF Parameters location to a second location, called the Active EDF Parameters. Every time you press one of the function keys F1 through F10, the parameters for the appropriate detector are transferred from the Temporary location to the Active location. These are the parameters which are displayed on the screen and used to calculate the positions of the diffraction and energy fiducial lines. These parameters are also used to calculate E and d for a peak position when located by mouse or GPLS.

Finally, when you complete the E-Calib Setup, described below, and run the Least Squares Fit Selected Data, the parameters are put in the E-Calib Setup window. They are transferred to the Active EDF Parameters location when you select Update Active EDF Parameters or Update All Active EDF Parameters in the menu above.

To save the Active EDF Parameters, go to the Utilities or E-Calib menu and select Write EDF Data. This will create the fname.EDF file mentioned above. If you plan to use this calibration for your entire run, copy fname.EDF to DEFAULT.EDF. Make sure the "Start In" location defined in the Plot85 shortcut is correct (your data folder). These parameters will then be loaded automatically when you next start Plot85.

PROCEDURE

The procedure for performing a calibration of energy and/or 2q follows. Make sure that the correct detector is loaded and displayed. Select E-Calib Setup in the E-Calibration menu.

You can avoid filling in the data for the standard by having the appropriate JCPDS file loaded (this doesn't work with a STANDARD.HKL file). There are two sets of instructions below; the first, abreviated set assumes that you have well-behaved data, a reasonable calibration, and are planning to fit all detectors.

  1. Plot your data file for detector1, and load the appropriate JCPDS file. The fiducials for the reference peaks should appear (usually in yellow, which is hard to see - press S to re-display the screen with better colors). If the data peaks don't look centered at this scale, then you will have to do a manual fit, and either the existing calibration is wrong, or the data is poor. Step through all the detectors (by pressing F1, F2, etc through F10), and note if any of the peaks for any of the detectors are bad. Go back to Detector 1 (press F1 twice). If one or more peak is bad for all detectors, edit your copy of the JCPDS file to remove that peak.
  2. Open the E-Calib Setup window; the d-spacing for all the diffraction lines will appear.
  3. Check the "Use" box for each line for which there is a good, uncontaminated single peak for Detector 1, as you observed in step 1 (doublets, etc. must be done manually). Close the E-Calib Setup window.
  4. Go to the GPLS General Setup window and check all the detectors you will use; (if there is more than one, besure to also check "Fit peaks in multiple detectors"). Don't check "pause between peaks". Leave everything else alone.
  5. Quit out of the current graphics window with Q.
  6. Select Save E-Calib Parameters from the main E-Calibration menu (this saves the contents of this window in case the system crashes before you complete the process). The filename is ecsavedxxxx_nnn.dat, where xxxx_nnn is the MED filename.
  7. Select GPLS Fit Selected Peaks. The program will fit the first peak for detector 1. This should be one of the Cobalt peaks. It will plot the fit and ask if you want to accept or reject it. Accepting it will put a check in the box for that peak for that detector. Rejecting will remove the check if there is one there. It will then plot the same peak for detector 2. Continue with this for all detectors. It will then go to peak 2, etc. When it is finished, all peaks for all detectors should have been fit and either accepted or rejected.
  8. Go back to the E-Calib setup and select the Order of Fit and the starting 2-theta. Change the default TTH-increment from .01 to .001, and the number of points from 101 to 1001. In the Least Squares options, check all three boxes (Optimize TTH, Plot GoF after Least Squares, and (this is new) Least Squares Fit All Detectors. I haven't tried this new function yet, but Ken has and he assures me that it works.
  9. Run Least Squares Fit Selected Data. This finds the actual parameters.
  10. Update Active EDF Parameters. This puts the just-calculated parameters in the Active EDF Parameters location. They will be displayed on the screen when the screen is re-drawn using the S, s, or function keys 1-10.
  11. Go to the Utilities or E-Calib menu and select Write EDF data. This creates an EDF file with the name fname.EDF. It should put the calibration parameters for the current detector in the position 1 to 10, depending on which detector is loaded.
  12. Go to the File menu, select Read EDF Data, and then read the file you just created. If you want Plot85 to automatically use these calibration parameters the next time you start it in this folder, copy or rename the EDF file to DEFAULT.EDF.

Detailed Instructions - especially if the above automatic procedure fails.

To perform an energy and/or 2q calibration, enter the energies or d for flourescence, gamma, or diffraction lines. Five energy values for common gamma and fluorescence lines are entered, but you can use others by simply entereing their energy in the box (the label won't change). For the entry Energy / D-Spacing, enter the energy of the line if it is above 10 keV, or the d-space if it is less than 10Å.

After you have entered all the lines you might use, check the box marked "Use" for each one. Check Plot GoF (Goodness of Fit) after Least Squares. Select OK

Close the Energy Calibration Setup window, close the Plot85 Main Graphics Window by entering "Q" (the window won't actually close, but it becomes inactive), and select GPLS Fit Selected Peaks. After each peak is fit, you will be asked to Click to Continue. Do that. If any peak appears to be bad, then you will have to repeat that peak manually. The others, however, should be good. This will happen if there are two peaks which are too close together.

Reopen the Energy Calibration Setup window and fill in the rest of the boxes. Select an Order of Fit, and a starting value for the 2q search. Normally, you should use 2nd order. If you use 3rd order, then the calibration won't be compatible with the MCA program. If you are not doing 2q search, leave Optimize TTH blank, otherwise select it. Also, check "Plot GoF after Least Squares". GoF means Goodness of Fit

The program will calculate the energy for each diffraction line using the selected 2q, then do a least-squares fit to find the energy calibration parameters. 2q will then be adjusted until the errors in the least-squares fit are minimized. It does this by starting at a value of 2q equal to Two Theta minus (TTH-inc*TTh points/2) and stepping by TTH-inc until Two Theta plus (TTH-inc*TTh points/2) is reached. The point with the best fit (largest R squared value) is selected. The results are then plotted as error in channel vs. energy. Any particularly bad line can be examined manually and either corrected or eliminated by unchecking the "Use" box.

Check the Plot85 text window for more information. Particularly check if the "Best R squared: 99.99999xx at point" is not the first or last point (which mean that the 2q search didn't find the best 2q). If this happens, update Active EDF Parameters and run least squares again. The starting point for the 2q search will be at the better end of the previous search. A good fit should be between R=99.999 and R=100. If the number of parameters equals the number of data points, then you will get a "perfect" fit, which the program considers to be an error.

If your data has reliable calibration information at the beginning of a run, but seems to drift, small corrections can be made. This is possible because every data set has peaks from a low-activity Co57 source mounted on the detector. We usually use only two of the peaks, one at 14.413 keV, below most of the data, and the other at 122.0614 keV, above most of the data. "Tweaking" consists of adjusting the linear and/or the offset terms in the energy calibration to make these two peaks fit perfectly. It assumes that 2q and the non-linear portions of the calibration curve don't change.

In the drop-down box above ("Calibration"), items 2, 3, and 4 of the second half apply to the detector on whose spectrum you are currently working. If you select the 5th item, "Auto: Fit.Tweak all Detectors", the peaks in the spectra for all the detectors selected in the Setup box are fit and then all the calibration parameters are tweaked.

Birch-Murgnahan

The Birch-Murgnahan utility can be used for two functions:

1. Adjusting the position of the reference lines in a JCPDS file, assuming you know the pressure and temperature. To use this, a JCPDS file with the necessary BM parameters must have been loaded. Select the "Calc V0/V..." box, and enter the pressure and temperature below. The program will calculate V0/V, change the unit cell parameters proportionately, and then recalculate all the d-spaces based on the new cell parameters and the HKLs in the JCPDS file.
2. If you determine the cell volume using CELRF or any other method, enter that value in the Volume window, and select the "Calculate Pressure" box. The pressure will be calculated using the BM parameters in the loaded JCPDS file and displayed in the Pressure window.
3. A third use which has not yet been implemented is a combination of the above two: calculate the pressure from measured diffraction data (as in 2. above) and use that pressure to adjust the JCPDS fiducials (as in 1. above).
The important thing to realize is the in option 2. above, the pressure (and temperature) are simply numbers and needn't come from the displayed data file or JCPDS.

BM Setup/Run
If a JCPDS entry has been read that contains equation of state parameters, they will be displayed here or you can enter new values. If you check “Calc V0/V …..” then V0/V will be calculated from the EoS parameters and the pressure. If you check “Calculate Pressure …..” then the pressure is calculated using the EoS parameters and the volume (ie V0/V).

Reference File

UTILITIES

The UTILITIES menu includes

 

The rest of the menus (EDIT, VIEW, STATE, WINDOW, and HELP) are standard Windows menus, and won't be described here.

 

Operations

Once data is plotted the cursor works as follows:

 

You may have up to 4 sets of reference lines plotted simultaneously (Standard.hkl, XPOW, JCPDS, and Fluorescence). Lines from the STANDARD.HKL file are refreshed by refreshing the screen with S or s; the others are refreshed using the plot lines item in their respective drop-down menu.

Some comments regarding PLOT85 when used with more than 1 detector elements.  

Notes:

Title 1 is whatever is typed in the "Experiment Title" field of the Experiment Information MEDM window. Title 2 is a concatenation of whatever is typed in the "Experiment Comment" fields (all of them) of the Experiment Information MEDM window. The title of standard is from the STANDARD.HKL file

The energy calibration and 2-theta terms are from the calibration, either the data file or the DEFAULT.EDF file. They will change if you select a different detector number.

Hot Keys used in graphics window.

Key

Function
Q/q Quit graphics mode
s Refresh screen
S Refresh screen (full plot)
esc Refresh screen (full plot)
n Read and plot previous data file
N Read and plot next sequential data file
P or p Print hardcopy
E/e When “pointing” to a peak, indicates an Energy peak
I/i Increment/decrement the cell parameters of the currently selected reference material
T/t Increment/decrement Two-Theta if option selected. See E-Calib setup TTH Hot Key
F1/F2/F3/F4 Plot data from detector 1,2,3,or 4 respectively
. . . Expand plot to range selected with first two dots (left/right respectively)
. . / Expand plot to range selected with two dots and invoke GPLS
Cntrl x Invoke first GPLS template file. See menu item: GPLS ? Read Template File
Cntrl y Invoke second GPLS template file.
Cntrl z Invoke third GPLS template file.

Peak Selection:
When selecting peaks, in either point and click mode or in GPLS, the user can use the
characters 1,2,3,…0 and their “shifted” counterparts to cross reference to a diffraction line from the last used reference material.

Installation

These instructions primarily apply to use at Stony Brook; other users need to make appropriate modifications.

1. Create a directory on C: (or wherever else you wish) called PLOT85. To install the program locally, copy the contents of the CD to that directory. To run PLOT85 off the network, for example, map drive X: to the folder where the executable is located. You could also map Z: to your area on a server. 

 

Although the program will run without defining environment variables, it works better if you do. How to set environment variables depends on you operating system, but for most, go to control panel/system/advanced/environment. If given a choice, use the system setting, not the user setting. If you want to check your settings, go to a command (or DOS) prompt, and enter "set", and all the environment settings will be displayed.

Shortcut

 

Create a shortcut to plot85.exe. You should modify the properties of the shortcut, such as "start in" location or "run" type. 

There are four shortcut options you can enter in the Target line, after the name of the .exe file: They are: "printer =", "gpls = ", "cycles =", and "screen =". These are case-sensitive. You may use any or all of the options. 

 

The "printer" option overrides the one created as an environment variable. It is especially useful if you want to set a default printer using the environment setting, and temporarily change it. 

 

The "gpls" option controls the GPLS menu. Its arguments can be "yes", "no", or "1". "Yes" gives you all GPLS options, "no" gives a minimum of GPLS options, but allows you to select the number of peaks to be fit, and "1" restricts the number of peaks to 1. The default is "no". The "cycles" option will fix the number of gpls cycles to the number entered. 

The "screen" option sets the default screen resolution. "?" gives the following list,

/W9 (Windows95, mode from environment)

/WV (Windows95, 640x480)

/WS (Windows95, 800x600)

/WX (Windows95, 1024x768)

/WZ (Windows95, 1280x1024)

Therefore, if you want to use the monochrome printer in room 167, one peak for GPLS, and a 1280x1024 screen, enter

C:\plot85\plot85.exe "printer=\\SBMP50\HPLJ4Si_121" "gpls=1" "screen=/WZ"

Examples:

"printer=\\SBMP50\HPLJ4Si_121" prints to a network printer

"printer=LPT1" prints to a local printer

"gpls=yes" enables all options

"gpls=no" enables a minimum of options (default), but with an unlimited number of peaks

"gpls=1" same as "no", but restricting the number of peaks to 1

"cycles=1" sets the number of Least Squares cycles in GPLS to 1

"screen=/W9" graphics mode from environment

"screen=/WV" VGA (640 x 480) graphics mode

"screen=/WS" SVGA (800 x 600) graphics mode

"screen=/WX" XGA (1024 x 768) graphics mode

"screen=/WZ" SXGA (1280 x 1024) graphics mode

 

Note: "gpls" and "cycles" can be overridden in the GPLS drop-down menu. The numbers you enter here will become the default in the menus.

 

"Printer" can override the default printer defined in the environment

Version History