From ec3f6b16a721798b81d5109f698b050f5babbe90 Mon Sep 17 00:00:00 2001 From: chrisjbillington Date: Mon, 16 Feb 2026 18:01:08 +1100 Subject: [PATCH] Don't error if 'data' group already exists This allows e.g. FunctionRunner functions to save data acquired at the start of a shot during transition_to_buffered, which is less awkward than trying to stash it somewhere and arrange to save it during transition_to_manual. --- blacs/experiment_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blacs/experiment_queue.py b/blacs/experiment_queue.py index dce7efd..db9234c 100644 --- a/blacs/experiment_queue.py +++ b/blacs/experiment_queue.py @@ -849,7 +849,7 @@ def restart_function(device_name): with h5py.File(path,'r+') as hdf5_file: self.BLACS.front_panel_settings.store_front_panel_in_h5(hdf5_file,states,tab_positions,window_data,plugin_data,save_conn_table=False, save_queue_data=False) - data_group = hdf5_file['/'].create_group('data') + data_group = hdf5_file['/'].require_group('data') # stamp with the run time of the experiment hdf5_file.attrs['run time'] = run_time.strftime('%Y%m%dT%H%M%S.%f')