Skip to content
Merged
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
30 changes: 30 additions & 0 deletions src/ess/dream/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
)
from ess.powder.types import (
AccumulatedProtonCharge,
CaveMonitor,
CaveMonitorPosition, # Should this be a DREAM-only parameter?
EmptyCanRun,
KeepEvents,
Expand All @@ -32,7 +33,9 @@
WavelengthMask,
)
from ess.reduce import time_of_flight
from ess.reduce.nexus.types import NeXusName
from ess.reduce.parameter import parameter_mappers
from ess.reduce.time_of_flight import GenericTofWorkflow
from ess.reduce.workflow import register_workflow

from .beamline import InstrumentConfiguration
Expand Down Expand Up @@ -105,6 +108,33 @@ def _collect_reducer_software() -> ReducerSoftware:
)


def DreamPowderWorkflow(*, run_norm: RunNormalization) -> sciline.Pipeline:
"""
Dream powder workflow with default parameters.

Parameters
----------
run_norm:
Select how to normalize each run (sample, vanadium, etc.).

Returns
-------
:
A workflow object for DREAM.
"""
wf = GenericTofWorkflow(run_types=[SampleRun], monitor_types=[CaveMonitor])
for provider in itertools.chain(powder_providers, _dream_providers):
wf.insert(provider)
wf[NeXusName[CaveMonitor]] = "monitor_cave"
insert_run_normalization(wf, run_norm)
for key, value in itertools.chain(
default_parameters().items(), time_of_flight.default_parameters().items()
):
wf[key] = value
wf.typical_outputs = typical_outputs
return wf


def DreamGeant4Workflow(*, run_norm: RunNormalization) -> sciline.Pipeline:
"""
Workflow with default parameters for the Dream Geant4 simulation.
Expand Down
Loading