Link to NIST Center for Neutron Research home page Link to National Institute of Standards & Technology home page
Link to Tcl/Tk information

EXPGUI
A Graphical User Interface for GSAS

EXPGUI is a graphical interface for the GSAS package. It allows two types of actions: it can be used to directly modify the GSAS experiment file with a graphical user interface (GUI) and it can be used to invoke the programs inside the GSAS package such as EXPEDT, GENLES, FOURIER... These programs can be run from a menu or in many cases by pressing buttons.

This documentation describes the different actions that can be accomplished with the different panes and the contents of the menus. Other documents about EXPGUI are: Installation notes for Windows, Installation notes for UNIX, Customization notes and two example tutorials: for TOF and constant-wavelength neutron. Note that screen images in this document are not updated as frequently as the text.


A. Experiment file editing

Different sections of the .EXP file can be edited by selecting different panes ("pages" or "panels") from the tabbed list.


The notebook pane tabs.

A.1 Least Squares (LS) Controls Pane

The LS Controls pane shows information about the current experiment, typically found in the EXPEDT "Least Squares Controls" options.

Note that the order that histograms appear in this pane is determined by the "Sort histograms by" option in the Options Menu.

A.2 Phase Pane

The phase pane is used to edit information about the structural model(s) found in the experiment file. The flags for refining the unit cell and atomic parameters, as well as ther damping values, can be set on this pane. Note that if a single atom is selected using the mouse, the information for that atom can be edited. If a group of atoms is selected (see Mouse Actions) the damping and refinement flags for all the selected atoms are changed.

If the EXPTOOL program (see the installation instructions) is installed, buttons for adding phases and atoms will appear on this pane, as seen below. If the program is not properly installed, no errors occur, but the buttons do not appear.

Note that the order that atoms appear in this pane is determined by the "Sort Atoms by" option in the Options Menu.

A.3 Histogram pane

The histogram pane is used to edit background and diffractometer constants for a histogram, as well as set damping and refinement flags for these parameters.

If "Multiple Histogram Selection" mode is set to "All", this pane is disabled. For other settings of this mode, groups of histograms can be selected and modified collectively.

If the EXPTOOL program (see the installation instructions) is installed, a button for adding histograms will appear on the bottom right on this pane, as seen below. If the program is not properly installed, no errors occur, but the button does not appear.

Note that the order that histograms appear in this pane is determined by the "Sort histograms by" option in the Options Menu.

A.4 Scaling pane

The Scaling pane is used to edit the scale factor for a histogram as well as the phase fractions for each phase present in that histogram. Damping and refinement flags for the scaling terms can also be set here.

If "Multiple Histogram Selection" mode is set to any value other than "Off," groups of histograms can be selected and modified collectively.

Note that the order that histograms appear in this pane is determined by the "Sort histograms by" option in the Options Menu.

A.5 Profile pane

The Profile pane is used to edit the profile values for each phase present in a histogram as well as set the refinement flags and a damping value for each phase.

If "Multiple Histogram Selection" mode is set to "All", this pane is disabled. For other settings of this mode, profile values and settings can be collectively modified for groups of histograms.

Note that the order that histograms appear in this pane is determined by the "Sort histograms by" option in the Options Menu.

A.6 Constraints pane

GSAS offers two types of restraints that can be included in a model. So called "soft constraints" or "restraints" penalize the fit if aspects of a model (for example, bond lengths) differ from selected values. So called "hard constraints" reduce the actual number of parameters in a model, by grouping parameters so that a single shift (possibly scaled) is applied to each parameter in the group. The constraints pane is used to set these "hard constraints." At this time the only constraints that can be set in EXPGUI are on atomic parameters (others can be set in EXPEDT).

Note that these constraints are only applied to shifts but not to the actual values. This means that, for example, if two atoms are constrained so that the shift on their occupancy is the same, but the initial occupancies differ, the in occupancy difference will not change as the values refine.

Atom Constraints

The atom constraints editing pane appears below. Note that constraints can be listed sorted by constraint number, phase number, lowest atom number or variable by clicking on the buttons at the top of the pane.

To delete one or more constraints, click on the appropriate checkbuttons in the Delete column and the press the Delete button, below. Due to the way GSAS implements these constraints, a parameter can be included in only one constraint. Should one or more parameters be constrained twice, an error message is shown as shown below. Note that the constraint number is displayed as red, for constraints that have conflicts in the constraints editing pane (see above.)

When the edit button for a constraint is pressed, the constraint is opened for editing. Controls are available to select the phase, variable, multiplier and atom(s). Note that for atom selection, use of the control key and the left mouse button allow individual atoms to be selected or deselected. Shift and the left mouse button allow ranges of atoms to be selected and the right mouse button selects all atoms (see Mouse Actions).

Note that it is inappropriate to constrain different types of parameters together, for example X and Uiso. The left-most variable button is the "master" which determines what variable are allowed in the other variable buttons.

When the "New Constraint" button is pressed, a blank constraint editing window is opened. Note that any variable to the right may then be selected, including two special codes, Uxx and XYZU. XYZU creates four constraints, requiring the shifts on x, y, z and Uiso to be the same for all the selected atoms. Uxx does the same for the six anisotropic displacement parameters. These special codes are valuable for atoms that share a site.

Note that only 100 parameters may be included in a constraint, with one exception. When shifts for Uiso for all atoms in a phase are constrained, this counts as a single parameter. If more than 100 parameters are entered for a constraint, an error message is shown. Up to 2000 atomic constraints may be entered. EXPGUI does not warn if you exceed this limit.

A.7 Preferential Orientation Pane

The Preferential Orientation Pane is used to control parameters related to fitting parameters using the March-Dollase formulation for preferred orientation. In this model one or more axes are designated as directions [designated by (hkl)] where crystallites are over (Ratio > 1) or underrepresented (Ratio < 1). The checkbox to the right of the Ratio value determines if it will be refined. If more than one axis is present, one must define the relative fraction of preferred orientation for each direction. These fractions are normalized, so do not vary the fractions for all directions in a phase. If "Multiple Histogram Selection" mode is set to any value other than "Off", all terms are displayed for all selected histograms. No attempt is made to group terms or flags.

Note that the other model for treating preferred orientation -- the orientation distribution function (spherical harmonics) is not yet implemented in EXPGUI and must be accessed from EXPEDT.

B. Shortcuts

B.1 Multiple Histogram Selection

This mode allows parameters to be changed for groups of histograms. When the "Multiple Histogram Selection" mode is off, it is possible to modify parameters and refinement flags for only a single histogram, but the other settings allow groups of histograms to be selected and modified. (see Mouse Actions). It does not make sense, however, to globally modify instrument-related parameters and flags for different histogram types. So global actions can be limited to a single class of histogram types (e.g. TOF, CW Neutron,...), which allows these parameters to be set for groups of similar histograms. Thus, if this mode is set to "All" the Histogram and Profile panes are disabled.

The setting for "Multiple Histogram Selection" mode is selected using the "Multiple Hist. Selection" item on the Options menu to create a submenu. Also on this submenu is an option "Group Phases Together" that controls how EXPGUI treats phases having the same profile type when multiple histograms are selected. If the "Group Phases Together" option is on, then the refinement flags for all phases with the same histogram types are grouped together, when possible. If this option is off, phases are treated separately.

B.2 Mouse Actions

A range of atoms or (in multiple selection mode) histograms may be selected by dragging (holding down) the left mouse button. It is also possible to select a range by using the Shift key with the left mouse button. To select or deselect individual entries, use the Control key with the left mouse button. Pressing the right mouse button selects all entries in a list.

C. Menu Commands and Programs

GSAS programs are invoked either through use of the menu bar


The menu bar.
or by "pressing" a button on the button bar. The button bar simply provides an easy way to access commonly used actions on the menu bar. Users can configure the menu bar to include their own preferred actions and, with some knowledge of the program and Tcl/Tk, add their own commands to the menu bar or button bar.

The button bar.
A description of the EXPGUI menus follows along with a very brief description of the function of each menu option. Note that an option may appear under more than one menu.

C.1 File Menu

The options on the File menu as is the custom contains the commands for reading and writing experiment files, as well as starting and ending the program.
expnam
Select an existing GSAS experiment to be used. If a name is entered that does not exists, it is possible to create a new experiment file from scratch.
Save
Saves modifications to the current experiment file to disk (shortcut Alt-S).
Save As
Saves modifications to the current experiment file to disk under a new file name
Reread .EXP file
Reread the last saved version of the experiment file from disk.
EraseHistory
Deletes old history records to speed reading of the .EXP file.
convert
Convert a standard ASCII file to the direct access format used by GSAS (and for UNIX, the reverse)
exit
Exit EXPGUI (shortcut Alt-X or ^C)

