fix(scans): stop async promotion of the daq to avoid double-writing unified names
CI for debye_bec / test (push) Successful in 56s

This commit is contained in:
wyzula_j committed 2026-08-11 13:18:17 +02:00
1 parent 7cbdfb5b37
commit 2e127c7444
4 files changed
+18 -4

No files matched your search

+5 -1
View File
@@ -71,7 +71,11 @@ class NidaqContinuousScan(ScanBase):
self.motors = [self.daq]
self.update_scan_info(scan_duration=scan_duration, compression=compression)
self.actions.set_device_readout_priority([self.daq], priority="async")
# NOTE: the daq is deliberately NOT promoted to async readout priority:
# the file writer would then ALSO consume the backend's legacy
# device_async_readback stream, whose signal names are now identical to
# the bridged ones, double-writing every dataset. The unified-bridge
# emission on device_async_signal is stored for every scan regardless.
@scan_hook
def prepare_scan(self):
+5 -1
View File
@@ -80,7 +80,11 @@ class XasSimpleScan(ScanBase):
scan_duration=scan_duration,
monitored_readout_cycle=monitored_readout_cycle,
)
self.actions.set_device_readout_priority([self.daq], priority="async")
# NOTE: the daq is deliberately NOT promoted to async readout priority:
# the file writer would then ALSO consume the backend's legacy
# device_async_readback stream, whose signal names are now identical to
# the bridged ones, double-writing every dataset. The unified-bridge
# emission on device_async_signal is stored for every scan regardless.
@scan_hook
def prepare_scan(self):
@@ -52,7 +52,10 @@ def test_xas_simple_scan_v4_prepare_scan_updates_metadata(v4_scan_assembler):
np.testing.assert_array_equal(scan.scan_info.positions, np.array([8000.0, 9000.0]))
assert scan.scan_info.additional_scan_parameters["scan_time"] == 1.0
assert scan.scan_info.additional_scan_parameters["scan_duration"] == 10.0
assert scan.scan_info.readout_priority_modification["async"] == ["nidaq"]
# the daq is no longer promoted to async: with unified channel-first
# names the writer must consume ONLY the bridged device_async_signal
# streams, never the backend's legacy per-device stream in parallel
assert scan.scan_info.readout_priority_modification["async"] == []
scan.actions.add_scan_report_instruction_device_progress.assert_called_once_with(scan.motor)
scan.actions.read_baseline_devices.assert_called_once_with(wait=False)
assert scan._baseline_readout_status is baseline_status
@@ -41,7 +41,10 @@ def test_nidaq_continuous_scan_v4_prepare_scan_updates_metadata(v4_scan_assemble
assert scan.scan_info.additional_scan_parameters["scan_duration"] == 10.0
assert scan.scan_info.additional_scan_parameters["compression"] is False
assert scan.scan_info.readout_priority_modification["async"] == ["nidaq"]
# the daq is no longer promoted to async: with unified channel-first
# names the writer must consume ONLY the bridged device_async_signal
# streams, never the backend's legacy per-device stream in parallel
assert scan.scan_info.readout_priority_modification["async"] == []
scan.actions.add_scan_report_instruction_device_progress.assert_called_once_with(scan.daq)
scan.actions.read_baseline_devices.assert_called_once_with(wait=False)
assert scan._baseline_readout_status is baseline_status