DMSC Integration Testing

Last updated: September 25, 2026 08:02:48

Test: nexusfiles-scipp|tbl|tbl_read_detector_geometry|orca_detector

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7feaa9f99f70>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7feaa9f99010>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7feaaa0cb410>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022386.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7feaabf4b240>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7feaa9f99f70>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f6a3818de50>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f6a3818cec0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f6a387181a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022246.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f6a39c17240>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f6a3818de50>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fc09a7e11f0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fc09a7cd1f0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fc09a797f20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022116.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fc09c201580>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7fc09a7e11f0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f7f74177410>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f7f74199d60>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f7f7400cc80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021976.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f7f75d25120>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f7f74177410>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f575edccc50>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f575ecd5820>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f575ed28fe0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021842.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f57604b5120>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f575edccc50>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f951e6f7ce0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f951e6f6180>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f951e7a90a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021702.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f951fe1d120>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f951e6f7ce0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f01d0b67b60>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f01d0b66180>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f01d0bf8dd0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021562.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f01d2a70fe0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f01d0b67b60>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f9ce6108320>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f9ce5d22e40>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f9ce6147fe0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021412.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f9ce7979120>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f9ce6108320>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f2540450620>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f253c161130>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f2540349e80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021272.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f25425d0fe0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f2540450620>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f74bdddb470>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f74bddda240>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f74bdbe5610>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021132.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f74bf42cfe0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f74bdddb470>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f21ac34de50>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f21ac34cef0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f21b0836180>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020992.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f21b21d0fe0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f21ac34de50>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f549535aab0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f549535fc50>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f54953b9670>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020702.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f549765b380>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f549535aab0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f435d5a6c00>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f43581fe1e0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f435d6f1700>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020562.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f435f757380>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f435d5a6c00>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f249344ade0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f2493448b00>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f24937c3ef0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020416.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f2494def380>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f249344ade0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f3876f5f2f0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f3876f5e2d0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f387762e870>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020276.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f387aa20d60>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f3876f5f2f0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f471e21f050>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f471e21df10>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f471e6b1df0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f4721a7ade0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f471e21f050>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f103df03080>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f103df01f70>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f103f2c8ec0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f1041656de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f103df03080>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fb2319a8680>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fb2319a9910>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fb231fe0f80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020115.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fb234e72de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7fb2319a8680>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f5f723e86b0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f5f723e9340>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f5f726d21b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019972.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f5f75856de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f5f723e86b0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f3fbbf4f4d0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f3fbbf559a0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f3fbbf4e6c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019663.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f3fbf9c2de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f3fbbf4f4d0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fc44f8a77d0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fc44f8aec90>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fc44f91af30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019523.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fc45339ede0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7fc44f8a77d0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7ff14f811d60>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7ff14fac79e0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7ff14f8ce5d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019374.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7ff153286de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7ff14f811d60>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f87ba09f4d0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f87ba09e540>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f87ba1a4650>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019228.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f87bdb8ede0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f87ba09f4d0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f3759ad3530>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f3759ad14f0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f3759cebf20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019097.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f375d68ade0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f3759ad3530>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fbc6f8c0b60>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fbc6f8c7fe0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fbc6f958230>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018957.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fbc73272de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7fbc6f8c0b60>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7f3d7bfcb020>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7f3d7bfcb9b0>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7f3d7c1ce420>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018817.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f3d7facade0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7f3d7bfcb020>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


UserWarning: Failed to load /entry/instrument/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
Full output
self = <scippnexus.base.Group object at 0x7fbc876f90a0>, 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-tbl/lib/python3.12/site-packages/scippnexus/base.py:390: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdetector.py:98: in assemble
    out = self._assemble_as_physical_component(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:417: in _assemble_as_physical_component
    assembled_nxdata = self._assemble_as_data(data_items)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:374: in _assemble_as_data
    da = self._add_coords(da, coords)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ess.reduce.nexus.workflow._StrippedDetector object at 0x7fbc876b3f50>
da = <scipp.DataArray>
Dimensions: Sizes[x_pixel_offset:2048, y_pixel_offset:2048, ]
Data:
                              int32        <no unit>  (x_pixel_offset, y_pixel_offset)  [0, 0, ..., 0, 0]


coords = DataGroup(sizes={'x_pixel_offset': 4096, 'y_pixel_offset': 4096}, keys=[
    x_pixel_offset: Variable({'x_pixel_offset': 4096}),
    y_pixel_offset: Variable({'y_pixel_offset': 4096}),
])

    def _add_coords(self, da: sc.DataArray, coords: sc.DataGroup) -> sc.DataArray:
        """Add coords to a data array.
    
        Sets alignment in the same way as slicing scipp.DataArray would.
        """
        for name, coord in coords.items():
            if not isinstance(coord, sc.Variable):
                da.coords[name] = sc.scalar(coord)
            else:
                if coord.shape == (1,) and not set(coord.dims).issubset(da.dims):
                    da.coords[name] = coord[0]
                else:
>                   da.coords[name] = coord
                    ^^^^^^^^^^^^^^^
E                   scipp._scipp.core.DimensionError: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/nxdata.py:456: DimensionError

During handling of the above exception, another exception occurred:

workflow = <sciline.pipeline.Pipeline object at 0x7fbc876ae180>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018677.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fbc8b1c2de0>

    def test_tbl_read_detector_geometry__orca_detector(
        workflow: sciline.Pipeline,
        coda_nexus_file_path: Path,
        check_detector_positions_histogram: Callable,
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusDetectorName] = "orca_detector"
    
>       result = workflow.compute(EmptyDetector[SampleRun])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

self = <scippnexus.base.Group object at 0x7fbc876f90a0>
e = DimensionError("Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048)")

    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/orca_detector as _StrippedDetector: Cannot add coord 'x_pixel_offset' of dims (x_pixel_offset: 4096) to DataArray with dims (x_pixel_offset: 2048, y_pixel_offset: 2048) 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.imaging.types.SampleRun],
E           nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nxdetector.NXdetector],
E       ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nxdetector.NXdetector, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report

View job log here


Test passed, nothing to report