C.2 Options Menu

This menu contains options that determine how EXPGUI runs.
archive EXP
Toggles archiving of .EXP files. When on, files are saved prior to each save or run of expedt in a file named [expnam].EXP.xxx.gz where xxx = 000, 001 (UNIX) or in a file named [expnam].ZIP or [expnam].xxx (Windows)
Use DISAGL Window
When this option is set, results from DISAGL are shown in a separate window. When it is not set, the results are written in the .LST file.
Sort atoms by
Determines the order that atoms are displayed on the "Phase" pane Atoms may be displayed sorted by atom number, atom type, or by x, y or z
Sort histograms by
Determines the order that histograms are displayed on the Histogram, Scaling and Profile panes Histograms may be sorted by histogram number, histogram type, original bank number, or diffraction angle/wavelength
Multiple hist. selection
When this mode is off, it is possible to modify parameters and refinement flags for only a single histogram. For other settings, it is possible to modify parameters and flags for groups of histograms (see help for Mouse actions). It does not make sense, however, to globally modify instrument-related parameters and flags for different histogram types. So global actions can be limited to a single class of histogram types (e.g. TOF, CW Neutron,...), which allows these parameters to be set for groups of similar histograms. Thus, if this mode is set to "All" the Histogram and Profile panes are disabled.
Override backspace
This option is available in UNIX only, as there are different ways that backspace can be implemented. When option is set as "On," the backspace key is overridden to send a "delete" character. If backspace does not work in a program such as EXPEDT, change try the other setting for this option.
Autoupdate EXP
Normally EXPGUI prompts before rereading the EXP file when GENLES, POWPREF,... are run (this is so that one can change the experiment file and rerun with the current input). If this option is set, the new file is automatically read without a prompt. This option is not available in Windows.
SaveOptions
Save the current values for "Override backspace", "Sort atoms by", "Sort histograms by" and "archive EXP" in file ~/.gsas_config (c:\.gsas_config on Windows).
liveplot_options
Used to set options for liveplot, for example, the histogram to be plotted

C.3 Powder Menu

This menu contains links to GSAS programs used for powder diffraction analysis.
expedt
Run GSAS experiment editor (shortcut Alt-E)
powpref
Powder data preparation (shortcut Alt-P)
genles
Run GSAS experiment editor (shortcut Alt-G)
powplot
Display powder patterns
rawplot
Plot powder data
fitspec
Fit a TOF vanadium scattering spectrum
tofnorm
Normalize a TOF spectrum

C.4 Single Crystal Menu

This menu contains links to GSAS programs used for single-rystal diffraction analysis.
expedt
Run GSAS experiment editor (shortcut Alt-E)
genles
Run GSAS experiment editor (shortcut Alt-G)
scabs
Single crystal absorption
scmerge
Sort and merge single crystal data
sxtldata
Prepare generic single crystal data

C.5 Graphics Menu

