source: trunk/doc/liveplot.html @ 930

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

rcs:* properties removed

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