Skip to content

Commit 7ef1c5d

Browse files
committed
Revert "Support event-mode monitors"
This reverts commit 8790b37.
1 parent 8790b37 commit 7ef1c5d

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

src/ess/dream/workflow.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
TofMask,
3131
TwoThetaMask,
3232
VanadiumRun,
33-
WavelengthBins,
3433
WavelengthMask,
3534
)
3635
from ess.reduce import time_of_flight
@@ -91,7 +90,6 @@ def default_parameters() -> dict:
9190
AccumulatedProtonCharge[VanadiumRun]: charge,
9291
AccumulatedProtonCharge[EmptyCanRun]: charge,
9392
TofMask: None,
94-
WavelengthBins: sc.linspace('wavelength', 0.0, 10.0, 1000, unit='angstrom'),
9593
WavelengthMask: None,
9694
TwoThetaMask: None,
9795
CaveMonitorPosition: sc.vector([0.0, 0.0, -4220.0], unit='mm'),

src/ess/powder/conversion.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
MonitorType,
2626
RunType,
2727
SampleRun,
28-
WavelengthBins,
2928
WavelengthMonitor,
3029
)
3130

@@ -247,27 +246,15 @@ def convert_reduced_to_empty_can_subtracted_tof(
247246

248247

249248
def convert_monitor_to_wavelength(
250-
monitor: MonitorTofData[RunType, MonitorType], wavelength: WavelengthBins
249+
monitor: MonitorTofData[RunType, MonitorType],
251250
) -> WavelengthMonitor[RunType, MonitorType]:
252-
"""
253-
Convert monitor data with time-of-flight coordinate to wavelength.
254-
255-
Parameters
256-
----------
257-
monitor:
258-
Monitor data with time-of-flight coordinate.
259-
wavelength:
260-
Bins for the wavelength coordinate. This will be used ONLY if the monitor is
261-
recorded in event mode. For histogrammed monitors no rebinning is performed.
262-
"""
263251
graph = {
264252
**scn.conversion.graph.beamline.beamline(scatter=False),
265253
**scn.conversion.graph.tof.elastic("tof"),
266254
}
267-
mon = monitor.transform_coords("wavelength", graph=graph, keep_intermediate=False)
268-
if mon.bins is not None:
269-
mon = mon.hist(wavelength=wavelength, dim=mon.dims)
270-
return WavelengthMonitor[RunType, MonitorType](mon)
255+
return WavelengthMonitor[RunType, MonitorType](
256+
monitor.transform_coords("wavelength", graph=graph, keep_intermediate=False)
257+
)
271258

272259

273260
providers = (

src/ess/powder/types.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@
6363
CalibrationFilename = NewType("CalibrationFilename", str | None)
6464
"""Filename of the instrument calibration file."""
6565

66-
WavelengthBins = NewType("WavelengthBins", sc.Variable)
67-
"""Bin edges for wavelength, used to bin event-mode monitors."""
68-
6966
DspacingBins = NewType("DspacingBins", sc.Variable)
7067
"""Bin edges for d-spacing."""
7168

0 commit comments

Comments
 (0)