Skip to content

LOKI i_of_q workflow fails to start with new geometry artifact (length-0 NXlogs) #922

@SimonHeybrock

Description

@SimonHeybrock

The trim-NXlogs-to-length-0 behaviour added to make_geometry_nexus.py (commit 45af601) interacts badly with _i_of_q_factory: the LokiWorkflow graph is evaluated at construction time, hits the empty detector_carriage NXlog through the rear detector's depends_on chain, and ess.reduce.nexus.workflow.reject_time_dependent_transform raises because no filter is installed. This blocks the workflow from starting — not just in tests; production starts the same way.

This was masked while the registry pointed at geometry-loki-2026-04-13.nxs (predates the trim change, has detector_carriage/value/value shape (1,)). With geometry-loki-2026-05-08.nxs (chopper-aware artifact, shape (0,)), tests/config/registered_workflow_factories_test.py::test_workflow_roundtrip[loki/i_of_q/1] fails. Default pytest filters out the slow marker so the failure only surfaces under tox / CI.

Repro

python -m pytest tests/config/registered_workflow_factories_test.py::test_workflow_roundtrip -k 'loki and i_of_q' -m ''

Stack ends in ess/reduce/nexus/workflow.py:298 reject_time_dependent_transform.

Fix sketch

DetectorViewFactory already handles this correctly for the rear bank XY projection (detector_view/factory.py:262):

value_stream = self._dynamic_transforms.get(source_name)
if value_stream is not None:
    add_dynamic_transform(workflow, transform_name=value_stream.transform_name)
    context_keys[value_stream.aux_stream] = TransformValueLog

_i_of_q_factory (config/instruments/loki/factories.py) needs the equivalent wiring: install add_dynamic_transform for /entry/instrument/detector_carriage/value on loki_detector_0 and add the detector_carriage aux stream as a context key. This aligns with the dynamic-detector-geometry-loki-carriage.md plan; xy_projection just got there first.

Notes

  • Don't revert to the old artifact — the new one is required for the wavelength-LUT chopper workflow.
  • Alternative: have make_geometry_nexus.py preserve a single sample per NXlog (as a "current state" snapshot) instead of trimming to 0. Less clean — the artifact is meant to be schema-only — but cheaper than touching every workflow that walks depends_on through f144 nodes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions