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
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:

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

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:
- Plot Data - used to plot the data after it has been read in using one of
the options below
- Plot 1/d (all detectors) - applies the individual calibration for each detector
to allow comparison of data
- Read File / Plot data
- Save Pks / Replot data
- Read datafile / save current pks file - This option will copy the current
temp.pks file to a fname.pks file before reading the new data file. Files
with the .pks or .pkn extension are ASCII files containing a list
of peaks found using one of several methods in the plot. Multiple detector
datafiles give a separate .pkn file for each detector, where n
is the detector number (1-10, at present). They can be printed for reference,
and are used as input for the Celrf cell refinement option. The name of the
.pks file (fname.pks) depends on the filename convention originally used for
collecting the data. For data collected prior to 9/22/06, it is a combination
of the first 8 characters plus an underscore (_) plus the numeric extension
(.00n) of the data file , and will only make sense if that name is created
correctly in the original STARTUP program. MgO__041.056 gives MgO__041_056.pk1
for detector 1, etc. For data collected after 9/22/06,
the filename format was changed so that in the above example, MgO__041.056
became MgO__041_0056.MED, so the peaks file will be MgO__041_0056.pk1, etc.
- Read datafile / do not save current pks file will read data files in the
APS format, regardless of their extension. You will not be given the option
to save .pks files, although a temp.pks file will always be created and you
can manually copy it to the correct .pks file. Files with the .pks extension
are ASCII files containing a list of peaks found using one of several methods
in the plot. They can be printed for reference, and are used as input for
the Celrf cell refinement option.
- Save current pks file Saves the temp.pks file into fname.pkn where n is
the detector number.
- Read HKL file - reads in a new STANDARD.HKL file (see next page)
- Read EDF file - reads in a new DEFAULT.EDF or any
other.EDF file (see
Utilities - Write EDF data). The DEFAULT.EDF
file is a calibration file created either manually or using
the calibrate option in this program (see below). If you use this method
for calibration, you must reread the DEFAULT.EDF file after each data file
is read.
- Read PKS file - Loads a PKS file from a previous PLOT85 session, for stress
and/or pressure calculation and for Celrf
- Import XY file - reads in an X-Y data file, where X is 2q
for CuKa1 radiation Also reads CHI files from Fit2d.
- Import Scintag txt file
- Import GSAS file - reads in an GSAS data file
- Read old MCA format file - same as Read datafile, above, except for SAM85-format
data files
- Read old MCA + save pks - same as Read datafile / save current pks file,
above, except for SAM85-format data files
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:
- NaCl
- 5.6402,,,,,,1
- 1,1,1,3.26,13.,2
- 2,0,0,2.821,100.,1
- 2,2,0,1.994,55.,3
- 2,2,2,1.628,15.,2
- 4,2,0,1.261,11.,4
- 999,0,0,0,0
- MgO
- 4.231,,,,,,4
- 1,1,1,2.431,10.
- 2,0,0,2.106,100.
- 2,2,0,1.489,52.
- 3,1,1,1.216,4.
- 2,2,2,1.216,12.
- 4,0,0,1.0533,5.
- 999,0,0,0,0
- Al2O3
- 4.758,4.758,12.99,90.,90.,120.,0
- 0,1,2,3.4802,75.
- 1,0,4,2.55105,90.
- 1,1,0,2.3796,40.
- 1,1,3,2.0855,100.
- 0,2,4,1.7401,45.
- 1,1,6,1.6015,80.
- 1,2,4,1.4046,30.
- 0,3,0,1.3739,50.
- 1,0,10,1.2391,35.
- 1,1,9,1.2343,8.
- 2,2,0,1.1898,8.
- 2,2,3,1.1470,6.
- 3,2,1,1.1255,6.
- 2,0,10,1.0990,9.
- 999,0,0,0,0
- Co57
- 5.6402,,,,,,0
- 1,1,1,14.413,25.
- 2,0,0,122.0614,100.
- 2,2,0,136.4743,20.
- 2,2,1,6.4,30.
- 2,2,2,21.123,10.
- 4,2,0,23.859,5.
- 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:
- Read File (this must be done first).
- Print - prints on the screen a list of h,k,l, and d for up to 40 strongest lines
- New Cell - same as New Cell in the Standards menu
- Set Cell Increment - same as Standards menu
- Plot lines - adds the new reference lines to the current plot
One acceptable format for the .POW file is shown below:
- corundum: standard at U of Arizona
- Mo 0 50
- 4.7608 4.76089 12.9957 90 90 120
R-3c
- Al 0 0 .355
- O .306 0 .25
- stop
- corundum: Zachariasen: (1928) Skrifter
Utgitt Av Det Norse Videnskaps-Akademi
- Mo 0 70
- 4.759 4.759 12.991 90 90 120 R-3c
- Al 0 0 .355
- 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:
- Read file / Plot Lines - Reads a JCPDS file from any location (default is
the same folder as the data), and plots the lines.
- Plot Lines - Persistent. - This option replots the lines every time you
change detectors, files, or expanded region. It must
be turned off if you want to use the Standards file.
- Plot Lines
- Display - prints on the screen the portions of the selected JCPDS file used
by this program.
- 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.
- Set Cell Increment - Entering "I" with the graphics window active
will increase a, b, and c by 1% and redraw the
plot; "i" will decrease it. Set Cell Increment allows you to change
the increment.
- Plot lines - adds the new reference lines to the current plot
- Read PDF2 - reads PDF2 output from Brian Toby's LOGIC
program. LOGIC, in turn, reads data from the ICDD PDF2 database, which much
be licensed ($$$$).
- Write JCPDS - exports data from PDF2 to our .JCPDS
format.
- Profile Setup
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):
- VERSION: 4
- COMMENT: Alumina (JCPDS 0-173, EOS
n/a)
- K0: 194.000
- K0P: 5.000
- SYMMETRY: HEXAGONAL
- A: 4.758
- B: 0.0000
- C: 12.99
- ALPHA: 0.0000
- BETA: 0.0000
- GAMMA: 0.0000
- VOLUME: 22.0640
- ALPHAT: 2.000e-6
- DIHKL: 3.4790 75.0 0 1 2
- DIHKL: 2.5520 90.0 1 0 4
- DIHKL: 2.3790 40.0 1 1 0
- DIHKL: 2.0850 100.0 1 1 3
- DIHKL: 1.7400 45.0 0 2 4
- DIHKL: 1.6010 80.0 1 1 6
- DIHKL: 1.4040 30.0 2 1 4
- DIHKL: 1.3740 50.0 3 0 0
- 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.
- List elements
- Add element
- Plot lines - adds the new reference lines to the current plot
- Plot CO57 - plots the three gamma calibration lines
from Co57 (line at 136.4743 keV is usually out of range).
- A preselected list of 6 elements
- Up to 4 newly added elements
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.
- The number of cycles refers to the number of least squares regression cycles.
5 appears to be sufficient.
- The number of peaks is the number to be fit as a group. You should use 1
if you can isolate one peak If there are additional peaks, even small, shoulders,
or unknown peaks, use the appropriate number. If you select 0 peaks, gpls
will continue asking for peak positions until you enter 'q' or 'Q'. Useful
if you have a mix of single peaks and doublets etc. If you wish to fit more
than one peak at once, then you need to select that number, and probably select
"Individual Peak Widths" (otherwise, all peaks will have the same
width in channels).
- If you uncheck Refine Peak Widths, then the number entered in the Peak Width
windows (.07 is degrees for ADD or 7 channels for EDD in this case) will be
used.
- Print last cycle only refers to the amount of information which appears
on the text screen.
- The "Fit peaks in multiple detectors" option allows you to fit
the selected peak for the selected detector. The program calculates the peak
position for other detectors using the relevant calibration information. If one or more of the peaks are energy peaks (as opposed to diffraction peaks), then enter "e" or "E" when selecting that peak (to calculate the channel number for the other detectors, 2q must be calculated, and that parameter has no meaning for an energy peak).
- Check the boxes for the detectors you wish to process. If one of the detectors has spurious or no data, do not check it.
- Tabulate D-spacings for Stress displays the d-space for the selected line
for all detectors, and also the individual differences. The difference between
the vertical and horizontal d-spaces is useful for estimating strain conditions.
- Checking "Pause between Peaks" allows you to inspect each fit graphically.
To use GPLS in manual mode, follow the following procedure:
- 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.
- 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
- 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).
- 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).
- 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.
- 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.
- 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:
- a sequence, in
which the first and last file are selected, or
- a list file which contains a list of data files to process.
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:
- 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...
- 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'.
- 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.
- 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.
- In GPLS Auto Setup check 'Set Select peaks flag'.
- 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.
- 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,
- 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.
- 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:
- 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.
- 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.
- 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.
- Run GPLS in manual mode on the first file. Be sure
that "Set Select Peaks Flag" is checked. After fitting,
peaks uncheck this box.
- Check the options in the boxes on the right-hand side of the GPLS Auto
Setup window.
- 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
- 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.
- Pause between fitted region and Pause between files - affects display
during execution
- Overwrite pk files without prompting - if a .pkn file already exits, rewrite
the file without confirmation from the user.
- 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)
- 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.
- 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.
- The first template file read will be tagged to control-x. If more than one template file then the second file read is tagged to control-y and the third to control-z. This allows for up to 3 different diffracting materials in the patterns.
- Be sure to set the Auto Peakfit options as described above.
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:
- Setup (this must be done first, see window below). You need to know the
cell parameters of the starting model. Program knows which parameters need
to be selected based on symmetry; i.e. for cubic materials, only
set a, Cubic, and refine a. A typical number of cycles of
refinement is 5.
- Refine
- Print list file
- Edit lst file
- Edit input file
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:
- 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.
- There may be another file, called DEFAULT.EDF, which
has the same parameters. Again, this will include the
calibration parameters for all detector elements.
- 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.
- 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.
- 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.
- If no DEFAULT.EDF file is found, then the parameters from the diffraction
data file are put into the Temporary EDF Parameters location.
- 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.
- 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.
- Open the E-Calib Setup window; the d-spacing for all the diffraction lines will appear.
- 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.
- 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.
- Quit out of the current graphics window with Q.
- 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.
- 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.
- 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.
- Run Least Squares Fit Selected Data. This finds the actual parameters.
- 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.
- 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.
- 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
- Set Filetype to APS (allows files with extension as sequence number to work)
- Set Filetype to X17 (default, allows files with sequence number as characters 10, 11, 12, and 13 in filename).
- Export to GSAS - can be used for conversion to 2-theta, or export EDS GSAS file
- Export to Jones
- Export as XY
- Set wavelength
- Clear Flags / set defaults
- Clear EDF data - use this if the calibration data source was wrong and you
wish to re-read it (using the file menu)
- Display EDF data - displays calibration data currently loaded in text window
- Write EDF data - creates EDF file using the current Active Calibration parameters.
Filename will be fn.edf where fn is generated from the current
data set
- Display Data - text list of data
- Color Postscript - changes printer postscript to color (default)
- Monochrome Postscript - changes printer postscript to monochrome. Change
only takes effect when you read a new file, or re-read the old one.
- HP Laser/Desk Jet
- Set Colors
- Set 1/d scales
- Enter default title 1 - This allows you to enter text to appear on the top
line of the graph. It will remain for all future graphs, unless you either
reset it (see below) or restart Plot85. If you have entered something in "Sample
title" or "Experiment title", this will be used (although it
can be changed). If there is no title 1 in the file, you must enter something
here. This new default title is not saved in the file.
- Reset default title 1 - deletes the current Title 1 so you can enter a new
one.
- Enter new title 1 - creates a new Title 1 for the current plot only.
- Enter new title 2 - creates a new Title 2 for the current plot only. If
nothing was entered in the first "Experiment Comments" field in
the MCA program, this must be entered for each graph (since they will all
be different). If you have entered something in one or more of the "Experiment
Comments" fields, they will be concatenated together (up to 80 characters)
and used as Title 2.
- Convert Scintag to XY
- Info messages: ALL (selecting this toggles between ALL, MANY, and FEW). This refers to the amount of text displayed on the text window.
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:
- 1. The selection commands "..." and "../" will expand
the range pointed to by the first two dots. A third dot will expand the displayed,
while the / will invoke GPLS.
- 2. If a standard has been selected the number
and shifted number keys point to the corresponding standard line.
- 3. P or p will produce a postscript file of the current graphics screen.
Filename is the filename of the data file with the extension ".ps".
If you properly set up the printer environment as described below, that file
will then be copied to the printer.
- 4. N and n will read the next/previous data file in the sequence.
- 5. Q or q will quit and return to the menu.
- 6. S will redisplay the original data, and s will redisplay the current
data selection. Position, JCPDS, and XPOW markers
will be lost. Standard markers will be retained.
- 7. Function keys F1 through F10 will select detectors
1-10 respectively. Calibration of each detector is maintained.
With some keyboards, after pressingt F10, you may have to press F1 before pressing any other function key.
- 8. "I" and "i" will increment or decrement the cell
edges of the active reference material (using the Standard, XPOW, or JCPDS
menus), recalculate the d-spacing and replot the data. The active reference
material is the last one to have the increment values changed or the last
one to be plotted with the drop-down menu.
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.
- 1. The only format that contains 10-detector information is the default APS
format created by Mark's MCA/MED program. This format has 8k (8192) channels.
This format has 10 entries for each detector-related parameter (calibration,
ROIs, data) in each line which formerly contained only one entry.
- 2. There are 10 sets of calibration parameters built into the data file; each detector has its one calibration data, and these
are correctly selected whenever you switch detectors.
- 3. When all detectors are displayed (in one graph), pressing F1, - F10 will select detectors 1-10 respectively. "S" will re-display
the whole spectrum; "s" will re-display the portion you currently
have selected. This ("S") must be done before selecting another
detector.
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.
- 1. Pgplot_font is a variable pointing to the location of the grfont.dat file. Without this file, text
will not be shown on the plot. (e.g. pgplot_font=c:\plot85\grfont.dat)
- 2. Plot85_HD is a variable pointing to the default PostScript printer. If it is a network printer, set
this equal to the share name (e.g. plot85_hd= \\SBMP90\HPLJ4Si_121)
- 3. File_path is the location of a writable directory where the program will put files, if it cannot
write them to the data directory. (e.g. file_path=c:\windows\temp)
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
- Version 1.0 - original version, written for VMS running on a VAX or an ALPHA
- Version 2.0 - beta version for Windows
- Version 3.0 - added support for .JCPDS reference files
- Version 3.1 - added Celrf
- Version 3.2 -
- Version 3.3 - Moved fluorescence reference to be an internal function using
the FLUORESCENCE menu; added GPLS and XPOW menus
- Version 3.4.0 - Made it possible to increment cell parameters for reference
lines input from .HKL, .JCPDS, or .POW files.
- Version 3.4.1
- Version 3.4.2 - changed look of File menu, and moved import of .MCA files
to the Utilities menu. (.MCA file inport moved back to the file menu in version
4.1.0)
- Version 3.4.3 - Increased the number of lines in a .JCPDS file from 20 to
40, but introduced a bug.
- Version 3.4.4 - corrected the bug introduced in 3.4.3
- Version 4.0.4 - added GUI functionality for default titles, new cell parameters,
GPLS setup, CELrf setup, fixed a problem in XPOW
- Version 4.0.5 -fixed some minor bugs related to GSAS export.
- Version 4.0.6 - corrected FWHM data in .PKS files , Added check mark next
to selected standard, fixed a bug in print command
- Version 4.1.0 - Added support for 4-detector version
of APS-format files
- Version 4.1.1 - corrected problem keeping calibration parameters and detector
selection coordinated
- Version 4.1.2 - changed .PKS file extension to .PKn where n is the
detector number.
- Version 4.1.3 - changed how cycles and QS are handled in Celf; moodified
export to GSAS for MED files
- Version 4.1.4 - added refinement of 2theta-zero in Celrf
- Version 4.1.5 - replaced some text dialog with GUIs
- Version 4.1.6 - warns user if temp.pks file is about to be overwritten;
changed cell increments to percentages; fixed a bug so the .pkn files to to
the data directory.
- Version 4.1.7 - increased the maximum number of peaks in XPOW from
20 to 40; added symbols for XPOW and .JCPDS files lines 21-40; fixed a bug
in the 4th energy calibration parameter.
- Version 4.2.0 - Added "auto" mode to GPLS. Define peaks and then
run a series of files.
- Version 4.2.1 - Added updating of starting peak positions in GPLS auto mode.
Added option to print only the last cycle in GPLS
- Version 4.2.2 - Added option to read a list of files for "auto processing"
in GPLS
- Version 4.2.3 - Fixed bug in celrf. Not selecting a pks file caused endless
loop. Added switch "icellexit" (write list file and exit after refinement)
- Version 4.3.0 - Added link to Celrf from GPLS auto mode
- Version 4.3.1 - Added "Region specific" output files for GPLS
auto mode - One file for each region fitted with one entry per file processed
- Version 4.3.2 - Added P and T to region-specific outfiles; hot key change:
N to next file, n to previous file
- Version 4.3.3 - Added ability to search for highest peak within GPLS auto
mode, bug fixes in inport_xy routines, celref for non-cubic structures
- Version 4.4.0 - Changed gpls automode peak updating to allow the shift of
the peak in region 1 to control shift of all peaks (autoshift mode)
- Version 4.4.1 - Auto Mode: set reject flag for region if GoF > max GoF
- Version 4.4.2 - (27-Dec-02) Added option to output native GSAS EDS file;
fixed bug in spawning copy command for pks file (NT doesn't support -Y option)
- Version 4.4.3 - Increased data size to a maximum of 4096 points (channels)
- Version 4.4.3b - Fixed bugs: conversion to gsas file (problem with quad
term) Non-standard name would crash program. No crash but still get funky
name (problems: no ext and filename less than 5 characters)
- Version 5.0.0 - Add peak search routine POW by Wayne Dollase (includes
background subtract, alpha 2 stripping (for sealed tube source), second derivative
peak search, and "peak matching" with peaks from 'standards', 'xpow',
and jcpds. A peaks file compatible with celrf is produced
- Version 5.1.0 - Added option to read PDF2 "output" from Brian
Toby's program PC Logic
- Version 5.1.1 - Added conversion of scintag data to xy c Version 4.0 implemented
some GUIs for input/output
- Version 5.1.2 Added plotting Co57 energies - a kluge - it is part of the
flouresence options
- Version 5.1.3 Increased JCPDS lines to 60. No symbols above 40
- Version 5.2.0 Nov 11,2003 - Added "reference" pattern. Reference
pattern can be shifted/scaled and subtracted from current pattern
- Version 5.2.1 Dec 3, 2003 - Added refinement of sample displacement error
in celrf
- Version 5.2.1a Feb 7, 2004 - removed reference to Fluke meters which caused
a crash when data file did not include them.
- Version 5.2.2 Feb 7, 2004 - added reference to Keithley meter.
- Version 5.5.0 Mar 17, 2004 - added automatic analysis of one peak on all
four detectors for strain analysis - alpha version
- Version 5.6.1 Mar 19, 2004 - added automatic calibration correction using
one or two Co-57 peaks - alpha version
- Version 5.6.2 March 19, 2004 - E-tweak all detectors
- Version 5.6.3 March 23, 2004 - 1) When pointing to peak position in gpls,
an E or e indicates the peak is not a diffraction peak but an energy peak
like Co57 etc. This is important if fitting "all detectors" - 2)
Added "All detectors options" check boxes in gpls setup * Fit peaks
in all detectors * Tabulate D's for differential stress analysis * Pause betweeen
peaks
- Version 5.7.0 March 26, 2004 Added "Quick Energy Calibration"
using Co57 and Pb flourescence
- Version 5.7.1 April 6, 2004 Fixed bug when path to datafiles is too long
(> 65 characters)
- Version 5.7.2 April 12, 2004 Added color selection codes (Utilities menu)
April 15, 2004 Added "write" function to "reference file"
options
- Version 5.7.3 April 18,2004 Fixed bug in "reference file" subtraction
dealt with negative results
- Version 5.8.0 April 19,2004 Added selection of detectors to "tweak"
when tweaking calibration
- Version 5.8.1 April 26,2004 Worked on e-calibration option.Fixed bug in
edf filename when using "n" and "N" hot keys
- Version 5.8.2 April 30,2004 Added support for laser/desk jet printer (B&W)
When EDF parameters are read from an edf file and "tweaked", edf
parameters are reset to original edf file vales when reading next file.
- Version 5.8.3 May 10,2004 Continued work on e-calibration. Added 2-q
optimization and plot of fitted calibration
- Version 5.8.4 May 12,2004 Minor bug fixes. Changed E-tweak e-params to
double precision
- Version 5.8.5 May 14,2004 Added support for "chi"
files(xy import) produced by FIT2D
- Version 5.8.6 June 10,2004 Bug fixes in E-calibration: GPLS fit for diffraction
peaks
- Version 5.9.0 June 23,2004 Added import of New Scintag
(DMSNT) txt formatted files. Fixed bug in export to xy format (properly
handles export of dmsnt files). Fixed bug in gpls plot. Standard lines only
add character marker, no line.
- Version 5.9.1 June 30,2004 Bug fixes
- Version 5.9.2 Oct 8,2004 Changed Brian Toby pdf2 input to accept either
D's or 2thetas. Added outkey "esc" in plot window. replot full spectra
without any reference lines (except standard if selected)
- Version 5.9.3 Dec 1, 2004 In GPLS: typing 'Q' or 'q' when pointing to a
peak will end peak selection and set the number of peaks to however many were
selected upto that point. Number of peaks should be set to 0 in GPLS setup
for this option. This is usefull when the number of peaks is changing from
region to region. Improved handling of singular matrix in GPLS.
- Version 5.9.4 Dec 3,2004 First pass at plotting 1/d for all detectors
- Version 5.10.0 Dec 8,2004 Add features to 1/d plot. Added support for N/n
option (next/previous file). P/p option (printed output). Added support for
jcpds reference lines. Patch to adjust scaling to prevent flat topping when
overall scale factor multiplier = 1.
- Version 5.10.1 Dec 16,2004 Added hot keys "D" and "d"
in 1/d plot. This will print "|" at the position selected and the
d-spacing vertically.
- Version 5.10.2 Feb 12,2005 Fixed bug in GPLS when plotting standard lines
with angle dispersive data. Changed how 1/d plotting handles hot keys "s"
and "S" should be the same as regular plots now. Fixed bug to properly
handle greying and enabling plot menus.
- Version 5.10.3 Feb 18,2005 Added menu items: File --> Read and Plot
datafile File --> Save pks / replot data.
- Version 5.10.3 a,b,c April 2005 Minor changes and fixes
- Version 5.10.3d June 1, 2005 Added plot of rsquares in e-calib
- Version 5.10.3e Aug 8, 2005 Fixed bug when plotting standard with data
gt 2048 channels
- Version 5.10.4 Feb 25, 2006 Changed default file
format (APS data) to n.3 (from 5.3). n usually 8 but can be upto 20. extension
is still sequence number. Added '%' as first character of header lines in
*.pk* files for compatability with MatLab.
- Version 5.10.5 Mar 9, 2006 Made some cosmetic changes in the opening file
menu, and changed some of the messages regarding initializing temp.pks file
- Version 5.10.6 Mar 10,2006 Bug fixes only
- Version 6.0.0 Mar 17,2006 First implementation of Birch-Murgnahan equation
of state
- Version 6.0.2 June 20,2006 Added detector selection in "GPLS Multiple
Detectors" option
- Version 6.0.3 June 30,2006 Bug fixes in AutoGpls w/Multiple Detectors Option
- Version 6.1.0 July 12,2006 Added "near realtime" in AutoGpls:
Hot keys cntl x,y, and z invoke use of template file 1,2 or 3 respectively
- Version 6.2.0 Aug19,2006 Added filenames with seq
in name: abcde_123.mca (X17 format)
- Version 6.3.0 Aug22,2006 Added Spring8 format to
File menu
- Version 6.3.1 Sept 8,2006 Patches/tweaks in BM EoS
- Version 6.3.2 Sept 21,2006 Reading JCPDS file will overwrite E-calibration
entries 3-12 (assuming there are 10 peaks) leaving only the lower energy Co57
peaks(14 & 122 KeV)
- Version 6.3.3 Nov 9,2006 Writing EDF file forces edf input from edf file
(not datafile) Added "write edf file" menu item to ecalib menu
- Version 6.3.4 May 14,2007 Added check for embedded spaces in path/filename
Fixed some problems with embedded spaces (pks files) Added a default for title
2 if title 2 is blank
- Version 6.3.5 May 15,2007 Many fixes for reading old
"MCA" datafiles
- Version 7.0.0 May 25,2007 First version Built with Intel VF9.1 and VS2005
- Version 7.0.1 Version 7.0.1 May 30,2007 Made text window scrollable. Made level of message output selectable(small medium and large)
- Version 7.0.2 June 6, 2007
More fixes for reading old MCA datafiles(handle usage of edf file)
- Version 7.0.3 June 8,2007 Fixed bug in exporting to "jones" format
- Version 7.0.4 Oct 18,2007 Fixed bug in GPLS when using more than 20 JCPDS Lines (lines 21 - 40 now pickup the proper HKLs)
- Version 7.1.0 Oct 22,2007 Added simple Gauss-Lorentz profiles for jcpds reference lines
- Version 7.2.0 November 21, 2007Added DotProduct fit index of DJW for jcpds_profiles and data. Added check of environment variable to set screen resolution. Environment variable PGPLOT_DEV
- /w9 mode from Environment
- /wv 640x480
- /ws 800x600
- /wx 1024x768
- /wz 1280x1024
- Version 7.3.0 Apr 18,2008 Added support for upto 10 detectors (minimal testing)
- Version 7.3.1 June 4, 2008 Bug fixes in edf routines
- Version 7.3.2 June 13, 2008 Bug fixes, extended text window to 500 lines
- Version 7.4.0 June 20, 2008 Changed E-calib to support multiple detectors Bug fixes in AutoGpls; added run parameter 'fileformat=aps'
-
- Version 7.4.1 June 20, 2008 Enabled reading of 12-detector files. Only 10 are displayed
Bug Fixes(rdjcpds e-calib update, set default nelements=10)
- Version 7.4.2 July 3, 2008
Bug fixes: auto mode with x17 file format
- Version 7.4.3 July 8, 2008
Bug fixes with more than 10 detectors
- Version 7.4.4 July 17, 2008
- Version 7.4.5d Nov 19,2008 Bug fix for auto mode and added y-scale factor in Utility menu
- Version 7.4.6 Nov 27,2008 Bug fix for edf parameters when reading new file after using function keys
- Version 7.4.7 Dec 2,2008 Fixed bug in naming of pk file
- Version 7.4.8 Feb 27,2009 Fixed bug in plotting Co57 lines
- Version 7.5.0 Mar 6,2009 E-calib changes. Added "Variable width" of region and Update All active params Added "all detector" feature in LS fitting of e-params Fixed bugs in all detector GPLS fitting