Skip to content

Commit

Permalink
Merge pull request #128 from scipp/dewfault-dream-monitor-names
Browse files Browse the repository at this point in the history
Set default monitor names for DREAM
  • Loading branch information
jl-wynen authored Feb 4, 2025
2 parents 94eca18 + 5ccb701 commit 1c0d528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/ess/dream/io/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

import sciline

from ess.reduce.nexus.types import DetectorBankSizes
from ess.powder.types import BunkerMonitor, CaveMonitor
from ess.reduce.nexus.types import DetectorBankSizes, NeXusName
from ess.reduce.nexus.workflow import GenericNeXusWorkflow

DETECTOR_BANK_SIZES = {
Expand Down Expand Up @@ -51,4 +52,6 @@ def LoadNeXusWorkflow() -> sciline.Pipeline:
"""
wf = GenericNeXusWorkflow()
wf[DetectorBankSizes] = DETECTOR_BANK_SIZES
wf[NeXusName[BunkerMonitor]] = "monitor_bunker"
wf[NeXusName[CaveMonitor]] = "monitor_cave"
return wf
5 changes: 2 additions & 3 deletions src/ess/powder/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# 1 TypeVars used to parametrize the generic parts of the workflow

BackgroundRun = reduce_t.BackgroundRun
BunkerMonitor = reduce_t.Monitor2
CalibratedDetector = reduce_t.CalibratedDetector
CalibratedMonitor = reduce_t.CalibratedMonitor
DetectorData = reduce_t.DetectorData
Expand All @@ -40,9 +41,7 @@
DetectorBankSizes = reduce_t.DetectorBankSizes

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


# 2 Workflow parameters
Expand Down

0 comments on commit 1c0d528

Please sign in to comment.