From 52e8ae0c57d57a596e166beb3d518b6ffdf90604 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 28 Jun 2020 18:53:35 +0200 Subject: [PATCH] collect filenames after waiting for all tasks (in nuDIA the run number is needed for the filenames but is only available after sending out the request, which is only possible after the stop pid is through --- slic/core/scanner/scanbackend.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/slic/core/scanner/scanbackend.py b/slic/core/scanner/scanbackend.py index b4ed5a631..6d92bce42 100644 --- a/slic/core/scanner/scanbackend.py +++ b/slic/core/scanner/scanbackend.py @@ -96,15 +96,17 @@ class ScanBackend: def acquire_all(self, filename): tasks = [] - filenames = [] for acq in self.acquisitions: t = acq.acquire(filename=filename, channels=self.channels, n_pulses=self.n_pulses_per_step) tasks.append(t) - filenames.extend(t.filenames) self.current_tasks = tasks - wait_for_all(tasks) + + filenames = [] + for t in tasks: + filenames.extend(t.filenames) + return filenames #TODO: returning this is weird