ess.reduce.live.workflow.LiveWorkflow#
- class ess.reduce.live.workflow.LiveWorkflow(*, streamed, outputs)[source]#
A workflow class that fulfills Beamlime’s LiveWorkflow protocol.
Methods
__init__
(*, streamed, outputs)from_workflow
(*, workflow, accumulators, ...)Create a live workflow from a base workflow and other parameters.
- classmethod from_workflow(*, workflow, accumulators, outputs, run_type, nexus_filename)[source]#
Create a live workflow from a base workflow and other parameters.
- Parameters:
workflow (
Pipeline
) – Base workflow to use for live data reduction.accumulators (
dict
[type
,Accumulator
]) – Accumulators forwarded to the stream processor.outputs (
dict
[str
,type
]) – Mapping from output names to keys in the workflow. The keys correspond to workflow results that will be computed.run_type (
type
[TypeVar
(RunType
,nexus.types.BackgroundRun
(int
),nexus.types.EmptyBeamRun
(int
),nexus.types.SampleRun
(int
),TransmissionRun
[nexus.types.SampleRun
(int
)],TransmissionRun
[nexus.types.BackgroundRun
(int
)],nexus.types.VanadiumRun
(int
))]) – Type of the run to process. This defines which run is the dynamic run being processed. The NeXus template file will be set as the filename for this run.nexus_filename (
Path
) – Path to the NeXus file to process.
- Returns:
TypeVar
(T
, bound= LiveWorkflow) – Live workflow object.