-
Notifications
You must be signed in to change notification settings - Fork 1
/
usb_Scan.html
329 lines (225 loc) · 16.4 KB
/
usb_Scan.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
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ScanPlan objects — xpdAcq 0.5 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="xpdAcq 0.5 documentation" href="index.html"/>
<link rel="up" title="For XPD Users" href="xpdusers.html"/>
<link rel="next" title="Where did all my Sample and Scan objects go?????" href="usb_Where.html"/>
<link rel="prev" title="Setting up your XPD acuisition objects" href="usb_Experiment.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> xpdAcq
</a>
<div class="version">
0.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quick Start</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="xpdusers.html">For XPD Users</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="sb_overview.html">Overview of xpd acquisition environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="sb_icollection.html">Overview of the bsui+xpdAcq environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_Beamtime.html">Setting up your Beamtime</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_Experiment.html">Setting up your XPD acuisition objects</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">ScanPlan objects</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#setting-up-scanplans">Setting up ScanPlans</a></li>
<li class="toctree-l3"><a class="reference internal" href="#summary-table-on-scanplan">Summary table on ScanPlan:</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="usb_Where.html">Where did all my Sample and Scan objects go?????</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_Where.html#bt-list-is-your-friends">bt.list() is your friends</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_Where.html#bt-list-gotchas">bt.list() Gotchas</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_Running.html">Running scans</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_QuickAssess.html">Initial assessment of your data</a></li>
<li class="toctree-l2"><a class="reference internal" href="usb_GlobalOptions.html">xpdAcq Configuration</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="beamlinestaff.html">For Beamline Staff</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="release_note.html">Release Notes</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">xpdAcq</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="xpdusers.html">For XPD Users</a> »</li>
<li>ScanPlan objects</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/usb_Scan.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="scanplan-objects">
<span id="usb-scan"></span><h1>ScanPlan objects<a class="headerlink" href="#scanplan-objects" title="Permalink to this headline">¶</a></h1>
<p>Firstly, what is a scanplan? A scanplan is a grouped set of detector exposures. The set may
contain just one exposure (we call that a count scan, <code class="docutils literal"><span class="pre">'ct'</span></code> ). Or it may be a series of exposures
taken one after the other, possibly with a delay between. We
call that a time-series (or <code class="docutils literal"><span class="pre">'tseries'</span></code> ). We also support two kinds of temperature related scanplans, which are temperature ramp, <code class="docutils literal"><span class="pre">'Tramp'</span></code> and temperature list, <code class="docutils literal"><span class="pre">Tlist</span></code>. More are also on the way, but
these simple scanplans may also be combined together in scripts, giving the user significant
control over how to construct their experiment.
Firstly, what is a ScanPlan? A <code class="docutils literal"><span class="pre">ScanPlan</span></code> is a grouped set of detector exposures. The set may
contain just one exposure (we call that a count scan, <code class="docutils literal"><span class="pre">ct</span></code> ). Or it may be a series of exposures
taken one after the other, possibly with a delay between. We call that a time-series (or <code class="docutils literal"><span class="pre">tseries</span></code> ).
Other temperature-related plans supported are temperature ramp, <code class="docutils literal"><span class="pre">Tramp</span></code> and temperature list scan, <code class="docutils literal"><span class="pre">Tlist</span></code>.
More are also on the way, but these simple <code class="docutils literal"><span class="pre">ScanPlan</span></code> may also be combined together in scripts,
giving the user significant control over how to construct their experiment.</p>
<p>To run a scan we need a <code class="docutils literal"><span class="pre">ScanPlan</span></code> and a <code class="docutils literal"><span class="pre">Sample</span></code>. The <code class="docutils literal"><span class="pre">ScanPlan</span></code> is the detailed description of
what the scan will do, but it doesn’t generate <em>any</em> scan until it is run on a particular sample.
Separating a scan into a plan and an execution (which is different than how SPEC works
for those old enough) makes it very easy to run a number of different samples with the
exact same <code class="docutils literal"><span class="pre">ScanPlan</span></code>, or (if you really want to) to collect dark images with exactly the same scan pattern, and so on.
We also want to save scan metadata accurately when the scan is actually run. To ensure this,
each scan object takes the scanplan parameters and it uses the same parameters
both to run the scan at run-time, and to save them, along with the sample information,
in the metadata for each exposure.</p>
<p>With this in mind, the workflow is that <em>we never edit a ScanPlan and rerun it</em> (stop that you SPEC people!).
What we do is that we <strong>create a new ScanPlan object</strong>,
every time we want to do a different, <em>even slightly different</em>, scan. These are all
saved for reload and will be sent home with you at the end of the experiment.</p>
<div class="section" id="setting-up-scanplans">
<h2>Setting up ScanPlans<a class="headerlink" href="#setting-up-scanplans" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal"><span class="pre">ScanPlan</span></code> takes <code class="docutils literal"><span class="pre">Beamtime</span></code>, scanplan and corresponding arguments. Let’s type <code class="docutils literal"><span class="pre">ScanPlan?</span></code> and hit return to find out more:</p>
<p>Here are some examples of valid count-type ScanPlan definitions:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">sc</span> <span class="o">=</span> <span class="n">ScanPlan</span><span class="p">(</span><span class="n">bt</span><span class="p">,</span> <span class="n">ct</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span> <span class="c1"># the simplest count scan definition</span>
</pre></div>
</div>
<dl class="docutils">
<dt>A few things to note:</dt>
<dd><ul class="first last simple">
<li>First argument is always <code class="docutils literal"><span class="pre">bt</span></code>, the <code class="docutils literal"><span class="pre">Beamtime</span></code> object.</li>
<li>The second argument is always the scanplan. In the example above, we
are using <em>count</em>, so we use <code class="docutils literal"><span class="pre">ct</span></code> as the second argument.</li>
<li>The scan parameter is fed in after scan type, starting from the third positional argument.</li>
</ul>
</dd>
<dt>Types of ScanPlan available in current version:</dt>
<dd><ul class="first last simple">
<li><code class="docutils literal"><span class="pre">ct</span></code> just exposes the detector for a number of seconds. e.g., <code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">ct,</span> <span class="pre">17.5)</span></code></li>
<li><code class="docutils literal"><span class="pre">tseries</span></code> executes a series of <code class="docutils literal"><span class="pre">num</span></code> counts of exposure time <code class="docutils literal"><span class="pre">exposure</span></code> seconds with a delay of <code class="docutils literal"><span class="pre">delay</span></code> seconds between them. e.g., <code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">tseries,</span> <span class="pre">1,</span> <span class="pre">59,</span> <span class="pre">50)</span></code> will measure 50 scans of 1 second with a delay of 59 seconds in between each of them.</li>
<li><code class="docutils literal"><span class="pre">Tramp</span></code> executes a temperature ramp from <code class="docutils literal"><span class="pre">'startingT'</span></code> to <code class="docutils literal"><span class="pre">'endingT'</span></code> in temperature steps of <code class="docutils literal"><span class="pre">Tstep</span></code> with exposure time of <code class="docutils literal"><span class="pre">exposure</span></code>. e.g., <code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">Tramp,</span> <span class="pre">1,</span> <span class="pre">200,</span> <span class="pre">500,</span> <span class="pre">5)</span></code> will automatically change the temperature,
starting at 200 K and ending at 500 K, measuring a scan of 1 s at every 5 K step. The temperature controller will hold at each temperature until the temperature stabilizes before starting the measurement.</li>
<li><code class="docutils literal"><span class="pre">Tlist</span></code> exposes the detector for a given exposure time <code class="docutils literal"><span class="pre">exposure</span></code>
in seconds at each temperature from a user-defined temperature
list. For example, <code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">Tlist,</span> <span class="pre">20,</span> <span class="pre">[250,</span> <span class="pre">180,</span> <span class="pre">200,</span> <span class="pre">230])</span></code>
will drive the temperature controller to 250K, 180K, 200K and 230K
and expose the detector for 20 seconds after the temperature
controller equilibrates at each of the temperatures.</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="summary-table-on-scanplan">
<h2>Summary table on ScanPlan:<a class="headerlink" href="#summary-table-on-scanplan" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="8%" />
<col width="34%" />
<col width="58%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">ScanPlan</th>
<th class="head">Syntax</th>
<th class="head">Summary</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">ct</span></code></td>
<td><code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">ct,</span> <span class="pre">17.5)</span></code></td>
<td>a count scan for 17.5s</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">tseries</span></code></td>
<td><code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">tseries,</span> <span class="pre">1,</span> <span class="pre">59,</span> <span class="pre">50)</span></code></td>
<td>time series with 1s count time, 59s delay and 50 repeats</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">Tramp</span></code></td>
<td><code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">Tramp</span> <span class="pre">,</span> <span class="pre">1,</span> <span class="pre">200,</span> <span class="pre">500,</span> <span class="pre">5)</span></code></td>
<td>temperature series with 1s count time, starting from 300k to 200k with 5k per step</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">Tlist</span></code></td>
<td><code class="docutils literal"><span class="pre">ScanPlan(bt,</span> <span class="pre">Tlist,</span> <span class="pre">5,</span> <span class="pre">[250,</span> <span class="pre">180,</span> <span class="pre">200,</span> <span class="pre">230])</span></code></td>
<td>exposure detector for 5s at 250K, 180K, 200K and 230K</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>OK, it is time to <a class="reference internal" href="usb_Running.html#usb-running"><span class="std std-ref">run our scans</span></a></p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="usb_Where.html" class="btn btn-neutral float-right" title="Where did all my Sample and Scan objects go?????" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="usb_Experiment.html" class="btn btn-neutral" title="Setting up your XPD acuisition objects" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright (c) 2016 trustees of Columbia University in the City of New York.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.5',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>