DMSC Integration Testing

Last updated: December 16, 2025 22:41:25

Test: nexusfiles-scipp|dream|dream_read_monitor_data|CaveMonitor

None

None

None

None

None

None

None

None

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/dream_999999_00009569.hdf')
monitor_type = ess.reduce.nexus.types.CaveMonitor
check_monitor_data =

@pytest.mark.parametrize("monitor_type", [BunkerMonitor, CaveMonitor])
def test_dream_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
result = workflow.compute(RawMonitor[SampleRun, monitor_type])

> check_monitor_data(result)

tests/nexusfiles-scipp/dream/dream_load_nexus_test.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

da =
Dimensions: Sizes[time:0, frame_time:512, ]
Coordinates:
* frame_time int32 ...4 [ns] (time) []
Data:
float64 [au] (time, frame_time) [] []



def _check_monitor_data(da: sc.DataArray) -> None:
if da.bins is not None:
assert da.dims == ("event_time_zero",)
assert "event_time_offset" in da.bins.coords
else:
assert set(da.dims) == {"time", "frame_time"}
assert "time" in da.coords
assert "frame_time" in da.coords

assert "position" in da.coords
> assert "source_position" in da.coords
E AssertionError: assert 'source_position' in \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n
E + where \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n = \nDimensions: Sizes[time:0, frame_time:512, ]\nCoordinates:\n* frame_time int32 [µs] (frame_time) [0, 0, ..., 0, 0]\n* position vector3 [m] () (0, 0, -4.22)\n* time datetime64 [ns] (time) []\nData:\n float64 [au] (time, frame_time) [] []\n\n.coords

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

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/dream_999999_00009429.hdf')
monitor_type = ess.reduce.nexus.types.CaveMonitor
check_monitor_data =

@pytest.mark.parametrize("monitor_type", [BunkerMonitor, CaveMonitor])
def test_dream_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
result = workflow.compute(RawMonitor[SampleRun, monitor_type])

> check_monitor_data(result)

tests/nexusfiles-scipp/dream/dream_load_nexus_test.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

da =
Dimensions: Sizes[time:0, frame_time:512, ]
Coordinates:
* frame_time int32 ...4 [ns] (time) []
Data:
float64 [au] (time, frame_time) [] []



def _check_monitor_data(da: sc.DataArray) -> None:
if da.bins is not None:
assert da.dims == ("event_time_zero",)
assert "event_time_offset" in da.bins.coords
else:
assert set(da.dims) == {"time", "frame_time"}
assert "time" in da.coords
assert "frame_time" in da.coords

assert "position" in da.coords
> assert "source_position" in da.coords
E AssertionError: assert 'source_position' in \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n
E + where \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n = \nDimensions: Sizes[time:0, frame_time:512, ]\nCoordinates:\n* frame_time int32 [µs] (frame_time) [0, 0, ..., 0, 0]\n* position vector3 [m] () (0, 0, -4.22)\n* time datetime64 [ns] (time) []\nData:\n float64 [au] (time, frame_time) [] []\n\n.coords

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

workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/dream_999999_00009289.hdf')
monitor_type = ess.reduce.nexus.types.CaveMonitor
check_monitor_data =

@pytest.mark.parametrize("monitor_type", [BunkerMonitor, CaveMonitor])
def test_dream_read_monitor_data(
workflow: sciline.Pipeline,
coda_nexus_file_path: Path,
monitor_type: type,
check_monitor_data: Callable,
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
result = workflow.compute(RawMonitor[SampleRun, monitor_type])

> check_monitor_data(result)

tests/nexusfiles-scipp/dream/dream_load_nexus_test.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

da =
Dimensions: Sizes[time:0, frame_time:512, ]
Coordinates:
* frame_time int32 ...4 [ns] (time) []
Data:
float64 [au] (time, frame_time) [] []



def _check_monitor_data(da: sc.DataArray) -> None:
if da.bins is not None:
assert da.dims == ("event_time_zero",)
assert "event_time_offset" in da.bins.coords
else:
assert set(da.dims) == {"time", "frame_time"}
assert "time" in da.coords
assert "frame_time" in da.coords

assert "position" in da.coords
> assert "source_position" in da.coords
E AssertionError: assert 'source_position' in \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n
E + where \n frame_time: (frame_time: 512) int32 [µs] [0, 0, ..., 0, 0]\n time: (time: 0) datetime64 [ns] []\n position: () vector3 [m] (0, 0, -4.22)\n = \nDimensions: Sizes[time:0, frame_time:512, ]\nCoordinates:\n* frame_time int32 [µs] (frame_time) [0, 0, ..., 0, 0]\n* position vector3 [m] () (0, 0, -4.22)\n* time datetime64 [ns] (time) []\nData:\n float64 [au] (time, frame_time) [] []\n\n.coords

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

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None