DMSC Integration Testing

Last updated: May 27, 2026 07:22:11

Test: nexusfiles-scipp|magic|magic_read_monitor_data|beam_monitor_1

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004624.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004470.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004326.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004182.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004047.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003903.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003768.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003633.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003498.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003363.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003228.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003084.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002940.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002805.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002548.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002394.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002274.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002148.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002031.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001914.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001797.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001680.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001563.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001446.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001320.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001203.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001086.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000969.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000861.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000744.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000609.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:270: in load_nexus_data
nexus.load_data(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:555: in load_data
component = instrument[component_name]
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000465.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000330.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000186.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000042.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00027427.hdf')
monitor_name = 'beam_monitor_1'
check_monitor_data =

@pytest.mark.parametrize("monitor_name", ["beam_monitor_1"])
def test_magic_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_name: str,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = monitor_name

> monitor = workflow.compute(RawMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
yield _unique_child_group(parent, nx_class, group_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , sel = 'beam_monitor_1'

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: 'beam_monitor_1'

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