View job log here
KeyError: 'event_mode_detectors'
In provider ess.reduce.nexus.workflow.load_nexus_component(
location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nxdetector.NXdetector, ess.reduce.nexus.types.SampleRun],
nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/base.py:370: KeyError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f81536ce2a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022385.hdf')
check_detector_positions_events = <function _check_detector_positions_events at 0x7f8153b4d3a0>
def test_odin_read_detector_geometry__timepix3(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = "event_mode_detectors/timepix3"
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_load_nexus_test.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/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-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
return self._func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/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-odin/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-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:370: in _unique_child_group
child = group[name]
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/base.py:367: in __getitem__
return self[grp][sel_path.relative_to(grp).as_posix()]
^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <scippnexus.base.Group object at 0x7f8152369100>
sel = 'event_mode_detectors'
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: 'event_mode_detectors'
E In provider ess.reduce.nexus.workflow.load_nexus_component(
E location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nxdetector.NXdetector, ess.reduce.nexus.types.SampleRun],
E nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/base.py:370: KeyError