DMSC Integration Testing

Last updated: May 27, 2026 07:24:18

Test: nexusfiles-scipp|loki|loki_read_choppers|

View job log here


workflow =
coda_nexus_file_path = PosixPath('/ess/data/coda/999999/raw/coda_loki_999999_00001526.hdf')
check_chopper =

def test_loki_read_choppers(
workflow: sciline.Pipeline, coda_nexus_file_path: Path, check_chopper: Callable
) -> None:
workflow[Filename[SampleRun]] = coda_nexus_file_path
choppers = workflow.compute(RawChoppers[SampleRun])

assert len(choppers) == 4
for name, chopper in choppers.items():
> check_chopper(chopper, name=name)

tests/nexusfiles-scipp/loki/loki_load_nexus_test.py:120:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

chopper = DataGroup(sizes={'time': None, 'dim_0': 2}, keys=[
type: Chopper type single,
position: Variable({}),
tran...ead_center: DataArray({'time': 5425}),
transformations: DataGroup(1, {}),
nexus_component_name: bw_chopper1,
])
name = 'bw_chopper1'

def _check_chopper(chopper: sc.DataGroup, name: str = "UNKNOWN") -> None:
assert "position" in chopper, f"Chopper '{name}' missing 'position'"
assert "rotation_speed" in chopper, f"Chopper '{name}' missing 'rotation_speed'"
assert "rotation_speed_setpoint" in chopper, (
f"Chopper '{name}' missing 'rotation_speed_setpoint'"
)
assert "slit_edges" in chopper, f"Chopper '{name}' missing 'slit_edges'"
assert "delay" in chopper, f"Chopper '{name}' missing 'delay'"
> assert "beam_position" in chopper, f"Chopper '{name}' missing 'beam_position'"
E AssertionError: Chopper 'bw_chopper1' missing 'beam_position'
E assert 'beam_position' in DataGroup(sizes={'time': None, 'dim_0': 2}, keys=[\n type: Chopper type single,\n position: Variable({}),\n transform: Variable({}),\n delay: DataArray({}),\n depends_on: TransformationChain(parent='/entry/instrument/bw_chopper1', value='/entry/instrument/bw_chopper1/transformations/trans_12', transformations=DataGroup(sizes={}, keys=[\n /entry/instrument/bw_chopper1/transformations/trans_12: Transform({}),\n])),\n experiment_delay: DataArray({}),\n pulse_delay: DataArray({}),\n radius: Variable({}),\n rotation_speed: DataArray({'time': 388}),\n rotation_speed_setpoint: DataArray({'time': 388}),\n slit_edges: Variable({'dim_0': 2}),\n slits: 1,\n top_dead_center: DataArray({'time': 5425}),\n transformations: DataGroup(1, {}),\n nexus_component_name: bw_chopper1,\n])

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