DMSC Integration Testing

Last updated: March 23, 2026 07:04:33

Test: nexusfiles-scipp|bifrost|can_compute_tof|monitor_frame_2

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00023346.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2354, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2354).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00023206.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2181, ]
Coordinates:
* event_time_zero datetime64 ...event: 20715362),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2181).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00023066.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1412, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1412).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022919.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2354, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2354).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022771.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1886, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1886).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022638.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:941, ]
Coordinates:
* event_time_zero datetime64 ...(event: 8920000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 941).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022458.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:973, ]
Coordinates:
* event_time_zero datetime64 ...(event: 9194290),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 973).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022318.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1885, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1885).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022178.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1413, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1413).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00022031.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1623, ]
Coordinates:
* event_time_zero datetime64 ...event: 15378080),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1623).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021891.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1415, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1415).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021758.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1043, ]
Coordinates:
* event_time_zero datetime64 ...(event: 9892280),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1043).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021478.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2591, ]
Coordinates:
* event_time_zero datetime64 ...event: 24552746),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2591).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021338.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1880, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1880).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021198.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2352, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2352).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00021058.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1884, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1884).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020918.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2329, ]
Coordinates:
* event_time_zero datetime64 ...event: 22016344),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2329).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020778.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:943, ]
Coordinates:
* event_time_zero datetime64 ...(event: 8920000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 943).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020733.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:753, ]
Coordinates:
* event_time_zero datetime64 ...(event: 7128418),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 753).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020733.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:753, ]
Coordinates:
* event_time_zero datetime64 ...(event: 7128418),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 753).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020726.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2825, ]
Coordinates:
* event_time_zero datetime64 ...event: 26760000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2825).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020586.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:942, ]
Coordinates:
* event_time_zero datetime64 ...(event: 8920000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 942).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020446.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1411, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1411).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020306.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2348, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2348).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020158.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1886, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1886).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00020018.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2823, ]
Coordinates:
* event_time_zero datetime64 ...event: 26760000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2823).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019885.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2262, ]
Coordinates:
* event_time_zero datetime64 ...event: 21431638),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2262).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019740.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1887, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1887).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019600.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1415, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1415).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019460.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2357, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2357).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019313.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1731, ]
Coordinates:
* event_time_zero datetime64 ...event: 16382918),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1731).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019180.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2346, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2346).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019033.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1881, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1881).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018886.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1880, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1880).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018746.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1409, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1409).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018606.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2348, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2348).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018459.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2166, ]
Coordinates:
* event_time_zero datetime64 ...event: 20548558),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2166).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018319.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1608, ]
Coordinates:
* event_time_zero datetime64 ...event: 15267472),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1608).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018235.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1405, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1405).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018235.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1405, ]
Coordinates:
* event_time_zero datetime64 ...event: 13380000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1405).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018186.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2676, ]
Coordinates:
* event_time_zero datetime64 ...event: 25437610),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2676).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00018046.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2347, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2347).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017899.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1578, ]
Coordinates:
* event_time_zero datetime64 ...event: 14964192),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1578).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017759.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:940, ]
Coordinates:
* event_time_zero datetime64 ...(event: 8920000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 940).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017613.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:2345, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 2345).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017473.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1452, ]
Coordinates:
* event_time_zero datetime64 ...event: 13783184),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1452).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017333.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1879, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1879).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017186.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1878, ]
Coordinates:
* event_time_zero datetime64 ...event: 17850258),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1878).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00017046.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2

@pytest.mark.parametrize(
"monitor_type",
[FrameMonitor1, FrameMonitor2, FrameMonitor3],
ids=["frame_1", "frame_2", "frame_3"],
)
def test_can_compute_tof__monitor_(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, monitor_type: type
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[TimeOfFlightLookupTableFilename] = tof_lookup_table_simulation()
> result = workflow.compute(TofMonitor[SampleRun, monitor_type])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/nexusfiles-scipp/bifrost/bifrost_reduction_test.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/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-bifrost/lib/python3.12/site-packages/sciline/scheduler.py:64: in get
results[t] = reporter.call_provider_with_reporting(graph[t], results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/reporter.py:398: in call_provider_with_reporting
return provider.call(values)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/sciline/_provider.py:144: in call
return self._func(
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/ess/spectroscopy/indirect/time_of_flight.py:84: in monitor_time_of_flight_data
monitor_data=monitor_data.rename(t='tof'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:145: in _rename_data_array
out = da.rename_dims(renaming_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
Dimensions: Sizes[event_time_zero:1881, ]
Coordinates:
* event_time_zero datetime64 ...event: 17840000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})


dims_dict = {'t': 'tof'}, names = {}

def _rename_dims(
self: _T, dims_dict: IntoStrDict[str] | None = None, /, **names: str
) -> _T:
"""Rename dimensions.

The renaming can be defined:

- using a dict mapping the old to new names, e.g.
``rename_dims({'x': 'a', 'y': 'b'})``
- using keyword arguments, e.g. ``rename_dims(x='a', y='b')``

In both cases, x is renamed to a and y to b.

Dimensions not specified in either input are unchanged.

This function only renames dimensions.
See the ``rename`` method to also rename coordinates and attributes.

Parameters
----------
dims_dict:
Dictionary or items iterator mapping old to new names.
names:
Mapping of old to new names as keyword arguments.

Returns
-------
:
A new object with renamed dimensions.

Examples
--------

>>> import scipp as sc
>>> var = sc.array(dims=['x', 'y'], values=[[1, 2], [3, 4]])
>>> var.rename_dims({'x': 'row', 'y': 'col'}).sizes
{'row': 2, 'col': 2}

Using keyword arguments:

>>> var.rename_dims(x='a', y='b').dims
('a', 'b')

Only specified dimensions are renamed:

>>> var.rename_dims(x='i').dims
('i', 'y')
"""
> return self._rename_dims(combine_dict_args(dims_dict, names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.DimensionError: Cannot rename dimension t since it is not contained in the input dimensions (event_time_zero: 1881).

.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/scipp/core/dimensions.py:63: DimensionError