source: trunk/doc/expgui_cfg.html @ 36

Last change on this file since 36 was 36, checked in by toby, 11 years ago

# on 1999/01/20 21:33:38, toby did:
Initial revision

  • Property rcs:author set to toby
  • Property rcs:date set to 1999/01/20 21:33:38
  • Property rcs:rev set to 1.1
  • Property rcs:state set to Exp
  • Property svn:keywords set to Author Date Revision Id
File size: 11.6 KB
3Customizing EXPGUI and Associated Programs
11Customizing EXPGUI and Associated Programs</H2></CENTER>
13The EXPGUI GSAS graphical user interface can be modified in many
14ways quite easily.
15This document describes how the GUI works and how to modify the menus without
16significant reprogramming.
19The main GUI is created by file expgui, which in turn uses the following files
26Two additional files are read if they are found:
31<P>The first three files,
32(<TT>readexp.tcl</TT>, <TT>gsascmds.tcl</TT>, <TT>gsasmenu.tcl</TT>)
33must be located in the same directory where the <TT>expgui</TT> file is found.
34The <TT>localconfig</TT> file also is read from this directory, if it exists.
35The final file, <TT>.gsas_config</TT>, is read from the user's login directory (UNIX) or <TT>C:\</TT> (Windows).
36No error occurs if either <TT>localconfig</TT> or <TT>.gsas_config</TT> is
37not present.
39The <TT>readexp.tcl</TT> and <TT>gsascmds.tcl</TT> files contain
40tcl procedures that are
41used for more than one application, so it is convenient to place them
42in separate files. They are only of interest to someone trying to debug
43or add new functionality to expgui.
45The <TT>gsasmenu.tcl</TT> file defines the contents of the
46menu bar, the contents of the
47button bar and definitions for each command. The contents of this file
48are designed to be modified and extended by users, either by editing the file,
49or by overridding definitions in the <TT>localconfig</TT> or
50<TT>.gsas_config</TT> files.
52The variables in the <TT>gsasmenu.tcl</TT> are:
55This list defines the menu bar headings other than File, Options & Help
57Each array element, e.g. expgui_menulist(file) and expgui_menulist(powder),
58defines commands to be added to a menu heading. Each command will appear
59as an array element in expgui_cmdlist.
61Each array element, e.g. expgui_cmdlist(Save) or expgui_cmdlist(expnam)
62contains two items. The first defines a tcl procedure to be executed
63when the command is invoked, or "-" if no command will be invoked and
64the second contains help information describing what the command does.
65Note that when menu item is selected the variable cmd is set to the
66name of the command, so
68    expgui_cmdlist(powpref) {{runGSASwEXP $cmd} {Powder data preparation}}
70means that "runGSASwEXP powpref" will be invoked when powpref is invoked.
71. For example, when powpref is selected, the tcl command
72"runGSASwEXP $cmd" is invoked, where variable cmd is set to "powpref".
74This list defines the commands that will appear on the button bar where
75each item that appears on the button bar must have a matching pair of entries
76in expgui_cmdlist.
77Thus if the command
79   set expgui(buttonlist) {expnam expedt genles ortep fourier forsrh forplot lstview}
81is placed in the <TT>localconfig</TT> or <TT>.gsas_config</TT> files this will
82redefine the contents of the button bar.
85In addition to the variables defined in the previous file, expgui, uses
86a small number of array for other configuration options. They are:
89set expgui(coordfont) "-*-courier-bold-r-normal--12-*"
90set expgui(histfont) "-*-courier-bold-r-normal--12-*"
91set liveplot(hst) 1
92set liveplot(legend) 1
93set expgui(filesort) 1
94set expgui(scriptdir) [file dirname $expgui(script) ]
95set expgui(gsasdir) [file dirname $expgui(scriptdir)]
96set expgui(gsasexe) [file join $expgui(gsasdir) exe]
97set expgui(asorttype) $expgui(asorttype)"
98set expgui(hsorttype) $expgui(hsorttype)"
99set expgui(filesort) $expgui(filesort)"
102This determines where files menulist, cmdlist, helplist
103and buttonlist, as well as widplt and lstview are located.
104Rarely needs to be changed.
106This determines where the GSAS executable files are located.
107You might want to change this is you keep multiple versions of GSAS
108around or if you keep the GSAS files in a different location than
109the default or want to keep the tcl files somewhere other than
110in a subdirectory of the GSAS files.
111<LI><B>env(GSASEXE)</B>: This sets an environment variable which is
112probably not used.
113<LI><B>env(ATOMDATA)</B>: This sets an environment variable which
114defines the location of a data file (.../gsas/data/atomdata.dat)
115needed by EXPEDT and probably other programs.
116<LI><B>env(ATMXSECT)</B>: This sets an environment variable which
117defines the location of a data file (.../gsas/data/atmxsect.dat)
118needed by program FPRIME.
119<LI><B>env(LENPAGE)</B>: This sets an environment variable which defines
120the number of lines per page used in the .LST file. You may want to
121change this to match your favorite print format to save paper.
122<LI><B>env(PGPLOT_DIR)</B>: This sets an environment variable needed by the
123<A HREF="" target=_top>PGPLOT</A> 
124graphics library.
125<LI><B>env(GSASBACKSPACE)</B>: This determines if the default definition
126for the backspace key is overridden; some UNIX systems need this so that
127expedt and other terminal-oriented programs work correctly and
128other systems do not. You can toggle this option using the "sets an environment variable needed by the "Override Backspace" option on the file menu. To
129set the variable to default as "off" use
131        setenv GSASBACKSPACE 0
133in your <tt>~/.cshrc</tt> file or include
135        set env(GSASBACKSPACE) 0
137in your <tt>~/.gsas_config</tt> or <tt>localconfig</tt> file.
138<LI><B>archive</B>: This defines the default state for the archive flag,
139where 0 is off and 1 is on. When archive is on, a copy of the .EXP file
140is saved as <expnam>.EXP.nnn and compressed before EXPEDT is run.
141<LI><B>compressprog</B>: This defines a compression program used to
142reduce the size of archived .EXP files.
143<LI><B>debug</B>: Setting debug to 1 turns on a number of annoying
144warning messages.
148The following options are available for customization
150<LI><B>txtvw(followcycle)</B>: This sets the initial value for the
151"Auto Advance" button in the "Go To" menu. When this is true,
152the program will show the last cycle in the file. As new cycles are
153added, the "view" is advanced.
154<LI><B>txtvw(menulength)</B>: This limits the number of entries that can
155exist in a menu. For example, the default is 25, so when more than 25 cycles
156are found in a .LST file, only the last 25 are listed in the
157"Go To"/cycle submenu.
158<LI><B>txtvw(maxchars)</B>: This limits the maximum number of
159characters that will be read from an existing .LST file to speed
160the start of the program. The default for txtvw(maxchars) is ~1Mb
161for UNIX systems and ~200K for Windows.
163One additional variable is present that I don't suggest using:
165<LI><B>plotvars</B>: I am in the process of developing code that tracks
166and plots shifts and R values as a function cycle number. Setting plotvars to 1
167allows this code to be tested.
169<A NAME="notroot"></A>
171This program can be customized by overriding definitions for the
172following variables in file <tt> ~/.liveplotrc</tt>.
174<LI><B>graph(printout)</B>: This is set to 1 if PostScript files
175will be printed and 0 if they will be written to disk.
176<LI><B>graph(outname)</B>: This is the default for the file name used
177when PostScript files will be written to disk.
178<LI><B>graph(outcmd)</B>: This is the default for the command used
179to print PostScript files.
180<LI><B>peakinfo(color</B><i>n</i><B>)</B>: These variables define the default colors for
181reflections in phase "<i>n</i>"
184If you have <A HREF="">CMPR</A>
185installed on your computer, you can use superimpose on liveplot the peaks
186for an arbitrary unit cell with space group extinctions show, if desired.
187This is pretty neat! To enable this feature, you must have a version of the
188GSAS GUI routines downloaded after 4 May 1998 and have installed
189a version of CMPR downloaded after 4 May 1998
190<A HREF="">
191(see the CMPR installation instructions.)</A>
192Then create a link from in the GSAS GUI
193directory to file cellgen.tcl in the CMPR directory. For example:
195         ln -s /usr/local/cmpr/cellgen.tcl /usr/local/gsas/tcl/cellgen.tcl
199If you have <A HREF="">LOGIC</A>
200installed on your computer, you can use superimpose peaks
201for a entry from the ICDD/JCPDS database on a pattern in LIVEPLOT.
202This is also pretty neat!
203To enable this feature, you must have a version of the
204GSAS GUI routines downloaded after 4 May 1998 and have installed
205a version of LOGIC downloaded after 4 May 1998
206<A HREF="">
207(see the LOGIC installation instructions.)</A>
208Then create a link from in the GSAS GUI
209directory to file icddcmd.tcl in the LOGIC directory. For example:
211         ln -s /usr/local/powdersuite/icddcmd.tcl /usr/local/gsas/tcl/icddcmd.tcl
215The widplt script is used to display the FWHM for one or more histograms
216from a .EXP file. It is often convenient to add for reference the expected
217instrumental curves as options to the menu. This can be done by creating a
218file called widplot_<i>name</i>. For example, renaming the
219<tt>example_widplt_BT1</tt> file supplied with the distribution to
220<tt>widplt_BT1</tt> will cause the FWHM curves for the NIST BT-1 instrument
221to be added to the menu of defined FWHM values.
223Creating such a file is easy. To add a entry define the following
224five array elements using a single, unique element name and then append that
225element name to variable datalist.
228    set UVWP(Ge15) {398.5 -343.2  163.0 0}
229    set XY(Ge15) {0 0}
230    set wave(Ge15) 2.0775
231    set lblarr(Ge15) "BT-1 Ge(311) 15'"
232    set ttrange(Ge15) "5 160"
233    lappend datalist Ge15
235Array element UVWP(item) contains the (Gaussian) GU, GV, GW and GP values,
236while XY(item) contains the (Lorentzian) LX and Ly terms. Array element
237wave(item) contains a wavelength, array element lblarr(item) contains
238the text to be shown on the "Plot Contents" menu and ttrange(item)
239defines the range the function is valid.
241Note that this script will
242probably need some work to be used with TOF diffraction.
244<HR>GSAS is written by: Allen C. Larson and Robert B. Von Dreele MS-H805,
245Los Alamos National Laboratory, Los Alamos, NM 87545. Problems, questions
246or kudos concerning GSAS should be sent to Robert B. Von Dreele at <A HREF=""></A>
248<P>The GUI is written by Brian H. Toby of the NIST Center for Neutron Research,
249<A HREF="MAILTO:Brian.Toby@NIST.GOV">Brian.Toby@NIST.GOV</A>.
251<P>GSAS is Copyright, 1984-1997, The Regents of the University of California.
252The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36)
253by the Los Alamos National Laboratory, which is operated by the University
254of California for the U.S. Department of Energy. The U.S. Government is
255licensed to use, reproduce, and distribute this software. Permission is
256granted to the public to copy and use this software without charge, provided
257that this notice and any statement of authorship are reproduced on all
258copies. Neither the Government nor the University makes any warranty, express
259or implied, or assumes any liability or responsibility for the use of this
262<P>The GUI is not subject to copyright. Have fun.
264<P>Brian Toby (<A HREF="MAILTO:Brian.Toby@NIST.GOV">Brian.Toby@NIST.GOV)</A>
266$Revision: 36 $ $Date: 2009-12-04 22:59:18 +0000 (Fri, 04 Dec 2009) $
Note: See TracBrowser for help on using the repository browser.