This menu contains links to several GSAS and two non-GSAS (liveplot and widplt) programs used for graphical display of data and results.
forplot
Display Fourier maps (set Fourier options in EXPEDT and then compute with FOURIER
polfplot
Display polefigures
powplot
Display powder patterns
ortep
Draw crystal structure
rawplot
Plot powder data
fourier
Generate Fourier map
forsrh
Search Fourier map for peaks
liveplot
Create a plot of powder data with zooming, automatic update and other nice features.
vrstplot
Create a VRML 3-D file for viewing with 3rd party software
widplt
Displays the FWHM as a function of Q, 2Theta,... for UVWXY values input or read from an EXP file

C.6 Results Menu

This menu contains links to several GSAS and one non-GSAS (lstview) programs used for analysis of results.
bijcalc
Thermal parameter analysis
disagl
Distance/angle calculations
reflist
List reflection data
geometry
Molecular geometry calculations
hstdmp
List powder histogram data
istats
HKL Intensity statistics
rcalc
Compute reflection resuduals
composition
Computes the chemical composition of a unit cell accounting for site multiplicies and occupancies
lstview
Create a box with scrollbars containing the current .LST file

C.7 Calculations Menu

This menu contains programs for useful crystallographic computations.
cllchg
Transform unit cell
fprime
Compute f, f', f'' and mu/rho for an element for a range of x-ray wavelengths
rducll
Unit cell reduction
spcgroup
Space group symbol interpreter
unimol
Unique molecule assembler

C.8 Import/Export Menu

This menu contains utilities for importing information into GSAS and exporting.
exp2xtl
Prepare a .XTL format file of atomic positions. This file is used in MSI software such as Cerius and InsightII.
gsas2cif
Prepare IUCr crystallographic information (CIF) file
hklsort
Prepare HKL tables
pubtable
Prepare atom parameter tables
convert
Convert a standard ASCII file to the direct access format used by GSAS (and for UNIX, the reverse)
cad4rd
Prepare CAD4 single crystal data
dbwscnv
Convert a powder diffraction data file from DBWS format
x17bcnv
Convert an energy dispersive diffractogram data file from NSLS X17b
p3r3data
Prepare Siemens/Brucker P3R3 single crystal data
sxtldata
Prepare generic single crystal data

D. EXPGUI Utility Programs

LSTVIEW

lstview is used to browse through the GSAS output listing. It is invoked by the "lstview" command in the GUI.

LIVEPLOT

liveplot shows the observed, calculated and difference plots for powder refinements. The plot is updated as the refinement progresses. The mouse can be used to zoom in on sections of the plot. Liveplot uses the BLT graphics package.

LIVEPLOT can now be enhanced to superimpose peak locations for input unit cells or peaks from JCPDS/ICDD entries. See the LIVEPLOT customization information or read file expgui_cfg.html in the gsas/tcl/doc directory.

LIVEPLOT gets the current diffraction information by running the TCLDUMP program, if installed, or HSTDUMP otherwise. The TCLDUMP program has been optimized for use with LIVEPLOT and offers a number of extra options that are not available when HSTDUMP is used: plots can be displayed in the native units (2Theta/TOF/KeV), or in d-space or Q; fixed plus fitted background curves are shown in green; if reflection tickmarks are displayed, reflection tickmarks can be displayed by pressing "H" or "h" while the mouse is near a reflection (holding the shift key while pressing the left mouse button also works). See the installation instructions for installing TCLDUMP.

WIDPLT

WIDPLT can be used to plot the actual peak widths generated by the profile parameters used in GSAS. It is possible to define reference curves that are loaded automatically. WIDPLT uses the BLT graphics package.


BLT

The BLT graphics package is used by the WIDPLT and LIVEPLOT routines. If the package can not be loaded these routines, an error message, "Error -- Unable to load the BLT package", will be displayed. A frequent problem is the package is installed, but not configured so that common support routines are loaded automatically. If this is the case, a message, "BLT Setup Error: could not access a Blt_ routine...", will be displayed. Please see
http://www.ncnr.nist.gov/programs/crystallography/software/tclpkgs.html for more information on installation of BLT.

Acknowledgements

Praise to Larson and Von Dreele for GSAS, Ousterhout for Tcl/Tk, Przemek Klosowski for convincing me to learn Tcl/Tk and Jonathan Wasserman for helping get this project started. Large sections of the Preferred Orientation GUI were written by Pamela Whitfield of the NRC (Canada).

GSAS is written by Allen C. Larson and Robert B. Von Dreele, MS-H805, Los Alamos National Laboratory, Los Alamos, NM 87545. Problems, questions or kudos concerning GSAS should be sent to Robert B. Von Dreele at vondreele@lanl.gov EXPGUI is written by Brian H. Toby of the NIST Center for Neutron Research, Brian.Toby@NIST.GOV with help from Jonathan Wasserman.

GSAS is Copyright, 1984-2000, by the Regents of the University of California. The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36) by the Los Alamos National Laboratory, which is operated by the University of California for the U.S. Department of Energy. The U.S. Government is licensed to use, reproduce, and distribute this software. Permission is granted to the public to copy and use this software without charge, provided that this notice and any statement of authorship are reproduced on all copies. Neither the Government nor the University makes any warranty, express or implied, or assumes any liability or responsibility for the use of this software.

EXPGUI is not subject to copyright. Have fun with it. Modify it. Write new sections and make them available to the reset of the world.

Neither the U.S. Government nor any author makes any warranty, expressed or implied, or assumes any liability or responsibility for the use of this information or the software described here. Brand names cited here are used for identification purposes and do not consitute an endorsement by NIST.

Brian Toby (Brian.Toby@NIST.GOV)
$Revision: 202 $ $Date: 2009-12-04 23:02:06 +0000 (Fri, 04 Dec 2009) $