-
Notifications
You must be signed in to change notification settings - Fork 0
/
Py16GUI.html
577 lines (454 loc) · 47 KB
/
Py16GUI.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Py16GUI</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Py16GUI</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/users/grp66007/dropbox/python/i16/py16/py16gui.py">c:\users\grp66007\dropbox\python\i16\py16\py16gui.py</a></font></td></tr></table>
<p><tt>Selection of graphical user interfaces (GUIs) that allow fast viewing and analysis of data <br>
on the beamline I16 at Diamond Light Source Ltd.<br>
<br>
By Dan Porter, PhD<br>
Diamond<br>
2016<br>
<br>
Usage: <br>
On an I16 workstation (as I16user)<br>
- Double click the shortcut on the desktop "<a href="#I16_Data_Viewer">I16_Data_Viewer</a>"<br>
- Select "Run in Console"<br>
<br>
On another Diamond workstation, the Diamond NX server or when remotely connecting:<br>
- Open a terminal<br>
- Type:<br>
>> cd /dls_sw/i16/software/python/Py16/<br>
>> module load python/ana<br>
>> ipython -i --matplotlib tk Py16GUI.py<br>
<br>
On another system<br>
- Open a terminal/ console/ command prompt<br>
Type:<br>
>> cd /direcotry of Py16GUI.py<br>
>> ipython -i --matplotlib tk Py16GUI.py<br>
<br>
Operation:<br>
1. On running the program, the main GUI (<a href="#I16_Data_Viewer">I16_Data_Viewer</a>) will appear<br>
2. Browse for the experimental and analysis directories <br>
- the experimental directory is where the scan data is stored<br>
- the analysis directory is where you wish to store any data you save or scripts you create<br>
3. Click "Last" to load the latest data with automaticaly choosen axes<br>
<br>
More Operations:<br>
- Click "Update Pilatus Plot" to load the images from any area detector<br>
- Click "Last Scans" to see a list of the last 100 scans that are selectable to plot<br>
- Select a function from the "Fit" dropdown menu to apply a fit the current plot<br>
- Click "Multiplot/ Peak Analysis" to open the <a href="#I16_Peak_Analysis">I16_Peak_Analysis</a> GUI<br>
- Click "Export Plot" to generate an figure of the current scan<br>
- Click "Print Current Scan" to send an image of the current scan to the default printer<br>
- Click "Print All Figures" to send all open figures to a single 2x6 page<br>
- Click "Meta" to see a full list of metadata for this scan<br>
- Tick the box "Live Mode" to automatically update the GUI every 10s<br>
- Click "Params" to change default parameters, such as error bars and temperature sensor<br>
<br>
Custom Regions of Interest:<br>
It is possible to define new regions of interest on an area detector and plot these.<br>
Note that manual regions of interest have hot and broken pixels set to zero. <br>
- Select the scan<br>
- Click "Update Pilatus Plot"<br>
- Edit the "Centre" and "ROI" boxes to define the box centre and size, press enter to update the plot<br>
- The button "Find Peak" will find the largest pixel, the buttons "roi2" and "roi1" will generate standard ROIs<br>
- In the "Y" dropdown menu, choose "Custom ROI" to plot the sum of this ROI<br>
- Or: Choose "ROI - bkg" to plot the background subtracted sum (the background is defined by a region twice the ROIs size)<br>
<br>
**********************<br>
Main GUIs:<br>
<a href="#I16_Data_Viewer">I16_Data_Viewer</a> - Starts automatically, set the experiment directory to see scan details, plot scan and area detector data, access other GUIs<br>
<a href="#I16_Peak_Analysis">I16_Peak_Analysis</a> - Plot and analyse multiple scans, including peak fitting and integration<br>
<a href="#I16_Advanced_Fitting">I16_Advanced_Fitting</a> - More fitting options, including masks<br>
<a href="#colour_cutoffs">colour_cutoffs</a> - A separate GUI that will interactively change the colormap max/min of the current figure.<br>
<br>
Version 3.2<br>
Last updated: 23/10/17<br>
<br>
Version History:<br>
07/02/16 0.9 Program created<br>
29/02/16 1.0 <a href="#I16_Data_Viewer">I16_Data_Viewer</a> and <a href="#I16_Peak_Analysis">I16_Peak_Analysis</a> Finished<br>
03/03/16 1.1 Tested on Beamline, removed errors, cleaned up<br>
28/04/16 1.2 Added Find Peak button<br>
05/05/16 1.3 Added helper bar, made pilatus button clearer<br>
09/05/16 1.4 Added buttons for find files and meta<br>
10/05/16 1.5 Added print buffer + close all buttons<br>
20/05/16 1.6 Added fit function to fit option menu and fixed reploting issue<br>
12/07/16 1.7 Added Advanced Peak Fitting GUI<br>
10/08/16 1.8 Added logplot and diffplot options<br>
08/09/16 1.9 Added auto pilatus update checkbox<br>
24/09/16 2.0 Removed requirement for SciSoftPi data loader<br>
07/10/16 2.1 Some minor corrections, addition of parameters window<br>
17/10/16 2.2 Addition of rem. Bkg for pilatus and pilatus peakregion/ background lines<br>
14/12/16 2.3 New option menus for exp directories and X,Y variables, other minor improvements<br>
20/12/16 2.4 Main app now resizes for screensize, Mac option added. Fixes for option menus. New Check buttons<br>
08/02/17 2.5 Log of pilatus images added, other bugs fixed<br>
25/02/17 2.6 Minor corrections and fixes, including multi-variable advanced fitting and persistence of custom ROIs<br>
11/07/17 2.7 Added scan selector<br>
24/07/17 2.8 Added <a href="#colour_cutoffs">colour_cutoffs</a> and other bug fixes<br>
01/08/17 2.9 Added check for large pilatus arrays, parameter "max array" in parameters window<br>
02/10/17 2.9 Added ability to turn off normalisation in multi-plots<br>
06/10/17 3.0 Added log plot to multiplots, plus other fixes<br>
10/10/17 3.1 Added <a href="#I16_Meta_Display">I16_Meta_Display</a>, multiplotting from scan selector<br>
23/10/17 3.2 Several minor improvements, including choice of plots for fitting<br>
<br>
###FEEDBACK### Please submit your bug reports, feature requests or queries to: dan.porter@diamond.ac.uk<br>
<br>
@author: Dan Porter<br>
I16, Diamond Light Source<br>
2016</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="datetime.html">datetime</a><br>
<a href="tkFileDialog.html">tkFileDialog</a><br>
<a href="glob.html">glob</a><br>
<a href="__main__.html">__main__</a><br>
<a href="matplotlib.html">matplotlib</a><br>
</td><td width="25%" valign=top><a href="tkMessageBox.html">tkMessageBox</a><br>
<a href="matplotlib.ticker.html">matplotlib.ticker</a><br>
<a href="numpy.html">numpy</a><br>
<a href="os.html">os</a><br>
<a href="matplotlib.pyplot.html">matplotlib.pyplot</a><br>
</td><td width="25%" valign=top><a href="Py16progs.html">Py16progs</a><br>
<a href="re.html">re</a><br>
<a href="subprocess.html">subprocess</a><br>
<a href="sys.html">sys</a><br>
<a href="tempfile.html">tempfile</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
<a href="Tkinter.html">Tkinter</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Advanced_Fitting">I16_Advanced_Fitting</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Check_Log">I16_Check_Log</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Data_Viewer">I16_Data_Viewer</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Meta_Display">I16_Meta_Display</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Params">I16_Params</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Peak_Analysis">I16_Peak_Analysis</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Print_Buffer">I16_Print_Buffer</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#I16_Scan_Selector">I16_Scan_Selector</a>
</font></dt><dt><font face="helvetica, arial"><a href="Py16GUI.html#colour_cutoffs">colour_cutoffs</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Advanced_Fitting">class <strong>I16_Advanced_Fitting</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>More Fitting options, including masking<br>
Activated from "Adv. Fitting" button in <a href="#I16_Peak_Analysis">I16_Peak_Analysis</a><br>
<br>
Takes scan numbers from <a href="#I16_Peak_Analysis">I16_Peak_Analysis</a> and allows navigation through<br>
all scans to check peak shapes etc.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Advanced_Fitting-__init__"><strong>__init__</strong></a>(self, scan_nos<font color="#909090">=[]</font>, ini_dependent<font color="#909090">=['Ta']</font>, ini_X<font color="#909090">=''</font>, ini_Y<font color="#909090">=''</font>, ini_fit<font color="#909090">='pVoight'</font>, ini_Isig<font color="#909090">=1</font>, ini_save<font color="#909090">=0</font>)</dt></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_chk_save"><strong>f_chk_save</strong></a>(self)</dt><dd><tt>Activate or deactivate scan</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_1"><strong>f_mask_1</strong></a>(self)</dt><dd><tt>Mask 1: x < val</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_2"><strong>f_mask_2</strong></a>(self)</dt><dd><tt>Mask 2: x > val</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_3"><strong>f_mask_3</strong></a>(self)</dt><dd><tt>Mask 3: |x-val1| < val2</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_4"><strong>f_mask_4</strong></a>(self)</dt><dd><tt>Mask 4: |x-val| > val2</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_print"><strong>f_mask_print</strong></a>(self)</dt><dd><tt>Print scans and masks</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_mask_remove"><strong>f_mask_remove</strong></a>(self)</dt><dd><tt>Remove masks</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_plt_dn"><strong>f_plt_dn</strong></a>(self)</dt><dd><tt>Next plot down</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_plt_up"><strong>f_plt_up</strong></a>(self)</dt><dd><tt>Next plot up</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_scan_makefile"><strong>f_scan_makefile</strong></a>(self)</dt><dd><tt>Create python analysis file</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_scan_select"><strong>f_scan_select</strong></a>(self, event)</dt><dd><tt>Scan selection</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-f_start"><strong>f_start</strong></a>(self)</dt><dd><tt>Begin the fit</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-update_mask"><strong>update_mask</strong></a>(self, mask)</dt><dd><tt>Update the mask array, mask = string</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-update_plot"><strong>update_plot</strong></a>(self)</dt><dd><tt>Generate the plot, run a test fit and display the results</tt></dd></dl>
<dl><dt><a name="I16_Advanced_Fitting-update_scans"><strong>update_scans</strong></a>(self)</dt><dd><tt>Update the scan list and masks</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Check_Log">class <strong>I16_Check_Log</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Functions to check multiple scans, check the log file and predict the end of a run<br>
Activated from the "More Check Options" button in <a href="#I16_Data_Viewer">I16_Data_Viewer</a><br>
<br>
Panel 1: Check scans<br>
- input the list of scan required in "Scans", this box is evaluated as python<br>
- Use the "show" box to add any metadata to the output<br>
- Click "Check Scans" - the output can be viewed in the console<br>
<br>
Panel 2: Check Log<br>
- Set either the Time or Scan number<br>
- Set the number of minutes (or tick "All time")<br>
- Click "Check Log" to show log file entries from "Mins" before Time/Scan until Time/Scan in the console<br>
- Use "Find Sting" to only show entries including this string<br>
- Tick "Show commands only" to only display commands<br>
<br>
Panel 3: Predict End<br>
- Set the number of the "First Scan" in a series<br>
- Set the expected "Last Scan" of a series (maths allowed)<br>
- Click "Predict End" to display the expexted end of the scan series in the console<br>
- Assumes each scan will be the same length on average.<br>
- Very useful for determining the end of a script<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Check_Log-__init__"><strong>__init__</strong></a>(self, ini_scan<font color="#909090">=0</font>)</dt></dl>
<dl><dt><a name="I16_Check_Log-f_checklog"><strong>f_checklog</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Check_Log-f_checkscans"><strong>f_checkscans</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Check_Log-f_input_scan"><strong>f_input_scan</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Check_Log-f_input_time"><strong>f_input_time</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Check_Log-f_prend"><strong>f_prend</strong></a>(self)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Data_Viewer">class <strong>I16_Data_Viewer</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Main GUI to view and analyse I16 data quickly during or after an experiment.<br>
<br>
OPERATION:<br>
- Once started, enter your experiment data directory, or press "Browse"<br>
<br>
- Enter the Scan number you wish to look at and press ENTER, or use "Last" to get the latest scan.<br>
<br>
- To plot the data, select the fitting and normalisation options you would like, then press "Plot"<br>
<br>
- To see a pilatus image, select the intensity-cutoffs and region of interest (ROI) and press "Pilatus"<br>
<br>
- If you would like to send the data to the console, press "Send to Console", this will send the variables<br>
x,y,dy,xvar,yvar,ttl,d to the console, where d is the dataholder with all the raw data.<br>
<br>
- Py16progs is imported to the console by default as pp, so you can use these functions easily. e.g. pp.plotscan(0)<br>
For more info on Py16progs and to see what functions are available, type: help(pp)<br>
<br>
- The buttons "Export Plot/Pilatus" will create figures of the current scan that can be saved or printed.<br>
<br>
- The button "Multiplot/ Peak Analysis" will take you to the Peak Analysis GUI.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Data_Viewer-__init__"><strong>__init__</strong></a>(self, figsize<font color="#909090">={'pilatus': [6, 2.5], 'scan': [6, 4]}</font>)</dt></dl>
<dl><dt><a name="I16_Data_Viewer-f_anal"><strong>f_anal</strong></a>(self)</dt><dd><tt>Launch analysis GUI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_checklog"><strong>f_checklog</strong></a>(self)</dt><dd><tt>checklog(mins=N)</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_checknum"><strong>f_checknum</strong></a>(self)</dt><dd><tt>checknum(-N,0)</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_chk_dn"><strong>f_chk_dn</strong></a>(self)</dt><dd><tt>Decrease Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_chk_exp"><strong>f_chk_exp</strong></a>(self)</dt><dd><tt>Check experiment button - opens a message box</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_chk_lat"><strong>f_chk_lat</strong></a>(self)</dt><dd><tt>Check scan lattice parameters - opens a message box</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_chk_mor"><strong>f_chk_mor</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Data_Viewer-f_chk_up"><strong>f_chk_up</strong></a>(self)</dt><dd><tt>Increase Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fldr2_browse"><strong>f_fldr2_browse</strong></a>(self)</dt><dd><tt>Browse for analysis directory</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fldr2_log"><strong>f_fldr2_log</strong></a>(self)</dt><dd><tt>Activate log plot</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fldr_browse"><strong>f_fldr_browse</strong></a>(self)</dt><dd><tt>Browse for data directory</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fldr_find"><strong>f_fldr_find</strong></a>(self)</dt><dd><tt>Search for data directory</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fldr_opt"><strong>f_fldr_opt</strong></a>(self)</dt><dd><tt>Load previous experiment</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_send"><strong>f_fnl_send</strong></a>(self)</dt><dd><tt>Send instructions to console</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_spil"><strong>f_fnl_spil</strong></a>(self)</dt><dd><tt>Send plotpil command to console</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_splot"><strong>f_fnl_splot</strong></a>(self)</dt><dd><tt>Send plotscan command to console</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_splotbuffer"><strong>f_fnl_splotbuffer</strong></a>(self)</dt><dd><tt>Send all open figures to the print buffer for 6-per-page page printing</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_splotclose"><strong>f_fnl_splotclose</strong></a>(self)</dt><dd><tt>Close all figures</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_splotprint"><strong>f_fnl_splotprint</strong></a>(self)</dt><dd><tt>Send plotscan command to console, print result and close</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_fnl_splotsave"><strong>f_fnl_splotsave</strong></a>(self)</dt><dd><tt>Send plotscan command to console, save result and close</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_livemode"><strong>f_livemode</strong></a>(self)</dt><dd><tt>Activate Live Mode</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_log_dn"><strong>f_log_dn</strong></a>(self)</dt><dd><tt>Decrease Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_log_up"><strong>f_log_up</strong></a>(self)</dt><dd><tt>Increase Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_params"><strong>f_params</strong></a>(self)</dt><dd><tt>Launch parameters GUI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_def1"><strong>f_pilopt_def1</strong></a>(self)</dt><dd><tt>Reset the pilatus centre and ROI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_def2"><strong>f_pilopt_def2</strong></a>(self)</dt><dd><tt>Reset the pilatus centre and ROI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_nroi"><strong>f_pilopt_nroi</strong></a>(self)</dt><dd><tt>Send pil values to vary</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_peak"><strong>f_pilopt_peak</strong></a>(self)</dt><dd><tt>Determine peak position in pilatus</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_plot"><strong>f_pilopt_plot</strong></a>(self)</dt><dd><tt>Plot pilatus images</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_posleft"><strong>f_pilopt_posleft</strong></a>(self)</dt><dd><tt>Move to previous pilatus image</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_posright"><strong>f_pilopt_posright</strong></a>(self)</dt><dd><tt>Move to next pilatus image</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_rembkg"><strong>f_pilopt_rembkg</strong></a>(self)</dt><dd><tt>Remove background from ROI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_pilopt_remfrm"><strong>f_pilopt_remfrm</strong></a>(self)</dt><dd><tt>Remove background from ROI</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_popt_fit"><strong>f_popt_fit</strong></a>(self, x)</dt><dd><tt>Plot scan with fit</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_popt_norm"><strong>f_popt_norm</strong></a>(self, x)</dt><dd><tt>Plot scan with fit</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_popt_plot"><strong>f_popt_plot</strong></a>(self)</dt><dd><tt>Plot current scan</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_popt_varx"><strong>f_popt_varx</strong></a>(self, x)</dt><dd><tt>Get varx and plot current scan</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_popt_vary"><strong>f_popt_vary</strong></a>(self, x)</dt><dd><tt>Get vary and plot current scan</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scan_dn"><strong>f_scan_dn</strong></a>(self)</dt><dd><tt>Decrease Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scan_ld"><strong>f_scan_ld</strong></a>(self)</dt><dd><tt>Update GUI for selected scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scan_mt"><strong>f_scan_mt</strong></a>(self)</dt><dd><tt>Send metadata to console</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scan_st"><strong>f_scan_st</strong></a>(self)</dt><dd><tt>Latest Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scan_up"><strong>f_scan_up</strong></a>(self)</dt><dd><tt>Increase Scan number</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-f_scn_sel"><strong>f_scn_sel</strong></a>(self)</dt><dd><tt>Scan selector button launches scan selector</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-on_closing"><strong>on_closing</strong></a>(self)</dt><dd><tt>End mainloop on close window</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-set_files"><strong>set_files</strong></a>(self)</dt><dd><tt>Set the filedir and savedir commands</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-update"><strong>update</strong></a>(self, event<font color="#909090">=None</font>)</dt><dd><tt>Update on <Enter></tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-update_details"><strong>update_details</strong></a>(self, event<font color="#909090">=None</font>)</dt><dd><tt>Load metadata for current scan</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-update_pilatus"><strong>update_pilatus</strong></a>(self, event<font color="#909090">=None</font>)</dt><dd><tt>Loads Pilatus data, plots data</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-update_plot"><strong>update_plot</strong></a>(self, event<font color="#909090">=None</font>)</dt><dd><tt>Plot metadata for current scan</tt></dd></dl>
<dl><dt><a name="I16_Data_Viewer-writeval"><strong>writeval</strong></a>(self, mstr, label_str, label_var, wid<font color="#909090">=27</font>)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Meta_Display">class <strong>I16_Meta_Display</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Displays the full meta data of the current scan<br>
Activated from the "Meta" button in <a href="#I16_Data_Viewer">I16_Data_Viewer</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Meta_Display-__init__"><strong>__init__</strong></a>(self, scanno<font color="#909090">=0</font>)</dt></dl>
<dl><dt><a name="I16_Meta_Display-f_exit"><strong>f_exit</strong></a>(self)</dt><dd><tt>Closes the current metadata window</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Params">class <strong>I16_Params</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Set the default experimental parameters<br>
Activated from the "Params" button in <a href="#I16_Data_Viewer">I16_Data_Viewer</a><br>
Ring Current Standard ring current for current experiment for normalisation<br>
ic1 Standard ic1monitor value for current experiment for normalisation<br>
Temp Sensor Temperature sensor used as default<br>
Errors Error funciton used (select none to remove error bars)<br>
Central Pixel Centre pixel [i,j] in area detectors<br>
Max Pixel Any pixels larger than this are hot pixels and set to zero<br>
Max array size Stops PC form running out of memory on large pilatus scans<br>
Peak Region Peak finding (nroi_peak) searches within this box<br>
Colours Set the default colour order for plots<br>
Title Set the title that will appear in plot titles<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Params-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="I16_Params-f_update"><strong>f_update</strong></a>(self)</dt><dd><tt>Update parameters and exit</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Peak_Analysis">class <strong>I16_Peak_Analysis</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#I16_Peak_Analysis">I16_Peak_Analysis</a><br>
<br>
GUI allowing you to quickly plot multiscan runs such as temperature or energy dependences.<br>
<br>
OPERATION:<br>
- As above, enter your experiment data director, or press "Browse"<br>
- Also enter the directory you would like files saved in.<br>
<br>
- Give the title and the variable that changes between scans (Dependent)<br>
<br>
- Define the variable to analyse (Y var) and the fit options (leave blank for defaults).<br>
<br>
- Define the scan numbers required by either: <br>
1. Specifying the range with first, last and step (then click "Generate")<br>
2. Specifying scan numbers directly in the box. Note that this box will be evaluated so you must<br>
specify a python array.<br>
<br>
- Use the buttons to select what you want to do next:<br>
"Plot Scans" - plot multiple scans on the same axis, with "Dependent" as the legend<br>
"Plot 3D" - Plot multiple scans on a 3D axis, with "Dependent" as the 3rd axis<br>
"Plot 2D" - As above, except creates a map where the height becomes a colour axis<br>
"Plot Surf" - As above but generates a surface<br>
"Fit Peaks" - On each scan, perform a fitting routine, storing the area, width, centre, etc, <br>
plot the results and save them to a .dat file.<br>
<br>
Custom regions of interest can be set for scans with area detectors:<br>
In the "Y" box, use the commands:<br>
nroi[110,242,75,67] - creates roi [ceni,cenj,widi,widj]<br>
nroi[31,31] - creates centred roi with size [widi,widj]<br>
nroi_peak[31,31] - create roi centred around largest pixel<br>
nroi_bkg[31,31] - create roi and subtract average value of surrounding pixels<br>
nroi_peak_bkg[11,15] - add functions together<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Peak_Analysis-__init__"><strong>__init__</strong></a>(self, initial_num<font color="#909090">=0</font>, ini_varx<font color="#909090">=''</font>, ini_vary<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="I16_Peak_Analysis-f_adv_fit"><strong>f_adv_fit</strong></a>(self)</dt><dd><tt>Start Advanced Fitting GUI</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_btn_2D"><strong>f_btn_2D</strong></a>(self)</dt><dd><tt>Button: Plot 2D</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_btn_3D"><strong>f_btn_3D</strong></a>(self)</dt><dd><tt>Button: Plot 3D</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_btn_fit"><strong>f_btn_fit</strong></a>(self)</dt><dd><tt>Button: Fit Peaks</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_btn_plot"><strong>f_btn_plot</strong></a>(self)</dt><dd><tt>Button: Plot scans</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_btn_surf"><strong>f_btn_surf</strong></a>(self)</dt><dd><tt>Button: Plot Surf</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_fldr_browse"><strong>f_fldr_browse</strong></a>(self)</dt><dd><tt>Browse for data directory</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_save_browse"><strong>f_save_browse</strong></a>(self)</dt><dd><tt>Browse for data directory</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_scan_check"><strong>f_scan_check</strong></a>(self)</dt><dd><tt>Check the scan numbers</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_scan_ld"><strong>f_scan_ld</strong></a>(self)</dt><dd><tt>Update GUI for selected scan number</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_scan_makefile"><strong>f_scan_makefile</strong></a>(self)</dt><dd><tt>Create python analysis file</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-f_scan_st"><strong>f_scan_st</strong></a>(self)</dt><dd><tt>Latest Scan number</tt></dd></dl>
<dl><dt><a name="I16_Peak_Analysis-getdepvar"><strong>getdepvar</strong></a>(self)</dt><dd><tt>Reads the dependant variable and returns the values given</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Print_Buffer">class <strong>I16_Print_Buffer</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Adds images to a series of A4 pages allowing multiple plots to be printed<br>
on one page.<br>
Activated from the "Print All Figures" button in <a href="#I16_Data_Viewer">I16_Data_Viewer</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Print_Buffer-__init__"><strong>__init__</strong></a>(self, fignos, ax_layout<font color="#909090">=[3, 2]</font>)</dt></dl>
<dl><dt><a name="I16_Print_Buffer-f_print"><strong>f_print</strong></a>(self)</dt><dd><tt>Print the buffer figure</tt></dd></dl>
<dl><dt><a name="I16_Print_Buffer-f_save"><strong>f_save</strong></a>(self)</dt><dd><tt>Save the buffer figure</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="I16_Scan_Selector">class <strong>I16_Scan_Selector</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Displays list of previous scans, selecting them will change the currently<br>
displayed scan in the main window.<br>
Opens on click of the "Last Scans window" button in <a href="#I16_Data_Viewer">I16_Data_Viewer</a><br>
- If "All scans" is ticked in the main window, this window will display<br>
all scans from this experiment<br>
- Otherwise, the last 100 scans will be displayed<br>
<br>
The "Update" button adds the most recent scans to the top of the list<br>
The "Reload" button reloads the scans, but also displays data associated with<br>
any metadata defined in the "show" box.<br>
<br>
E.G. <br>
Show: Ta >> Reload - scans are shown with temperatures<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="I16_Scan_Selector-__init__"><strong>__init__</strong></a>(self, parent, scanrange, showval<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="I16_Scan_Selector-f_reload"><strong>f_reload</strong></a>(self)</dt><dd><tt>Closes the current selector window and reloads it</tt></dd></dl>
<dl><dt><a name="I16_Scan_Selector-f_scan_select"><strong>f_scan_select</strong></a>(self, event)</dt><dd><tt>Select scan number from list box and send plot command to main window</tt></dd></dl>
<dl><dt><a name="I16_Scan_Selector-f_update"><strong>f_update</strong></a>(self)</dt><dd><tt>Closes the current selector window and reloads it</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="colour_cutoffs">class <strong>colour_cutoffs</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Change the vmin/vmax colormap limits of the current figure<br>
Activate form the console by typing:<br>
<a href="#colour_cutoffs">colour_cutoffs</a>()<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="colour_cutoffs-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_but1"><strong>f_but1</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_but2"><strong>f_but2</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_but3"><strong>f_but3</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_gcf"><strong>f_gcf</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_lower_left"><strong>f_lower_left</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_lower_right"><strong>f_lower_right</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_upper_left"><strong>f_upper_left</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-f_upper_right"><strong>f_upper_right</strong></a>(self)</dt></dl>
<dl><dt><a name="colour_cutoffs-update"><strong>update</strong></a>(self, event<font color="#909090">=None</font>)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>BF</strong> = ['Times', 12]<br>
<strong>HF</strong> = ['Courier', 12]<br>
<strong>LF</strong> = ['Times', 14]<br>
<strong>LINUX</strong> = {'pilatus': [6, 2.9], 'scan': [6, 4]}<br>
<strong>MAC</strong> = {'pilatus': [5, 2], 'scan': [5, 3]}<br>
<strong>NORMAL</strong> = {'pilatus': [6, 2.5], 'scan': [6, 4]}<br>
<strong>Py16GUI_Version</strong> = 3.2<br>
<strong>SF</strong> = ['Times New Roman', 14]<br>
<strong>WINDOWS</strong> = {'pilatus': [6, 2.5], 'scan': [6, 4]}</td></tr></table>
</body></html>