DMSC Integration Testing

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

Test: nexusfiles-scipp|odin|can_compute_wavelength|beam_monitor_1

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 0x7f814b6448f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022385.hdf')
monitor_index = 1

    @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:9561, wavelength:716, ]
Coordinates:
* position                  vector3     ...ata:
                            float64  [dimensionless]  (time, wavelength)  [0, 0, ..., 10, 0]  [0, 0, ..., 10, 0]


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 0x7f7a90a20ef0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022255.hdf')
monitor_index = 1

    @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:9709, wavelength:716, ]
Coordinates:
* position                  vector3     ...ata:
                            float64  [dimensionless]  (time, wavelength)  [0, 0, ..., 10, 0]  [0, 0, ..., 10, 0]


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 0x7f0057f37260>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00022115.hdf')
monitor_index = 1

    @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:10787, wavelength:716, ]
Coordinates:
* position                  vector3    ...a:
                            float64  [dimensionless]  (time, wavelength)  [0, 10, ..., 10, 0]  [0, 10, ..., 10, 0]


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 0x7f7bb85b2240>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021975.hdf')
monitor_index = 1

    @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:8987, wavelength:716, ]
Coordinates:
* position                  vector3     ...
Data:
                            float64  [dimensionless]  (time, wavelength)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


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 0x7f3c61622090>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021701.hdf')
monitor_index = 1

    @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 0x7f3c54236210>
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 0x7f6641330470>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021561.hdf')
monitor_index = 1

    @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 0x7f6644d10c50>
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 0x7f43639dd430>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021411.hdf')
monitor_index = 1

    @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 0x7f43657756d0>
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 0x7f0812d0c5f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021271.hdf')
monitor_index = 1

    @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 0x7f07f8664bc0>
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 0x7f31b8219b20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00021131.hdf')
monitor_index = 1

    @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 0x7f31c4708290>
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 0x7f83a2f723c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020415.hdf')
monitor_index = 1

    @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 0x7f83a011d5b0>
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 0x7f4fc38b0f20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020275.hdf')
monitor_index = 1

    @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 0x7f4fc018a7b0>
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 0x7fecd021d5b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 1

    @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 0x7fecdac9e300>
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 0x7fbacb5ea090>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020202.hdf')
monitor_index = 1

    @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 0x7fbac06b62d0>
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 0x7f3a8021afc0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020114.hdf')
monitor_index = 1

    @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 0x7f3a81226240>
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 0x7f9e22b2b470>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019971.hdf')
monitor_index = 1

    @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 0x7f9e236d8470>
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


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fb17c57c320>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019453.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:6478, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14567e+09, -2.12208e+09, ..., 2.09472e+09, 2.12611e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f9bb6b3fc20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019453.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:6478, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14567e+09, -2.12208e+09, ..., 2.09472e+09, 2.12611e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fbdc4eb2600>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019373.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4253, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.08023e+09, -2.03474e+09, ..., 2.12601e+09, 2.12601e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fa63a4f77a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019227.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:10066, frame_time:7000, ]
Coordinates:
* frame_time                float64   ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14405e+09, -2.13497e+09, ..., 2.07927e+09, 2.14566e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f21a4887dd0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00019096.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4228, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14748e+09, -2.14014e+09, ..., 2.14107e+09, 2.14127e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4e526d97c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018956.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4593, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.08037e+09, -2.08009e+09, ..., 2.00203e+09, 2.10725e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8f57395580>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018816.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:10669, frame_time:7000, ]
Coordinates:
* frame_time                float64   ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-6.70648e+08, -1.05203e+08, ..., 1.85319e+09, 1.8699e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fce143088f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018676.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:8699, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [0, 0, ..., 1.8351e+09, 1.8351e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fd2e1ec4800>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018332.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4861, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-5.36871e+08, -5.36871e+08, ..., 2.01991e+09, 2.02064e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f99e5c62ab0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018332.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4861, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-5.36871e+08, -5.36871e+08, ..., 2.01991e+09, 2.02064e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4dd206ec30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018332.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4861, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-5.36871e+08, -5.36871e+08, ..., 2.01991e+09, 2.02064e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8d9de3f740>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018252.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:7976, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.10185e+09, -2.0991e+09, ..., 2.10968e+09, 2.14074e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7ffa53f868d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00018122.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4776, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...ata:
                            float64             [au]  (time, frame_time)  [4, 11, ..., 0, 0]  [4, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14742e+09, -2.14642e+09, ..., 2.1465e+09, 2.14673e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fe2d6269d90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017982.hdf')
monitor_index = 1

    @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:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:5671, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-7.38195e+08, -7.38195e+08, ..., 1.8351e+09, 1.8351e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
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           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f5be3dad580>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017745.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:764, frame_time:7000, ]
Coordinates:
* frame_time                float64     ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-1.94616e+09, -1.94616e+09, ..., 1.8699e+09, 1.97127e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f627a4a0b90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017657.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:482: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4853, frame_time:7000, ]
Coordinates:
* frame_time                float64    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.11504e+09, -2.09827e+09, ..., 2.03057e+09, 2.03253e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fa9f00fc590>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017547.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:10126, frame_time:7000, ]
Coordinates:
* frame_time                  int32   ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-8.72413e+08, -8.72413e+08, ..., 1.8351e+09, 1.8351e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fa55e707110>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017397.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:4576, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-1.99606e+09, -1.63347e+09, ..., 1.98287e+09, 2.06827e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f83017efaa0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017257.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:5403, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.08667e+09, -2.08588e+09, ..., 2.02827e+09, 2.02919e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f617d5e2a80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017127.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:9005, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.11311e+09, -2.05618e+09, ..., 2.03662e+09, 2.07274e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f9794095730>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016977.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:8057, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14357e+09, -2.13852e+09, ..., 2.14748e+09, 2.14748e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f76c90ea6f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016707.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:6241, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-1.82773e+09, -1.77697e+09, ..., 2.14748e+09, 2.14748e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f27cc7ca930>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016557.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:5185, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [0, 0, ..., 1.8351e+09, 1.8351e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f2ecacc3830>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016427.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:3879, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-2.14467e+09, -2.14467e+09, ..., 2.10084e+09, 2.1009e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f34f46c1af0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016287.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:10983, frame_time:7000, ]
Coordinates:
* frame_time                  int32   ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-3168, -3056, ..., 1.85319e+09, 1.8699e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f037e909fa0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016137.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:7345, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...a:
                            float64             [au]  (time, frame_time)  [10, 11, ..., 0, 0]  [10, 11, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-3168, -3168, ..., 1.8699e+09, 1.8699e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError

View job log here


scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fbe1607bb90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00015997.hdf')
monitor_index = 1

    @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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:7555, frame_time:7000, ]
