Skip to content

Commit f15b313

Browse files
Merge pull request #171 from scipp/simpler-tof-workflow
Update for simplified ess.reduce.GenericTofWorkflow
2 parents 8d97af9 + d1f56e7 commit f15b313

File tree

10 files changed

+15
-36
lines changed

10 files changed

+15
-36
lines changed

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.2",
35+
"essreduce>=25.05.3",
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.2
6+
essreduce>=25.05.3
77
graphviz
88
numpy
99
plopp>=25.03.0

requirements/base.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SHA1:60cb3370153cfec27ffbe68c100df7aa10faaed0
1+
# SHA1:b1c1e81e8ad714d967dc65bce97a390ae3880cc6
22
#
33
# This file was generated by pip-compile-multi.
44
# To update, run:
@@ -29,15 +29,15 @@ dnspython==2.7.0
2929
# via email-validator
3030
email-validator==2.2.0
3131
# via scippneutron
32-
essreduce==25.5.2
32+
essreduce==25.5.3
3333
# via -r base.in
3434
exceptiongroup==1.3.0
3535
# via ipython
3636
executing==2.2.0
3737
# via stack-data
3838
fonttools==4.58.0
3939
# via matplotlib
40-
fsspec==2025.5.0
40+
fsspec==2025.5.1
4141
# via dask
4242
graphviz==0.20.3
4343
# via -r base.in
@@ -115,7 +115,7 @@ ptyprocess==0.7.0
115115
# via pexpect
116116
pure-eval==0.2.3
117117
# via stack-data
118-
pydantic==2.11.4
118+
pydantic==2.11.5
119119
# via scippneutron
120120
pydantic-core==2.33.2
121121
# via pydantic

requirements/ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# requirements upgrade
77
#
8-
cachetools==5.5.2
8+
cachetools==6.0.0
99
# via tox
1010
certifi==2025.4.26
1111
# via requests

requirements/dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jupyter-server==2.16.0
6565
# notebook-shim
6666
jupyter-server-terminals==0.5.3
6767
# via jupyter-server
68-
jupyterlab==4.4.2
68+
jupyterlab==4.4.3
6969
# via -r dev.in
7070
jupyterlab-server==2.27.3
7171
# via jupyterlab
@@ -75,7 +75,7 @@ overrides==7.7.0
7575
# via jupyter-server
7676
pathspec==0.12.1
7777
# via copier
78-
pip-compile-multi==3.0.0
78+
pip-compile-multi==3.1.0
7979
# via -r dev.in
8080
pip-tools==7.4.1
8181
# via pip-compile-multi

requirements/docs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jupyter-client==8.6.3
6262
# via
6363
# ipykernel
6464
# nbclient
65-
jupyter-core==5.7.2
65+
jupyter-core==5.8.0
6666
# via
6767
# ipykernel
6868
# jupyter-client
@@ -180,7 +180,7 @@ tinycss2==1.4.0
180180
# via bleach
181181
tomli==2.2.1
182182
# via sphinx
183-
tornado==6.5
183+
tornado==6.5.1
184184
# via
185185
# ipykernel
186186
# jupyter-client

requirements/nightly.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ executing==2.2.0
4646
# via stack-data
4747
fonttools==4.58.0
4848
# via matplotlib
49-
fsspec==2025.5.0
49+
fsspec==2025.5.1
5050
# via dask
5151
graphviz==0.20.3
5252
# via -r nightly.in
@@ -139,7 +139,7 @@ ptyprocess==0.7.0
139139
# via pexpect
140140
pure-eval==0.2.3
141141
# via stack-data
142-
pydantic==2.11.4
142+
pydantic==2.11.5
143143
# via scippneutron
144144
pydantic-core==2.33.2
145145
# via pydantic
@@ -210,7 +210,7 @@ traitlets==5.14.3
210210
# traittypes
211211
traittypes==0.2.1
212212
# via ipydatawidgets
213-
typing-extensions==4.13.2
213+
typing-extensions==4.14.0rc1
214214
# via
215215
# exceptiongroup
216216
# ipython

requirements/static.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ distlib==0.3.9
1111
# via virtualenv
1212
filelock==3.18.0
1313
# via virtualenv
14-
identify==2.6.10
14+
identify==2.6.12
1515
# via pre-commit
1616
nodeenv==1.9.1
1717
# via pre-commit

src/ess/dream/workflow.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
from ess.powder import providers as powder_providers
1414
from ess.powder import with_pixel_mask_filenames
15-
from ess.powder.conversion import convert_monitor_to_wavelength
1615
from ess.powder.correction import (
1716
RunNormalization,
1817
insert_run_normalization,
@@ -21,23 +20,18 @@
2120
AccumulatedProtonCharge,
2221
CaveMonitorPosition, # Should this be a DREAM-only parameter?
2322
EmptyCanRun,
24-
MonitorType,
2523
PixelMaskFilename,
2624
Position,
2725
ReducerSoftware,
28-
ResampledMonitorTofData,
29-
RunType,
3026
SampleRun,
3127
TimeOfFlightLookupTableFilename,
3228
TofMask,
3329
TwoThetaMask,
3430
VanadiumRun,
3531
WavelengthMask,
36-
WavelengthMonitor,
3732
)
3833
from ess.reduce import time_of_flight
3934
from ess.reduce.parameter import parameter_mappers
40-
from ess.reduce.time_of_flight import resample_monitor_time_of_flight_data
4135
from ess.reduce.workflow import register_workflow
4236

4337
from .beamline import InstrumentConfiguration
@@ -107,18 +101,6 @@ def _collect_reducer_software() -> ReducerSoftware:
107101
)
108102

109103

110-
def convert_dream_monitor_to_wavelength(
111-
monitor: ResampledMonitorTofData[RunType, MonitorType],
112-
) -> WavelengthMonitor[RunType, MonitorType]:
113-
"""
114-
We know that DREAM monitors are recording in histogram mode, so we need to use the
115-
resampled monitor data to avoid having nans in the time-of-flight coordinates.
116-
117-
This provider should be inserted in the Dream workflow below.
118-
"""
119-
return convert_monitor_to_wavelength(monitor)
120-
121-
122104
def DreamGeant4Workflow(*, run_norm: RunNormalization) -> sciline.Pipeline:
123105
"""
124106
Workflow with default parameters for the Dream Geant4 simulation.
@@ -136,8 +118,6 @@ def DreamGeant4Workflow(*, run_norm: RunNormalization) -> sciline.Pipeline:
136118
wf = LoadGeant4Workflow()
137119
for provider in itertools.chain(powder_providers, _dream_providers):
138120
wf.insert(provider)
139-
wf.insert(convert_dream_monitor_to_wavelength)
140-
wf.insert(resample_monitor_time_of_flight_data)
141121
insert_run_normalization(wf, run_norm)
142122
for key, value in itertools.chain(
143123
default_parameters().items(), time_of_flight.default_parameters().items()

src/ess/powder/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
DetectorTofData = tof_t.DetectorTofData
3939
MonitorTofData = tof_t.MonitorTofData
40-
ResampledMonitorTofData = tof_t.ResampledMonitorTofData
4140
PulsePeriod = tof_t.PulsePeriod
4241
PulseStride = tof_t.PulseStride
4342
PulseStrideOffset = tof_t.PulseStrideOffset

0 commit comments

Comments
 (0)