None
Test: nexusfiles-scipp|bifrost|bifrost_read_monitor_data|FrameMonitor2
workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_bifrost_999999_00019320.hdf')
monitor_type = ess.reduce.nexus.types.FrameMonitor2
check_monitor_data =
@pytest.mark.parametrize("monitor_type", [FrameMonitor1, FrameMonitor2, FrameMonitor3])
def test_bifrost_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
monitor = workflow.compute(RawMonitor[SampleRun, monitor_type])
> check_monitor_data(monitor)
tests/nexusfiles-scipp/bifrost/bifrost_load_nexus_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
da =
Dimensions: Sizes[event_time_zero:2352, ]
Coordinates:
* event_time_zero datetime64 ...event: 22300000),
data=float32[counts],
coords={'event_time_offset':int32[ns], 'event_id':int32})
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
> assert da.bins.size().sum() > 0
^^^^^^^^^^^^^^^^^^^^^^^^
E scipp._scipp.core.UnitError: Expected unit None, got dimensionless.
.tox/nexusfiles-scipp-bifrost/lib/python3.12/site-packages/dmsc_nightly/testing/nexusfiles/validation_fixtures.py:38: UnitError