diff --git a/debye_bec/scans/nidaq_continuous_scan.py b/debye_bec/scans/nidaq_continuous_scan.py index 6a5da9d..d1afd99 100644 --- a/debye_bec/scans/nidaq_continuous_scan.py +++ b/debye_bec/scans/nidaq_continuous_scan.py @@ -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): diff --git a/debye_bec/scans/xas_simple_scan.py b/debye_bec/scans/xas_simple_scan.py index d6a313f..dad2973 100644 --- a/debye_bec/scans/xas_simple_scan.py +++ b/debye_bec/scans/xas_simple_scan.py @@ -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): diff --git a/tests/tests_scans/test_mono_bragg_scans_v4.py b/tests/tests_scans/test_mono_bragg_scans_v4.py index e33fe92..fab5f6f 100644 --- a/tests/tests_scans/test_mono_bragg_scans_v4.py +++ b/tests/tests_scans/test_mono_bragg_scans_v4.py @@ -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 diff --git a/tests/tests_scans/test_nidaq_continous_scan.py b/tests/tests_scans/test_nidaq_continous_scan.py index f2c10ec..6679939 100644 --- a/tests/tests_scans/test_nidaq_continous_scan.py +++ b/tests/tests_scans/test_nidaq_continous_scan.py @@ -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