Skip to content

Commit d0f534d

Browse files
authored
Merge pull request #259 from scipp/diffraction-tofectomy
Tofectomy: workflows without tof
2 parents 2c8fc71 + 6e5ac55 commit d0f534d

23 files changed

+273
-226
lines changed

docs/user-guide/dream/dream-advanced-powder-reduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@
628628
"name": "python",
629629
"nbconvert_exporter": "python",
630630
"pygments_lexer": "ipython3",
631-
"version": "3.10.14"
631+
"version": "3.12.12"
632632
}
633633
},
634634
"nbformat": 4,

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"id": "0",
66
"metadata": {},
77
"source": [
8-
"# Create a time-of-flight lookup table for DREAM\n",
8+
"# Create a wavelength lookup table for DREAM\n",
99
"\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."
1111
]
1212
},
1313
{
@@ -18,7 +18,7 @@
1818
"outputs": [],
1919
"source": [
2020
"import scipp as sc\n",
21-
"from ess.reduce import time_of_flight\n",
21+
"from ess.reduce import unwrap\n",
2222
"from ess.reduce.nexus.types import AnyRun\n",
2323
"from ess.dream.beamline import InstrumentConfiguration, choppers"
2424
]
@@ -40,7 +40,7 @@
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"disk_choppers = choppers(InstrumentConfiguration.high_flux_BC215)"
43+
"disk_choppers = choppers(InstrumentConfiguration.high_flux_BC240)"
4444
]
4545
},
4646
{
@@ -60,17 +60,17 @@
6060
"metadata": {},
6161
"outputs": [],
6262
"source": [
63-
"wf = time_of_flight.TofLookupTableWorkflow()\n",
63+
"wf = unwrap.LookupTableWorkflow()\n",
6464
"\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"
7474
]
7575
},
7676
{
@@ -88,7 +88,7 @@
8888
"metadata": {},
8989
"outputs": [],
9090
"source": [
91-
"table = wf.compute(time_of_flight.TimeOfFlightLookupTable)\n",
91+
"table = wf.compute(unwrap.LookupTable)\n",
9292
"table.array"
9393
]
9494
},
@@ -117,7 +117,7 @@
117117
"metadata": {},
118118
"outputs": [],
119119
"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')"
121121
]
122122
}
123123
],

