source: branches/sandbox/doc/liveplot.html @ 1144

Last change on this file since 1144 was 1144, checked in by toby, 10 years ago

More improvements to magnification regions based on Vince's comments; document changes on web page

  • Property svn:keywords set to Author Date Revision Id
  • Property svn:mime-type set to text/html
File size: 31.7 KB
Line 
1<html>
2<head>
3   <title>EXPGUI -- LIVEPLOT/BKGEDIT</title>
4   <meta name="keywords" content="crystallography, Rietveld, diffraction,
5   GSAS, EXPGUI">
6</HEAD>
7<style>
8A:link {text-decoration:none}
9A:vlink {text-decoration:none}
10</style>
11
12<BODY BGCOLOR="#FFFFFF"
13      topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" 
14      text="#000000" link="#0033ff" vlink="#0033ff" alink="#0033ff">
15
16<?
17   include("/var/www/include/navigation.inc");
18   include("/var/www/include/utility.inc");
19?>
20<blockquote><font face="arial, helvetica, sans-serif">
21
22<TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT>
23<TR><TH><A  Href="expgui.html">EXPGUI top</A> 
24</TH><TH><A Href="excledt.html">Next page<BR>(EXCLEDT)</A>
25</TH><TH><A Href="expguic.html">Previous page</A>
26</TH></TR></TABLE><BR CLEAR=ALL>
27
28<center><h1>
29<HR noshade width="75%" size="2" align="center">
30EXPGUI Utilities (1),<BR>LIVEPLOT and BKGEDIT
31<HR noshade width="75%" size="2" align="center">
32</h1></center>
33This page documents the LIVEPLOT and BKGEDIT utility programs
34in the EXPGUI package.
35LIVEPLOT and BKGEDIT are actually the same program, but perform
36different functions, depending on how they are invoked.
37LIVEPLOT is used to display the quality of the diffraction fit, while
38BKGEDIT is used to fit a background function to fixed background points
39that have been input by the user.
40<P>
41Both LIVEPLOT and BKGEDIT get the current diffraction information
42by running the GSAS TCLDUMP program, if installed, or
43the GSAS HSTDUMP otherwise. The TCLDUMP program has been optimized for use
44with LIVEPLOT and allows LIVEPLOT to offer a number of extra
45options that are not available when HSTDUMP is used. Since TCLDUMP has been
46included in GSAS since April of 2000, the following documentation assumes
47that TCLDUMP is installed.
48
49<a name="liveplot"></a>
50<H3>LIVEPLOT</H3>
51LIVEPLOT is started by pressing the LIVEPLOT button on the toolbar
52or via the Graphs/liveplot menu item.
53<P>
54Some of the features available in LIVEPLOT are:
55<UL>
56<LI>The plot is updated automatically after each refinement run
57<LI>The plot can be "zoomed-in", by clicking on the corners of the
58area to be magnified and "zoomed-out" using the
59right mouse button (Mac: Apple+click)
60<LI>
61The units used for plotting histograms can be selected. Choices are:
62native units (2Theta/TOF/KeV); d-space (A) or Q (A<sup>-1</sup>)
63<LI><IMG SRC="new.gif" alt="New!">
64Regions of the plot can be magnified to show more detail, for example
65  in regions at high Q.
66  <LI>
67The background (fixed plus fitted) can be plotted or can be subtracted.
68<LI>
69Reflection tickmarks can be displayed in a variety of formats
70<LI>
71LIVEPLOT can be coupled to the LOGIC or CMPR programs, so that
72peak positions for an arbitrary unit cell and
73spacegroup can be shown superimposed on the "Rietveld plot."
74<LI>
75Reflection indices (<I>hkl</I> values) can be shown for tickmarks
76<LI>
77The cumulative chi<sup>2</sup> function or
78 (obs-calc)/sigma can be plotted.
79<LI>
80The cursor position can be displayed
81<LI>
82Plots can be <a href="#export">exported to obtain publication-quality
83graphics.</a>
84</UL>
85
86<a name="bkgedit"></a>
87<H3>BKGEDIT</H3>
88<IMG SRC="note.gif" alt="Note!">
89BKGEDIT is used to fit a background function to a set of points
90selected by the user.
91For most refinements, this is not needed,
92as it is possible to simply select a background
93function (I find that the type 1 function,
94shifted Chebyschev polynomials, works well)
95and then refine, adding terms until a good fit is obtained.
96On occasion, poor initial fits are obtained in this manner. This is
97most common in cases where large numbers of peaks are poorly fit. Since
98significant sections of the data are not well fit, the refinement results in
99an unreasonable background function, because this yields better agreement
100with the observed data.
101In these cases,
102it may be best to fix the background to follow a "reasonable" curve in the
103initial stages and then refine the background in the final stages of
104refinement, when a good model has been obtained.
105<P>
106The BKGEDIT program, as shown below, is used to input a set a background
107points via the mouse. The points are then used to determine a type 1
108(Chebyschev) background function that fits the input background points. These
109terms can then be saved in the experiment file creating a background that
110is good enough for the initial stages of refinement and that can be
111refined once the model is adequate for the task.
112<IMG SRC="note.gif" alt="Note!">
113BKGEDIT can be used to fit GSAS background functions 1-6 (though
114for most purposes only type 1 is needed.)
115<P>
116<IMG SRC="b1.gif" align=TEXTOP alt="BKGEDIT screen image">
117<H4>Steps in fitting a background function</H4>
118The BKGEDIT program is started from
119via the Powder/bkgedit menu item or by pressing the
120"Fit Background Graphically" button on the
121<A href="expgui3.html#EditBackground">"Edit Background"</A>
122dialog box (invoked from the "Edit Background" button on the
123<A href="expgui3.html">Histogram pane</A>.)
124toolbar
125or
126<OL>
127<LI><a href="#zoom">Zoom in</a> on the lower intensity section of the
128plot, so that the background is clearly discernible. In some cases, the
129data will need to be handled in sections.
130<LI>Press the "Add" button to add background points.
131Note the cursor changes from cross-hairs to an arrow,
132when the "Add" button is pressed.
133<LI>Move the mouse to the first location
134where a background point will be added and click with the left
135mouse button. A magenta triangle will appear at the location.
136Points can be added in any order. It is best to make sure that the fixed points
137are placed over the entire range of the data, e.g. near the maximum and minimum
138data points in TOF, 2theta, etc.
139<DL><DL>
140Note that it is advisable to place many background points in areas where
141the background is changing rapidly (where the background is most bumpy).
142</DL></DL>
143As background points are entered, they are saved in a file named
144<I>EXPNAM</I><font face="courier">.bkg</font><I>N</I>, where
145<I>EXPNAM</I> is the experiment name and <I>N</I> is the histogram number.
146If BKGEDIT is restarted at some later time, these points are reread.
147<LI>If any points are placed in incorrect positions, they can be deleted by
148pressing the "Delete" button. The mouse cursor changes to a circle. When
149the mouse left clicked, the fixed background point closest to the mouse
150position (which may be outside the zoom range) is deleted.
151<LI>Background points can also be edited by entering numbers into the
152"Background points" area.
153<LI>After enough background points have been entered, the
154"Fit" button turns from gray to black. When pressed, the selected
155background function is fitted
156and the resulting curve is shown as a blue dashed line.
157<DL><DL>
158<LI>It is suggested that you start with relatively few
159terms and add terms and background points as needed.
160Note that the maximum number of increases as
161more background points are entered.
162<LI>Editing the terms manually is possible. The curve is reevaluated as
163changes are made.
164<LI>For the type 3 background function (radial distribution function),
165the R terms are listed separately from the other
166background terms. These R (radii) values must be entered manually and
167are not refined.
168</DL></DL>
169<LI>Once a good background function is determined, it can be saved in the
170experiment file by pressing the "Save in EXP file & Exit" button. This will
171set the background type, and save the terms.
172It will also turn off
173the background refinement flag for the appropriate histogram so that the
174terms are not refined inadvertently.
175</OL>
176
177<P>
178Note that POWPREF must be run at least once before BKGEDIT can be used,
179however, use of
180GENLES before BKGEDIT is optional. If the data range is changed, for example
181by excluding a section of the data at the lower end, or changing tmax (dmin),
182the Chebyschev polynomial terms must change to generate the same
183background values, so both POWPREF and BKGEDIT should be rerun to
184regenerate the Chebyschev terms.
185
186<H4>Why not use fixed background points?</H4>
187I personally feel that
188a refined background function is preferrable to use of a fixed model,
189if at all possible.
190One reason for this is that Rietveld refinements usually achieve better fits
191when the background is optimized. A second reason refining the background
192provides a
193feel for the interaction between background values and displacement
194(thermal) parameters.
195Usually, background and displacement parameters are fairly independent, but
196for some materials, where the high Q (high 2theta) portion of the pattern
197has many completely overlapped peaks, it is impossible to uniquely
198determine where the
199background should be placed, either by refinement or by manual placement.
200Under these circumstances, the background should be refined with the
201displacement parameters fixed at an appropriate value for the material. The
202background should then be fixed for all future refinements
203and the displacement parameters can then be refined. <I>Of course this
204means you have predjudiced the refinement to result in the expected
205average displacement parameter and this </I><B>must</B><I> be noted
206any publication. However, if this is necessary, the data simply do not
207contain sufficient information to independently determine
208background and displacement parameters. Use of fixed background points
209would not demonstrate this and would lead the researcher to a false
210sense of security (or fear, if the values are unreasonable)
211that the displacement parameters actually mean something.</I>
212<P>
213If you still want to use fixed background points, despite this tirade,
214be sure to set the estimated
215error on those points to be 0.0. Use of non-zero estimated errors, can
216result in artificially lowered R-factors and chi-squared values.
217In one test, I was able to lower the R<sub>wp</sub> and
218reduced chi<sup>2</sup> values,
219from the correct values of 0.042 and 3.0, respectively, to misleading
220values of 0.036 and 0.8,
221respectively. [As expected, the R(F<sup>2</sup>) stayed constant at 0.045
222with the different fixed background errors;
223FYI, refining the background caused R(F<sup>2</sup>) to drop to 0.036,
224so I would consider the refined background to be better.]
225<P>
226If the background is so truly irregular that only use of fixed background
227points will do,
228BKGEDIT can be used to generate these fixed background points.
229The file used by BKGEDIT to save these points,
230<I>EXPNAM</I><font face="courier">.bkg</font><I>N</I>,
231will define the background points if read directly into EXPEDT
232by typing "@R" at the initial prompt in EXPEDT:
233<FONT FACE="COURIER"><PRE>
234   Is this the file you wish to use? (?,D,K,Q,R,Y) ><u>@r</u>
235</PRE></FONT>
236prompt and then supplying the name of the file, in response to the next prompt:
237<FONT FACE="COURIER"><PRE>
238   Enter the name of your macro file: <u>GARNET.bkg1</u>
239</PRE></FONT>
240Doing this will cause the background points you entered into BKGEDIT to
241be used in GSAS
242fixed background points. If you do this you do not want to save the
243fitted background function as well, as this would effectively subtract
244double the desired background.
245Note that GSAS allows simultaneous use of
246both fixed and a refined background;
247this is seldom done.
248
249<hr><h2>LIVEPLOT/BKGEDIT Features</h2>
250<B>Plot contents:</B>
251Reflection markers can be placed using the File/Tickmarks menu item
252<IMG SRC="note.gif" alt="Note!">or by pressing the
253"1" key for phase 1, "2" for phase 2,... Note that many attributes
254for reflection markers can be edited using
255Options/<a href="#configTick">Configure Tickmarks</a>
256
257<P>
258<a name="nexthist"></a>
259<IMG SRC="note.gif" alt="Note!">
260If more than one histogram is available to plot, it is possible to cycle
261between the histograms by pressing the "n" or "N" (for next) key.
262<P>
263<a name="zoom"></a>
264<B>Plot zooming:</B>
265When the left (usual) mouse button is pressed, this defines one corner
266of a region to be magnified, as is shown to the right.
267If the mouse is then moved, the diagonal
268corner of this magnification region is defined. When the left mouse button
269is pressed a second time, the selected section of the plot is magnified to
270fill the entire plot.
271<P>
272<img SRC="mzoom.gif" align=RIGHT alt="LIVEPLOT manual zoom">
273Zoom settings are saved.
274If the right mouse button is pressed, the previous zoom setting is used,
275so that the left mouse button is used to "zoom in" and the right mouse
276button is used to "zoom out." Note, on the Macintosh, hold down the
277Apple button while using the [only] mouse button to simulate a right-click.
278
279<P>
280<IMG SRC="note.gif" alt="Note!">
281<a name="manzoom">
282</a>Zoom settings can also be entered manually by pressing the "Z" key. This
283opens a dialog, as is shown to the right, where the x- or y-axis range
284can be specified. Any value that is not specified is set to the maximum
285or minimum for the entire dataset. It is possible to zoom further in using
286the mouse, but to zoom out beyond the manual zoom limits, the "reset" button
287on the manual zoom menu must be used.
288<P>
289<a name="zoomshift"></a>
290To shift the zoom region around,
291the right and left arrow keys can be used to shift the
292region 10 % to the left or right.
293Likewise,
294the up and down arrow keys can be used to shift the region up or down by 10 %.
295Holding down the control key down while pressing these keys increases
296the amount of the shift to 100 %.
297<P>
298<a name="LiveCursor"></a>
299<img SRC="cursor.gif" align=RIGHT alt="LIVEPLOT live cursor">
300<IMG SRC="note.gif" alt="Note!">
301<B>Cursor Display:</B>
302Pressing the "L" (or "l") key, or using the Option/Show Cursor Position
303menu button causes the position of the cursor (mouse position)
304in plot to be shown. The coordinates are listing in a small area below
305the plot. The position display is updated as the mouse is moved. The
306same key, menu button, or the button labeled "Close cursor display" can be
307used to remove the display.
308<P>
309<br clear=all>
310<h2>Features in LIVEPLOT only</h2>
311<img SRC="lz.gif" BORDER=3 align=RIGHT alt="LIVEPLOT Screen snapshot">
312<a name="Cchi2"></a>
313<B>The cumulative chi<sup>2</sup></B>
314function was first suggested by
315Bill David as a way to see which reflections have the greatest influence on
316chi<sup>2</sup> [W.I.F. David, <I>Accuracy in Powder Diffraction-III</I>, 2001].
317It is defined for point j as
318<IMG SRC="cchi2.gif" alt="equation for cumulative chi2 function" ALIGN=TOP>
319where y<sub>obs,i</sub> and y<sub>calc,i</sub> are the observed and computed
320data points and sigma<sub>i</sub> is the expected error. Thus, the statistically
321expected value for
322[(y<sub>obs,i</sub>-y<sub>calc,i</sub>)/sigma<sub>i</sub>]<sup>2</sup> is 1
323and this function should rise in a smooth line if all points are fitted as
324statistically expected.
325This can be displayed using the "Cumulative Chi2" item in the Options menu.
326<P>
327In the plot to the right, the cumulative chi<sup>2</sup> function is shown in
328purple. Note that first peak is not well fit, but the low angle "shoulder" is
329as important as the peak misfitting, with respect to the chi<sup>2</sup>.
330<P>
331<a name="OmCoS"></a>
332<B>Plotting (Obs-Calc)/Sigma</B>
333A more traditional way to see the data points that have the worst agreement
334between observation and model is to plot the difference between these values,
335but weighted by the reciprocal of the expected uncertainty, <I>e.g.</I> 
336(y<sub>obs,i</sub> - y<sub>calc,i</sub>)/sigma<sub>i</sub>, as defined above.
337The standard plot of (y<sub>obs,i</sub> - y<sub>calc,i</sub>) over-emphasizes
338minor discrepancies in strong peaks while being insensitive to very
339significant discrepancies in weaker peaks, so the
340(y<sub>obs,i</sub> - y<sub>calc,i</sub>)/sigma<sub>i</sub> is the more valuable
341plot.
342This can be displayed using the "(obs-calc)/sigma" item in the Options menu.
343
344<P>
345<br clear=all>
346<a name="hkl">
347</a><img SRC="lind.gif" BORDER=3 align=RIGHT alt="LIVEPLOT Screen snapshot">
348<B>Reflection indices</B>
349are be displayed by pressing "H" or "h" while the
350mouse is near a reflection (holding the shift key while
351pressing the left mouse button also works, but sometimes interferes with the
352zoom feature).
353Pressing "A" or "a" shows all reflections in the displayed region.
354The indices are shown
355on the screen for phases with tickmarks (as shown to the right).
356Indices are listed in the "Separate window for <I>hkl</I> labels"
357(as seen below) for all phases, regardless of the tickmark settings.
358Displayed indices will remain on the screen for a preset time and
359then will be deleted; alternately, pressing "D" or "d" deletes the hkl labels.
360Several aspects of reflection labeling can be customized,
361see the <a href="#hklOpts">HKL labeling options</a> for further information.
362
363<img SRC="lind1.gif" align=LEFT alt="LIVEPLOT Screen snapshot">
364
365<br clear=all>
366<P>
367<a name="magnification"></a>
368<B>Plot Magnification</B>
369Sections of the plot can be magnified through use of options in the
370Magnification menu or by using control-1 through control-9.
371<img SRC="magreg.png" align=RIGHT alt="LIVEPLOT Screen snapshot">
372<UL>
373<LI>The Magnification/Add region menu item requests a location in the
374  pattern (2Theta/TOF/KeV/d-space/Q) and a multiplier. Data where the
375  scan variable (2Theta...) is of that value or higher, up to the
376  next region or end of the pattern are multiplied by that factor. The
377  factor, must be >0.
378<LI>Magnification/Edit regions brings up a menu (see below) where the previously
379 defined regions can be changed. The region boundaries can be moved
380  and the multiplier values can be changed. If a multiplier is set to
381  zero (or negative) that region is removed.
382<LI>Magnification/Clear deletes all previously defined regions
383<LI>Pressing control plus a positive digit (1,2,3,...9) also adds a
384  magnification region. The digit determines the magnification
385  multiplier. Data where the
386  scan variable (2Theta...) from the mouse position up to the
387  next region or end of the pattern are multiplied by that factor.
388<img SRC="editreg.png" align=RIGHT alt="LIVEPLOT menu">
389</UL>
390 <br clear=all>
391<P>
392<a name="export"></a>
393<B>Export plot options</B>
394<UL><LI>
395The plot can be exported to
396<A HREF="http://plasma-gate.weizmann.ac.il/Grace/">Grace</A>, WYSIWYG 2D plotting tool for X-Windows
397that produces publication-quality graphics. Many UNIX users know
398this program under a previous name, xmgr.
399The export is implemented
400by producing an ASCII file with instructions that
401creates a plot with similar formatting to what appears on the
402screen in LIVEPLOT/BKGEDIT. However, the output quality from
403Grace is much higher quality. Further, Grace
404can be used to enhanced and annotate the plot further.
405<LI>
406For use in many other graphics programs, LIVEPLOT will produce a
407"comma separated variable" data file with the data displayed on the screen.
408The user will need to read this in,
409set line styles and scaling, etc., but this does provide an option for
410generating high-quality graphics for presentations and publications.
411<LI>LIVEPLOT will produce PostScript versions of the plot on the screen,
412but the quality is rather low (this is a limitation of the BLT graphics
413package).
414</UL>
415
416<hr><h2>LIVEPLOT/BKGEDIT Keyboard Shortcuts</h2>
417Frequent users of LIVEPLOT & BKGEDIT will find that many useful actions
418can be performed very easily by learning the following keystroke commands.
419Note that either uppercase or lowercase letters may be used.
420<DL>
421<DT><a href="#hkl">H</a>
422<DD>Labels reflections near cursor
423<DT><a href="#hkl">A</a>
424<DD>Labels all reflections
425<DT><a href="#hkl">D</a>
426<DD>Deletes reflection labels
427<DT><a href="#manzoom">Z</a>
428<DD>Specify zoom range manually
429<DT><a href="#tickmarks">1, 2,...</a>
430<DD>Displays reflection positions (tickmarks) for histogram 1, 2 etc.
431<DT><a href="#nexthist">N</a>
432<DD>Loads next histogram
433<DT><a href="#LiveCursor">L</a>
434<DD>Turns on display of cursor position
435<DT><a href="#zoomshift">arrow keys</A>
436<DD>Moves zoom region around in plot
437<DT><a href="#mag">Control+1, 2,...</a>
438<DD>Defines a <a href="#magnification">magnification region</A> at the
439  cursor location.
440</DL>
441
442<hr><h2>LIVEPLOT/BKGEDIT Menu Contents</h2>
443A few of these options are omitted from BKGEDIT.
444<img SRC="lm1.gif" align=RIGHT alt="LIVEPLOT Menu">
445<H3>File Menu</H3>
446<DL><DL>
447<a name="tickmarks"></a>
448<DT>Tickmarks
449<DD>Checkbuttons are provided for each phase to determine if tick marks
450will be shown.
451<IMG SRC="note.gif" alt="Note!">
452Tickmarks can also be
453toggled by pressing the
454"1" key for phase 1, "2" for phase 2,...
455Also see the Options/<a href="#configTick">Configure Tickmarks</a>
456menu item for information
457on tickmarks.
458<DT>Histogram
459<DD>This allows a histogram to be selected to be loaded
460<DL><DL>
461<IMG SRC="note.gif" alt="Note!">
462It is also possible to advance
463between the histograms by pressing the "n" or "N" (for next) key.
464</DL></DL>
465<DT>Update Plot
466<DD>The causes LIVEPLOT to read read the current histogram again from
467the datafile
468<DT>Export Plot
469<DD>This offers options for exporting the plot in multiple formats.
470I am hoping to add more export formats eventually.
471<DL><DL>
472<DT>to PostScript
473<DD>Creates a <I>low quality</I> PostScript file containing the LIVEPLOT
474output. See the Options/"Set PS output" button for where the file is created.
475Most unix systems are capable or printing PostScript files.
476On Windows, a program such ghostview may be needed to translate the
477PostScript to a format that can be viewed or printed.
478<A name="grace">
479<DT>to Grace
480<IMG SRC="note.gif" alt="Note!">
481<DD>Plots can be exported to
482<A HREF="http://plasma-gate.weizmann.ac.il/Grace/">Grace</A>, WYSIWYG 2D plotting tool for X-Windows
483that produces publication-quality graphics.
484After the plot is exported, it can be further
485enhanced and annotated in grace.
486</DL></DL>
487<DT>Quit
488<DD>Exits BKGEDIT/LIVEPLOT.
489</DL></DL>
490<br clear=all>
491<img SRC="lm2.gif" align=RIGHT alt="LIVEPLOT Menu">
492<H3>Options Menu</H3>
493<DL><DL>
494<a name="configTick"></a>
495<DT>Configure Tickmarks<DD>
496This submenu provides options that controls how tickmarks are displayed.
497<P><DL><DL>
498<DT>Auto locate<DD>
499When this option is selected, tickmarks are placed in different positions
500for each phase, automatically, similar to how tickmarks are shown in POWPLOT.
501<DT>Manual Placement<DD>
502Tickmarks are drawn at specific heights that can be set for each phase
503(see below). The default
504is for lines to be draw from "-Inf" to "Inf", which creates lines from the
505bottom to the top of the plot.
506<DT>Label by name
507<IMG SRC="note.gif" alt="Note!">
508<DD>
509By default, a label "Phase1",... is displayed in the legend when tickmarks
510for that phase are displayed. When this button is pressed, the first
51120 characters of each phase name (phase title) are used instead. This
512label can be edited, as described in the next paragraph.
513<DT>Phase <I>n</I> opts<DD>
514The options for each phase allow the line to be changed between
515solid and dashed, color of the line can be specified and
516the vertical placement of the tickmarks can be specified. The
517"Show Reflections" flag,
518set in the File/Tickmarks menu,
519as well as the label used for the phase can also be changed here.
520
521</DL></DL>
522<P>
523<DT>Obs Symbol (Symbol Type)
524<DD>This brings up a menu where the symbol type and size for the
525observed data points (and for BKGEDIT, the fixed background points)
526can be selected.
527<P>
528<DT>Symbol Color
529<DD>The colors for all the displayed lines and symbols can be changed here.
530<P>
531<DT>X units
532<DD>The x units can be selected here. The choices are
533"as collected" (2Theta/TOF/KeV), d-space (A) or Q (A<sup>-1</sup>)
534<P>
535<DT>Y units
536<DD>The intensity values can be normalized by the incident spectrum
537(for energy dispersive methods).
538</DL></DL>
539<br clear=all>
540<img SRC="lm3.gif" align=RIGHT alt="LIVEPLOT menu">
541<a name="hklOpts"></a>
542<DL><DL>
543<DT>HKL labeling
544<DD>This brings up a menu that selects
545<UL><LI>Erase time:
546how long in seconds that <I>hkl</I> values are shown
547before they are erased (0 means that they are not erased),
548<LI>Label size: the size of the
549labels in pixels,
550<LI>Search Region: only reflections within this number of pixels of the mouse,
551when the "h" key is pressed (if any) are labeled,
552<LI>Separate window: when this
553option is selected, reflection labels are shown in a text window
554</UL>
555<DT>Subtract background
556<DD>The background is always shown, even when subtracted
557<DT>Include legend
558<DD>The legend is the optional box in the upper left that defines the
559plot entries
560<DT>Show [Hide] Cursor Position
561<DD>This turns <a href="#LiveCursor">Cursor position display</a> on and off.
562<DT>Set PS output
563<DD>For UNIX this allows the file to be sent directly to a printer
564or can be saved in a file. For Windows, a file must be written.
565<DT>Set screen font
566<DD>This option is used to control the font used for menus, graphics and
567other aspects of windows.
568<DT>Raise on update
569<DD>This causes the plot to be placed on top of other windows, if partially
570obscured, when the plot is updated. At this time, this option does not
571work in Windows-NT and -2000.
572<DT>Cumulative Chi2
573<DD>The causes the Cumulative chi<sup>2</sup> function to be displayed
574(as <a href="#Cchi2">presented above</a>).
575<DT>(obs-calc)/sigma
576<DD>The causes the (y<sub>obs</sub>-y<sub>calc</sub>)/sigma
577values to be displayed
578(as <a href="#OmCoS">presented above</a>).
579
580<DT>Save Options
581<DD>Causes many of the options set in this menu to be saved in the
582<FONT FACE="COURIER">.gsas_config</FONT> 
583(or <FONT FACE="COURIER">c:\gsas.config</FONT>) file.
584</DL></DL>
585<br clear=all>
586
587<P>
588<hr><H2>Customization of LIVEPLOT & BKGEDIT</H2><A NAME="customize"></A>
589The <FONT FACE="COURIER">localconfig</FONT> and
590<FONT FACE="COURIER">.gsas_config</FONT> 
591(or <FONT FACE="COURIER">c:\gsas.config</FONT>)
592files are read, if present.
593The following variables control how LIVEPLOT, and in most cases BKGEDIT,
594function and can be
595customized by changing their values in the
596<FONT FACE="COURIER">localconfig</FONT> and
597<FONT FACE="COURIER">.gsas_config</FONT> 
598(or <FONT FACE="COURIER">c:\gsas.config</FONT>)
599files.
600<DL><DL>
601<DT><FONT FACE="COURIER">peakinfo(flag<i>n</i>)</FONT><DD>
602These variables define if peak positions will be shown
603for reflections in phase "<i>n</i>". Reflections will be shown if
604the value is non-zero.
605
606<DT><FONT FACE="COURIER">peakinfo(color<i>n</i>)</FONT><DD>
607These variables define the default colors for
608reflections in phase "<i>n</i>"
609
610<DT><FONT FACE="COURIER">peakinfo(dashes<i>n</i>)</FONT><DD>
611These variables define if peaks will be dashed for
612reflections in phase "<i>n</i>" (UNIX only). Lines will be dashed if
613the value is non-zero.
614
615<DT><FONT FACE="COURIER">peakinfo(min<i>n</i>) and peakinfo(max<i>n</i>)</FONT><DD>
616These variables dictate the placement vertical position for reflection
617markers, when manually placed (see expgui(autotick), below). To draw
618to the edge of the screen, use -Inf and Inf.
619</DL></DL>
620
621The following variables are written to
622<font face="courier">.gsas_config</font> 
623(or <FONT FACE="COURIER">c:\gsas.config</FONT>)
624when
625"Save Options" is used. These variables are all set from the GUI and therefore
626do not need to be edited manually.
627
628<DL><DL>
629<DT><FONT FACE="COURIER">graph(printout)</FONT><DD>
630This is set to 1 if PostScript files
631will be printed and 0 if they will be written to disk (for Windows all
632files should be written to disk).
633
634<DT><FONT FACE="COURIER">graph(outname)</FONT><DD>
635This is the default for the file name used
636when PostScript files will be written to disk.
637
638<DT><FONT FACE="COURIER">graph(outcmd)</FONT><DD>
639This is the default for the command used
640to print PostScript files (Unix only).
641
642<DT><FONT FACE="COURIER">graph(legend)</FONT><DD>
643Sets the default value for display of the legend in LIVEPLOT and WIDPLT.
644
645<DT><FONT FACE="COURIER">graph(autoraise)</FONT><DD>
646This option shows up in the options menu item as "Raise on update."
647When set to non-zero, the LIVEPLOT window is raised
648(placed on top of any other overlapping) windows
649each time it is updated.
650This option does not seem to work in Windows-NT, but this may depend on
651the version of Tcl/Tk.
652
653<DT><FONT FACE="COURIER">peakinfo(obssym)</FONT><DD>
654Symbol for observed data points. Valid choices are square, circle, diamond,
655plus, cross, splus and scross.
656
657<DT><FONT FACE="COURIER">peakinfo(obssize)</FONT><DD>
658Size for the symbol for observed data points. A value of 1 corresponds to about 1/8 inch
659(about 3 mm).
660
661<DT><FONT FACE="COURIER">expgui(pixelregion)</FONT><DD>
662When hkl values are loaded (using tcldump) and reflections are labeled, reflections
663can be labeled using a Shift-Left-Mouse click. All labeled reflections within expgui(pixelregion)
664pixels of the mouse position are assumed to be overlapped and are labeled.
665
666<DT><FONT FACE="COURIER">expgui(fadetime)</FONT><DD>
667The time in seconds before reflection labels are removed. A value of zero means that reflections
668must be deleted manually (Shift-Right-Mouse).
669(Mac: Shift+Apple+click)
670<DT><FONT FACE="COURIER">expgui(lblfontsize)</FONT><DD>
671A size for reflections labels in pixels.
672
673<DT><FONT FACE="COURIER">expgui(hklbox)</FONT><DD>
674If this variable is non-zero, reflection indices are shown in a box.
675
676<DT><FONT FACE="COURIER">expgui(autotick)</FONT><DD>
677If this variable is non-zero, reflection markers positions are
678set automatically.
679</DL></DL>
680<P>
681<hr><H2>Interfacing External Programs</H2>
682<B>Combining LIVEPLOT with CMPR & LOGIC</B>
683If you have the
684<A HREF="http://www.ncnr.nist.gov/programs/crystallography/software/cmpr">
685CMPR/LOGIC</A>
686programs installed on your computer, you can use superimpose on the
687GSAS results the peaks for an arbitrary unit cell.
688If you have an old version of the
689<A HREF="http://www.icdd.com/products/overview.htm">
690ICDD-JCPDS PDF-2 powder diffraction database</a>,
691(when distributed as an AIDS*83 format flat file)
692you can also superimpose entries from this database on the
693GSAS results displayed in LIVEPLOT.
694<P>
695When the CMPR/LOGIC program is installed in the same location
696as the GSAS package (<i>e.g.</i> 
697<font face="courier">/home/gsas</font> & 
698<font face="courier">/home/cmpr</font>
699or <font face="courier">C:\DIFRC\GSAS</font> & 
700<font face="courier">C:\DIFRC\CMPR</font>) or if
701the CMPR/LOGIC programs are loaded into standard locations
702(<font face="courier">/usr/local/cmpr</font> or
703<font face="courier">~/cmpr</font> for Unix and Mac OSX or
704<font face="courier">c:\cmpr</font> or
705<font face="courier">c:\Program files\cmpr</font> for Windows),
706the LIVEPLOT program will locate both programs and add an extra menu labeled
707"Peak Gen" to the menu bar. If the CMPR program is not located automatically,
708you may customize this location by specifying a value for
709Tcl/Tk variable cmprdir by including a line such as this:
710<PRE>
711          set cmprdir C:/ncnrpkg/cmpr
712</PRE>
713 in the <FONT FACE="COURIER">localconfig</FONT>,
714<FONT FACE="COURIER">.gsas_config</FONT> 
715or <FONT FACE="COURIER">c:\gsas.config</FONT> files
716[note that forward slashes ("/") should be used here, even for windows.]
717
718<P>
719The "Peak Gen" menu will have either or both of two entries
720"Display a cell" and "Plot ICDD Entry", depending on what
721software is located. The
722"Display a cell" option produces a window similar to the
723<A href="http://www.ncnr.nist.gov/xtal/software/cmpr/doc/cmprdoc.html#editcell">
724Edit Cell feature in CMPR</A>
725where allowed reflection positions are displayed for a set of unit cell
726parameters and optionally a space group or extinction conditions.
727The "Plot ICDD Entry" provides a window similar to the
728<A href="http://www.ncnr.nist.gov/xtal/software/cmpr/doc/cmprdoc.html#editcell">
729LOGIC interface in CMPR</A>
730where ICDD searches may be conducted. From the resulting list of matches,
731selected entries may be displayed.
732<P>
733Note that these routines display peak positions in units of 2Theta, Q or
734d-space. If you are using TOF or EDS data, you must select Q or d-space
735display in LIVEPLOT. If you are using 2Theta, you must supply the correct
736wavelength.
737<P>
738Note that a version of both EXPGUI and CMPR/LOGIC from November 2003 or later
739must be used for these features to work.
740
741</UL>
742<hr>
743<TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT>
744<TR><TH><A  Href="expgui.html">EXPGUI top</A>
745</TH><TH><A Href="excledt.html">Next page<BR>(EXCLEDT)</A>
746</TH><TH><A Href="expguic.html">Previous page</A>
747</TH></TR></TABLE>
748
749<P><font size=-1><A HREF="MAILTO:crystal@NIST.gov?subject=WWW page <?=$PHP_SELF?>">Comments, corrections or questions: crystal@NIST.gov</A></font><BR>
750<font size=-1><? lastmod(); ?> </font>
751<br>
752$Revision: 1144 $ $Date: 2011-06-03 02:42:48 +0000 (Fri, 03 Jun 2011) $
753</blockquote>
754</body>
755</html>
Note: See TracBrowser for help on using the repository browser.