DMSC Integration Testing

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

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 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 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: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 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 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 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 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 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 0x7f103e6e52b0>
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 0x7fb231a41e20>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00020115.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:900, 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 0x7f5f71fe1a00>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019972.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:828, 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 0x7f3fbc46b890>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019663.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:508, 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 0x7fc44469fd70>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019523.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:699, 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 0x7ff134701100>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019374.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:615, 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 0x7f87b9f37fb0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019228.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:864, 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 0x7f375a28ec30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019097.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:859, 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 0x7fbc52e03410>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018957.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:654, 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 0x7f3d7c7097f0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018817.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:585, 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 0x7fbc882e6030>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018677.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:649, 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 0x7fc544734f50>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018333.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:579, 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 0x7f71c41fbe60>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018333.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:579, 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 0x7fcd30777e90>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018333.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:579, 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 0x7f4d31ce0da0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018253.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:608, 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 0x7f2b9c02a4b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00018123.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:507, 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 0x7f790271c0e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017983.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:733, 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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f3e19f798b0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017746.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:119: 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/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:61, 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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fc90800a4e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017658.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:119: 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/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:625, 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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fd7a83c1790>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017548.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:618, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fdad5827950>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017398.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:780, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f879307d160>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017258.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:729, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f77bc05b6e0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00017118.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:719, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f1970154d10>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016978.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:829, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fdda1b7e120>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016708.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:500, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f8d40e95ee0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016558.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:421, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f5a203bfe30>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016428.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:462, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f7e78fabfb0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016278.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:412, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7f021842fdd0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00016138.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:617, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

.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.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/scipp/core/binning.py:992: BinEdgeError
Full output
workflow = <sciline.pipeline.Pipeline object at 0x7fa3fc0c7f80>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00015998.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:119: 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/ess/reduce/unwrap/to_wavelength.py:547: in monitor_wavelength_data
    _compute_wavelength_data(
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:474: in _compute_wavelength_data
    data = _compute_wavelength_histogram(da=da, lookup=lookup, ltotal=ltotal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/ess/reduce/unwrap/to_wavelength.py:157: in _compute_wavelength_histogram
    rebinned = da.rebin({key: new_bins})
               ^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-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:493, frame_time:714, ]
Coordinates:
* frame_time                  int32      ...                   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.

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