Skip to content

Commit 1c0d528

Browse files
authored
Merge pull request #128 from scipp/dewfault-dream-monitor-names
Set default monitor names for DREAM
2 parents 94eca18 + 5ccb701 commit 1c0d528

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/ess/dream/io/nexus.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
import sciline
1717

18-
from ess.reduce.nexus.types import DetectorBankSizes
18+
from ess.powder.types import BunkerMonitor, CaveMonitor
19+
from ess.reduce.nexus.types import DetectorBankSizes, NeXusName
1920
from ess.reduce.nexus.workflow import GenericNeXusWorkflow
2021

2122
DETECTOR_BANK_SIZES = {
@@ -51,4 +52,6 @@ def LoadNeXusWorkflow() -> sciline.Pipeline:
5152
"""
5253
wf = GenericNeXusWorkflow()
5354
wf[DetectorBankSizes] = DETECTOR_BANK_SIZES
55+
wf[NeXusName[BunkerMonitor]] = "monitor_bunker"
56+
wf[NeXusName[CaveMonitor]] = "monitor_cave"
5457
return wf

src/ess/powder/types.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# 1 TypeVars used to parametrize the generic parts of the workflow
2222

2323
BackgroundRun = reduce_t.BackgroundRun
24+
BunkerMonitor = reduce_t.Monitor2
2425
CalibratedDetector = reduce_t.CalibratedDetector
2526
CalibratedMonitor = reduce_t.CalibratedMonitor
2627
DetectorData = reduce_t.DetectorData
@@ -40,9 +41,7 @@
4041
DetectorBankSizes = reduce_t.DetectorBankSizes
4142

4243
RunType = TypeVar("RunType", SampleRun, VanadiumRun)
43-
# Include Monitor2 because a single constraint is not allowed.
44-
# We will eventually have more than one...
45-
MonitorType = TypeVar("MonitorType", CaveMonitor, reduce_t.Monitor2)
44+
MonitorType = TypeVar("MonitorType", CaveMonitor, BunkerMonitor)
4645

4746

4847
# 2 Workflow parameters

0 commit comments

Comments
 (0)