docs/user-guide/dream/dream-powder-reduction.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@
145145
"outputs": [],
146146
"source": [
147147
"histogram = intensity.hist()\n",
148-
"fig = histogram.plot(title=intensity.coords['detector'].value.capitalize())\n",
149-
"fig.ax.set_ylabel(f\"I(d) [{histogram.unit}]\")\n",
150-
"fig"
148+
"histogram.plot(title=intensity.coords['detector'].value.capitalize(), ylabel=f\"I(d) [{histogram.unit}]\")"
151149
]
152150
},
153151
{

docs/user-guide/sns-instruments/POWGEN_data_reduction.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
"source": [
240240
"results = workflow.compute(\n",
241241
" (\n",
242-
" TofDetector[SampleRun],\n",
242+
" WavelengthDetector[SampleRun],\n",
243243
" CorrectedDetector[SampleRun],\n",
244244
" )\n",
245245
")"
@@ -252,7 +252,7 @@
252252
"metadata": {},
253253
"outputs": [],
254254
"source": [
255-
"results[TofDetector[SampleRun]]"
255+
"results[WavelengthDetector[SampleRun]]"
256256
]
257257
},
258258
{
@@ -377,7 +377,8 @@
377377
"mimetype": "text/x-python",
378378
"name": "python",
379379
"nbconvert_exporter": "python",
380-
"pygments_lexer": "ipython3"
380+
"pygments_lexer": "ipython3",
381+
"version": "3.12.12"
381382
}
382383
},
383384
"nbformat": 4,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ requires-python = ">=3.11"
3131
# Make sure to list one dependency per line.
3232
dependencies = [
3333
"dask>=2022.1.0",
34-
"essreduce>=26.3.1",
34+
"essreduce>=26.4.0",
3535
"graphviz",
3636
"numpy>=2",
3737
"plopp>=26.2.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>=2022.1.0
6-
essreduce>=26.3.1
6+
essreduce>=26.4.0
77
graphviz
88
numpy>=2
99
plopp>=26.2.0

requirements/base.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SHA1:81c10bea2bf8b09c721c1bb7b501d35596a04095
1+
# SHA1:d9fbbf694f7784dc50f913e8e6d0bcc452239f7a
22
#
33
# This file was generated by pip-compile-multi.
44
# To update, run:
@@ -7,13 +7,13 @@
77
#
88
annotated-types==0.7.0
99
# via pydantic
10-
ase==3.27.0
10+
ase==3.28.0
1111
# via ncrystal
1212
asttokens==3.0.1
1313
# via stack-data
1414
certifi==2026.2.25
1515
# via requests
16-
charset-normalizer==3.4.5
16+
charset-normalizer==3.4.6
1717
# via requests
1818
click==8.3.1
1919
# via dask
@@ -27,19 +27,19 @@ cyclebane==24.10.0
2727
# via sciline
2828
cycler==0.12.1
2929
# via matplotlib
30-
dask==2026.1.2
30+
dask==2026.3.0
3131
# via -r base.in
3232
decorator==5.2.1
3333
# via ipython
3434
dnspython==2.8.0
3535
# via email-validator
3636
email-validator==2.3.0
3737
# via scippneutron
38-
essreduce==26.3.1
38+
essreduce==26.4.0
3939
# via -r base.in
4040
executing==2.2.1
4141
# via stack-data
42-
fonttools==4.62.0
42+
fonttools==4.62.1
4343
# via matplotlib
4444
fsspec==2026.2.0
4545
# via dask
@@ -55,7 +55,7 @@ idna==3.11
5555
# via
5656
# email-validator
5757
# requests
58-
importlib-metadata==8.7.1
58+
importlib-metadata==9.0.0
5959
# via dask
6060
ipydatawidgets==4.3.5
6161
# via pythreejs
@@ -127,7 +127,7 @@ pillow==12.1.1
127127
# via matplotlib
128128
platformdirs==4.9.4
129129
# via pooch
130-
plopp==26.3.0
130+
plopp==26.3.1
131131
# via
132132
# -r base.in
133133
# scippneutron
@@ -164,7 +164,7 @@ sciline==25.11.1
164164
# via
165165
# -r base.in
166166
# essreduce
167-
scipp==26.3.0
167+
scipp==26.3.1
168168
# via
169169
# -r base.in
170170
# essreduce
@@ -193,7 +193,7 @@ spglib==2.6.0
193193
# ncrystal
194194
stack-data==0.6.3
195195
# via ipython
196-
tof==26.1.0
196+
tof==26.3.0
197197
# via -r base.in
198198
toolz==1.1.0
199199
# via

requirements/basetest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ asttokens==3.0.1
99
# via stack-data
1010
certifi==2026.2.25
1111
# via requests
12-
charset-normalizer==3.4.5
12+
charset-normalizer==3.4.6
1313
# via requests
1414
comm==0.2.3
1515
# via ipywidgets

requirements/ci.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
#
66
# requirements upgrade
77
#
8-
cachetools==7.0.4
8+
cachetools==7.0.5
99
# via tox
1010
certifi==2026.2.25
1111
# via requests
12-
charset-normalizer==3.4.5
12+
charset-normalizer==3.4.6
1313
# via requests
1414
colorama==0.4.6
1515
# via tox
1616
distlib==0.4.0
1717
# via virtualenv
18-
filelock==3.25.0
18+
filelock==3.25.2
1919
# via
2020
# python-discovery
2121
# tox
@@ -40,17 +40,17 @@ pluggy==1.6.0
4040
# via tox
4141
pyproject-api==1.10.0
4242
# via tox
43-
python-discovery==1.1.1
43+
python-discovery==1.2.0
4444
# via virtualenv
4545
requests==2.32.5
4646
# via -r ci.in
4747
smmap==5.0.3
4848
# via gitdb
4949
tomli-w==1.2.0
5050
# via tox
51-
tox==4.49.0
51+
tox==4.50.3
5252
# via -r ci.in
5353
urllib3==2.6.3
5454
# via requests
55-
virtualenv==21.1.0
55+
virtualenv==21.2.0
5656
# via tox

requirements/dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-r static.txt
1313
-r test.txt
1414
-r wheels.txt
15-
anyio==4.12.1
15+
anyio==4.13.0
1616
# via
1717
# httpx
1818
# jupyter-server
@@ -22,11 +22,11 @@ argon2-cffi-bindings==25.1.0
2222
# via argon2-cffi
2323
arrow==1.4.0
2424
# via isoduration
25-
async-lru==2.2.0
25+
async-lru==2.3.0
2626
# via jupyterlab
2727
cffi==2.0.0
2828
# via argon2-cffi-bindings
29-
copier==9.13.1
29+
copier==9.14.0
3030
# via -r dev.in
3131
dunamai==1.26.0
3232
# via copier
@@ -46,7 +46,7 @@ jinja2-ansible-filters==1.3.2
4646
# via copier
4747
json5==0.13.0
4848
# via jupyterlab-server
49-
jsonpointer==3.0.0
49+
jsonpointer==3.1.1
5050
# via jsonschema
5151
jsonschema[format-nongpl]==4.26.0
5252
# via
@@ -65,7 +65,7 @@ jupyter-server==2.17.0
6565
# notebook-shim
6666
jupyter-server-terminals==0.5.4
6767
# via jupyter-server
68-
jupyterlab==4.5.5
68+
jupyterlab==4.5.6
6969
# via -r dev.in
7070
jupyterlab-server==2.28.0
7171
# via jupyterlab

0 commit comments

Comments
 (0)