|
5 | 5 | "id": "0", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | | - "# Create a time-of-flight lookup table for DREAM" |
| 8 | + "# Create a time-of-flight lookup table for DREAM\n", |
| 9 | + "\n", |
| 10 | + "This notebook shows how to create a time-of-flight lookup table for the DREAM instrument." |
9 | 11 | ] |
10 | 12 | }, |
11 | 13 | { |
|
16 | 18 | "outputs": [], |
17 | 19 | "source": [ |
18 | 20 | "import scipp as sc\n", |
19 | | - "import sciline as sl\n", |
20 | 21 | "from ess.reduce import time_of_flight\n", |
21 | 22 | "from ess.dream.beamline import InstrumentConfiguration, choppers" |
22 | 23 | ] |
|
26 | 27 | "id": "2", |
27 | 28 | "metadata": {}, |
28 | 29 | "source": [ |
29 | | - "## Select the choppers" |
| 30 | + "## Select the choppers\n", |
| 31 | + "\n", |
| 32 | + "We select the choppers for the 'high-flux' configuration." |
30 | 33 | ] |
31 | 34 | }, |
32 | 35 | { |
|
54 | 57 | "metadata": {}, |
55 | 58 | "outputs": [], |
56 | 59 | "source": [ |
57 | | - "wf = sl.Pipeline(\n", |
58 | | - " time_of_flight.providers(), params=time_of_flight.default_parameters()\n", |
59 | | - ")\n", |
| 60 | + "wf = time_of_flight.TofLookupTableWorkflow()\n", |
60 | 61 | "\n", |
61 | 62 | "wf[time_of_flight.LtotalRange] = sc.scalar(60.0, unit=\"m\"), sc.scalar(80.0, unit=\"m\")\n", |
62 | | - "wf[time_of_flight.SimulationResults] = time_of_flight.simulate_beamline(\n", |
63 | | - " choppers=disk_choppers, neutrons=5_000_000, source_position=sc.vector([0, 0, 0], unit='m'),\n", |
64 | | - ")\n", |
65 | | - "\n", |
| 63 | + "wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n", |
| 64 | + "wf[time_of_flight.SourcePosition] = sc.vector([0, 0, 0], unit='m')\n", |
| 65 | + "wf[time_of_flight.DiskChoppers] = disk_choppers\n", |
66 | 66 | "wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n", |
67 | 67 | "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n", |
68 | 68 | "wf[time_of_flight.LookupTableRelativeErrorThreshold] = 0.02\n", |
|
0 commit comments