workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017191.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:479: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:406: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:119: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:11073, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:11073, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
Test: nexusfiles-scipp|odin|can_compute_tof|beam_monitor_1
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00017044.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:3895, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:3895, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016904.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:5797, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:5797, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016764.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:11163, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:11163, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016624.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:7717, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:7717, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016484.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:4484, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:4484, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016337.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:755: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:11250, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:11250, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016197.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:8099, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:8099, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00016057.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:4353, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:4353, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00015917.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:9565, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:9565, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00015784.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:9979, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:9979, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00015644.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:8235, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:8235, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00015504.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:5151, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:5151, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[BeamMonitor1]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, BeamMonitor1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:473: in monitor_time_of_flight_data
_compute_tof_data(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:403: in _compute_tof_data
data = _time_of_flight_data_histogram(da=da, lookup=lookup, ltotal=ltotal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/time_of_flight/eto_to_tof.py:116: in _time_of_flight_data_histogram
rebinned = da.rebin({key: new_bins})
^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:744: in impl
return func(data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
arg_dict = {'frame_time':
kwargs = {}
edges = {'frame_time':
out =
Dimensions: Sizes[time:8194, frame_time:7000, ]
Coordinates:
* frame_time int32 ...
Data:
float64 [au] (time, frame_time) [3, 3, ..., 0, 0] [3, 3, ..., 0, 0]
dim = 'frame_time'
edge =
@data_group_overload
def rebin(
x: Variable | DataArray | Dataset | DataGroup[Any],
arg_dict: IntoStrDict[SupportsIndex | Variable] | None = None,
/,
**kwargs: SupportsIndex | Variable,
) -> Variable | DataArray | Dataset | DataGroup[Any]:
"""Rebin a data array or dataset.
The coordinate of the input for the dimension to be rebinned must contain bin edges,
i.e., the data must be histogrammed.
If the input has masks that contain the dimension being rebinned then those
masks are applied to the data before rebinning. That is, masked values are treated
as zero.
Parameters
----------
x:
Data to rebin.
arg_dict:
Dictionary mapping dimension labels to binning parameters.
**kwargs:
Mapping of dimension label to corresponding binning parameters.
Returns
-------
:
Data rebinned according to the new bin edges.
See Also
--------
scipp.bin:
For changing the binning of binned (as opposed to dense, histogrammed) data.
scipp.hist:
For histogramming data.
Examples
--------
Rebin a data array along one of its dimensions, specifying (1) number of bins, (2)
bin width, or (3) actual binning:
>>> from numpy.random import default_rng
>>> rng = default_rng(seed=1234)
>>> x = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> y = sc.array(dims=['row'], unit='m', values=rng.random(100))
>>> data = sc.ones(dims=['row'], unit='K', shape=[100])
>>> table = sc.DataArray(data=data, coords={'x': x, 'y': y})
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=2).sizes
{'x': 2, 'y': 100}
>>> da.rebin(x=sc.scalar(0.2, unit='m')).sizes
{'x': 5, 'y': 100}
>>> da.rebin(x=sc.linspace('x', 0.2, 0.8, num=10, unit='m')).sizes
{'x': 9, 'y': 100}
Rebin a data array along two of its dimensions:
>>> da = table.hist(x=100, y=100)
>>> da.rebin(x=4, y=6).sizes
{'x': 4, 'y': 6}
"""
if isinstance(x, DataGroup):
# Only to make mypy happy because we have `DataGroup` in annotation of `x`
# so that Sphinx shows it.
raise TypeError("Internal error: input should not be a DataGroup")
edges = _make_edges(x, arg_dict, kwargs)
out = x
for dim, edge in edges.items():
> out = _cpp.rebin(out, dim, edge)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.BinEdgeError: The input does not have coordinates with bin-edges.
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/binning.py:971: BinEdgeError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], PreopenNeXusFile, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], NeXusFileSpec[SampleRun], Filename[SampleRun], TimeInterval[DarkBackgroundRun], TimeInterval[OpenBeamRun], TimeInterval[SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, SampleRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, SampleRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, SampleRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, OpenBeamRun], Position[NXsource, SampleRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, SampleRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, SampleRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, OpenBeamRun], Position[NXsample, SampleRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, SampleRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, SampleRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusClass[NXdisk_chopper], NeXusClass[BeamMonitor1], NeXusClass[NXsource], NeXusClass[BeamMonitor2], NeXusClass[BeamMonitor3], NeXusClass[NXcrystal], NeXusClass[NXsample], NeXusClass[NXdetector], NeXusClass[BeamMonitor4], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, SampleRun], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[SampleRun], EmptyDetector[DarkBackgroundRun], DetectorBankSizes, EmptyDetector[OpenBeamRun], EmptyDetector[SampleRun], RawDetector[DarkBackgroundRun], RawDetector[OpenBeamRun], RawDetector[SampleRun], RawChoppers[DarkBackgroundRun], RawChoppers[OpenBeamRun], RawChoppers[SampleRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[DarkBackgroundRun], TofLookupTable, DetectorLtotal[DarkBackgroundRun], PulseStrideOffset, TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofDetector[SampleRun], DetectorLtotal[SampleRun], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], ToaDetector[DarkBackgroundRun], ToaDetector[OpenBeamRun], ToaDetector[SampleRun], TofLookupTableFilename, CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[OpenBeamRun], CoordTransformGraph[SampleRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[SampleRun], CorrectedDetector[DarkBackgroundRun], MaskingRules, CorrectedDetector[OpenBeamRun], CorrectedDetector[SampleRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[SampleRun], Filename[SampleRun], PreopenNeXusFile, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], TimeInterval[SampleRun], TimeInterval[DarkBackgroundRun], TimeInterval[OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, OpenBeamRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, OpenBeamRun], Position[NXsample, SampleRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, OpenBeamRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, OpenBeamRun], Position[NXcrystal, SampleRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, OpenBeamRun], Position[NXdetector, SampleRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, OpenBeamRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, OpenBeamRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXsource, SampleRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, OpenBeamRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusClass[BeamMonitor4], NeXusClass[BeamMonitor1], NeXusClass[NXsample], NeXusClass[BeamMonitor2], NeXusClass[NXcrystal], NeXusClass[NXdetector], NeXusClass[BeamMonitor3], NeXusClass[NXdisk_chopper], NeXusClass[NXsource], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, OpenBeamRun], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor4], DetectorPositionOffset[SampleRun], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[OpenBeamRun], EmptyDetector[SampleRun], DetectorBankSizes, EmptyDetector[DarkBackgroundRun], EmptyDetector[OpenBeamRun], RawDetector[SampleRun], RawDetector[DarkBackgroundRun], RawDetector[OpenBeamRun], RawChoppers[SampleRun], RawChoppers[DarkBackgroundRun], RawChoppers[OpenBeamRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[SampleRun], TofLookupTable, DetectorLtotal[SampleRun], PulseStrideOffset, TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], ToaDetector[SampleRun], ToaDetector[DarkBackgroundRun], ToaDetector[OpenBeamRun], TofLookupTableFilename, CoordTransformGraph[SampleRun], CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[OpenBeamRun], WavelengthDetector[SampleRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[OpenBeamRun], CorrectedDetector[SampleRun], MaskingRules, CorrectedDetector[DarkBackgroundRun], CorrectedDetector[OpenBeamRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[SampleRun], Filename[SampleRun], PreopenNeXusFile, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], TimeInterval[DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusClass[BeamMonitor2], NeXusClass[NXdetector], NeXusClass[NXcrystal], NeXusClass[NXsample], NeXusClass[NXdisk_chopper], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], NeXusClass[NXsource], NeXusClass[BeamMonitor1], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor1], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[DarkBackgroundRun], EmptyDetector[SampleRun], DetectorBankSizes, EmptyDetector[OpenBeamRun], EmptyDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], RawChoppers[DarkBackgroundRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[SampleRun], TofLookupTable, DetectorLtotal[SampleRun], PulseStrideOffset, TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], ToaDetector[DarkBackgroundRun], TofLookupTableFilename, CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], CoordTransformGraph[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], CorrectedDetector[SampleRun], MaskingRules, CorrectedDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], PreopenNeXusFile, NeXusFileSpec[SampleRun], Filename[SampleRun], NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], TimeInterval[OpenBeamRun], TimeInterval[SampleRun], TimeInterval[DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, SampleRun], Position[NXdetector, DarkBackgroundRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, DarkBackgroundRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, SampleRun], Position[NXcrystal, DarkBackgroundRun], Position[NXsample, OpenBeamRun], Position[NXsample, SampleRun], Position[NXsample, DarkBackgroundRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, DarkBackgroundRun], Position[NXsource, OpenBeamRun], Position[NXsource, SampleRun], Position[NXsource, DarkBackgroundRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, DarkBackgroundRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusClass[NXdetector], NeXusClass[BeamMonitor1], NeXusClass[NXcrystal], NeXusClass[NXsample], NeXusClass[NXdisk_chopper], NeXusClass[BeamMonitor2], NeXusClass[NXsource], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor1], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[SampleRun], DetectorPositionOffset[DarkBackgroundRun], EmptyDetector[OpenBeamRun], DetectorBankSizes, EmptyDetector[SampleRun], EmptyDetector[DarkBackgroundRun], RawDetector[OpenBeamRun], RawDetector[SampleRun], RawDetector[DarkBackgroundRun], RawChoppers[OpenBeamRun], RawChoppers[SampleRun], RawChoppers[DarkBackgroundRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[OpenBeamRun], TofLookupTable, DetectorLtotal[OpenBeamRun], PulseStrideOffset, TofDetector[SampleRun], DetectorLtotal[SampleRun], TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], ToaDetector[OpenBeamRun], ToaDetector[SampleRun], ToaDetector[DarkBackgroundRun], TofLookupTableFilename, CoordTransformGraph[OpenBeamRun], CoordTransformGraph[SampleRun], CoordTransformGraph[DarkBackgroundRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[SampleRun], WavelengthDetector[DarkBackgroundRun], CorrectedDetector[OpenBeamRun], MaskingRules, CorrectedDetector[SampleRun], CorrectedDetector[DarkBackgroundRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[SampleRun], Filename[SampleRun], PreopenNeXusFile, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], TimeInterval[DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], NeXusClass[NXsample], NeXusClass[NXsource], NeXusClass[NXcrystal], NeXusClass[BeamMonitor1], NeXusClass[NXdetector], NeXusClass[BeamMonitor2], NeXusClass[NXdisk_chopper], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor1], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[DarkBackgroundRun], EmptyDetector[SampleRun], DetectorBankSizes, EmptyDetector[OpenBeamRun], EmptyDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], RawChoppers[DarkBackgroundRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[SampleRun], TofLookupTable, DetectorLtotal[SampleRun], PulseStrideOffset, TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], ToaDetector[DarkBackgroundRun], TofLookupTableFilename, CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], CoordTransformGraph[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], CorrectedDetector[SampleRun], MaskingRules, CorrectedDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], PreopenNeXusFile, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], NeXusFileSpec[SampleRun], Filename[SampleRun], TimeInterval[DarkBackgroundRun], TimeInterval[OpenBeamRun], TimeInterval[SampleRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, SampleRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, SampleRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, OpenBeamRun], Position[NXsample, SampleRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, OpenBeamRun], Position[NXsource, SampleRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, SampleRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, SampleRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, SampleRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, SampleRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusClass[BeamMonitor2], NeXusClass[BeamMonitor4], NeXusClass[BeamMonitor3], NeXusClass[NXsample], NeXusClass[NXsource], NeXusClass[NXcrystal], NeXusClass[NXdetector], NeXusClass[BeamMonitor1], NeXusClass[NXdisk_chopper], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, SampleRun], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor1], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[SampleRun], EmptyDetector[DarkBackgroundRun], DetectorBankSizes, EmptyDetector[OpenBeamRun], EmptyDetector[SampleRun], RawDetector[DarkBackgroundRun], RawDetector[OpenBeamRun], RawDetector[SampleRun], RawChoppers[DarkBackgroundRun], RawChoppers[OpenBeamRun], RawChoppers[SampleRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[DarkBackgroundRun], TofLookupTable, DetectorLtotal[DarkBackgroundRun], PulseStrideOffset, TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofDetector[SampleRun], DetectorLtotal[SampleRun], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], ToaDetector[DarkBackgroundRun], ToaDetector[OpenBeamRun], ToaDetector[SampleRun], TofLookupTableFilename, CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[OpenBeamRun], CoordTransformGraph[SampleRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[SampleRun], CorrectedDetector[DarkBackgroundRun], MaskingRules, CorrectedDetector[OpenBeamRun], CorrectedDetector[SampleRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], PreopenNeXusFile, NeXusFileSpec[SampleRun], Filename[SampleRun], NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], TimeInterval[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusClass[BeamMonitor1], NeXusClass[BeamMonitor2], NeXusClass[NXsample], NeXusClass[BeamMonitor4], NeXusClass[NXdisk_chopper], NeXusClass[NXsource], NeXusClass[BeamMonitor3], NeXusClass[NXcrystal], NeXusClass[NXdetector], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor4], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], EmptyDetector[DarkBackgroundRun], DetectorBankSizes, EmptyDetector[SampleRun], EmptyDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawChoppers[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[DarkBackgroundRun], TofLookupTable, DetectorLtotal[DarkBackgroundRun], PulseStrideOffset, TofDetector[SampleRun], DetectorLtotal[SampleRun], TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], ToaDetector[DarkBackgroundRun], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], TofLookupTableFilename, CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], MaskingRules, CorrectedDetector[SampleRun], CorrectedDetector[OpenBeamRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], PreopenNeXusFile, NeXusFileSpec[SampleRun], Filename[SampleRun], NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], TimeInterval[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], NeXusClass[NXsample], NeXusClass[BeamMonitor2], NeXusClass[NXcrystal], NeXusClass[NXdetector], NeXusClass[NXsource], NeXusClass[BeamMonitor1], NeXusClass[NXdisk_chopper], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor2], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], EmptyDetector[DarkBackgroundRun], DetectorBankSizes, EmptyDetector[SampleRun], EmptyDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawChoppers[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[DarkBackgroundRun], TofLookupTable, DetectorLtotal[DarkBackgroundRun], PulseStrideOffset, TofDetector[SampleRun], DetectorLtotal[SampleRun], TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], ToaDetector[DarkBackgroundRun], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], TofLookupTableFilename, CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], MaskingRules, CorrectedDetector[SampleRun], CorrectedDetector[OpenBeamRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[SampleRun], Filename[SampleRun], PreopenNeXusFile, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], TimeInterval[DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusClass[NXsource], NeXusClass[BeamMonitor2], NeXusClass[NXdetector], NeXusClass[NXcrystal], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], NeXusClass[NXdisk_chopper], NeXusClass[NXsample], NeXusClass[BeamMonitor1], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor3], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[DarkBackgroundRun], EmptyDetector[SampleRun], DetectorBankSizes, EmptyDetector[OpenBeamRun], EmptyDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], RawChoppers[DarkBackgroundRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[SampleRun], TofLookupTable, DetectorLtotal[SampleRun], PulseStrideOffset, TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], ToaDetector[DarkBackgroundRun], TofLookupTableFilename, CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], CoordTransformGraph[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], CorrectedDetector[SampleRun], MaskingRules, CorrectedDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00014865.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], PreopenNeXusFile, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], NeXusFileSpec[SampleRun], Filename[SampleRun], TimeInterval[OpenBeamRun], TimeInterval[DarkBackgroundRun], TimeInterval[SampleRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXsample, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, SampleRun], Position[BeamMonitor1, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[NXsource, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusClass[NXcrystal], NeXusClass[NXsample], NeXusClass[BeamMonitor1], NeXusClass[NXsource], NeXusClass[NXdetector], NeXusClass[NXdisk_chopper], NeXusClass[BeamMonitor2], NeXusClass[BeamMonitor3], NeXusClass[BeamMonitor4], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor1], DetectorPositionOffset[OpenBeamRun], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[SampleRun], EmptyDetector[OpenBeamRun], DetectorBankSizes, EmptyDetector[DarkBackgroundRun], EmptyDetector[SampleRun], RawDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawDetector[SampleRun], RawChoppers[OpenBeamRun], RawChoppers[DarkBackgroundRun], RawChoppers[SampleRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[OpenBeamRun], TofLookupTable, DetectorLtotal[OpenBeamRun], PulseStrideOffset, TofDetector[DarkBackgroundRun], DetectorLtotal[DarkBackgroundRun], TofDetector[SampleRun], DetectorLtotal[SampleRun], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], ToaDetector[OpenBeamRun], ToaDetector[DarkBackgroundRun], ToaDetector[SampleRun], TofLookupTableFilename, CoordTransformGraph[OpenBeamRun], CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[SampleRun], WavelengthDetector[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[SampleRun], CorrectedDetector[OpenBeamRun], MaskingRules, CorrectedDetector[DarkBackgroundRun], CorrectedDetector[SampleRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00013753.hdf')
monitor_index = 1
@pytest.mark.parametrize("monitor_index", [1, 2, 3])
def test_can_compute_tof__beam_monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_index: int
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusName[FrameMonitor0]] = f"beam_monitor_{monitor_index}"
> result = workflow.compute(TofMonitor[SampleRun, FrameMonitor0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_reduction_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
keys = ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]
def get(
self,
keys: type | Iterable[type] | "UnionType" | str, # noqa: UP037 (needed by Sphinx)
*,
scheduler: Scheduler | None = None,
handler: ErrorHandler | None = None,
max_depth: int = 4,
) -> TaskGraph:
"""
Return a TaskGraph for the given keys.
Parameters
----------
keys:
Type to compute the result for.
Can be a single type or an iterable of types.
scheduler:
Optional scheduler to use for computing the result. If not given, a
:py:class:`NaiveScheduler` is used if `dask` is not installed,
otherwise dask's threaded scheduler is used.
handler:
Handler for unsatisfied requirements. If not provided,
:py:class:`HandleAsBuildTimeException` is used, which raises an exception.
During development and debugging it can be helpful to use a handler that
raises an exception only when the graph is computed. This can be achieved
by passing :py:class:`HandleAsComputeTimeException` as the handler.
max_depth:
Maximum depth to show in the dependency tree when reporting errors.
"""
if multi := _is_multiple_keys(keys):
targets = tuple(keys) # type: ignore[arg-type]
else:
targets = (keys,)
try:
graph = to_task_graph(self, targets=targets, handler=handler) # type: ignore[arg-type]
except UnsatisfiedRequirement as e:
missing = e.args[1]
nx_graph = self.underlying_graph
if missing in nx_graph:
paths = _find_paths_to_targets(nx_graph, missing, targets)
info = _format_paths_msg(nx_graph, paths)
else:
nodes = ", ".join(map(key_name, nx_graph.nodes))
info = f'{e} Requested node not in graph. Did you mean one of: {nodes}?'
# Not raising `from e` because that includes noisy traceback of internals,
# which are not relevant to the user.
> raise type(e)(f'{info}\n\n') from None
E sciline.handler.UnsatisfiedRequirement: ('No provider found for type', ess.reduce.time_of_flight.types.TofMonitor[ess.imaging.types.SampleRun, ess.reduce.nexus.types.FrameMonitor0]) Requested node not in graph. Did you mean one of: GravityVector, NeXusFileSpec[DarkBackgroundRun], Filename[DarkBackgroundRun], PreopenNeXusFile, NeXusFileSpec[SampleRun], Filename[SampleRun], NeXusFileSpec[OpenBeamRun], Filename[OpenBeamRun], TimeInterval[DarkBackgroundRun], TimeInterval[SampleRun], TimeInterval[OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusName[BeamMonitor2], NeXusComponentLocationSpec[BeamMonitor2, SampleRun], NeXusComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusName[NXcrystal], NeXusComponentLocationSpec[NXcrystal, SampleRun], NeXusComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusName[NXsample], NeXusComponentLocationSpec[NXsample, SampleRun], NeXusComponentLocationSpec[NXsample, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusName[BeamMonitor3], NeXusComponentLocationSpec[BeamMonitor3, SampleRun], NeXusComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusName[NXsource], NeXusComponentLocationSpec[NXsource, SampleRun], NeXusComponentLocationSpec[NXsource, OpenBeamRun], NeXusComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusName[NXdetector], NeXusComponentLocationSpec[NXdetector, SampleRun], NeXusComponentLocationSpec[NXdetector, OpenBeamRun], NeXusComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusName[NXdisk_chopper], NeXusComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusName[BeamMonitor4], NeXusComponentLocationSpec[BeamMonitor4, SampleRun], NeXusComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusName[BeamMonitor1], NeXusComponentLocationSpec[BeamMonitor1, SampleRun], NeXusComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor2, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor2, OpenBeamRun], NeXusAllComponentLocationSpec[NXcrystal, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXcrystal, SampleRun], NeXusAllComponentLocationSpec[NXcrystal, OpenBeamRun], NeXusAllComponentLocationSpec[NXsample, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsample, SampleRun], NeXusAllComponentLocationSpec[NXsample, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor3, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor3, OpenBeamRun], NeXusAllComponentLocationSpec[NXsource, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXsource, SampleRun], NeXusAllComponentLocationSpec[NXsource, OpenBeamRun], NeXusAllComponentLocationSpec[NXdetector, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdetector, SampleRun], NeXusAllComponentLocationSpec[NXdetector, OpenBeamRun], NeXusAllComponentLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusAllComponentLocationSpec[NXdisk_chopper, SampleRun], NeXusAllComponentLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor4, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor4, OpenBeamRun], NeXusAllComponentLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusAllComponentLocationSpec[BeamMonitor1, SampleRun], NeXusAllComponentLocationSpec[BeamMonitor1, OpenBeamRun], NeXusTransformationChain[BeamMonitor2, DarkBackgroundRun], NeXusComponent[BeamMonitor2, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor2, SampleRun], NeXusComponent[BeamMonitor2, SampleRun], NeXusTransformationChain[BeamMonitor2, OpenBeamRun], NeXusComponent[BeamMonitor2, OpenBeamRun], NeXusTransformationChain[NXcrystal, DarkBackgroundRun], NeXusComponent[NXcrystal, DarkBackgroundRun], NeXusTransformationChain[NXcrystal, SampleRun], NeXusComponent[NXcrystal, SampleRun], NeXusTransformationChain[NXcrystal, OpenBeamRun], NeXusComponent[NXcrystal, OpenBeamRun], NeXusTransformationChain[NXsample, DarkBackgroundRun], NeXusComponent[NXsample, DarkBackgroundRun], NeXusTransformationChain[NXsample, SampleRun], NeXusComponent[NXsample, SampleRun], NeXusTransformationChain[NXsample, OpenBeamRun], NeXusComponent[NXsample, OpenBeamRun], NeXusTransformationChain[BeamMonitor3, DarkBackgroundRun], NeXusComponent[BeamMonitor3, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor3, SampleRun], NeXusComponent[BeamMonitor3, SampleRun], NeXusTransformationChain[BeamMonitor3, OpenBeamRun], NeXusComponent[BeamMonitor3, OpenBeamRun], NeXusTransformationChain[NXsource, DarkBackgroundRun], NeXusComponent[NXsource, DarkBackgroundRun], NeXusTransformationChain[NXsource, SampleRun], NeXusComponent[NXsource, SampleRun], NeXusTransformationChain[NXsource, OpenBeamRun], NeXusComponent[NXsource, OpenBeamRun], NeXusTransformationChain[NXdetector, DarkBackgroundRun], NeXusComponent[NXdetector, DarkBackgroundRun], NeXusTransformationChain[NXdetector, SampleRun], NeXusComponent[NXdetector, SampleRun], NeXusTransformationChain[NXdetector, OpenBeamRun], NeXusComponent[NXdetector, OpenBeamRun], NeXusTransformationChain[NXdisk_chopper, DarkBackgroundRun], NeXusComponent[NXdisk_chopper, DarkBackgroundRun], NeXusTransformationChain[NXdisk_chopper, SampleRun], NeXusComponent[NXdisk_chopper, SampleRun], NeXusTransformationChain[NXdisk_chopper, OpenBeamRun], NeXusComponent[NXdisk_chopper, OpenBeamRun], NeXusTransformationChain[BeamMonitor4, DarkBackgroundRun], NeXusComponent[BeamMonitor4, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor4, SampleRun], NeXusComponent[BeamMonitor4, SampleRun], NeXusTransformationChain[BeamMonitor4, OpenBeamRun], NeXusComponent[BeamMonitor4, OpenBeamRun], NeXusTransformationChain[BeamMonitor1, DarkBackgroundRun], NeXusComponent[BeamMonitor1, DarkBackgroundRun], NeXusTransformationChain[BeamMonitor1, SampleRun], NeXusComponent[BeamMonitor1, SampleRun], NeXusTransformationChain[BeamMonitor1, OpenBeamRun], NeXusComponent[BeamMonitor1, OpenBeamRun], NeXusTransformation[BeamMonitor2, DarkBackgroundRun], NeXusTransformation[BeamMonitor2, SampleRun], NeXusTransformation[BeamMonitor2, OpenBeamRun], NeXusTransformation[NXcrystal, DarkBackgroundRun], NeXusTransformation[NXcrystal, SampleRun], NeXusTransformation[NXcrystal, OpenBeamRun], NeXusTransformation[NXsample, DarkBackgroundRun], NeXusTransformation[NXsample, SampleRun], NeXusTransformation[NXsample, OpenBeamRun], NeXusTransformation[BeamMonitor3, DarkBackgroundRun], NeXusTransformation[BeamMonitor3, SampleRun], NeXusTransformation[BeamMonitor3, OpenBeamRun], NeXusTransformation[NXsource, DarkBackgroundRun], NeXusTransformation[NXsource, SampleRun], NeXusTransformation[NXsource, OpenBeamRun], NeXusTransformation[NXdetector, DarkBackgroundRun], NeXusTransformation[NXdetector, SampleRun], NeXusTransformation[NXdetector, OpenBeamRun], NeXusTransformation[NXdisk_chopper, DarkBackgroundRun], NeXusTransformation[NXdisk_chopper, SampleRun], NeXusTransformation[NXdisk_chopper, OpenBeamRun], NeXusTransformation[BeamMonitor4, DarkBackgroundRun], NeXusTransformation[BeamMonitor4, SampleRun], NeXusTransformation[BeamMonitor4, OpenBeamRun], NeXusTransformation[BeamMonitor1, DarkBackgroundRun], NeXusTransformation[BeamMonitor1, SampleRun], NeXusTransformation[BeamMonitor1, OpenBeamRun], Position[BeamMonitor2, DarkBackgroundRun], Position[BeamMonitor2, SampleRun], Position[BeamMonitor2, OpenBeamRun], Position[NXcrystal, DarkBackgroundRun], Position[NXcrystal, SampleRun], Position[NXcrystal, OpenBeamRun], Position[NXsample, DarkBackgroundRun], Position[NXsample, SampleRun], Position[NXsample, OpenBeamRun], Position[BeamMonitor3, DarkBackgroundRun], Position[BeamMonitor3, SampleRun], Position[BeamMonitor3, OpenBeamRun], Position[NXsource, DarkBackgroundRun], Position[NXsource, SampleRun], Position[NXsource, OpenBeamRun], Position[NXdetector, DarkBackgroundRun], Position[NXdetector, SampleRun], Position[NXdetector, OpenBeamRun], Position[NXdisk_chopper, DarkBackgroundRun], Position[NXdisk_chopper, SampleRun], Position[NXdisk_chopper, OpenBeamRun], Position[BeamMonitor4, DarkBackgroundRun], Position[BeamMonitor4, SampleRun], Position[BeamMonitor4, OpenBeamRun], Position[BeamMonitor1, DarkBackgroundRun], Position[BeamMonitor1, SampleRun], Position[BeamMonitor1, OpenBeamRun], NeXusData[BeamMonitor2, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor2, DarkBackgroundRun], NeXusData[BeamMonitor2, SampleRun], NeXusDataLocationSpec[BeamMonitor2, SampleRun], NeXusData[BeamMonitor2, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor2, OpenBeamRun], NeXusData[NXcrystal, DarkBackgroundRun], NeXusDataLocationSpec[NXcrystal, DarkBackgroundRun], NeXusData[NXcrystal, SampleRun], NeXusDataLocationSpec[NXcrystal, SampleRun], NeXusData[NXcrystal, OpenBeamRun], NeXusDataLocationSpec[NXcrystal, OpenBeamRun], NeXusData[NXsample, DarkBackgroundRun], NeXusDataLocationSpec[NXsample, DarkBackgroundRun], NeXusData[NXsample, SampleRun], NeXusDataLocationSpec[NXsample, SampleRun], NeXusData[NXsample, OpenBeamRun], NeXusDataLocationSpec[NXsample, OpenBeamRun], NeXusData[BeamMonitor3, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor3, DarkBackgroundRun], NeXusData[BeamMonitor3, SampleRun], NeXusDataLocationSpec[BeamMonitor3, SampleRun], NeXusData[BeamMonitor3, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor3, OpenBeamRun], NeXusData[NXsource, DarkBackgroundRun], NeXusDataLocationSpec[NXsource, DarkBackgroundRun], NeXusData[NXsource, SampleRun], NeXusDataLocationSpec[NXsource, SampleRun], NeXusData[NXsource, OpenBeamRun], NeXusDataLocationSpec[NXsource, OpenBeamRun], NeXusData[NXdetector, DarkBackgroundRun], NeXusDataLocationSpec[NXdetector, DarkBackgroundRun], NeXusData[NXdetector, SampleRun], NeXusDataLocationSpec[NXdetector, SampleRun], NeXusData[NXdetector, OpenBeamRun], NeXusDataLocationSpec[NXdetector, OpenBeamRun], NeXusData[NXdisk_chopper, DarkBackgroundRun], NeXusDataLocationSpec[NXdisk_chopper, DarkBackgroundRun], NeXusData[NXdisk_chopper, SampleRun], NeXusDataLocationSpec[NXdisk_chopper, SampleRun], NeXusData[NXdisk_chopper, OpenBeamRun], NeXusDataLocationSpec[NXdisk_chopper, OpenBeamRun], NeXusData[BeamMonitor4, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor4, DarkBackgroundRun], NeXusData[BeamMonitor4, SampleRun], NeXusDataLocationSpec[BeamMonitor4, SampleRun], NeXusData[BeamMonitor4, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor4, OpenBeamRun], NeXusData[BeamMonitor1, DarkBackgroundRun], NeXusDataLocationSpec[BeamMonitor1, DarkBackgroundRun], NeXusData[BeamMonitor1, SampleRun], NeXusDataLocationSpec[BeamMonitor1, SampleRun], NeXusData[BeamMonitor1, OpenBeamRun], NeXusDataLocationSpec[BeamMonitor1, OpenBeamRun], NeXusClass[BeamMonitor2], NeXusClass[NXcrystal], NeXusClass[NXsample], NeXusClass[BeamMonitor3], NeXusClass[NXsource], NeXusClass[NXdetector], NeXusClass[NXdisk_chopper], NeXusClass[BeamMonitor4], NeXusClass[BeamMonitor1], AllNeXusComponents[BeamMonitor2, DarkBackgroundRun], AllNeXusComponents[BeamMonitor2, SampleRun], AllNeXusComponents[BeamMonitor2, OpenBeamRun], AllNeXusComponents[NXcrystal, DarkBackgroundRun], AllNeXusComponents[NXcrystal, SampleRun], AllNeXusComponents[NXcrystal, OpenBeamRun], AllNeXusComponents[NXsample, DarkBackgroundRun], AllNeXusComponents[NXsample, SampleRun], AllNeXusComponents[NXsample, OpenBeamRun], AllNeXusComponents[BeamMonitor3, DarkBackgroundRun], AllNeXusComponents[BeamMonitor3, SampleRun], AllNeXusComponents[BeamMonitor3, OpenBeamRun], AllNeXusComponents[NXsource, DarkBackgroundRun], AllNeXusComponents[NXsource, SampleRun], AllNeXusComponents[NXsource, OpenBeamRun], AllNeXusComponents[NXdetector, DarkBackgroundRun], AllNeXusComponents[NXdetector, SampleRun], AllNeXusComponents[NXdetector, OpenBeamRun], AllNeXusComponents[NXdisk_chopper, DarkBackgroundRun], AllNeXusComponents[NXdisk_chopper, SampleRun], AllNeXusComponents[NXdisk_chopper, OpenBeamRun], AllNeXusComponents[BeamMonitor4, DarkBackgroundRun], AllNeXusComponents[BeamMonitor4, SampleRun], AllNeXusComponents[BeamMonitor4, OpenBeamRun], AllNeXusComponents[BeamMonitor1, DarkBackgroundRun], AllNeXusComponents[BeamMonitor1, SampleRun], AllNeXusComponents[BeamMonitor1, OpenBeamRun], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor2], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor1], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor3], MonitorPositionOffset[DarkBackgroundRun, BeamMonitor4], MonitorPositionOffset[SampleRun, BeamMonitor2], MonitorPositionOffset[SampleRun, BeamMonitor1], MonitorPositionOffset[SampleRun, BeamMonitor3], MonitorPositionOffset[SampleRun, BeamMonitor4], MonitorPositionOffset[OpenBeamRun, BeamMonitor2], MonitorPositionOffset[OpenBeamRun, BeamMonitor1], MonitorPositionOffset[OpenBeamRun, BeamMonitor3], MonitorPositionOffset[OpenBeamRun, BeamMonitor4], EmptyMonitor[DarkBackgroundRun, BeamMonitor2], EmptyMonitor[DarkBackgroundRun, BeamMonitor1], EmptyMonitor[DarkBackgroundRun, BeamMonitor3], EmptyMonitor[DarkBackgroundRun, BeamMonitor4], EmptyMonitor[SampleRun, BeamMonitor2], EmptyMonitor[SampleRun, BeamMonitor1], EmptyMonitor[SampleRun, BeamMonitor3], EmptyMonitor[SampleRun, BeamMonitor4], EmptyMonitor[OpenBeamRun, BeamMonitor2], EmptyMonitor[OpenBeamRun, BeamMonitor1], EmptyMonitor[OpenBeamRun, BeamMonitor3], EmptyMonitor[OpenBeamRun, BeamMonitor4], RawMonitor[DarkBackgroundRun, BeamMonitor2], RawMonitor[DarkBackgroundRun, BeamMonitor1], RawMonitor[DarkBackgroundRun, BeamMonitor3], RawMonitor[DarkBackgroundRun, BeamMonitor4], RawMonitor[SampleRun, BeamMonitor2], RawMonitor[SampleRun, BeamMonitor1], RawMonitor[SampleRun, BeamMonitor3], RawMonitor[SampleRun, BeamMonitor4], RawMonitor[OpenBeamRun, BeamMonitor2], RawMonitor[OpenBeamRun, BeamMonitor1], RawMonitor[OpenBeamRun, BeamMonitor3], RawMonitor[OpenBeamRun, BeamMonitor4], DetectorPositionOffset[DarkBackgroundRun], DetectorPositionOffset[SampleRun], DetectorPositionOffset[OpenBeamRun], EmptyDetector[DarkBackgroundRun], DetectorBankSizes, EmptyDetector[SampleRun], EmptyDetector[OpenBeamRun], RawDetector[DarkBackgroundRun], RawDetector[SampleRun], RawDetector[OpenBeamRun], RawChoppers[DarkBackgroundRun], RawChoppers[SampleRun], RawChoppers[OpenBeamRun], Beamline[NewType], Beamline[NewType], Beamline[NewType], Measurement[NewType], Measurement[NewType], Measurement[NewType], TofDetector[DarkBackgroundRun], TofLookupTable, DetectorLtotal[DarkBackgroundRun], PulseStrideOffset, TofDetector[SampleRun], DetectorLtotal[SampleRun], TofDetector[OpenBeamRun], DetectorLtotal[OpenBeamRun], TofMonitor[DarkBackgroundRun, BeamMonitor2], MonitorLtotal[DarkBackgroundRun, BeamMonitor2], TofMonitor[DarkBackgroundRun, BeamMonitor1], MonitorLtotal[DarkBackgroundRun, BeamMonitor1], TofMonitor[DarkBackgroundRun, BeamMonitor3], MonitorLtotal[DarkBackgroundRun, BeamMonitor3], TofMonitor[DarkBackgroundRun, BeamMonitor4], MonitorLtotal[DarkBackgroundRun, BeamMonitor4], TofMonitor[SampleRun, BeamMonitor2], MonitorLtotal[SampleRun, BeamMonitor2], TofMonitor[SampleRun, BeamMonitor1], MonitorLtotal[SampleRun, BeamMonitor1], TofMonitor[SampleRun, BeamMonitor3], MonitorLtotal[SampleRun, BeamMonitor3], TofMonitor[SampleRun, BeamMonitor4], MonitorLtotal[SampleRun, BeamMonitor4], TofMonitor[OpenBeamRun, BeamMonitor2], MonitorLtotal[OpenBeamRun, BeamMonitor2], TofMonitor[OpenBeamRun, BeamMonitor1], MonitorLtotal[OpenBeamRun, BeamMonitor1], TofMonitor[OpenBeamRun, BeamMonitor3], MonitorLtotal[OpenBeamRun, BeamMonitor3], TofMonitor[OpenBeamRun, BeamMonitor4], MonitorLtotal[OpenBeamRun, BeamMonitor4], ToaDetector[DarkBackgroundRun], ToaDetector[SampleRun], ToaDetector[OpenBeamRun], TofLookupTableFilename, CoordTransformGraph[DarkBackgroundRun], CoordTransformGraph[SampleRun], CoordTransformGraph[OpenBeamRun], WavelengthDetector[DarkBackgroundRun], WavelengthDetector[SampleRun], WavelengthDetector[OpenBeamRun], CorrectedDetector[DarkBackgroundRun], MaskingRules, CorrectedDetector[SampleRun], CorrectedDetector[OpenBeamRun], NeXusName[FrameMonitor0]?
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:281: UnsatisfiedRequirement