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

Last change on this file since 1250 was 1223, checked in by toby, 9 years ago

update refs to .xor.aps

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