DMSC Integration Testing

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

Test: nexusfiles-scipp|tbl|can_compute_wavelength|beam_monitor_1

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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7feaa9f99730>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022386.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:521, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f9eb9f5d130>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022306.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:781, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f6a002a8d10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022246.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:634, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f2f788a99d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022206.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:541, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8e0c2af1d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022206.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:541, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7faf082dea50>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022196.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:304, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fc09acc81a0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022116.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:826, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fcb447a1f10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:328, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fb6940d2330>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:328, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4cad9ad4f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022066.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:328, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f713651f6e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022046.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:788: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:742, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:1072: 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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fef5bf04410>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022036.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:633, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fb3c030aba0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022036.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:633, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f059ba3d850>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:329, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7ff7181da3f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:329, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f03ef6d42c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022026.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:329, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f7f38050320>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021976.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:333, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f634416fa70>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021912.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:826, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4e3eef4260>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021912.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:826, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f6d181c14f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021902.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:695, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f5730744bf0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021842.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:701, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f951e6d99d0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021702.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:857, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f01d0d672c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021562.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:843, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f3fade515e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021512.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:882, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f9ce6c74680>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021412.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:779, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f25147e3fe0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021272.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:492, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f74bdace660>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00021132.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:808, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f21b078b0b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020992.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:480, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4a52f745f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020912.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:16, frame_time:714, ]
Coordinates:
* frame_time                float64       ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f94fc33bef0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:519, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f2c24367200>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:519, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fc0100eb860>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020892.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:519, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f5488123890>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020702.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:495, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f4358334aa0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020562.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:16, frame_time:714, ]
Coordinates:
* frame_time                float64       ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f65b7e16060>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020562.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:16, frame_time:714, ]
Coordinates:
* frame_time                float64       ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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,
    backend: <enum 'FrameUnwrapBackend'>,
) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f2492e20890>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020416.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:621: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:528: in _compute_wavelength_data
    data = _compute_wavelength_histogram(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:196: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:491, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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               backend: <enum 'FrameUnwrapBackend'>,
E           ) -> ess.reduce.unwrap.types.WavelengthMonitor[ess.imaging.types.SampleRun, ess.imaging.types.BeamMonitor1]

.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f38776d3b00>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020276.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:461, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f47ae89b920>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:830, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f47141a0c20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:830, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f28b8ee8e90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:830, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8e001e8350>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:830, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7ff0a07c82c0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020203.hdf')
monitor_type = ess.imaging.types.BeamMonitor1

    @pytest.mark.parametrize("monitor_type", [BeamMonitor1], ids=["1"])
    def test_can_compute_wavelength__beam_monitor_(
        workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
    ) -> None:
        workflow[Filename[SampleRun]] = coda_nexus_file_path
        workflow[LookupTableFilename] = tbl_wavelength_lookup_table_no_choppers()
>       result = workflow.compute(WavelengthMonitor[SampleRun, monitor_type])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/tbl/tbl_reduction_test.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
    return self.get(tp, **kwargs).compute(reporter=reporter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
    return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
    return self._dask_get(dsk, list(map(_to_dask_key, keys)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/threaded.py:115: in get
    results = get_async(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:547: in get_async
    raise_exception(exc, tb)
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:351: in reraise
    raise exc
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/local.py:256: in execute_task
    result = task(data)
             ^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
    return self.func(*new_argspec)
           ^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dask/utils.py:81: in apply
    return func(*args)
           ^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:565: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/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-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:162: in _compute_wavelength_histogram
    ).rebin({key: new_bins})
      ^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
    return func(data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = <scipp.DataArray>
Dimensions: Sizes[time:830, frame_time:714, ]
Coordinates:
* frame_time                float64      ...                   float64             [au]  (time, frame_time)  [140, 154, ..., 154, 140]  [140, 154, ..., 154, 140]


arg_dict = {'frame_time': <scipp.Variable> (frame_time: 716)    float64             [ns]  [0, 0, ..., 7.13285e+07, 7.14286e+07]}
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-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError