|
25 | 25 | "metadata": {}, |
26 | 26 | "outputs": [], |
27 | 27 | "source": [ |
28 | | - "import scipp as sc\n", |
29 | 28 | "import scippneutron as scn\n", |
30 | 29 | "\n", |
31 | 30 | "from ess.beer import BeerModMcStasWorkflow, BeerModMcStasWorkflowKnownPeaks\n", |
32 | 31 | "from ess.beer.data import mcstas_silicon_medium_resolution, mcstas_duplex, duplex_peaks_array, silicon_peaks_array\n", |
33 | | - "from ess.reduce.nexus.types import Filename, SampleRun\n", |
34 | | - "from ess.reduce.time_of_flight.types import DetectorTofData\n", |
35 | 32 | "from ess.beer.types import *\n", |
36 | 33 | "\n", |
37 | 34 | "# Default bin edges for our d_hkl histograms\n", |
|
173 | 170 | "source": [ |
174 | 171 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
175 | 172 | "wf[Filename[SampleRun]] = mcstas_silicon_medium_resolution()\n", |
176 | | - "wf.compute(DetectorData[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
| 173 | + "wf.compute(RawDetector[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
177 | 174 | ] |
178 | 175 | }, |
179 | 176 | { |
|
192 | 189 | "outputs": [], |
193 | 190 | "source": [ |
194 | 191 | "wf[DHKLList] = silicon_peaks_array()\n", |
195 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 192 | + "da = wf.compute(TofDetector[SampleRun])\n", |
196 | 193 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
197 | 194 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), silicon_peaks_array())" |
198 | 195 | ] |
|
214 | 211 | "source": [ |
215 | 212 | "wf = BeerModMcStasWorkflow()\n", |
216 | 213 | "wf[Filename[SampleRun]] = mcstas_silicon_medium_resolution()\n", |
217 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 214 | + "da = wf.compute(TofDetector[SampleRun])\n", |
218 | 215 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
219 | 216 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), silicon_peaks_array())" |
220 | 217 | ] |
|
268 | 265 | "source": [ |
269 | 266 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
270 | 267 | "wf[Filename[SampleRun]] = mcstas_duplex(8)\n", |
271 | | - "wf.compute(DetectorData[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
| 268 | + "wf.compute(RawDetector[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
272 | 269 | ] |
273 | 270 | }, |
274 | 271 | { |
|
287 | 284 | "outputs": [], |
288 | 285 | "source": [ |
289 | 286 | "wf[DHKLList] = duplex_peaks_array()\n", |
290 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 287 | + "da = wf.compute(TofDetector[SampleRun])\n", |
291 | 288 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
292 | 289 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
293 | 290 | ] |
|
309 | 306 | "source": [ |
310 | 307 | "wf = BeerModMcStasWorkflow()\n", |
311 | 308 | "wf[Filename[SampleRun]] = mcstas_duplex(8)\n", |
312 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 309 | + "da = wf.compute(TofDetector[SampleRun])\n", |
313 | 310 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
314 | 311 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
315 | 312 | ] |
|
363 | 360 | "source": [ |
364 | 361 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
365 | 362 | "wf[Filename[SampleRun]] = mcstas_duplex(9)\n", |
366 | | - "wf.compute(DetectorData[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
| 363 | + "wf.compute(RawDetector[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
367 | 364 | ] |
368 | 365 | }, |
369 | 366 | { |
|
382 | 379 | "outputs": [], |
383 | 380 | "source": [ |
384 | 381 | "wf[DHKLList] = duplex_peaks_array()\n", |
385 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 382 | + "da = wf.compute(TofDetector[SampleRun])\n", |
386 | 383 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
387 | 384 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
388 | 385 | ] |
|
404 | 401 | "source": [ |
405 | 402 | "wf = BeerModMcStasWorkflow()\n", |
406 | 403 | "wf[Filename[SampleRun]] = mcstas_duplex(9)\n", |
407 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 404 | + "da = wf.compute(TofDetector[SampleRun])\n", |
408 | 405 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
409 | 406 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
410 | 407 | ] |
|
458 | 455 | "source": [ |
459 | 456 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
460 | 457 | "wf[Filename[SampleRun]] = mcstas_duplex(10)\n", |
461 | | - "wf.compute(DetectorData[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
| 458 | + "wf.compute(RawDetector[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
462 | 459 | ] |
463 | 460 | }, |
464 | 461 | { |
|
477 | 474 | "outputs": [], |
478 | 475 | "source": [ |
479 | 476 | "wf[DHKLList] = duplex_peaks_array()\n", |
480 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 477 | + "da = wf.compute(TofDetector[SampleRun])\n", |
481 | 478 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
482 | 479 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
483 | 480 | ] |
|
499 | 496 | "source": [ |
500 | 497 | "wf = BeerModMcStasWorkflow()\n", |
501 | 498 | "wf[Filename[SampleRun]] = mcstas_duplex(10)\n", |
502 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 499 | + "da = wf.compute(TofDetector[SampleRun])\n", |
503 | 500 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
504 | 501 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
505 | 502 | ] |
|
553 | 550 | "source": [ |
554 | 551 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
555 | 552 | "wf[Filename[SampleRun]] = mcstas_duplex(16)\n", |
556 | | - "wf.compute(DetectorData[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
| 553 | + "wf.compute(RawDetector[SampleRun])['bank1'].hist(two_theta=1000, event_time_offset=1000).plot(norm='log')" |
557 | 554 | ] |
558 | 555 | }, |
559 | 556 | { |
|
572 | 569 | "outputs": [], |
573 | 570 | "source": [ |
574 | 571 | "wf[DHKLList] = duplex_peaks_array()\n", |
575 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 572 | + "da = wf.compute(TofDetector[SampleRun])\n", |
576 | 573 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
577 | 574 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
578 | 575 | ] |
|
594 | 591 | "source": [ |
595 | 592 | "wf = BeerModMcStasWorkflow()\n", |
596 | 593 | "wf[Filename[SampleRun]] = mcstas_duplex(16)\n", |
597 | | - "da = wf.compute(DetectorTofData[SampleRun])\n", |
| 594 | + "da = wf.compute(TofDetector[SampleRun])\n", |
598 | 595 | "da = da.transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
599 | 596 | "ground_truth_peak_positions(da.hist(dspacing=dspacing, dim=da.dims).plot(), duplex_peaks_array())" |
600 | 597 | ] |
|
0 commit comments