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

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

liveplot: export to gnuplot; plot I/sigma(I); change title & size of labels; improve tick location; make autoticks standard; expgui: new menu item to create InstParm? file; InstEdit?: bug fixes; remove fprime since not in GSAS anymore; fix 2Theta max bug for CW instruments; updates to doc files

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