|
24 | 24 | "import plopp as pp\n", |
25 | 25 | "import scipp as sc\n", |
26 | 26 | "from scippneutron.chopper import DiskChopper\n", |
27 | | - "from ess.reduce.nexus.types import AnyRun, DetectorData, SampleRun\n", |
| 27 | + "from ess.reduce.nexus.types import AnyRun, RawDetector, SampleRun\n", |
28 | 28 | "from ess.reduce.time_of_flight import *" |
29 | 29 | ] |
30 | 30 | }, |
|
300 | 300 | "source": [ |
301 | 301 | "wf = GenericTofWorkflow(run_types=[SampleRun], monitor_types=[])\n", |
302 | 302 | "\n", |
303 | | - "wf[DetectorData[SampleRun]] = raw_data\n", |
| 303 | + "wf[RawDetector[SampleRun]] = raw_data\n", |
304 | 304 | "wf[DetectorLtotal[SampleRun]] = Ltotal\n", |
305 | 305 | "\n", |
306 | | - "wf.visualize(DetectorTofData[SampleRun])" |
| 306 | + "wf.visualize(TofDetector[SampleRun])" |
307 | 307 | ] |
308 | 308 | }, |
309 | 309 | { |
|
436 | 436 | ] |
437 | 437 | }, |
438 | 438 | { |
439 | | - "attachments": {}, |
440 | 439 | "cell_type": "markdown", |
441 | 440 | "id": "30", |
442 | 441 | "metadata": {}, |
|
457 | 456 | "wf[TimeOfFlightLookupTable] = table\n", |
458 | 457 | "\n", |
459 | 458 | "# Compute time-of-flight of neutron events\n", |
460 | | - "tofs = wf.compute(DetectorTofData[SampleRun])\n", |
| 459 | + "tofs = wf.compute(TofDetector[SampleRun])\n", |
461 | 460 | "tofs" |
462 | 461 | ] |
463 | 462 | }, |
|
616 | 615 | "outputs": [], |
617 | 616 | "source": [ |
618 | 617 | "# Update workflow\n", |
619 | | - "wf[DetectorData[SampleRun]] = raw_data\n", |
| 618 | + "wf[RawDetector[SampleRun]] = raw_data\n", |
620 | 619 | "wf[DetectorLtotal[SampleRun]] = Ltotal\n", |
621 | 620 | "\n", |
622 | 621 | "# Compute tofs and wavelengths\n", |
623 | | - "tofs = wf.compute(DetectorTofData[SampleRun])\n", |
| 622 | + "tofs = wf.compute(TofDetector[SampleRun])\n", |
624 | 623 | "wav_wfm = tofs.transform_coords(\"wavelength\", graph=graph)\n", |
625 | 624 | "\n", |
626 | 625 | "# Compare in plot\n", |
|
795 | 794 | "metadata": {}, |
796 | 795 | "outputs": [], |
797 | 796 | "source": [ |
798 | | - "wf[DetectorData[SampleRun]] = ess_beamline.get_monitor(\"detector\")[0]\n", |
| 797 | + "wf[RawDetector[SampleRun]] = ess_beamline.get_monitor(\"detector\")[0]\n", |
799 | 798 | "wf[DetectorLtotal[SampleRun]] = Ltotal\n", |
800 | 799 | "\n", |
801 | 800 | "wf[TimeOfFlightLookupTable] = table\n", |
802 | 801 | "\n", |
803 | 802 | "# Compute time-of-flight\n", |
804 | | - "tofs = wf.compute(DetectorTofData[SampleRun])\n", |
| 803 | + "tofs = wf.compute(TofDetector[SampleRun])\n", |
805 | 804 | "# Compute wavelength\n", |
806 | 805 | "wav_wfm = tofs.transform_coords(\"wavelength\", graph=graph)\n", |
807 | 806 | "\n", |
|
823 | 822 | "display_name": "Python 3 (ipykernel)", |
824 | 823 | "language": "python", |
825 | 824 | "name": "python3" |
826 | | - }, |
827 | | - "language_info": { |
828 | | - "codemirror_mode": { |
829 | | - "name": "ipython", |
830 | | - "version": 3 |
831 | | - }, |
832 | | - "file_extension": ".py", |
833 | | - "mimetype": "text/x-python", |
834 | | - "name": "python", |
835 | | - "nbconvert_exporter": "python", |
836 | | - "pygments_lexer": "ipython3" |
837 | 825 | } |
838 | 826 | }, |
839 | 827 | "nbformat": 4, |
|
0 commit comments