Coordinates:
* frame_time                  int32    ...
Data:
                            float64             [au]  (time, frame_time)  [0, 0, ..., 0, 0]  [0, 0, ..., 0, 0]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 7002)    float64            [µs]  [-1.5435e+09, -1.54334e+09, ..., 1.85319e+09, 1.8699e+09]}
kwargs = {}

    @data_group_overload
    def rebin(
        x: Variable | DataArray | Dataset | DataGroup[Any],
        arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
        /,
        **kwargs: SupportsIndex | Variable,
    ) -> Variable | DataArray | Dataset | DataGroup[Any]:
        """Rebin a data array or dataset.
    
        The coordinate of the input for the dimension to be rebinned must contain bin edges,
        i.e., the data must be histogrammed.
    
        If the input has masks that contain the dimension being rebinned then those
        masks are applied to the data before rebinning. That is, masked values are treated
        as zero.
    
        Parameters
        ----------
        x:
            Data to rebin.
        arg_dict:
            Dictionary mapping dimension labels to binning parameters.
        **kwargs:
            Mapping of dimension label to corresponding binning parameters.
    
        Returns
        -------
        :
            Data rebinned according to the new bin edges.
    
        See Also
        --------
        scipp.bin:
            For changing the binning of binned (as opposed to dense, histogrammed) data.
        scipp.hist:
            For histogramming data.
    
        Examples
        --------
    
        Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
        bin width, or (3) actual binning:
    
          >>> from numpy.random import default_rng
          >>> rng = default_rng(seed=1234)
          >>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
          >>> data = sc.ones(dims=['row'], unit='K', shape=[100])
          >>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=2).sizes
          {'x': 2, 'y': 100}
    
          >>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
          {'x': 5, 'y': 100}
    
          >>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
          {'x': 9, 'y': 100}
    
        Rebin a data array along two of its dimensions:
    
          >>> da = table.hist(x=100, y=100)
          >>> da.rebin(x=4, y=6).sizes
          {'x': 4, 'y': 6}
        """
        if isinstance(x, DataGroup):
            # Only to make mypy happy because we have `DataGroup` in annotation of `x`
            # so that Sphinx shows it.
            raise TypeError("Internal error: input should not be a DataGroup")
        edges = _make_edges(x, arg_dict, kwargs)
        out = x
        for dim, edge in edges.items():
>           out = _cpp.rebin(out, dim, edge)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
E           scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.

.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError