DMSC Integration Testing

Last updated: March 23, 2026 07:06:10

Test: nexusfiles-scipp|tbl|tbl_read_detector_data|ngem_detector

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00022777.hdf')
detector_name = 'ngem_detector'
check_detector_events =

@pytest.mark.parametrize(
"detector_name",
[
"he3_detector_bank0",
"he3_detector_bank1",
"multiblade_detector",
"ngem_detector",
"timepix3_detector",
],
)
def test_tbl_read_detector_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name

result = workflow.compute(NeXusData[NXdetector, SampleRun])

> check_detector_events(result)

tests/nexusfiles-scipp/tbl/tbl_load_nexus_test.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

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



def _check_detector_events(da: sc.DataArray) -> None:
assert "event_time_offset" in da.bins.coords
assert "event_id" in da.bins.coords
assert "event_time_zero" in da.coords
> assert da.bins.size().sum().value > 0
E AssertionError: assert np.int64(0) > 0
E + where np.int64(0) = \nDimensions: Sizes[]\nData:\n int64 () 0\n\n.value
E + where \nDimensions: Sizes[]\nData:\n int64 () 0\n\n = sum()
E + where sum = \nDimensions: Sizes[event_time_zero:0, ]\nCoordinates:\n* event_time_zero datetime64 [ns] (event_time_zero) []\nData:\n int64 (event_time_zero) []\n\n.sum
E + where \nDimensions: Sizes[event_time_zero:0, ]\nCoordinates:\n* event_time_zero datetime64 [ns] (event_time_zero) []\nData:\n int64 (event_time_zero) []\n\n = size()
E + where size = .size
E + where = \nDimensions: Sizes[event_time_zero:0, ]\nCoordinates:\n* event_time_zero datetime64 [ns] (event_time_zero) []\nData:\n DataArrayView (event_time_zero) binned data: dim='event', content=DataArray(\n dims=(event: 0),\n data=float32[counts],\n coords={'event_time_offset':int32[ns], 'event_id':int32})\n\n.bins

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/validation_fixtures.py:25: AssertionError

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_tbl_999999_00019375.hdf')
detector_name = 'ngem_detector'
check_detector_events =

@pytest.mark.parametrize(
"detector_name",
[
"he3_detector_bank0",
"he3_detector_bank1",
"multiblade_detector",
"ngem_detector",
"timepix3_detector",
],
)
def test_tbl_read_detector_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
detector_name: str,
check_detector_events: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
workflow[NeXusDetectorName] = detector_name

result = workflow.compute(NeXusData[NXdetector, SampleRun])

> check_detector_events(result)

tests/nexusfiles-scipp/tbl/tbl_load_nexus_test.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

da =
Dimensions: Sizes[event_time_zero:12143, ]
Coordinates:
* event_time_zero datetime64 ...s=(event: 48570),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})



def _check_detector_events(da: sc.DataArray) -> None:
assert "event_time_offset" in da.bins.coords
assert "event_id" in da.bins.coords
assert "event_time_zero" in da.coords
> assert da.bins.size().sum() > 0
^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.UnitError: Expected unit None, got dimensionless.

.tox/nexusfiles-scipp-tbl/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/validation_fixtures.py:25: UnitError