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> |
---|
8 | A:link {text-decoration:none} |
---|
9 | A: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"> |
---|
30 | EXPGUI Utilities (1),<BR>LIVEPLOT and BKGEDIT |
---|
31 | <HR noshade width="75%" size="2" align="center"> |
---|
32 | </h1></center> |
---|
33 | This page documents the LIVEPLOT and BKGEDIT utility programs |
---|
34 | in the EXPGUI package. |
---|
35 | LIVEPLOT and BKGEDIT are actually the same program, but perform |
---|
36 | different functions, depending on how they are invoked. |
---|
37 | LIVEPLOT is used to display the quality of the diffraction fit, while |
---|
38 | BKGEDIT is used to fit a background function to fixed background points |
---|
39 | that have been input by the user. |
---|
40 | <P> |
---|
41 | Both LIVEPLOT and BKGEDIT get the current diffraction information |
---|
42 | by running the GSAS TCLDUMP program. (In GSAS/EXPGUI before 2001, the |
---|
43 | GSAS HSTDUMP program was used, which was less powerful. This code has |
---|
44 | not been removed, but will not be used if TCLDUMP is present.) |
---|
45 | |
---|
46 | <a name="liveplot"></a> |
---|
47 | <H3>LIVEPLOT</H3> |
---|
48 | LIVEPLOT is started by pressing the LIVEPLOT button on the toolbar |
---|
49 | or via the Graphs/liveplot menu item. |
---|
50 | <P> |
---|
51 | Some of the features available in LIVEPLOT are: |
---|
52 | <UL> |
---|
53 | <LI><IMG SRC="new.gif" alt="New!"> |
---|
54 | Regions 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!"> |
---|
57 | Plots can be <a href="#export">exported to obtain publication-quality |
---|
58 | graphics </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 |
---|
62 | area to be magnified and "zoomed-out" using the |
---|
63 | right mouse button (Mac: Apple+click) |
---|
64 | <LI> |
---|
65 | The units used for plotting histograms can be selected. Choices are: |
---|
66 | native 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. |
---|
69 | <LI> |
---|
70 | Reflection tickmarks can be displayed in a variety of formats |
---|
71 | <LI> |
---|
72 | LIVEPLOT can be coupled to the LOGIC or CMPR programs, so that |
---|
73 | peak positions for an arbitrary unit cell and |
---|
74 | spacegroup can be shown superimposed on the "Rietveld plot." |
---|
75 | <LI> |
---|
76 | Reflection indices (<I>hkl</I> values) can be shown for tickmarks |
---|
77 | <LI> |
---|
78 | The cumulative chi<sup>2</sup> function or |
---|
79 | (obs-calc)/sigma can be plotted. |
---|
80 | <LI> |
---|
81 | The cursor position can be displayed |
---|
82 | </UL> |
---|
83 | |
---|
84 | <a name="bkgedit"></a> |
---|
85 | <H3>BKGEDIT</H3> |
---|
86 | <IMG SRC="note.gif" alt="Note!"> |
---|
87 | BKGEDIT is used to fit a background function to a set of points |
---|
88 | selected by the user. |
---|
89 | For most refinements, this is not needed, |
---|
90 | as it is possible to simply select a background |
---|
91 | function (I find that the type 1 function, |
---|
92 | shifted Chebyschev polynomials, works well) |
---|
93 | and then refine, adding terms until a good fit is obtained. |
---|
94 | On occasion, poor initial fits are obtained in this manner. This is |
---|
95 | most common in cases where large numbers of peaks are poorly fit. Since |
---|
96 | significant sections of the data are not well fit, the refinement results in |
---|
97 | an unreasonable background function, because this yields better agreement |
---|
98 | with the observed data. |
---|
99 | In these cases, |
---|
100 | it may be best to fix the background to follow a "reasonable" curve in the |
---|
101 | initial stages and then refine the background in the final stages of |
---|
102 | refinement, when a good model has been obtained. |
---|
103 | <P> |
---|
104 | The BKGEDIT program, as shown below, is used to input a set a background |
---|
105 | points via the mouse. The points are then used to determine a type 1 |
---|
106 | (Chebyschev) background function that fits the input background points. These |
---|
107 | terms can then be saved in the experiment file creating a background that |
---|
108 | is good enough for the initial stages of refinement and that can be |
---|
109 | refined once the model is adequate for the task. |
---|
110 | <IMG SRC="note.gif" alt="Note!"> |
---|
111 | BKGEDIT can be used to fit GSAS background functions 1-6 (though |
---|
112 | for most purposes only type 1 is needed.) |
---|
113 | <P> |
---|
114 | <IMG SRC="b1.gif" align=TEXTOP alt="BKGEDIT screen image"> |
---|
115 | <H4>Steps in fitting a background function</H4> |
---|
116 | The BKGEDIT program is started from |
---|
117 | via 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> |
---|
120 | dialog box (invoked from the "Edit Background" button on the |
---|
121 | <A href="expgui3.html">Histogram pane</A>.) |
---|
122 | toolbar |
---|
123 | or |
---|
124 | <OL> |
---|
125 | <LI><a href="#zoom">Zoom in</a> on the lower intensity section of the |
---|
126 | plot, so that the background is clearly discernible. In some cases, the |
---|
127 | data will need to be handled in sections. |
---|
128 | <LI>Press the "Add" button to add background points. |
---|
129 | Note the cursor changes from cross-hairs to an arrow, |
---|
130 | when the "Add" button is pressed. |
---|
131 | <LI>Move the mouse to the first location |
---|
132 | where a background point will be added and click with the left |
---|
133 | mouse button. A magenta triangle will appear at the location. |
---|
134 | Points can be added in any order. It is best to make sure that the fixed points |
---|
135 | are placed over the entire range of the data, e.g. near the maximum and minimum |
---|
136 | data points in TOF, 2theta, etc. |
---|
137 | <DL><DL> |
---|
138 | Note that it is advisable to place many background points in areas where |
---|
139 | the background is changing rapidly (where the background is most bumpy). |
---|
140 | </DL></DL> |
---|
141 | As 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. |
---|
144 | If 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 |
---|
146 | pressing the "Delete" button. The mouse cursor changes to a circle. When |
---|
147 | the mouse left clicked, the fixed background point closest to the mouse |
---|
148 | position (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 |
---|
153 | background function is fitted |
---|
154 | and the resulting curve is shown as a blue dashed line. |
---|
155 | <DL><DL> |
---|
156 | <LI>It is suggested that you start with relatively few |
---|
157 | terms and add terms and background points as needed. |
---|
158 | Note that the maximum number of increases as |
---|
159 | more background points are entered. |
---|
160 | <LI>Editing the terms manually is possible. The curve is reevaluated as |
---|
161 | changes are made. |
---|
162 | <LI>For the type 3 background function (radial distribution function), |
---|
163 | the R terms are listed separately from the other |
---|
164 | background terms. These R (radii) values must be entered manually and |
---|
165 | are not refined. |
---|
166 | </DL></DL> |
---|
167 | <LI>Once a good background function is determined, it can be saved in the |
---|
168 | experiment file by pressing the "Save in EXP file & Exit" button. This will |
---|
169 | set the background type, and save the terms. |
---|
170 | It will also turn off |
---|
171 | the background refinement flag for the appropriate histogram so that the |
---|
172 | terms are not refined inadvertently. |
---|
173 | </OL> |
---|
174 | |
---|
175 | <P> |
---|
176 | Note that POWPREF must be run at least once before BKGEDIT can be used, |
---|
177 | however, use of |
---|
178 | GENLES before BKGEDIT is optional. If the data range is changed, for example |
---|
179 | by excluding a section of the data at the lower end, or changing tmax (dmin), |
---|
180 | the Chebyschev polynomial terms must change to generate the same |
---|
181 | background values, so both POWPREF and BKGEDIT should be rerun to |
---|
182 | regenerate the Chebyschev terms. |
---|
183 | |
---|
184 | <H4>Why not use fixed background points?</H4> |
---|
185 | I personally feel that |
---|
186 | a refined background function is preferrable to use of a fixed model, |
---|
187 | if at all possible. |
---|
188 | One reason for this is that Rietveld refinements usually achieve better fits |
---|
189 | when the background is optimized. A second reason refining the background |
---|
190 | provides a |
---|
191 | feel for the interaction between background values and displacement |
---|
192 | (thermal) parameters. |
---|
193 | Usually, background and displacement parameters are fairly independent, but |
---|
194 | for some materials, where the high Q (high 2theta) portion of the pattern |
---|
195 | has many completely overlapped peaks, it is impossible to uniquely |
---|
196 | determine where the |
---|
197 | background should be placed, either by refinement or by manual placement. |
---|
198 | Under these circumstances, the background should be refined with the |
---|
199 | displacement parameters fixed at an appropriate value for the material. The |
---|
200 | background should then be fixed for all future refinements |
---|
201 | and the displacement parameters can then be refined. <I>Of course this |
---|
202 | means you have predjudiced the refinement to result in the expected |
---|
203 | average displacement parameter and this </I><B>must</B><I> be noted |
---|
204 | any publication. However, if this is necessary, the data simply do not |
---|
205 | contain sufficient information to independently determine |
---|
206 | background and displacement parameters. Use of fixed background points |
---|
207 | would not demonstrate this and would lead the researcher to a false |
---|
208 | sense of security (or fear, if the values are unreasonable) |
---|
209 | that the displacement parameters actually mean something.</I> |
---|
210 | <P> |
---|
211 | If you still want to use fixed background points, despite this tirade, |
---|
212 | be sure to set the estimated |
---|
213 | error on those points to be 0.0. Use of non-zero estimated errors, can |
---|
214 | result in artificially lowered R-factors and chi-squared values. |
---|
215 | In one test, I was able to lower the R<sub>wp</sub> and |
---|
216 | reduced chi<sup>2</sup> values, |
---|
217 | from the correct values of 0.042 and 3.0, respectively, to misleading |
---|
218 | values of 0.036 and 0.8, |
---|
219 | respectively. [As expected, the R(F<sup>2</sup>) stayed constant at 0.045 |
---|
220 | with the different fixed background errors; |
---|
221 | FYI, refining the background caused R(F<sup>2</sup>) to drop to 0.036, |
---|
222 | so I would consider the refined background to be better.] |
---|
223 | <P> |
---|
224 | If the background is so truly irregular that only use of fixed background |
---|
225 | points will do, |
---|
226 | BKGEDIT can be used to generate these fixed background points. |
---|
227 | The file used by BKGEDIT to save these points, |
---|
228 | <I>EXPNAM</I><font face="courier">.bkg</font><I>N</I>, |
---|
229 | will define the background points if read directly into EXPEDT |
---|
230 | by typing "@R" at the initial prompt in EXPEDT: |
---|
231 | <FONT FACE="COURIER"><PRE> |
---|
232 | Is this the file you wish to use? (?,D,K,Q,R,Y) ><u>@r</u> |
---|
233 | </PRE></FONT> |
---|
234 | prompt and then supplying the name of the file, in response to the next prompt: |
---|
235 | <FONT FACE="COURIER"><PRE> |
---|
236 | Enter the name of your macro file: <u>GARNET.bkg1</u> |
---|
237 | </PRE></FONT> |
---|
238 | Doing this will cause the background points you entered into BKGEDIT to |
---|
239 | be used in GSAS |
---|
240 | fixed background points. If you do this you do not want to save the |
---|
241 | fitted background function as well, as this would effectively subtract |
---|
242 | double the desired background. |
---|
243 | Note that GSAS allows simultaneous use of |
---|
244 | both fixed and a refined background; |
---|
245 | this is seldom done. |
---|
246 | |
---|
247 | <hr><h2>LIVEPLOT/BKGEDIT Features</h2> |
---|
248 | <B>Plot contents:</B> |
---|
249 | Reflection 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 |
---|
252 | for reflection markers can be edited using |
---|
253 | Options/<a href="#configTick">Configure Tickmarks</a> |
---|
254 | |
---|
255 | <P> |
---|
256 | <a name="nexthist"></a> |
---|
257 | <IMG SRC="note.gif" alt="Note!"> |
---|
258 | If more than one histogram is available to plot, it is possible to cycle |
---|
259 | between the histograms by pressing the "n" or "N" (for next) key. |
---|
260 | <P> |
---|
261 | <a name="zoom"></a> |
---|
262 | <B>Plot zooming:</B> |
---|
263 | When the left (usual) mouse button is pressed, this defines one corner |
---|
264 | of a region to be magnified, as is shown to the right. |
---|
265 | If the mouse is then moved, the diagonal |
---|
266 | corner of this magnification region is defined. When the left mouse button |
---|
267 | is pressed a second time, the selected section of the plot is magnified to |
---|
268 | fill the entire plot. |
---|
269 | <P> |
---|
270 | <img SRC="mzoom.gif" align=RIGHT alt="LIVEPLOT manual zoom"> |
---|
271 | Zoom settings are saved. |
---|
272 | If the right mouse button is pressed, the previous zoom setting is used, |
---|
273 | so that the left mouse button is used to "zoom in" and the right mouse |
---|
274 | button is used to "zoom out." Note, on the Macintosh, hold down the |
---|
275 | Apple button while using the [only] mouse button to simulate a right-click. |
---|
276 | |
---|
277 | <P> |
---|
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 |
---|
281 | opens a dialog, as is shown to the right, where the x- or y-axis range |
---|
282 | can be specified. Any value that is not specified is set to the maximum |
---|
283 | or minimum for the entire dataset. It is possible to zoom further in using |
---|
284 | the mouse, but to zoom out beyond the manual zoom limits, the "reset" button |
---|
285 | on the manual zoom menu must be used. |
---|
286 | <P> |
---|
287 | <a name="zoomshift"></a> |
---|
288 | To shift the zoom region around, |
---|
289 | the right and left arrow keys can be used to shift the |
---|
290 | region 10 % to the left or right. |
---|
291 | Likewise, |
---|
292 | the up and down arrow keys can be used to shift the region up or down by 10 %. |
---|
293 | Holding down the control key down while pressing these keys increases |
---|
294 | the 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> |
---|
300 | Pressing the "L" (or "l") key, or using the Option/Show Cursor Position |
---|
301 | menu button causes the position of the cursor (mouse position) |
---|
302 | in plot to be shown. The coordinates are listing in a small area below |
---|
303 | the plot. The position display is updated as the mouse is moved. The |
---|
304 | same key, menu button, or the button labeled "Close cursor display" can be |
---|
305 | used 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> |
---|
312 | function was first suggested by |
---|
313 | Bill David as a way to see which reflections have the greatest influence on |
---|
314 | chi<sup>2</sup> [W.I.F. David, <I>Accuracy in Powder Diffraction-III</I>, 2001]. |
---|
315 | It is defined for point j as |
---|
316 | <IMG SRC="cchi2.gif" alt="equation for cumulative chi2 function" ALIGN=TOP> |
---|
317 | where y<sub>obs,i</sub> and y<sub>calc,i</sub> are the observed and computed |
---|
318 | data points and sigma<sub>i</sub> is the expected error. Thus, the statistically |
---|
319 | expected value for |
---|
320 | [(y<sub>obs,i</sub>-y<sub>calc,i</sub>)/sigma<sub>i</sub>]<sup>2</sup> is 1 |
---|
321 | and this function should rise in a smooth line if all points are fitted as |
---|
322 | statistically expected. |
---|
323 | This can be displayed using the "Cumulative Chi2" item in the Options menu. |
---|
324 | <P> |
---|
325 | In the plot to the right, the cumulative chi<sup>2</sup> function is shown in |
---|
326 | purple. Note that first peak is not well fit, but the low angle "shoulder" is |
---|
327 | as 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> |
---|
331 | A more traditional way to see the data points that have the worst agreement |
---|
332 | between observation and model is to plot the difference between these values, |
---|
333 | but 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. |
---|
335 | The standard plot of (y<sub>obs,i</sub> - y<sub>calc,i</sub>) over-emphasizes |
---|
336 | minor discrepancies in strong peaks while being insensitive to very |
---|
337 | significant 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 |
---|
339 | plot. |
---|
340 | This 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> |
---|
347 | are be displayed by pressing "H" or "h" while the |
---|
348 | mouse is near a reflection (holding the shift key while |
---|
349 | pressing the left mouse button also works, but sometimes interferes with the |
---|
350 | zoom feature). |
---|
351 | Pressing "A" or "a" shows all reflections in the displayed region. |
---|
352 | The indices are shown |
---|
353 | on the screen for phases with tickmarks (as shown to the right). |
---|
354 | Indices are listed in the "Separate window for <I>hkl</I> labels" |
---|
355 | (as seen below) for all phases, regardless of the tickmark settings. |
---|
356 | Displayed indices will remain on the screen for a preset time and |
---|
357 | then will be deleted; alternately, pressing "D" or "d" deletes the hkl labels. |
---|
358 | Several aspects of reflection labeling can be customized, |
---|
359 | see 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="magnification"></a> |
---|
366 | <B>Plot Magnification</B> |
---|
367 | Sections of the plot can be magnified through use of options in the |
---|
368 | Magnification menu or by using control-1 through control-9. |
---|
369 | <img SRC="magreg.png" align=RIGHT alt="LIVEPLOT Screen snapshot"> |
---|
370 | <UL> |
---|
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"> |
---|
387 | </UL> |
---|
388 | <br clear=all> |
---|
389 | <P> |
---|
390 | <a name="export"></a> |
---|
391 | <B>Export plot options</B> |
---|
392 | <UL><LI> |
---|
393 | <IMG SRC="new.gif" alt="New!"> |
---|
394 | The LIVEPLOT program can export plots to to a <I>high quality</I> PDF |
---|
395 | file for presentations or publications using <A |
---|
396 | HREF="http://www.gnuplot.info/">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). |
---|
410 | |
---|
411 | <P><LI> The plot can be exported to |
---|
412 | <A HREF="http://plasma-gate.weizmann.ac.il/Grace/">Grace</A>, WYSIWYG 2D plotting tool for X-Windows |
---|
413 | that 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="http://cygwin.com/">Cygwin</A> is required. |
---|
421 | <P><LI> |
---|
422 | For use in many other graphics programs, LIVEPLOT will produce a |
---|
423 | "comma separated variable" data file with the data displayed on the screen. |
---|
424 | The user will need to read this in, |
---|
425 | set line styles and scaling, etc., but this does provide an option for |
---|
426 | generating high-quality graphics for presentations and publications. |
---|
427 | <P><LI>LIVEPLOT will produce PostScript versions of the plot on the screen, |
---|
428 | but the quality is rather low (this is a limitation of the BLT graphics |
---|
429 | package). |
---|
430 | <P><LI>LIVEPLOT/BKGFIT can also be used to prepare input for FOX (Free |
---|
431 | Objects for Xtallography). |
---|
432 | |
---|
433 | </UL> |
---|
434 | |
---|
435 | <hr><h2>LIVEPLOT/BKGEDIT Keyboard Shortcuts</h2> |
---|
436 | Frequent users of LIVEPLOT & BKGEDIT will find that many useful actions |
---|
437 | can be performed very easily by learning the following keystroke commands. |
---|
438 | Note that either uppercase or lowercase letters may be used. |
---|
439 | <DL> |
---|
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. |
---|
459 | </DL> |
---|
460 | |
---|
461 | <hr><h2>LIVEPLOT/BKGEDIT Menu Contents</h2> |
---|
462 | A few of these options are omitted from BKGEDIT. |
---|
463 | <img SRC="lm1.gif" align=RIGHT alt="LIVEPLOT Menu"> |
---|
464 | <H3>File Menu</H3> |
---|
465 | <DL><DL> |
---|
466 | <a name="tickmarks"></a> |
---|
467 | <DT>Tickmarks |
---|
468 | <DD>Checkbuttons are provided for each phase to determine if tick marks |
---|
469 | will be shown. |
---|
470 | <IMG SRC="note.gif" alt="Note!"> |
---|
471 | Tickmarks can also be |
---|
472 | toggled by pressing the |
---|
473 | "1" key for phase 1, "2" for phase 2,... |
---|
474 | Also see the Options/<a href="#configTick">Configure Tickmarks</a> |
---|
475 | menu item for information |
---|
476 | on tickmarks. |
---|
477 | <DT>Histogram |
---|
478 | <DD>This allows a histogram to be selected to be loaded |
---|
479 | <DL><DL> |
---|
480 | <IMG SRC="note.gif" alt="Note!"> |
---|
481 | It is also possible to advance |
---|
482 | between the histograms by pressing the "n" or "N" (for next) key. |
---|
483 | </DL></DL> |
---|
484 | <DT>Update Plot |
---|
485 | <DD>The causes LIVEPLOT to read read the current histogram again from |
---|
486 | the datafile |
---|
487 | <DT>Export Plot |
---|
488 | <DD>This offers options for exporting the plot in multiple formats. |
---|
489 | <DL><DL> |
---|
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. |
---|
498 | |
---|
499 | <DT>to PostScript |
---|
500 | <DD>Creates a <I>low quality</I> PostScript file containing the LIVEPLOT |
---|
501 | output. See the Options/"Set PS output" button for where the file is created. |
---|
502 | Most unix systems are capable or printing PostScript files. |
---|
503 | On Windows, a program such ghostview may be needed to translate the |
---|
504 | PostScript to a format that can be viewed or printed. |
---|
505 | |
---|
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="http://plasma-gate.weizmann.ac.il/Grace/">Grace</A>, WYSIWYG 2D plotting tool for X-Windows |
---|
511 | that produces publication-quality graphics. |
---|
512 | After the plot is exported, it can be further |
---|
513 | enhanced and annotated in grace. |
---|
514 | |
---|
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. |
---|
522 | </DL></DL> |
---|
523 | <DT>Quit |
---|
524 | <DD>Exits BKGEDIT/LIVEPLOT. |
---|
525 | </DL></DL> |
---|
526 | <br clear=all> |
---|
527 | <img SRC="lm2.gif" align=RIGHT alt="LIVEPLOT Menu"> |
---|
528 | <H3>Options Menu</H3> |
---|
529 | <DL><DL> |
---|
530 | <a name="configTick"></a> |
---|
531 | <DT>Configure Tickmarks<DD> |
---|
532 | This submenu provides options that controls how tickmarks are displayed. |
---|
533 | <P><DL><DL> |
---|
534 | <DT>Auto locate<DD> |
---|
535 | When this option is selected, tickmarks are placed in different positions |
---|
536 | for each phase, automatically, similar to how tickmarks are shown in POWPLOT. |
---|
537 | <DT>Manual Placement<DD> |
---|
538 | Tickmarks are drawn at specific heights that can be set for each phase |
---|
539 | (see below). The default |
---|
540 | is for lines to be draw from "-Inf" to "Inf", which creates lines from the |
---|
541 | bottom to the top of the plot. |
---|
542 | <DT>Label by name |
---|
543 | <IMG SRC="note.gif" alt="Note!"> |
---|
544 | <DD> |
---|
545 | By default, a label "Phase1",... is displayed in the legend when tickmarks |
---|
546 | for that phase are displayed. When this button is pressed, the first |
---|
547 | 20 characters of each phase name (phase title) are used instead. This |
---|
548 | label can be edited, as described in the next paragraph. |
---|
549 | <DT>Phase <I>n</I> opts<DD> |
---|
550 | The options for each phase allow the line to be changed between |
---|
551 | solid and dashed, color of the line can be specified and |
---|
552 | the vertical placement of the tickmarks can be specified. The |
---|
553 | "Show Reflections" flag, |
---|
554 | set in the File/Tickmarks menu, |
---|
555 | as well as the label used for the phase can also be changed here. |
---|
556 | |
---|
557 | </DL></DL> |
---|
558 | <P> |
---|
559 | <DT>Obs Symbol (Symbol Type) |
---|
560 | <DD>This brings up a menu where the symbol type and size for the |
---|
561 | observed data points (and for BKGEDIT, the fixed background points) |
---|
562 | can be selected. |
---|
563 | <P> |
---|
564 | <DT>Symbol Color |
---|
565 | <DD>The colors for all the displayed lines and symbols can be changed here. |
---|
566 | <P> |
---|
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>) |
---|
570 | <P> |
---|
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]. |
---|
577 | </DL></DL> |
---|
578 | <br clear=all> |
---|
579 | <img SRC="lm3.gif" align=RIGHT alt="LIVEPLOT menu"> |
---|
580 | <a name="hklOpts"></a> |
---|
581 | <DL><DL> |
---|
582 | <DT>HKL labeling |
---|
583 | <DD>This brings up a menu that selects |
---|
584 | <UL><LI>Erase time: |
---|
585 | how long in seconds that <I>hkl</I> values are shown |
---|
586 | before they are erased (0 means that they are not erased), |
---|
587 | <LI>Label size: the size of the |
---|
588 | labels in pixels, |
---|
589 | <LI>Search Region: only reflections within this number of pixels of the mouse, |
---|
590 | when the "h" key is pressed (if any) are labeled, |
---|
591 | <LI>Separate window: when this |
---|
592 | option is selected, reflection labels are shown in a text window |
---|
593 | </UL> |
---|
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 |
---|
598 | plot 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 |
---|
603 | or 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 |
---|
606 | other 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 |
---|
616 | obscured, when the plot is updated. At this time, this option does not |
---|
617 | work 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>). |
---|
621 | <DT>(obs-calc)/sigma |
---|
622 | <DD>The causes the (y<sub>obs</sub>-y<sub>calc</sub>)/sigma |
---|
623 | values to be displayed |
---|
624 | (as <a href="#OmCoS">presented above</a>). |
---|
625 | |
---|
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. |
---|
630 | </DL></DL> |
---|
631 | <br clear=all> |
---|
632 | |
---|
633 | <P> |
---|
634 | <hr><H2>Customization of LIVEPLOT & BKGEDIT</H2><A NAME="customize"></A> |
---|
635 | The <FONT FACE="COURIER">localconfig</FONT> and |
---|
636 | <FONT FACE="COURIER">.gsas_config</FONT> |
---|
637 | (or <FONT FACE="COURIER">c:\gsas.config</FONT>) |
---|
638 | files are read, if present. |
---|
639 | The following variables control how LIVEPLOT, and in most cases BKGEDIT, |
---|
640 | function and can be |
---|
641 | customized 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>) |
---|
645 | files. |
---|
646 | <DL><DL> |
---|
647 | <DT><FONT FACE="COURIER">peakinfo(flag<i>n</i>)</FONT><DD> |
---|
648 | These variables define if peak positions will be shown |
---|
649 | for reflections in phase "<i>n</i>". Reflections will be shown if |
---|
650 | the value is non-zero. |
---|
651 | |
---|
652 | <DT><FONT FACE="COURIER">peakinfo(color<i>n</i>)</FONT><DD> |
---|
653 | These variables define the default colors for |
---|
654 | reflections in phase "<i>n</i>" |
---|
655 | |
---|
656 | <DT><FONT FACE="COURIER">peakinfo(dashes<i>n</i>)</FONT><DD> |
---|
657 | These variables define if peaks will be dashed for |
---|
658 | reflections in phase "<i>n</i>" (UNIX only). Lines will be dashed if |
---|
659 | the value is non-zero. |
---|
660 | |
---|
661 | <DT><FONT FACE="COURIER">peakinfo(min<i>n</i>) and peakinfo(max<i>n</i>)</FONT><DD> |
---|
662 | These variables dictate the placement vertical position for reflection |
---|
663 | markers, when manually placed (see expgui(autotick), below). To draw |
---|
664 | to the edge of the screen, use -Inf and Inf. |
---|
665 | </DL></DL> |
---|
666 | |
---|
667 | The following variables are written to |
---|
668 | <font face="courier">.gsas_config</font> |
---|
669 | (or <FONT FACE="COURIER">c:\gsas.config</FONT>) |
---|
670 | when |
---|
671 | "Save Options" is used. These variables are all set from the GUI and therefore |
---|
672 | do not need to be edited manually. |
---|
673 | |
---|
674 | <DL><DL> |
---|
675 | <DT><FONT FACE="COURIER">graph(printout)</FONT><DD> |
---|
676 | This is set to 1 if PostScript files |
---|
677 | will be printed and 0 if they will be written to disk (for Windows all |
---|
678 | files should be written to disk). |
---|
679 | |
---|
680 | <DT><FONT FACE="COURIER">graph(outname)</FONT><DD> |
---|
681 | This is the default for the file name used |
---|
682 | when PostScript files will be written to disk. |
---|
683 | |
---|
684 | <DT><FONT FACE="COURIER">graph(outcmd)</FONT><DD> |
---|
685 | This is the default for the command used |
---|
686 | to print PostScript files (Unix only). |
---|
687 | |
---|
688 | <DT><FONT FACE="COURIER">graph(legend)</FONT><DD> |
---|
689 | Sets the default value for display of the legend in LIVEPLOT and WIDPLT. |
---|
690 | |
---|
691 | <DT><FONT FACE="COURIER">graph(autoraise)</FONT><DD> |
---|
692 | This option shows up in the options menu item as "Raise on update." |
---|
693 | When set to non-zero, the LIVEPLOT window is raised |
---|
694 | (placed on top of any other overlapping) windows |
---|
695 | each time it is updated. |
---|
696 | This option does not seem to work in Windows-NT, but this may depend on |
---|
697 | the version of Tcl/Tk. |
---|
698 | |
---|
699 | <DT><FONT FACE="COURIER">peakinfo(obssym)</FONT><DD> |
---|
700 | Symbol for observed data points. Valid choices are square, circle, diamond, |
---|
701 | plus, cross, splus and scross. |
---|
702 | |
---|
703 | <DT><FONT FACE="COURIER">peakinfo(obssize)</FONT><DD> |
---|
704 | Size for the symbol for observed data points. A value of 1 corresponds to about 1/8 inch |
---|
705 | (about 3 mm). |
---|
706 | |
---|
707 | <DT><FONT FACE="COURIER">expgui(pixelregion)</FONT><DD> |
---|
708 | When hkl values are loaded (using tcldump) and reflections are labeled, reflections |
---|
709 | can be labeled using a Shift-Left-Mouse click. All labeled reflections within expgui(pixelregion) |
---|
710 | pixels of the mouse position are assumed to be overlapped and are labeled. |
---|
711 | |
---|
712 | <DT><FONT FACE="COURIER">expgui(fadetime)</FONT><DD> |
---|
713 | The time in seconds before reflection labels are removed. A value of zero means that reflections |
---|
714 | must be deleted manually (Shift-Right-Mouse). |
---|
715 | (Mac: Shift+Apple+click) |
---|
716 | <DT><FONT FACE="COURIER">expgui(lblfontsize)</FONT><DD> |
---|
717 | A size for reflections labels in pixels. |
---|
718 | |
---|
719 | <DT><FONT FACE="COURIER">expgui(hklbox)</FONT><DD> |
---|
720 | If this variable is non-zero, reflection indices are shown in a box. |
---|
721 | |
---|
722 | <DT><FONT FACE="COURIER">expgui(autotick)</FONT><DD> |
---|
723 | If this variable is non-zero, reflection markers positions are |
---|
724 | set automatically. |
---|
725 | </DL></DL> |
---|
726 | <P> |
---|
727 | <hr><H2>Interfacing External Programs</H2> |
---|
728 | <B>Combining LIVEPLOT with CMPR & LOGIC</B> |
---|
729 | If you have the |
---|
730 | <A HREF="https://subversion.xor.aps.anl.gov/trac/CMPR">CMPR</A> |
---|
731 | program installed on your computer, you can use superimpose on the |
---|
732 | GSAS results the peaks for an arbitrary unit cell. |
---|
733 | <P> |
---|
734 | When the CMPR program is installed in the same location |
---|
735 | as the GSAS package (<i>e.g.</i> |
---|
736 | <font face="courier">/home/gsas</font> & |
---|
737 | <font face="courier">/home/cmpr</font> |
---|
738 | or <font face="courier">C:\DIFRC\GSAS</font> & |
---|
739 | <font face="courier">C:\DIFRC\CMPR</font>) or if |
---|
740 | the 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), |
---|
745 | the 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, |
---|
747 | you may customize this location by specifying a value for |
---|
748 | Tcl/Tk variable cmprdir by including a line such as this: |
---|
749 | <PRE> |
---|
750 | set cmprdir C:/ncnrpkg/cmpr |
---|
751 | </PRE> |
---|
752 | in the <FONT FACE="COURIER">localconfig</FONT>, |
---|
753 | <FONT FACE="COURIER">.gsas_config</FONT> |
---|
754 | or <FONT FACE="COURIER">c:\gsas.config</FONT> files |
---|
755 | [note that forward slashes ("/") should be used here, even for windows.] |
---|
756 | |
---|
757 | <P> |
---|
758 | The "Peak Gen" menu will have either or both of two entries |
---|
759 | "Display a cell" and "Plot ICDD Entry", depending on what |
---|
760 | software is located. The |
---|
761 | "Display a cell" option produces a window similar to the |
---|
762 | <A href="https://subversion.xor.aps.anl.gov/CMPR/trunk/doc/cmprdoc.html#editcell"> |
---|
763 | Edit Cell feature in CMPR</A> |
---|
764 | where allowed reflection positions are displayed for a set of unit cell |
---|
765 | parameters and optionally a space group or extinction conditions. |
---|
766 | <P> |
---|
767 | Note that these routines display peak positions in units of 2Theta, Q or |
---|
768 | d-space. If you are using TOF or EDS data, you must select Q or d-space |
---|
769 | display in LIVEPLOT. If you are using 2Theta, you must supply the correct |
---|
770 | wavelength. |
---|
771 | <P> |
---|
772 | Note that a version of both EXPGUI and CMPR/LOGIC from November 2003 or later |
---|
773 | must be used for these features to work. |
---|
774 | |
---|
775 | </UL> |
---|
776 | <hr> |
---|
777 | <TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT> |
---|
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> |
---|
781 | </TH></TR></TABLE> |
---|
782 | |
---|
783 | </blockquote> |
---|
784 | </body> |
---|
785 | </html> |
---|