DMSC Integration Testing

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

Test: nexusfiles-scipp|odin|can_compute_wavelength|beam_monitor_2

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f811872fe30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022385.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fa124274770>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022305.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f7a7023dc10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022255.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fd9146be0c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022205.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fbe12650920>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022205.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fd1fd3da120>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022195.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f0030759a60>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022115.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f696475d100>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022065.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f66fc013080>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022065.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f0b34109580>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022065.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f6df4087380>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022045.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fc9c4035e80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022035.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fcb4071b6b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022035.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f27587f7470>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022025.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7ffa2c0fc980>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022025.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f28a87c7ad0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022025.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f7b98085b80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021975.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8fa1b5d220>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021911.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: No strictly increasing sections found.
In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
    monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
    pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
    keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f10f87af470>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021911.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:531: in _compute_wavelength_data
    out = rebin_strictly_increasing(data, dim='wavelength')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

da = <scipp.DataArray>
Dimensions: Sizes[time:0, wavelength:716, ]
Coordinates:
* position                  vector3        ...e])  [nan, nan, ..., nan, nan]
Data:
                            float64  [dimensionless]  (time, wavelength)  []  []


dim = 'wavelength'

    def rebin_strictly_increasing(da: sc.DataArray, dim: str) -> sc.DataArray:
        """
        Find strictly monotonic sections in a coordinate dimension and rebin the data array
        into a regular grid based on these sections.
        """
        # Ensure the dimension is named like the coordinate.
        da = da.rename_dims({da.coords[dim].dim: dim})
        slices = find_strictly_increasing_sections(da.coords[dim])
        if len(slices) == 1:
            # Slices refer to the indices in the coord, which are bin edges.
            # For slicing data we need to stop at the last index minus one.
            return da[dim, slices[0].start : slices[0].stop - 1]
        if not slices:
>           raise ValueError("No strictly increasing sections found.")
E           ValueError: No strictly increasing sections found.
E           In provider ess.reduce.unwrap.to_wavelength.monitor_wavelength_data(
E               monitor_data: ess.reduce.nexus.types.RawMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               lookup: ess.reduce.unwrap.types.ErrorLimitedLookupTable[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               ltotal: ess.reduce.unwrap.types.MonitorLtotal[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1],
E               pulse_stride_offset: ess.reduce.unwrap.types.PulseStrideOffset,
E               keep_event_time_offset: ess.reduce.unwrap.types.KeepEventTimeOffset,
E               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/resample.py:91: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f36803d0590>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021901.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f36801e1ee0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f3c54147f50>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021701.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f3c62951df0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f66411238f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021561.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f6638379160>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f05920a06b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021511.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f0591d97bc0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f436026f710>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021411.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f4365860680>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f08139feff0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021271.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f07f86ecad0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f31c47fb650>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021131.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f31c2541010>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f69fdb0c560>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020911.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f69febc4860>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7efccc7b1ee0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020911.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7efccc728170>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f0f30236000>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020561.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f0f285c5ac0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8398357b60>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020415.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f83a25d6360>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4fc422e690>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020275.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f4fb8527e90>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fd1901c14c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7fd194534fe0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fecdaccc890>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7fecd0253c20>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f70fa811d90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f70fb2ca060>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f98781f1df0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f987a80a450>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError

View job log here


ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
In provider ess.reduce.nexus.workflow.load_nexus_component(
    location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
    nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f7201fc9790>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 2

    @pytest.mark.parametrize("monitor_index", [1, 2, 3])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
>       result = workflow.compute(WavelengthMonitor[SampleRun, BeamMonitor1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/odin/odin_reduction_test.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:242: in load_nexus_component
    nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:99: in load_component
    with open_component_group(
/opt/miniforge/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:325: in open_component_group
    yield _unique_child_group(parent, nx_class, group_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

group = <scippnexus.base.Group object at 0x7f7202b237a0>
nx_class = <class 'scippnexus.nexus_classes.NXsource'>, name = None

    def _unique_child_group(
        group: snx.Group, nx_class: type[snx.NXobject], name: str | None
    ) -> snx.Group:
        if name is not None:
            child = group[name]
            if isinstance(child, snx.Field):
                raise ValueError(
                    f"Expected a NeXus group as item '{name}' but got a field."
                )
            if child.nx_class != nx_class:
                raise ValueError(
                    f"The NeXus group '{name}' was expected to be a "
                    f'{nx_class} but is a {child.nx_class}.'
                )
            return child
    
        children = group[nx_class]
        if len(children) != 1:
>           raise ValueError(
                f"Expected exactly one {nx_class.__name__} group '{group.name}', "
                f"got {len(children)}"
            )
E           ValueError: Expected exactly one NXsource group '/entry/instrument', got 2
E           In provider ess.reduce.nexus.workflow.load_nexus_component(
E               location: ess.reduce.nexus.types.NeXusComponentLocationSpec[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun],
E               nx_class: ess.reduce.nexus.types.NeXusClass[scippnexus.nexus_classes.NXsource],
E           ) -> ess.reduce.nexus.types.NeXusComponent[scippnexus.nexus_classes.NXsource, ess.imaging.types.SampleRun]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:384: ValueError