|
22 | 22 | "from ess.beer import BeerModMcStasWorkflow, BeerModMcStasWorkflowKnownPeaks\n", |
23 | 23 | "from ess.beer.data import mcstas_silicon_medium_resolution, mcstas_duplex, duplex_peaks_array, silicon_peaks_array\n", |
24 | 24 | "from ess.beer.types import *\n", |
| 25 | + "from ess.powder.types import *\n", |
25 | 26 | "\n", |
26 | 27 | "# Default bin edges for our d_hkl histograms\n", |
27 | 28 | "dspacing = sc.linspace('dspacing', 0.8, 2.2, 2000, unit='angstrom')\n", |
|
163 | 164 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
164 | 165 | "wf[DetectorBank] = DetectorBank.north\n", |
165 | 166 | "wf[Filename[SampleRun]] = mcstas_silicon_medium_resolution()\n", |
166 | | - "da = wf.compute(RawDetector[SampleRun])\n", |
| 167 | + "wf[DHKLList] = silicon_peaks_array()\n", |
| 168 | + "da = wf.compute(WavelengthDetector[SampleRun])\n", |
167 | 169 | "da.masks.clear()\n", |
168 | 170 | "da.hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
169 | 171 | ] |
|
183 | 185 | "metadata": {}, |
184 | 186 | "outputs": [], |
185 | 187 | "source": [ |
186 | | - "wf[DHKLList] = silicon_peaks_array()\n", |
187 | 188 | "wf[Filename[SampleRun]] = mcstas_silicon_medium_resolution()\n", |
188 | 189 | "\n", |
189 | 190 | "results = {}\n", |
190 | 191 | "for bank in DetectorBank:\n", |
191 | 192 | " wf[DetectorBank] = bank\n", |
192 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 193 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
193 | 194 | " results[bank] = (\n", |
194 | 195 | " da\n", |
195 | 196 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
220 | 221 | "results = {}\n", |
221 | 222 | "for bank in DetectorBank:\n", |
222 | 223 | " wf[DetectorBank] = bank\n", |
223 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 224 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
224 | 225 | " results[bank] = (\n", |
225 | 226 | " da\n", |
226 | 227 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
279 | 280 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
280 | 281 | "wf[DetectorBank] = DetectorBank.south\n", |
281 | 282 | "wf[Filename[SampleRun]] = mcstas_duplex(8)\n", |
282 | | - "wf.compute(RawDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-2)" |
| 283 | + "wf[DHKLList] = duplex_peaks_array()\n", |
| 284 | + "wf.compute(WavelengthDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-2)" |
283 | 285 | ] |
284 | 286 | }, |
285 | 287 | { |
|
297 | 299 | "metadata": {}, |
298 | 300 | "outputs": [], |
299 | 301 | "source": [ |
300 | | - "wf[DHKLList] = duplex_peaks_array()\n", |
301 | | - "\n", |
302 | 302 | "results = {}\n", |
303 | 303 | "for bank in DetectorBank:\n", |
304 | 304 | " wf[DetectorBank] = bank\n", |
305 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 305 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
306 | 306 | " results[bank] = (\n", |
307 | 307 | " da\n", |
308 | 308 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
333 | 333 | "results = {}\n", |
334 | 334 | "for bank in DetectorBank:\n", |
335 | 335 | " wf[DetectorBank] = bank\n", |
336 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 336 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
337 | 337 | " results[bank] = (\n", |
338 | 338 | " da\n", |
339 | 339 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
392 | 392 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
393 | 393 | "wf[DetectorBank] = DetectorBank.south\n", |
394 | 394 | "wf[Filename[SampleRun]] = mcstas_duplex(9)\n", |
395 | | - "wf.compute(RawDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
| 395 | + "wf[DHKLList] = duplex_peaks_array()\n", |
| 396 | + "wf.compute(WavelengthDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
396 | 397 | ] |
397 | 398 | }, |
398 | 399 | { |
|
410 | 411 | "metadata": {}, |
411 | 412 | "outputs": [], |
412 | 413 | "source": [ |
413 | | - "wf[DHKLList] = duplex_peaks_array()\n", |
414 | | - "\n", |
415 | 414 | "results = {}\n", |
416 | 415 | "for bank in DetectorBank:\n", |
417 | 416 | " wf[DetectorBank] = bank\n", |
418 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 417 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
419 | 418 | " results[bank] = (\n", |
420 | 419 | " da\n", |
421 | 420 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
446 | 445 | "results = {}\n", |
447 | 446 | "for bank in DetectorBank:\n", |
448 | 447 | " wf[DetectorBank] = bank\n", |
449 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 448 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
450 | 449 | " results[bank] = (\n", |
451 | 450 | " da\n", |
452 | 451 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
505 | 504 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
506 | 505 | "wf[DetectorBank] = DetectorBank.south\n", |
507 | 506 | "wf[Filename[SampleRun]] = mcstas_duplex(10)\n", |
508 | | - "wf.compute(RawDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
| 507 | + "wf[DHKLList] = duplex_peaks_array()\n", |
| 508 | + "wf.compute(WavelengthDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
509 | 509 | ] |
510 | 510 | }, |
511 | 511 | { |
|
523 | 523 | "metadata": {}, |
524 | 524 | "outputs": [], |
525 | 525 | "source": [ |
526 | | - "wf[DHKLList] = duplex_peaks_array()\n", |
527 | | - "\n", |
528 | 526 | "results = {}\n", |
529 | 527 | "for bank in DetectorBank:\n", |
530 | 528 | " wf[DetectorBank] = bank\n", |
531 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 529 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
532 | 530 | " results[bank] = (\n", |
533 | 531 | " da\n", |
534 | 532 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
559 | 557 | "results = {}\n", |
560 | 558 | "for bank in DetectorBank:\n", |
561 | 559 | " wf[DetectorBank] = bank\n", |
562 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 560 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
563 | 561 | " results[bank] = (\n", |
564 | 562 | " da\n", |
565 | 563 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
618 | 616 | "wf = BeerModMcStasWorkflowKnownPeaks()\n", |
619 | 617 | "wf[DetectorBank] = DetectorBank.south\n", |
620 | 618 | "wf[Filename[SampleRun]] = mcstas_duplex(16)\n", |
621 | | - "wf.compute(RawDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
| 619 | + "wf[DHKLList] = duplex_peaks_array()\n", |
| 620 | + "wf.compute(WavelengthDetector[SampleRun]).hist(two_theta=400, event_time_offset=1000).plot(norm='log', cmin=1.0e-3)" |
622 | 621 | ] |
623 | 622 | }, |
624 | 623 | { |
|
636 | 635 | "metadata": {}, |
637 | 636 | "outputs": [], |
638 | 637 | "source": [ |
639 | | - "wf[DHKLList] = duplex_peaks_array()\n", |
640 | | - "\n", |
641 | 638 | "results = {}\n", |
642 | 639 | "for bank in DetectorBank:\n", |
643 | 640 | " wf[DetectorBank] = bank\n", |
644 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 641 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
645 | 642 | " results[bank] = (\n", |
646 | 643 | " da\n", |
647 | 644 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
672 | 669 | "results = {}\n", |
673 | 670 | "for bank in DetectorBank:\n", |
674 | 671 | " wf[DetectorBank] = bank\n", |
675 | | - " da = wf.compute(TofDetector[SampleRun])\n", |
| 672 | + " da = wf.compute(WavelengthDetector[SampleRun])\n", |
676 | 673 | " results[bank] = (\n", |
677 | 674 | " da\n", |
678 | 675 | " .transform_coords(('dspacing',), graph=scn.conversion.graph.tof.elastic('tof'),)\n", |
|
0 commit comments