|
5 | 5 | "id": "0", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | | - "# Create a time-of-flight lookup table for DREAM\n", |
| 8 | + "# Create a wavelength lookup table for DREAM\n", |
9 | 9 | "\n", |
10 | | - "This notebook shows how to create a time-of-flight lookup table for the DREAM instrument." |
| 10 | + "This notebook shows how to create a wavelength lookup table for the DREAM instrument." |
11 | 11 | ] |
12 | 12 | }, |
13 | 13 | { |
|
18 | 18 | "outputs": [], |
19 | 19 | "source": [ |
20 | 20 | "import scipp as sc\n", |
21 | | - "from ess.reduce import time_of_flight\n", |
| 21 | + "from ess.reduce import unwrap\n", |
22 | 22 | "from ess.reduce.nexus.types import AnyRun\n", |
23 | 23 | "from ess.dream.beamline import InstrumentConfiguration, choppers" |
24 | 24 | ] |
|
40 | 40 | "metadata": {}, |
41 | 41 | "outputs": [], |
42 | 42 | "source": [ |
43 | | - "disk_choppers = choppers(InstrumentConfiguration.high_flux_BC215)" |
| 43 | + "disk_choppers = choppers(InstrumentConfiguration.high_flux_BC240)" |
44 | 44 | ] |
45 | 45 | }, |
46 | 46 | { |
|
60 | 60 | "metadata": {}, |
61 | 61 | "outputs": [], |
62 | 62 | "source": [ |
63 | | - "wf = time_of_flight.TofLookupTableWorkflow()\n", |
| 63 | + "wf = unwrap.LookupTableWorkflow()\n", |
64 | 64 | "\n", |
65 | | - "wf[time_of_flight.LtotalRange] = sc.scalar(5.0, unit=\"m\"), sc.scalar(80.0, unit=\"m\")\n", |
66 | | - "wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n", |
67 | | - "wf[time_of_flight.SourcePosition] = sc.vector([0, 0, 0], unit='m')\n", |
68 | | - "wf[time_of_flight.DiskChoppers[AnyRun]] = disk_choppers\n", |
69 | | - "wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n", |
70 | | - "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n", |
71 | | - "wf[time_of_flight.PulsePeriod] = 1.0 / sc.scalar(14.0, unit=\"Hz\")\n", |
72 | | - "wf[time_of_flight.PulseStride] = 1\n", |
73 | | - "wf[time_of_flight.PulseStrideOffset] = None" |
| 65 | + "wf[unwrap.LtotalRange] = sc.scalar(5.0, unit=\"m\"), sc.scalar(80.0, unit=\"m\")\n", |
| 66 | + "wf[unwrap.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n", |
| 67 | + "wf[unwrap.SourcePosition] = sc.vector([0, 0, 0], unit='m')\n", |
| 68 | + "wf[unwrap.DiskChoppers[AnyRun]] = disk_choppers\n", |
| 69 | + "wf[unwrap.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n", |
| 70 | + "wf[unwrap.TimeResolution] = sc.scalar(250.0, unit='us')\n", |
| 71 | + "wf[unwrap.PulsePeriod] = 1.0 / sc.scalar(14.0, unit=\"Hz\")\n", |
| 72 | + "wf[unwrap.PulseStride] = 1\n", |
| 73 | + "wf[unwrap.PulseStrideOffset] = None" |
74 | 74 | ] |
75 | 75 | }, |
76 | 76 | { |
|
88 | 88 | "metadata": {}, |
89 | 89 | "outputs": [], |
90 | 90 | "source": [ |
91 | | - "table = wf.compute(time_of_flight.TimeOfFlightLookupTable)\n", |
| 91 | + "table = wf.compute(unwrap.LookupTable)\n", |
92 | 92 | "table.array" |
93 | 93 | ] |
94 | 94 | }, |
|
117 | 117 | "metadata": {}, |
118 | 118 | "outputs": [], |
119 | 119 | "source": [ |
120 | | - "table.save_hdf5('DREAM-high-flux-tof-lut-5m-80m.h5')" |
| 120 | + "table.save_hdf5('DREAM-high-flux-wavelength-lut-5m-80m-bc240.h5')" |
121 | 121 | ] |
122 | 122 | } |
123 | 123 | ], |
|
0 commit comments