Skip to content

Commit 7bc85e1

Browse files
committed
Update for simplified ess.reduce.GenericTofWorkflow
The separate resampling step in essreduce was removed. This allows for removal of some workarounds here.
1 parent 8d97af9 commit 7bc85e1

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

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)