DMSC Integration Testing

Last updated: September 25, 2026 08:04:50

Test: nexusfiles-scipp|beer|beer_read_detector_geometry|beer_detector_s2

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f85cb6a5ac0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f85cb6a5550>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f85cc681760>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022387.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f85cbf3d4e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f85cb6a5ac0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fbcc5665af0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fbcc56654f0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fbcc6883b30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022307.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fbcc5f154e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fbcc5665af0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fa1fad19a30>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fa1fad19400>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fa1fbd706e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022247.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fa1fb4694e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fa1fad19a30>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f368a845760>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f368a845220>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f368bd2e1b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022207.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f368b1cd4e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f368a845760>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fd994d9f470>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fd994d9d880>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fd994c56fc0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022207.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fd995b494e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fd994d9f470>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f8852f31a30>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f8852f31370>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f88530d47a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022197.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f885365d3a0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f8852f31a30>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7ff1eb463200>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7ff1eb462b70>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7ff1eb5f3c80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022117.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7ff1ec355440>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7ff1eb463200>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f6b0d01d2e0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f6b0d01d3d0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f6b0d22db20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022067.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f6b0da714e0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f6b0d01d2e0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fb18af16f30>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fb18af168a0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fb18b0a5760>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022067.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fb18ba393a0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fb18af16f30>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fd9d65d6bd0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fd9d65d6060>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fd9d670be30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022067.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fd9d70c53a0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fd9d65d6bd0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f473c74e780>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f473c7f0d10>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f473caff560>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022047.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f473d825300>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f473c74e780>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f403dd06840>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f403dd04410>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f403de89df0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022037.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f403efd5080>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f403dd06840>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fe2e704c200>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fe2e704efc0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fe2e71d6b40>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022037.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fe2e7b1d080>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fe2e704c200>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fe754c32450>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fe754cbcbf0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fe754f326f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022027.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fe75552d080>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fe754c32450>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7efcc3fe2ba0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7efcc3fe0560>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7efcc449dc40>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022027.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7efcc4d0d080>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7efcc3fe2ba0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f9e14252b40>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f9e14251dc0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f9e143be3f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00022027.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f9e15571080>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f9e14252b40>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f5261456720>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f52614562a0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f52615dc740>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021977.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f5261f58ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f5261456720>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fcbaca1d250>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fcbaca1cbc0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fcbad7181a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021913.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fcbad560fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fcbaca1d250>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f20e2f51490>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f20e2f53620>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f20e3321fd0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021903.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f20e3eb0ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f20e2f51490>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fd3e266a7e0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fd3e266a2a0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fd3e26ffec0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021903.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fd3e3234fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fd3e266a7e0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f729d742cf0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f729d7428d0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f7294388a10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021833.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f729e160fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f729d742cf0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fee0098ac30>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fee00989fa0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fee00cf7ec0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021703.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fee01480fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fee0098ac30>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f2452a72db0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f2452a72990>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f2452bf56d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021563.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f2453930ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f2452a72db0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f7e18edecc0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f7e18ede8d0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f7e19041d60>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021513.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f7e196d0ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f7e18edecc0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fa59744e2a0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fa59744c470>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fa59777ae70>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021413.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fa5984c4ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fa59744e2a0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fd195bbe6f0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fd195bbdd00>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fd195d37170>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021273.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fd196734fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fd195bbe6f0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f83a4cb6a50>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f83a4cb4e60>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f83a4e453d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00021123.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f83a5b84ea0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f83a4cb6a50>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f9f52222b40>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f9f52221c70>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f9f52358b00>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020983.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f9f52c04fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f9f52222b40>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f39489fecf0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f39489fe8d0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f3948dacb60>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020913.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f3949be0fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f39489fecf0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f65567aac90>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f65567aa870>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f655698c620>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020893.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f6556fa4fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f65567aac90>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f91f2c52b40>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f91f2c51f40>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f91f30a1d90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020893.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f91f41e4fe0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f91f2c52b40>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f25b187e900>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f25b187e480>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f25b19a7b30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020893.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f25b2630f40>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f25b187e900>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f6037a7a930>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f6037a7a600>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f6037c7bfb0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020703.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f6038964f40>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f6037a7a930>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f65a9327620>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f65a9327200>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f65a927e420>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020563.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f65aa454f40>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f65a9327620>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fa6c937a930>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fa6c937a4b0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fa6c9641d30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020563.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fa6c9d88f40>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fa6c937a930>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f144d76c920>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f144d76d3a0>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f144dbdfc50>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020417.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f144e684e00>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f144d76c920>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f7a2dfa5f40>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f7a2dfa4440>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f7a2e006f30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020267.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f7a31838cc0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f7a2dfa5f40>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fe9c389d670>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fe9c389fa10>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fe9c39e9c70>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020207.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7fe9c6f88ae0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7fe9c389d670>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f89dde4dfd0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f89dde47e00>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f89ddfd1b80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020205.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f89e14fcae0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f89dde4dfd0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7efe385a5cd0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7efe385a4320>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7efe386f6fc0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020205.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7efe3bdcccc0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7efe385a5cd0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f29a3749af0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f29a3749610>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f29a38f27e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020205.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f29a6ef8cc0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f29a3749af0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f8536e458e0>, sel = ()

    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]
            if isinstance(child, Field):
                self._populate_fields()
            return child
    
        def isclass(x):
            return inspect.isclass(x) and issubclass(x, Field | NXobject)
    
        if isclass(sel) or (
            isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
        ):
            return self._get_children_by_nx_class(sel)
    
        dg = self._nexus.read_children(sel)
        if not dg:
            # Bail out early to avoid fallback warnings. Everything is optional in
            # NeXus so we cannot assume that the group is invalid (in contrast to
            # likely partially incomplete groups that will fail to assemble below).
            return dg
        try:
>           dg = self._nexus.assemble(dg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f8536e47410>
dg = DataGroup(sizes={'dim_0': None, 'dim_1': 1000, 'dim_2': 1000}, keys=[
    detector_number: Variable({'dim_0': 12, 'dim...000}),
    z_pixel_offset: Variable({'dim_0': 12}),
    data: Variable({'dim_0': 12, 'dim_1': 1000, 'dim_2': 1000}),
])

    def _assemble_as_data(
        self, dg: sc.DataGroup
    ) -> sc.DataGroup | sc.DataArray | sc.Dataset:
        if not self._valid:
>           raise NexusStructureError("Could not determine signal field or dimensions.")
E           scippnexus.base.NexusStructureError: Could not determine signal field or dimensions.

.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/nxdata.py:362: NexusStructureError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f8536feb470>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_beer_999999_00020205.hdf')
detector_name = 'beer_detector_s2'
check_detector_positions_events = <function _check_detector_positions_events at 0x7f853a62ccc0>

    @pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
    def test_beer_read_detector_geometry(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        detector_name: str,
        check_detector_positions_events: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = detector_name
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/beer/beer_load_nexus_test.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/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-beer/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/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-beer/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
    loaded = cast(sc.DataGroup, group[selection])
                                ^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-beer/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
    self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <scippnexus.base.Group object at 0x7f8536e458e0>
e = NexusStructureError('Could not determine signal field or dimensions.')

    def _warn_fallback(self, e: Exception) -> None:
        msg = (
            f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
            "Falling back to loading HDF5 group children as scipp.DataGroup."
        )
>       warnings.warn(msg, stacklevel=2)
E       UserWarning: Failed to load /entry/instrument/beer_detector_s2 as _StrippedDetector: Could not determine signal field or dimensions. Falling back to loading HDF5 group children as scipp.DataGroup.
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-beer/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning