Test passed, nothing to report
Test: nexusfiles-scipp|odin|odin_read_choppers_to_disk_choppers|bpc1
UserWarning: depends_on chain {x} contains empty time-series,
In provider ess.reduce.nexus.workflow.parse_raw_choppers(
choppers: ess.reduce.nexus.types.AllNeXusComponents[scippnexus.nexus_classes.NXdisk_chopper, ess.reduce.nexus.types.SampleRun],
) -> ess.reduce.nexus.types.RawChoppers[ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:180: UserWarning
Full output
chopper_name = 'bpc1'
workflow = <sciline.pipeline.Pipeline object at 0x7f838c77f170>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020415.hdf')
to_disk_choppers = <function _to_disk_choppers at 0x7f83ce30a200>
check_disk_chopper = <function _check_disk_chopper at 0x7f83a411b4c0>
@pytest.mark.parametrize(
"chopper_name",
["bpc1", "bpc2", "foc1", "foc2", "foc3", "foc4", "foc5", "t0", "wfm1", "wfm2"],
)
def test_odin_read_choppers_to_disk_choppers(
chopper_name: str,
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
to_disk_choppers: Callable,
check_disk_chopper: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> choppers = workflow.compute(RawChoppers[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_load_nexus_test.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
return self._func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:557: in parse_raw_choppers
choppers.apply(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:267: in apply
return DataGroup({key: func(v, *args, **kwargs) for key, v in self.items()})
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:559: in <lambda>
nexus.compute_component_position(chopper)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:161: in compute_component_position
return snx.compute_positions(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:391: in compute_positions
return _with_positions(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:442: in _with_positions
if (transform := chain.compute()) is not None:
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
chain = [<scipp.Variable> () translation3 [m] (0, 0, 6.775), <scipp.DataArray>
Dimensions: Sizes[time:0, ]
Coor... datetime64 [ns] (time) []
Data:
translation3 [m] (time) []
]
def combine_transformations(
chain: list[sc.DataArray | sc.Variable],
) -> sc.DataArray | sc.Variable:
"""
Take the product of a chain of transformations, handling potentially mismatching
time-dependence.
Time-dependent transformations are interpolated to a common time-coordinate.
"""
if any((x.sizes.get('time') == 0) for x in chain):
> warnings.warn(
UserWarning('depends_on chain {x} contains empty time-series, '),
stacklevel=2,
)
E UserWarning: depends_on chain {x} contains empty time-series,
E In provider ess.reduce.nexus.workflow.parse_raw_choppers(
E choppers: ess.reduce.nexus.types.AllNeXusComponents[scippnexus.nexus_classes.NXdisk_chopper, ess.reduce.nexus.types.SampleRun],
E ) -> ess.reduce.nexus.types.RawChoppers[ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:180: UserWarning
UserWarning: depends_on chain {x} contains empty time-series,
In provider ess.reduce.nexus.workflow.parse_raw_choppers(
choppers: ess.reduce.nexus.types.AllNeXusComponents[scippnexus.nexus_classes.NXdisk_chopper, ess.reduce.nexus.types.SampleRun],
) -> ess.reduce.nexus.types.RawChoppers[ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:180: UserWarning
Full output
chopper_name = 'bpc1'
workflow = <sciline.pipeline.Pipeline object at 0x7f4fc00c7bc0>
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_odin_999999_00020275.hdf')
to_disk_choppers = <function _to_disk_choppers at 0x7f4fef506200>
check_disk_chopper = <function _check_disk_chopper at 0x7f4fc3d294e0>
@pytest.mark.parametrize(
"chopper_name",
["bpc1", "bpc2", "foc1", "foc2", "foc3", "foc4", "foc5", "t0", "wfm1", "wfm2"],
)
def test_odin_read_choppers_to_disk_choppers(
chopper_name: str,
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
to_disk_choppers: Callable,
check_disk_chopper: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> choppers = workflow.compute(RawChoppers[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/odin/odin_load_nexus_test.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/task_graph.py:122: in compute
return self._scheduler.get(self._graph, [targets], reporter=reporter)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/scheduler.py:140: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/dask/utils.py:81: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/sciline/_provider.py:145: in __call__
return self._func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:557: in parse_raw_choppers
choppers.apply(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scipp/core/data_group.py:267: in apply
return DataGroup({key: func(v, *args, **kwargs) for key, v in self.items()})
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:559: in <lambda>
nexus.compute_component_position(chopper)
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:161: in compute_component_position
return snx.compute_positions(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:391: in compute_positions
return _with_positions(
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:442: in _with_positions
if (transform := chain.compute()) is not None:
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
chain = [<scipp.Variable> () translation3 [m] (0, 0, 6.775), <scipp.DataArray>
Dimensions: Sizes[time:0, ]
Coor... datetime64 [ns] (time) []
Data:
translation3 [m] (time) []
]
def combine_transformations(
chain: list[sc.DataArray | sc.Variable],
) -> sc.DataArray | sc.Variable:
"""
Take the product of a chain of transformations, handling potentially mismatching
time-dependence.
Time-dependent transformations are interpolated to a common time-coordinate.
"""
if any((x.sizes.get('time') == 0) for x in chain):
> warnings.warn(
UserWarning('depends_on chain {x} contains empty time-series, '),
stacklevel=2,
)
E UserWarning: depends_on chain {x} contains empty time-series,
E In provider ess.reduce.nexus.workflow.parse_raw_choppers(
E choppers: ess.reduce.nexus.types.AllNeXusComponents[scippnexus.nexus_classes.NXdisk_chopper, ess.reduce.nexus.types.SampleRun],
E ) -> ess.reduce.nexus.types.RawChoppers[ess.reduce.nexus.types.SampleRun]
.tox/nexusfiles-scipp-odin/lib/python3.12/site-packages/scippnexus/nxtransformations.py:180: UserWarning