Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default monitor names for DREAM #128

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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