DMSC Integration Testing

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

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 0x7f9eb91826f0>, 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 0x7f9eb9181790>
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 0x7f9eb93096d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022306.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f9ebab63240>

    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 0x7f9eb91826f0>
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 0x7f2f7786e270>, 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 0x7f2f7786d310>
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 0x7f2f77988830>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022206.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f2f79243100>

    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 0x7f2f7786e270>
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 0x7f8e15e6a3f0>, 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 0x7f8e15e69490>
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 0x7f8e16105cd0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022206.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f8e17877240>

    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 0x7f8e15e6a3f0>
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 0x7faf0a582810>, 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 0x7faf0a5818b0>
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 0x7faf0a7801d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022196.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7faf0c78f100>

    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 0x7faf0a582810>
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 0x7fcb729762a0>, 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 0x7fcb729bd5e0>
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 0x7fcb7290d790>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fcb749154e0>

    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 0x7fcb729762a0>
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 0x7fb6bbe69340>, 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 0x7fb6bbe118b0>
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 0x7fb6bbeaf290>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fb6bd759620>

    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 0x7fb6bbe69340>
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 0x7f4cad9b39b0>, 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 0x7f4cadbd5d30>
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 0x7f4cadb91910>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f4caf335620>

    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 0x7f4cad9b39b0>
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 0x7f7136448530>, 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 0x7f71364939b0>
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 0x7f7136449220>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022046.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f7137c45580>

    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 0x7f7136448530>
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 0x7fef5bed2f30>, 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 0x7fef5bec5730>
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 0x7fef5be6e4b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022036.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fef5d639080>

    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 0x7fef5bed2f30>
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 0x7fb3c02a6930>, 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 0x7fb3c03d88f0>
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 0x7fb3c022eba0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022036.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fb3c1fd11c0>

    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 0x7fb3c02a6930>
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 0x7f059bae5160>, 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 0x7f059ba45ac0>
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 0x7f059b9fe360>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f059d151080>

    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 0x7f059bae5160>
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 0x7ff740bdc410>, 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 0x7ff740b1e8d0>
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 0x7ff740c0c680>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7ff742309080>

    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 0x7ff740bdc410>
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 0x7f03ef77eb10>, 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 0x7f03ef755f10>
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 0x7f03ef7f3ef0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f03f11e51c0>

    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 0x7f03ef77eb10>
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 0x7f6346b25f40>, 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 0x7f6346b24fe0>
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 0x7f6346c9bd10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021912.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f6348d0ae80>

    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 0x7f6346b25f40>
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 0x7f4e3ed43920>, 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 0x7f4e3ecee660>
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 0x7f4e3ede9b80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021912.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f4e40761120>

    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 0x7f4e3ed43920>
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 0x7f6d53ce4650>, 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 0x7f6d53cc3e30>
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 0x7f6d53d1f800>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021902.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f6d55781120>

    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 0x7f6d53ce4650>
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 0x7f3fae11a270>, 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 0x7f3fae11af90>
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 0x7f3fade97710>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021512.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f3faf8b1120>

    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 0x7f3fae11a270>
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 0x7f4a52443470>, 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 0x7f4a5246a150>
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 0x7f4a5236ed50>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020912.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f4a53f61120>

    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 0x7f4a52443470>
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 0x7f94ff3c63f0>, 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 0x7f94ff3c4f20>
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 0x7f94ff19d250>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f9500a00fe0>

    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 0x7f94ff3c63f0>
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 0x7f2c2454e4b0>, 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 0x7f2c2454fb30>
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 0x7f2c2434e570>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7f2c2618cfe0>

    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 0x7f2c2454e4b0>
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 0x7fc00f6f2810>, 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 0x7fc00f6eee40>
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 0x7fc00fdfeba0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
check_detector_positions_histogram = <function _check_detector_positions_histogram at 0x7fc011d7f380>

    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 0x7fc00f6f2810>
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 0x7f65b776ad20>, 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 0x7f65b77672c0>
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 0x7f65b7874050>
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 0x7f65b998b380>

    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 0x7f65b776ad20>
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 0x7f47ae8a2de0>, 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 0x7f47ae8a1c70>
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 0x7f47aeb796d0>
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 0x7f47b2012de0>

    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 0x7f47ae8a2de0>
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 0x7f28b964c1d0>, 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 0x7f28b964df70>
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 0x7f28b9645d60>
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 0x7f28bb1662a0>

    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 0x7f28b964c1d0>
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 0x7f8e159b0860>, 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 0x7f8e159b1b20>
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 0x7f8e155a2fc0>
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 0x7f8e18f38d60>

    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 0x7f8e159b0860>
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 0x7ff0b733a540>, 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 0x7ff0b73394c0>
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 0x7ff0b85c17f0>
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 0x7ff0bad2cd60>

    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 0x7ff0b733a540>
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