Skip to content

Commit 621d197

Browse files
authored
Merge pull request #190 from scipp/new-tof-lut-workflow
Update to use the new tof lookup table workflow
2 parents c9c29dd + a7b5da4 commit 621d197

File tree

17 files changed

+78
-84
lines changed

17 files changed

+78
-84
lines changed

tools/dream-make-tof-lookup-table.ipynb renamed to docs/user-guide/dream/dream-make-tof-lookup-table.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"id": "0",
66
"metadata": {},
77
"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."
911
]
1012
},
1113
{
@@ -16,7 +18,6 @@
1618
"outputs": [],
1719
"source": [
1820
"import scipp as sc\n",
19-
"import sciline as sl\n",
2021
"from ess.reduce import time_of_flight\n",
2122
"from ess.dream.beamline import InstrumentConfiguration, choppers"
2223
]
@@ -26,7 +27,9 @@
2627
"id": "2",
2728
"metadata": {},
2829
"source": [
29-
"## Select the choppers"
30+
"## Select the choppers\n",
31+
"\n",
32+
"We select the choppers for the 'high-flux' configuration."
3033
]
3134
},
3235
{
@@ -54,15 +57,12 @@
5457
"metadata": {},
5558
"outputs": [],
5659
"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",
6061
"\n",
6162
"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",
6666
"wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n",
6767
"wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n",
6868
"wf[time_of_flight.LookupTableRelativeErrorThreshold] = 0.02\n",

docs/user-guide/dream/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ dream-instrument-view
5454
workflow-widget-dream
5555
dream-detector-diagnostics
5656
dream-visualize-absorption
57+
dream-make-tof-lookup-table
5758
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ requires-python = ">=3.10"
3232
# Make sure to list one dependency per line.
3333
dependencies = [
3434
"dask",
35-
"essreduce>=25.05.3",
35+
"essreduce>=25.07.0",
3636
"graphviz",
3737
"numpy",
3838
"plopp>=25.03.0",

requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# --- END OF CUSTOM SECTION ---
44
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
55
dask
6-
essreduce>=25.05.3
6+
essreduce>=25.07.0
77
graphviz
88
numpy
99
plopp>=25.03.0

requirements/base.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# SHA1:81114073dd5e4b765405b54b3976f92d6a96439b
1+
# SHA1:8f044677d4db96fd48743befd036bb0b7410e72f
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
88
annotated-types==0.7.0
99
# via pydantic
@@ -21,21 +21,21 @@ cyclebane==24.10.0
2121
# via sciline
2222
cycler==0.12.1
2323
# via matplotlib
24-
dask==2025.5.1
24+
dask==2025.7.0
2525
# via -r base.in
2626
decorator==5.2.1
2727
# via ipython
2828
dnspython==2.7.0
2929
# via email-validator
3030
email-validator==2.2.0
3131
# via scippneutron
32-
essreduce==25.5.3
32+
essreduce==25.7.0
3333
# via -r base.in
3434
exceptiongroup==1.3.0
3535
# via ipython
3636
executing==2.2.0
3737
# via stack-data
38-
fonttools==4.58.4
38+
fonttools==4.58.5
3939
# via matplotlib
4040
fsspec==2025.5.1
4141
# via dask
@@ -143,7 +143,7 @@ scipp==25.5.1
143143
# scippneutron
144144
# scippnexus
145145
# tof
146-
scippneutron==25.6.0
146+
scippneutron==25.7.0
147147
# via
148148
# -r base.in
149149
# essreduce
@@ -177,7 +177,7 @@ traitlets==5.14.3
177177
# traittypes
178178
traittypes==0.2.1
179179
# via ipydatawidgets
180-
typing-extensions==4.14.0
180+
typing-extensions==4.14.1
181181
# via
182182
# exceptiongroup
183183
# ipython

requirements/basetest.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# SHA1:c4f3e9aaa3abd10fcdf497bea14415857f62cc89
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
8-
certifi==2025.6.15
8+
certifi==2025.7.14
99
# via requests
1010
charset-normalizer==3.4.2
1111
# via requests
@@ -21,7 +21,7 @@ packaging==25.0
2121
# via
2222
# pooch
2323
# pytest
24-
pandas==2.3.0
24+
pandas==2.3.1
2525
# via -r basetest.in
2626
platformdirs==4.3.8
2727
# via pooch
@@ -43,7 +43,7 @@ six==1.17.0
4343
# via python-dateutil
4444
tomli==2.2.1
4545
# via pytest
46-
typing-extensions==4.14.0
46+
typing-extensions==4.14.1
4747
# via exceptiongroup
4848
tzdata==2025.2
4949
# via pandas

requirements/ci.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# SHA1:6344d52635ea11dca331a3bc6eb1833c4c64d585
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
88
cachetools==6.1.0
99
# via tox
10-
certifi==2025.6.15
10+
certifi==2025.7.14
1111
# via requests
1212
chardet==5.2.0
1313
# via tox
@@ -50,7 +50,7 @@ tomli==2.2.1
5050
# tox
5151
tox==4.27.0
5252
# via -r ci.in
53-
typing-extensions==4.14.0
53+
typing-extensions==4.14.1
5454
# via tox
5555
urllib3==2.5.0
5656
# via requests

requirements/dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# SHA1:efd19a3a98c69fc3d6d6233ed855de7e4a208f74
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
88
-r base.txt
99
-r ci.txt
@@ -26,9 +26,9 @@ async-lru==2.0.5
2626
# via jupyterlab
2727
cffi==1.17.1
2828
# via argon2-cffi-bindings
29-
copier==9.7.1
29+
copier==9.8.0
3030
# via -r dev.in
31-
dunamai==1.24.1
31+
dunamai==1.25.0
3232
# via copier
3333
fqdn==1.5.1
3434
# via jsonschema
@@ -105,7 +105,7 @@ terminado==0.18.1
105105
# jupyter-server-terminals
106106
toposort==1.10
107107
# via pip-compile-multi
108-
types-python-dateutil==2.9.0.20250516
108+
types-python-dateutil==2.9.0.20250708
109109
# via arrow
110110
uri-template==1.3.0
111111
# via jsonschema

requirements/docs.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# SHA1:f584be06df2929a863ef5490377cbfe43c8e99a0
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
88
-r base.txt
99
accessible-pygments==0.0.5
@@ -26,7 +26,7 @@ beautifulsoup4==4.13.4
2626
# pydata-sphinx-theme
2727
bleach[css]==6.2.0
2828
# via nbconvert
29-
certifi==2025.6.15
29+
certifi==2025.7.14
3030
# via requests
3131
charset-normalizer==3.4.2
3232
# via requests
@@ -104,7 +104,7 @@ nbsphinx==0.9.7
104104
# via -r docs.in
105105
nest-asyncio==1.6.0
106106
# via ipykernel
107-
pandas==2.3.0
107+
pandas==2.3.1
108108
# via -r docs.in
109109
pandocfilters==1.5.1
110110
# via nbconvert

requirements/mypy.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SHA1:859ef9c15e5e57c6c91510133c01f5751feee941
22
#
3-
# This file was generated by pip-compile-multi.
3+
# This file is autogenerated by pip-compile-multi
44
# To update, run:
55
#
6-
# requirements upgrade
6+
# pip-compile-multi
77
#
88
-r test.txt
9-
mypy==1.16.1
9+
mypy==1.17.0
1010
# via -r mypy.in
1111
mypy-extensions==1.1.0
1212
# via mypy

0 commit comments

Comments
 (0)