|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "markdown",
|
5 |
| - "id": "32ad7110-b627-4e52-b014-a70ad3d5193a", |
| 5 | + "id": "0", |
6 | 6 | "metadata": {},
|
7 | 7 | "source": [
|
8 | 8 | "# Component guide\n",
|
|
14 | 14 | {
|
15 | 15 | "cell_type": "code",
|
16 | 16 | "execution_count": null,
|
17 |
| - "id": "1d69bb0a-4b4d-47c6-9465-318c21e72e7c", |
| 17 | + "id": "1", |
18 | 18 | "metadata": {},
|
19 | 19 | "outputs": [],
|
20 | 20 | "source": [
|
|
29 | 29 | },
|
30 | 30 | {
|
31 | 31 | "cell_type": "markdown",
|
32 |
| - "id": "0543c13d-847d-4642-8736-14a75ed5fd01", |
| 32 | + "id": "2", |
33 | 33 | "metadata": {},
|
34 | 34 | "source": [
|
35 | 35 | "We begin by making a source pulse using the profile from ESS."
|
|
38 | 38 | {
|
39 | 39 | "cell_type": "code",
|
40 | 40 | "execution_count": null,
|
41 |
| - "id": "35b39244-c45b-4bdb-8138-7d0e56a40478", |
| 41 | + "id": "3", |
42 | 42 | "metadata": {},
|
43 | 43 | "outputs": [],
|
44 | 44 | "source": [
|
|
48 | 48 | },
|
49 | 49 | {
|
50 | 50 | "cell_type": "markdown",
|
51 |
| - "id": "3c6ecb82-a47f-4f66-a067-9224e9d67be9", |
| 51 | + "id": "4", |
52 | 52 | "metadata": {},
|
53 | 53 | "source": [
|
54 | 54 | "## Adding a detector\n",
|
|
60 | 60 | {
|
61 | 61 | "cell_type": "code",
|
62 | 62 | "execution_count": null,
|
63 |
| - "id": "e2ced2be-d642-4886-9281-37cd90102c31", |
| 63 | + "id": "5", |
64 | 64 | "metadata": {},
|
65 | 65 | "outputs": [],
|
66 | 66 | "source": [
|
67 |
| - "detector = tof.Detector(distance=30.0 * meter)\n", |
| 67 | + "detector = tof.Detector(distance=30.0 * meter, name='detector')\n", |
68 | 68 | "\n",
|
69 | 69 | "# Build the instrument model\n",
|
70 | 70 | "model = tof.Model(source=source, detectors=[detector])\n",
|
|
74 | 74 | {
|
75 | 75 | "cell_type": "code",
|
76 | 76 | "execution_count": null,
|
77 |
| - "id": "75dd1359-d990-482c-b0d6-4a0ae094b0fc", |
| 77 | + "id": "6", |
78 | 78 | "metadata": {},
|
79 | 79 | "outputs": [],
|
80 | 80 | "source": [
|
|
85 | 85 | },
|
86 | 86 | {
|
87 | 87 | "cell_type": "markdown",
|
88 |
| - "id": "a2c80ee1-5729-4a09-88c0-3c4e04610772", |
| 88 | + "id": "7", |
89 | 89 | "metadata": {},
|
90 | 90 | "source": [
|
91 | 91 | "As expected, the detector sees all the neutrons from the pulse.\n",
|
|
96 | 96 | {
|
97 | 97 | "cell_type": "code",
|
98 | 98 | "execution_count": null,
|
99 |
| - "id": "112124d4-689b-408a-9be6-de1bef8a6205", |
| 99 | + "id": "8", |
100 | 100 | "metadata": {},
|
101 | 101 | "outputs": [],
|
102 | 102 | "source": [
|
|
105 | 105 | },
|
106 | 106 | {
|
107 | 107 | "cell_type": "markdown",
|
108 |
| - "id": "34267819-4f83-48c6-b51b-9f13742ac3da", |
| 108 | + "id": "9", |
109 | 109 | "metadata": {},
|
110 | 110 | "source": [
|
111 | 111 | "The data itself is available via the `.toas`, `.wavelengths`, `.birth_times`, and `.speeds` properties,\n",
|
|
119 | 119 | {
|
120 | 120 | "cell_type": "code",
|
121 | 121 | "execution_count": null,
|
122 |
| - "id": "bbda2581-ebfa-44ce-ae58-1f4f2db832d9", |
| 122 | + "id": "10", |
123 | 123 | "metadata": {},
|
124 | 124 | "outputs": [],
|
125 | 125 | "source": [
|
|
128 | 128 | },
|
129 | 129 | {
|
130 | 130 | "cell_type": "markdown",
|
131 |
| - "id": "89ad197a-4304-4cff-a332-e865a2c93f43", |
| 131 | + "id": "11", |
132 | 132 | "metadata": {},
|
133 | 133 | "source": [
|
134 | 134 | "## Adding a chopper\n",
|
|
141 | 141 | {
|
142 | 142 | "cell_type": "code",
|
143 | 143 | "execution_count": null,
|
144 |
| - "id": "e7e49cac-affd-4c01-860f-03934bc348e9", |
| 144 | + "id": "12", |
145 | 145 | "metadata": {},
|
146 | 146 | "outputs": [],
|
147 | 147 | "source": [
|
|
166 | 166 | },
|
167 | 167 | {
|
168 | 168 | "cell_type": "markdown",
|
169 |
| - "id": "6893e0a2-70c9-424f-aeb2-aac010fc02bd", |
| 169 | + "id": "13", |
170 | 170 | "metadata": {},
|
171 | 171 | "source": [
|
172 | 172 | "We can directly set this on our existing model, and re-run the simulation."
|
|
175 | 175 | {
|
176 | 176 | "cell_type": "code",
|
177 | 177 | "execution_count": null,
|
178 |
| - "id": "48909c2a-51e8-4532-a8eb-7c7bbba7544d", |
| 178 | + "id": "14", |
179 | 179 | "metadata": {},
|
180 | 180 | "outputs": [],
|
181 | 181 | "source": [
|
|
186 | 186 | },
|
187 | 187 | {
|
188 | 188 | "cell_type": "markdown",
|
189 |
| - "id": "3155b564-12e1-4d06-a2dd-d376314713f4", |
| 189 | + "id": "15", |
190 | 190 | "metadata": {},
|
191 | 191 | "source": [
|
192 | 192 | "As expected, the two openings now create two bursts of neutrons,\n",
|
|
198 | 198 | {
|
199 | 199 | "cell_type": "code",
|
200 | 200 | "execution_count": null,
|
201 |
| - "id": "94bc5f13-4e58-4ae4-ba15-86078ab8311d", |
| 201 | + "id": "16", |
202 | 202 | "metadata": {},
|
203 | 203 | "outputs": [],
|
204 | 204 | "source": [
|
|
207 | 207 | },
|
208 | 208 | {
|
209 | 209 | "cell_type": "markdown",
|
210 |
| - "id": "7ce2e25e-e21f-442b-b729-9b1c7a97893b", |
| 210 | + "id": "17", |
211 | 211 | "metadata": {},
|
212 | 212 | "source": [
|
213 | 213 | "we notice that the chopper sees all the incoming neutrons,\n",
|
|
219 | 219 | {
|
220 | 220 | "cell_type": "code",
|
221 | 221 | "execution_count": null,
|
222 |
| - "id": "90341882-625a-432d-8625-3d0850403f85", |
| 222 | + "id": "18", |
223 | 223 | "metadata": {},
|
224 | 224 | "outputs": [],
|
225 | 225 | "source": [
|
|
228 | 228 | },
|
229 | 229 | {
|
230 | 230 | "cell_type": "markdown",
|
231 |
| - "id": "68e35c62-6072-47b1-8c3e-e610826da008", |
| 231 | + "id": "19", |
232 | 232 | "metadata": {},
|
233 | 233 | "source": [
|
234 | 234 | "## Multiple choppers\n",
|
|
241 | 241 | {
|
242 | 242 | "cell_type": "code",
|
243 | 243 | "execution_count": null,
|
244 |
| - "id": "ac5f9697-a2a6-45a8-ad99-af6ad1a60be7", |
| 244 | + "id": "20", |
245 | 245 | "metadata": {},
|
246 | 246 | "outputs": [],
|
247 | 247 | "source": [
|
|
269 | 269 | },
|
270 | 270 | {
|
271 | 271 | "cell_type": "markdown",
|
272 |
| - "id": "62d721c5-3c3e-457c-ab05-60659fccdaaa", |
| 272 | + "id": "21", |
273 | 273 | "metadata": {},
|
274 | 274 | "source": [
|
275 | 275 | "The distribution of neutrons that are blocked and pass through the second chopper looks as follows:"
|
|
278 | 278 | {
|
279 | 279 | "cell_type": "code",
|
280 | 280 | "execution_count": null,
|
281 |
| - "id": "ab11bd09-73ba-4bf8-9b52-e503d77f3f5c", |
| 281 | + "id": "22", |
282 | 282 | "metadata": {},
|
283 | 283 | "outputs": [],
|
284 | 284 | "source": [
|
|
287 | 287 | },
|
288 | 288 | {
|
289 | 289 | "cell_type": "markdown",
|
290 |
| - "id": "09d6cbef-f2f3-48db-a696-b4ed912817c8", |
| 290 | + "id": "23", |
291 | 291 | "metadata": {},
|
292 | 292 | "source": [
|
293 | 293 | "while the detector now sees 4 peaks"
|
|
296 | 296 | {
|
297 | 297 | "cell_type": "code",
|
298 | 298 | "execution_count": null,
|
299 |
| - "id": "20349f5e-bfd3-4ccb-bde4-119f3e3d423a", |
| 299 | + "id": "24", |
300 | 300 | "metadata": {},
|
301 | 301 | "outputs": [],
|
302 | 302 | "source": [
|
|
305 | 305 | },
|
306 | 306 | {
|
307 | 307 | "cell_type": "markdown",
|
308 |
| - "id": "55c8ca14-e885-43b2-8409-48c1eb964625", |
| 308 | + "id": "25", |
309 | 309 | "metadata": {},
|
310 | 310 | "source": [
|
311 | 311 | "To view the blocked rays on the time-distance diagram of the model, use"
|
|
314 | 314 | {
|
315 | 315 | "cell_type": "code",
|
316 | 316 | "execution_count": null,
|
317 |
| - "id": "a3e040c6-afee-495f-a32f-7fdcad506df1", |
| 317 | + "id": "26", |
318 | 318 | "metadata": {},
|
319 | 319 | "outputs": [],
|
320 | 320 | "source": [
|
|
323 | 323 | },
|
324 | 324 | {
|
325 | 325 | "cell_type": "markdown",
|
326 |
| - "id": "b3c4a5fb-010b-4d6a-a391-4fb48aa4b1d2", |
| 326 | + "id": "27", |
327 | 327 | "metadata": {},
|
328 | 328 | "source": [
|
329 | 329 | "## Adding a monitor\n",
|
|
335 | 335 | {
|
336 | 336 | "cell_type": "code",
|
337 | 337 | "execution_count": null,
|
338 |
| - "id": "1c8bdc32-583a-4c7c-8c6d-34dab8061c6f", |
| 338 | + "id": "28", |
339 | 339 | "metadata": {},
|
340 | 340 | "outputs": [],
|
341 | 341 | "source": [
|
|
349 | 349 | {
|
350 | 350 | "cell_type": "code",
|
351 | 351 | "execution_count": null,
|
352 |
| - "id": "2f008516-af80-4c55-a6bb-a71a86fa9132", |
| 352 | + "id": "29", |
353 | 353 | "metadata": {},
|
354 | 354 | "outputs": [],
|
355 | 355 | "source": [
|
|
358 | 358 | },
|
359 | 359 | {
|
360 | 360 | "cell_type": "markdown",
|
361 |
| - "id": "021f81eb-42c3-4094-981e-ada20eca3fdb", |
| 361 | + "id": "30", |
362 | 362 | "metadata": {},
|
363 | 363 | "source": [
|
364 | 364 | "## Counter-rotating chopper\n",
|
|
373 | 373 | {
|
374 | 374 | "cell_type": "code",
|
375 | 375 | "execution_count": null,
|
376 |
| - "id": "0e978761-f2de-423e-9e43-a9e664a85a48", |
| 376 | + "id": "31", |
377 | 377 | "metadata": {},
|
378 | 378 | "outputs": [],
|
379 | 379 | "source": [
|
|
402 | 402 | {
|
403 | 403 | "cell_type": "code",
|
404 | 404 | "execution_count": null,
|
405 |
| - "id": "354e87fd-05e4-4237-84d7-3599610e3403", |
| 405 | + "id": "32", |
406 | 406 | "metadata": {},
|
407 | 407 | "outputs": [],
|
408 | 408 | "source": [
|
|
0 commit comments