None
Test: nexusfiles-scipp|estia|can_compute_wavelength|
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
> return Transform.from_object(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:99: in from_object
depends_on = DependsOn(parent=obj.parent.name, value=obj.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00004468.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:402: in __getitem__
return maybe_transformation(self, value=dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
return Transform.from_object(obj, value)
except KeyError as e:
> warnings.warn(
UserWarning(f'Invalid transformation, {obj.name} missing attribute {e}'),
stacklevel=2,
)
E UserWarning: Invalid transformation, /entry/instrument/multiblade_detector/transformations/detector_rotation missing attribute 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:244: UserWarning
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
> return Transform.from_object(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:99: in from_object
depends_on = DependsOn(parent=obj.parent.name, value=obj.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00004324.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:402: in __getitem__
return maybe_transformation(self, value=dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
return Transform.from_object(obj, value)
except KeyError as e:
> warnings.warn(
UserWarning(f'Invalid transformation, {obj.name} missing attribute {e}'),
stacklevel=2,
)
E UserWarning: Invalid transformation, /entry/instrument/multiblade_detector/transformations/detector_rotation missing attribute 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:244: UserWarning
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
> return Transform.from_object(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:99: in from_object
depends_on = DependsOn(parent=obj.parent.name, value=obj.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00004189.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:402: in __getitem__
return maybe_transformation(self, value=dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
return Transform.from_object(obj, value)
except KeyError as e:
> warnings.warn(
UserWarning(f'Invalid transformation, {obj.name} missing attribute {e}'),
stacklevel=2,
)
E UserWarning: Invalid transformation, /entry/instrument/multiblade_detector/transformations/detector_rotation missing attribute 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:244: UserWarning
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
> return Transform.from_object(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:99: in from_object
depends_on = DependsOn(parent=obj.parent.name, value=obj.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00004045.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:402: in __getitem__
return maybe_transformation(self, value=dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj =
value = DataGroup(sizes={'time': 0}, keys=[
depends_on: TransformationChain(parent='/entry/instrument/multiblade_detector/..._flag: DataGroup(3, {'time': 0}),
target_value: DataGroup(3, {'time': 0}),
value: DataGroup(3, {'time': 0}),
])
def maybe_transformation(
obj: Field | Group, value: sc.Variable | sc.DataArray | sc.DataGroup
) -> sc.Variable | sc.DataArray | sc.DataGroup:
"""
Return a loaded field, possibly modified if it is a transformation.
Transformations are usually stored in NXtransformations groups. However, identifying
transformation fields in this way requires inspecting the parent group, which
is cumbersome to implement. Furthermore, according to the NXdetector documentation
transformations are not necessarily placed inside NXtransformations.
Instead we use the presence of the attribute 'transformation_type' to identify
transformation fields.
"""
if obj.attrs.get('transformation_type') is None:
return value
try:
return Transform.from_object(obj, value)
except KeyError as e:
> warnings.warn(
UserWarning(f'Invalid transformation, {obj.name} missing attribute {e}'),
stacklevel=2,
)
E UserWarning: Invalid transformation, /entry/instrument/multiblade_detector/transformations/detector_rotation missing attribute 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:244: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003901.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003766.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003631.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003496.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003361.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003226.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00003082.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002938.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
> depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def __getitem__(self, name: str) -> Any:
> attr = self._attrs[name]
^^^^^^^^^^^^^^^^^
E KeyError: 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/attrs.py:18: KeyError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002803.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:399: in __getitem__
if (chain := parse_depends_on_chain(self, dg['depends_on'])) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent =
depends_on = DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation')
def parse_depends_on_chain(
parent: Field | Group, depends_on: DependsOn
) -> TransformationChain | None:
"""Follow a depends_on chain and return the transformations."""
chain = TransformationChain(depends_on.parent, depends_on.value)
# Use raw h5py objects to follow the chain because that avoids constructing
# expensive intermediate snx.Group objects.
file = parent.underlying.file
visited = [depends_on.absolute_path()]
try:
while not depends_on.is_terminal:
transform, base = _locate_depends_on_target(
file, depends_on, parent.definitions
)
depends_on = DependsOn(parent=base, value=transform.attrs['depends_on'])
chain.transformations[transform.name] = transform[()]
if depends_on.absolute_path() in visited:
raise ValueError(
'Circular depends_on chain detected: '
f'{[*visited, depends_on.absolute_path()]}'
)
visited.append(depends_on.absolute_path())
except KeyError as e:
> warnings.warn(
UserWarning(
f'depends_on chain {depends_on} references missing node {e}'.replace(
'\n', ''
)
),
stacklevel=2,
)
E UserWarning: depends_on chain DependsOn(parent='/entry/instrument/multiblade_detector/transformations', value='/entry/instrument/multiblade_detector/transformations/detector_rotation') references missing node 'depends_on'
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:331: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
depends_on: DependsOn(parent='/entry/instrument/multiblade_detector/transformations/detector_rotation', value='/entry/instrument/multiblade_detector/transformations/detector_arm'),
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002555.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002392.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/base.py:437: in __iter__
yield (key, self._mapping.get(key))
^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/group.py:403: in get
return self[name]
^^^^^^^^^^
h5py/_objects.pyx:56: in h5py._objects.with_phil.wrapper
???
h5py/_objects.pyx:57: in h5py._objects.with_phil.wrapper
???
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/group.py:369: in __getitem__
return dataset.Dataset(oid, readonly=(self.file.mode == 'r'))
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/base.py:286: in file
return files.File(self.id)
^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/files.py:571: in __init__
super().__init__(fid)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/h5py/_hl/group.py:40: in __init__
super().__init__(bind)
h5py/_objects.pyx:56: in h5py._objects.with_phil.wrapper
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E RecursionError: maximum recursion depth exceeded
h5py/_objects.pyx:57: RecursionError
!!! Recursion error detected, but an error occurred locating the origin of recursion.
The following exception happened when comparing locals in the stack frame:
RecursionError: maximum recursion depth exceeded
Displaying first and last 10 stack frames out of 1005.
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002272.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:362: in to_transformation
return NeXusTransformation[Component, RunType].from_chain(chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/types.py:360: in from_chain
return NeXusTransformation(value=chain.compute())
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:111: in build
t = self.value * self.vector
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: in data_group_nary
key: func(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func =
args = (DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
]),
kwargs = {}
dgs = [DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
])]
keys = ['value', 'alarm', 'connection_status']
elem =
def data_group_nary(
func: Callable[..., _R], *args: Any, **kwargs: Any
) -> DataGroup[_R]:
dgs = [
arg
for arg in itertools.chain(args, kwargs.values())
if isinstance(arg, DataGroup)
]
keys = _key_intersection(dgs)
def elem(x: Any, key: str) -> Any:
return x[key] if isinstance(x, DataGroup) else x
return DataGroup(
{
> key: func(
*[elem(x, key) for x in args],
**{name: elem(x, key) for name, x in kwargs.items()},
)
for key in keys
}
)
E scipp._scipp.core.UnitError: Cannot multiply with operand of unit 'None'.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: UnitError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002155.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:362: in to_transformation
return NeXusTransformation[Component, RunType].from_chain(chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/types.py:360: in from_chain
return NeXusTransformation(value=chain.compute())
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:111: in build
t = self.value * self.vector
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: in data_group_nary
key: func(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func =
args = (DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
]),
kwargs = {}
dgs = [DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
])]
keys = ['value', 'alarm', 'connection_status']
elem =
def data_group_nary(
func: Callable[..., _R], *args: Any, **kwargs: Any
) -> DataGroup[_R]:
dgs = [
arg
for arg in itertools.chain(args, kwargs.values())
if isinstance(arg, DataGroup)
]
keys = _key_intersection(dgs)
def elem(x: Any, key: str) -> Any:
return x[key] if isinstance(x, DataGroup) else x
return DataGroup(
{
> key: func(
*[elem(x, key) for x in args],
**{name: elem(x, key) for name, x in kwargs.items()},
)
for key in keys
}
)
E scipp._scipp.core.UnitError: Cannot multiply with operand of unit 'None'.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: UnitError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00002029.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:362: in to_transformation
return NeXusTransformation[Component, RunType].from_chain(chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/types.py:360: in from_chain
return NeXusTransformation(value=chain.compute())
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:111: in build
t = self.value * self.vector
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: in data_group_nary
key: func(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func =
args = (DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
]),
kwargs = {}
dgs = [DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
])]
keys = ['value', 'alarm', 'connection_status']
elem =
def data_group_nary(
func: Callable[..., _R], *args: Any, **kwargs: Any
) -> DataGroup[_R]:
dgs = [
arg
for arg in itertools.chain(args, kwargs.values())
if isinstance(arg, DataGroup)
]
keys = _key_intersection(dgs)
def elem(x: Any, key: str) -> Any:
return x[key] if isinstance(x, DataGroup) else x
return DataGroup(
{
> key: func(
*[elem(x, key) for x in args],
**{name: elem(x, key) for name, x in kwargs.items()},
)
for key in keys
}
)
E scipp._scipp.core.UnitError: Cannot multiply with operand of unit 'None'.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: UnitError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001912.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:362: in to_transformation
return NeXusTransformation[Component, RunType].from_chain(chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/types.py:360: in from_chain
return NeXusTransformation(value=chain.compute())
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:111: in build
t = self.value * self.vector
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: in data_group_nary
key: func(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func =
args = (DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
]),
kwargs = {}
dgs = [DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
])]
keys = ['value', 'alarm', 'connection_status']
elem =
def data_group_nary(
func: Callable[..., _R], *args: Any, **kwargs: Any
) -> DataGroup[_R]:
dgs = [
arg
for arg in itertools.chain(args, kwargs.values())
if isinstance(arg, DataGroup)
]
keys = _key_intersection(dgs)
def elem(x: Any, key: str) -> Any:
return x[key] if isinstance(x, DataGroup) else x
return DataGroup(
{
> key: func(
*[elem(x, key) for x in args],
**{name: elem(x, key) for name, x in kwargs.items()},
)
for key in keys
}
)
E scipp._scipp.core.UnitError: Cannot multiply with operand of unit 'None'.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: UnitError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001804.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:362: in to_transformation
return NeXusTransformation[Component, RunType].from_chain(chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/types.py:360: in from_chain
return NeXusTransformation(value=chain.compute())
^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:270: in compute
transform = combine_transformations([t.build() for t in chain])
^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxtransformations.py:111: in build
t = self.value * self.vector
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: in data_group_nary
key: func(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:602: in __mul__
return data_group_nary(operator.mul, self, other)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
func =
args = (DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
]),
kwargs = {}
dgs = [DataGroup(sizes={'time': 0}, keys=[
value: DataArray({'time': 0}),
alarm: DataArray({'time': 0}),
connection_status: DataArray({'time': 0}),
])]
keys = ['value', 'alarm', 'connection_status']
elem =
def data_group_nary(
func: Callable[..., _R], *args: Any, **kwargs: Any
) -> DataGroup[_R]:
dgs = [
arg
for arg in itertools.chain(args, kwargs.values())
if isinstance(arg, DataGroup)
]
keys = _key_intersection(dgs)
def elem(x: Any, key: str) -> Any:
return x[key] if isinstance(x, DataGroup) else x
return DataGroup(
{
> key: func(
*[elem(x, key) for x in args],
**{name: elem(x, key) for name, x in kwargs.items()},
)
for key in keys
}
)
E scipp._scipp.core.UnitError: Cannot multiply with operand of unit 'None'.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scipp/core/data_group.py:698: UnitError
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001678.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001561.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001444.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001318.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001201.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00001084.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000976.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
self =
def __getitem__(self, sel):
"""
Get a child group or child dataset, a selection of child groups, or load and
return the current group.
Three cases are supported:
- String name: The child group or child dataset of that name is returned.
- Class such as ``NXdata`` or ``NXlog``: A dict containing all direct children
with a matching ``NX_class`` attribute are returned. Also accepts a tuple of
classes. ``Field`` selects all child fields, i.e., all datasets but not
groups.
- Scipp-style index: Load the specified slice of the current group, returning
a :class:`scipp.DataArray` or :class:`scipp.DataGroup`.
Parameters
----------
sel:
Child name, class, or index.
Returns
-------
:
Field, group, dict of fields, or loaded data.
"""
if isinstance(sel, str):
# We cannot get the child directly from the HDF5 group, since we need to
# create the parent group, to ensure that fields get the correct properties
# such as sizes and dtype.
if '/' in sel:
sel_path = PurePosixPath(sel)
if sel_path.is_absolute():
return self.file[sel_path.relative_to('/').as_posix()]
# If the path is a single name, we can directly access the child
elif len(sel_path.parts) == 1:
return self[sel_path.as_posix()]
else:
grp = sel_path.parts[0]
return self[grp][sel_path.relative_to(grp).as_posix()]
elif sel == '..':
return self.parent
child = self._children[sel]
if isinstance(child, Field):
self._populate_fields()
return child
def isclass(x):
return inspect.isclass(x) and issubclass(x, Field | NXobject)
if isclass(sel) or (
isinstance(sel, list) and len(sel) and all(isclass(x) for x in sel)
):
return self._get_children_by_nx_class(sel)
dg = self._nexus.read_children(sel)
if not dg:
# Bail out early to avoid fallback warnings. Everything is optional in
# NeXus so we cannot assume that the group is invalid (in contrast to
# likely partially incomplete groups that will fail to assemble below).
return dg
try:
> dg = self._nexus.assemble(dg)
^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:390:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxlog.py:98: in assemble
out = super().assemble(dg)
^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:356: in assemble
return self._assemble_as_data(dg)
^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
dg = DataGroup(sizes={}, keys=[
])
def _assemble_as_data(
self, dg: sc.DataGroup
) -> sc.DataGroup | sc.DataArray | sc.Dataset:
if not self._valid:
raise NexusStructureError("Could not determine signal field or dimensions.")
dg = dg.copy(deep=False)
aux = {name: dg.pop(name) for name in self._aux_signals}
signal = dg.pop(self._signal_name)
coords = dg
if isinstance(signal, sc.DataGroup):
> raise NexusStructureError("Signal is not an array-like.")
E scippnexus.base.NexusStructureError: Signal is not an array-like.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:368: NexusStructureError
During handling of the above exception, another exception occurred:
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000859.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:233: in load_nexus_component
nexus.load_component(location, nx_class=nx_class, definitions=definitions)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:105: in load_component
loaded = cast(sc.DataGroup, group[selection])
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:353: in read_children
return super().read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/nxdata.py:349: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:383: in __getitem__
dg = self._nexus.read_children(sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:96: in read_children
name: self.index_child(child, sel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:79: in index_child
return child[child_sel]
^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:392: in __getitem__
self._warn_fallback(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
e = NexusStructureError('Signal is not an array-like.')
def _warn_fallback(self, e: Exception) -> None:
msg = (
f"Failed to load {self.name} as {type(self._nexus).__name__}: {e} "
"Falling back to loading HDF5 group children as scipp.DataGroup."
)
> warnings.warn(msg, stacklevel=2)
E UserWarning: Failed to load /entry/instrument/multiblade_detector/transformations/detector_rotation as NXlog: Signal is not an array-like. Falling back to loading HDF5 group children as scipp.DataGroup.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/scippnexus/base.py:409: UserWarning
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000742.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000616.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000472.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000328.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000184.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00000049.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00027434.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:360: in to_transformation
t.value = _apply_time_filter(t.value['time', interval.value], time_filter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:309: in _apply_time_filter
return user_filter(transform)
^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def reject_time_dependent_transform(
transform: sc.DataArray,
) -> Never:
"""Raise a value error to forbid time-dependent transformations by default."""
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:298: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00027290.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00027146.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00027002.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026867.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026732.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026575.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026295.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026295.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026151.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00026015.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00025879.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00025588.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_estia_999999_00025588.hdf')
def test_can_compute_wavelength(
workflow: sciline.Pipeline,
coda_nexus_file_path: pathlib.Path,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
> result = workflow.compute(WavelengthDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/estia/estia_reduction_test.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/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-estia/lib/python3.12/site-packages/sciline/scheduler.py:119: in get
return self._dask_get(dsk, list(map(_to_dask_key, keys)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/threaded.py:91: in get
results = get_async(
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:549: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:353: in reraise
raise exc
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/local.py:258: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/_task_spec.py:759: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/dask/utils.py:80: in apply
return func(*args)
^^^^^^^^^^^
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:341: in to_transformation
t.value = _time_filter(t.value['time', interval.value])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
transform =
Dimensions: Sizes[time:0, ]
Coordinates:
* average_value float64 [deg] () 0... datetime64 [ns] (time) []
Data:
float64 [deg] (time) []
def _time_filter(transform: sc.DataArray) -> sc.Variable:
if transform.ndim == 0 or transform.sizes == {'time': 1}:
return transform.data.squeeze()
> raise ValueError(
f"Transform is time-dependent: {transform}, but no filter is provided."
)
E ValueError: Transform is time-dependent:
E Dimensions: Sizes[time:0, ]
E Coordinates:
E * average_value float64 [deg] () 0
E * maximum_value float64 [deg] () 0
E * minimum_value float64 [deg] () 0
E * time datetime64 [ns] (time) []
E Data:
E float64 [deg] (time) []
E
E , but no filter is provided.
.tox/nexusfiles-scipp-estia/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:295: ValueError