workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004624.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
Test: nexusfiles-scipp|magic|magic_read_detector_geometry|detector_a
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004470.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004326.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004182.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00004047.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003903.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003768.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003633.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003498.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003363.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003228.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00003084.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002940.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002805.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002638.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002620.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002548.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002548.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002534.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002485.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002476.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002394.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002274.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002148.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00002031.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001914.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001797.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001752.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001752.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001680.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001563.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001527.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001518.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001518.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001518.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001509.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001446.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001320.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001203.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00001086.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000969.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000861.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000744.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000690.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000609.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000465.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000330.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_magic_999999_00000186.hdf')
detector_name = 'detector_a'
check_detector_positions_events =
@pytest.mark.parametrize("detector_name", DETECTOR_NAMES)
def test_magic_read_detector_geometry(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_positions_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name
> result = workflow.compute(EmptyDetector[SampleRun])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/nexusfiles-scipp/magic/magic_load_nexus_test.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/sciline/pipeline.py:191: in compute
return self.get(tp, **kwargs).compute(reporter=reporter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/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-magic/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-magic/lib/python3.12/site-packages/dask/threaded.py:115: in get
results = get_async(
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:547: in get_async
raise_exception(exc, tb)
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:351: in reraise
raise exc
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/local.py:256: in execute_task
result = task(data)
^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/_task_spec.py:768: in __call__
return self.func(*new_argspec)
^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/dask/utils.py:79: in apply
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/workflow.py:425: in get_calibrated_detector
position = nexus.compute_detector_position(da, transform=transform, offset=offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/ess/reduce/nexus/_nexus_loader.py:493: in compute_detector_position
offsets = snx.zip_pixel_offsets(da.coords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x =
detector_number:
def zip_pixel_offsets(x: dict[str, sc.Variable], /) -> sc.Variable:
"""
Zip the x_pixel_offset, y_pixel_offset, and z_pixel_offset fields into a vector.
These fields originate from NXdetector groups. All but x_pixel_offset are optional,
e.g., for 2D detectors. Zero values for missing fields are assumed.
Parameters
----------
mapping:
Mapping (typically a data group, or data array coords) containing
x_pixel_offset, y_pixel_offset, and z_pixel_offset.
Returns
-------
:
Vectors with pixel offsets.
See Also
--------
compute_positions
"""
> zero = sc.scalar(0.0, unit=x['x_pixel_offset'].unit)
^^^^^^^^^^^^^^^^^^^
E KeyError: "Expected 'x_pixel_offset' in
.tox/nexusfiles-scipp-magic/lib/python3.12/site-packages/scippnexus/nxtransformations.py:421: KeyError