Skip to content

Commit

Permalink
Merge pull request #138 from scipp/fix-live-workflow
Browse files Browse the repository at this point in the history
Fix live data reduction.
  • Loading branch information
SimonHeybrock committed May 22, 2024
2 parents 1f39f2c + fd49554 commit b0bd3c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/ess/loki/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ess.sans.conversions import monitor_to_wavelength, sans_monitor
from ess.sans.types import (
Filename,
FilePath,
Incident,
MonitorType,
NeXusMonitorName,
Expand Down Expand Up @@ -116,7 +115,7 @@ def __call__(self, group: JSONGroup) -> dict[str, sc.DataArray]:
"""
# ``JsonGroup`` is turned into the ``NexusGroup`` here, not in the ``beamlime``
# so that the workflow can control the definition of the group.
self.pipeline[FilePath[Filename[SampleRun]]] = snx.Group(
self.pipeline[Filename[SampleRun]] = snx.Group(
group, definitions=snx.base_definitions()
)
results = self.pipeline.compute(
Expand Down
11 changes: 11 additions & 0 deletions tests/loki/live_reduction_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
import sciline as sl

from ess.loki.workflow import LoKiMonitorWorkflow


def loki_monitor_workflow_test() -> None:
# Test building the sciline pipeline.
workflow = LoKiMonitorWorkflow()
assert isinstance(workflow.pipeline, sl.pipeline)

0 comments on commit b0bd3c5

Please sign in to comment.