DMSC Integration Testing

Last updated: September 15, 2025 23:36:07

Test: nexusfiles-scipp|bifrost|bifrost_read_monitor_data|FrameMonitor0

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00084404.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00084264.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00084131.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083995.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083862.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083736.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083603.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083477.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083344.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083211.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00083085.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00082959.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/999999/raw/999999_00082826.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

instrument = 'bifrost', coda_proposal_id = '977695'
pathfinder = . at 0x7fe730d23100>

@pytest.fixture(scope="session")
def coda_nexus_file_path(
instrument: str, coda_proposal_id: str, pathfinder: Callable[..., Path]
) -> Path:
> return pathfinder(proposal_id=coda_proposal_id, instrument=instrument)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:34: in
"manual": lambda *args, **kwargs: coda.get_latest_nexus_paths(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

instrument = 'BIFROST', proposal_id = '977695', n = 1, inspect = 20

def get_latest_nexus_paths(
instrument: str, proposal_id: str | None, n: int = 1, inspect: int = 20
) -> list[Path]:
"""
Get the latest file paths manually by sorting the files in the directory.

Parameters
----------
instrument:
The instrument name.
proposal_id:
SciCat proposal ID for CODA.
If ``None``, the environment variable ``OVERRIDE_RAW_DATA_DIR`` must be set.
n:
The number of files to return.
inspect:
The number of files to inspect before returning.

Returns
-------
:
Paths to the n latest files for the given instrument and proposal.
"""
instrument = NEXUS_INSTRUMENT_NAME[instrument]
path = _coda_raw_data_path(proposal_id)
files_found = []
logging.info(
"Scanning the %d latest files in %s for instrument %s",
inspect,
path,
instrument,
)
recent_files = sorted(path.glob("*.hdf"))[-inspect::][::-1]
logging.info("Recent files: %s", recent_files)
for file in recent_files:
logging.info("Inspecting file: %s", file)
try:
with snx.File(file, "r", locking=False) as f:
instrument_in_file = f["/entry/instrument/name"][()]
if instrument_in_file == instrument:
logging.info(
"File %s matches requested instrument %s. Adding to list. "
"Last modified: %s",
file,
instrument,
datetime.fromtimestamp(
os.stat(file).st_mtime, tz=local_timezone()
),
)
files_found.append(file)
if len(files_found) == n:
logging.info("Found %d files. Returning.", n)
return files_found
else:
logging.info(
"File instrument is %s, but %s was requested. Skipping.",
instrument_in_file,
instrument,
)
except OSError as e:
logging.warning(
"File %s could not be opened. Reason: %s",
file,
e,
)
continue
logging.error("No files found for instrument %s", instrument)
> raise RuntimeError(f"No files found for instrument {instrument}")
E RuntimeError: No files found for instrument BIFROST

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/coda.py:94: RuntimeError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00082363.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00082363.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00082285.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00082165.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00082039.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081919.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081637.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081517.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081391.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081265.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081133.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00081001.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080875.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080743.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080605.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080449.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080311.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
^^^^^^^^^^^^^^^^^^^
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

instrument = 'bifrost', coda_proposal_id = '977695'
pathfinder = . at 0x7fdad47fe0c0>

@pytest.fixture(scope="session")
def coda_nexus_file_path(
instrument: str, coda_proposal_id: str, pathfinder: Callable[..., Path]
) -> Path:
> return pathfinder(proposal_id=coda_proposal_id, instrument=instrument)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:34: in
"manual": lambda *args, **kwargs: coda.get_latest_nexus_paths(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

instrument = 'BIFROST', proposal_id = '977695', n = 1, inspect = 20

def get_latest_nexus_paths(
instrument: str, proposal_id: str | None, n: int = 1, inspect: int = 20
) -> list[Path]:
"""
Get the latest file paths manually by sorting the files in the directory.

Parameters
----------
instrument:
The instrument name.
proposal_id:
SciCat proposal ID for CODA.
If ``None``, the environment variable ``OVERRIDE_RAW_DATA_DIR`` must be set.
n:
The number of files to return.
inspect:
The number of files to inspect before returning.

Returns
-------
:
Paths to the n latest files for the given instrument and proposal.
"""
instrument = NEXUS_INSTRUMENT_NAME[instrument]
path = _coda_raw_data_path(proposal_id)
files_found = []
logging.info(
"Scanning the %d latest files in %s for instrument %s",
inspect,
path,
instrument,
)
recent_files = sorted(path.glob("*.hdf"))[-inspect::][::-1]
logging.info("Recent files: %s", recent_files)
for file in recent_files:
logging.info("Inspecting file: %s", file)
try:
with snx.File(file, "r", locking=False) as f:
instrument_in_file = f["/entry/instrument/name"][()]
if instrument_in_file == instrument:
logging.info(
"File %s matches requested instrument %s. Adding to list. "
"Last modified: %s",
file,
instrument,
datetime.fromtimestamp(
os.stat(file).st_mtime, tz=local_timezone()
),
)
files_found.append(file)
if len(files_found) == n:
logging.info("Found %d files. Returning.", n)
return files_found
else:
logging.info(
"File instrument is %s, but %s was requested. Skipping.",
instrument_in_file,
instrument,
)
except OSError as e:
logging.warning(
"File %s could not be opened. Reason: %s",
file,
e,
)
continue
logging.error("No files found for instrument %s", instrument)
> raise RuntimeError(f"No files found for instrument {instrument}")
E RuntimeError: No files found for instrument BIFROST

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/coda.py:94: RuntimeError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00080041.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00079901.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00079754.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00079607.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:267: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:363: in load_data
component = instrument[component_name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/2025/977695/raw/977695_00079474.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor0

@pytest.mark.parametrize(
"monitor_type", [FrameMonitor0, FrameMonitor1, FrameMonitor2, FrameMonitor3]
)
def test_bifrost_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> monitor = workflow.compute(MonitorData[SampleRun, monitor_type])

tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:230: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:57: in load_component
component = _unique_child_group(parent, nx_class, group_name)
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:227: in _unique_child_group
child = group[name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = '007_frame_0'

def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.

Three cases are supported:

- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.

Parameters
----------
sel:
Child name, class, or index.

Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
> child = self._children[sel]
E KeyError: '007_frame_0'

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scippnexus/base.py:365: KeyError

None

None

None

None

None

None

None

None

None

None

instrument = 'bifrost', coda_proposal_id = '977695'
pathfinder = . at 0x7ff829447880>

@pytest.fixture(scope="session")
def coda_nexus_file_path(
instrument: str, coda_proposal_id: str, pathfinder: Callable[..., Path]
) -> Path:
> return pathfinder(proposal_id=coda_proposal_id, instrument=instrument)

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:34: in
"manual": lambda *args, **kwargs: coda.get_latest_nexus_paths(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

instrument = 'BIFROST', proposal_id = '977695', n = 1, inspect = 20

def get_latest_nexus_paths(
instrument: str, proposal_id: str | None, n: int = 1, inspect: int = 20
) -> list[Path]:
"""
Get the latest file paths manually by sorting the files in the directory.

Parameters
----------
instrument:
The instrument name.
proposal_id:
SciCat proposal ID for CODA.
If ``None``, the environment variable ``OVERRIDE_RAW_DATA_DIR`` must be set.
n:
The number of files to return.
inspect:
The number of files to inspect before returning.

Returns
-------
:
Paths to the n latest files for the given instrument and proposal.
"""
instrument = NEXUS_INSTRUMENT_NAME[instrument]
path = _coda_raw_data_path(proposal_id)
files_found = []
logging.info(
"Scanning the %d latest files in %s for instrument %s",
inspect,
path,
instrument,
)
recent_files = sorted(path.glob("*.hdf"))[-inspect::][::-1]
logging.info("Recent files: %s", recent_files)
for file in recent_files:
logging.info("Inspecting file: %s", file)
try:
with snx.File(file, "r", locking=False) as f:
instrument_in_file = f["/entry/instrument/name"][()]
if instrument_in_file == instrument:
logging.info(
"File %s matches requested instrument %s. Adding to list. "
"Last modified: %s",
file,
instrument,
datetime.fromtimestamp(
os.stat(file).st_mtime, tz=local_timezone()
),
)
files_found.append(file)
if len(files_found) == n:
logging.info("Found %d files. Returning.", n)
return files_found
else:
logging.info(
"File instrument is %s, but %s was requested. Skipping.",
instrument_in_file,
instrument,
)
except OSError as e:
logging.warning(
"File %s could not be opened. Reason: %s",
file,
e,
)
continue
logging.error("No files found for instrument %s", instrument)
> raise RuntimeError(f"No files found for instrument {instrument}")
E RuntimeError: No files found for instrument BIFROST

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/coda.py:94: RuntimeError

instrument = 'bifrost', coda_proposal_id = '977695'
pathfinder = . at 0x7f47ad8936a0>

@pytest.fixture(scope="session")
def coda_nexus_file_path(
instrument: str, coda_proposal_id: str, pathfinder: Callable[..., Path]
) -> Path:
> return pathfinder(proposal_id=coda_proposal_id, instrument=instrument)

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/setup_fixtures.py:34: in
"manual": lambda *args, **kwargs: coda.get_latest_nexus_paths(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

instrument = 'BIFROST', proposal_id = '977695', n = 1, inspect = 20

def get_latest_nexus_paths(
instrument: str, proposal_id: str | None, n: int = 1, inspect: int = 20
) -> list[Path]:
"""
Get the latest file paths manually by sorting the files in the directory.

Parameters
----------
instrument:
The instrument name.
proposal_id:
SciCat proposal ID for CODA.
If ``None``, the environment variable ``OVERRIDE_RAW_DATA_DIR`` must be set.
n:
The number of files to return.
inspect:
The number of files to inspect before returning.

Returns
-------
:
Paths to the n latest files for the given instrument and proposal.
"""
instrument = NEXUS_INSTRUMENT_NAME[instrument]
path = _coda_raw_data_path(proposal_id)
files_found = []
logging.info(
"Scanning the %d latest files in %s for instrument %s",
inspect,
path,
instrument,
)
recent_files = sorted(path.glob("*.hdf"))[-inspect::][::-1]
logging.info("Recent files: %s", recent_files)
for file in recent_files:
logging.info("Inspecting file: %s", file)
try:
with snx.File(file, "r", locking=False) as f:
instrument_in_file = f["/entry/instrument/name"][()]
if instrument_in_file == instrument:
logging.info(
"File %s matches requested instrument %s. Adding to list. "
"Last modified: %s",
file,
instrument,
datetime.fromtimestamp(
os.stat(file).st_mtime, tz=local_timezone()
),
)
files_found.append(file)
if len(files_found) == n:
logging.info("Found %d files. Returning.", n)
return files_found
else:
logging.info(
"File instrument is %s, but %s was requested. Skipping.",
instrument_in_file,
instrument,
)
except OSError as e:
logging.warning(
"File %s could not be opened. Reason: %s",
file,
e,
)
continue
logging.error("No files found for instrument %s", instrument)
> raise RuntimeError(f"No files found for instrument {instrument}")
E RuntimeError: No files found for instrument BIFROST

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/coda.py:94: RuntimeError