You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blacs complains when try to save the data from the scope if multiple scopes are connected.
Line 57 (transition_to_buffer) in labscript-devices/labscript_devices/TekScope/blacs_workers.py creates a group in the .h5 file to save the scope data. However, when the group is already created by the first connected scope, the second scope gets an error because the group already exists.
`
with h5py.File(self.h5file, 'r+') as hdf_file:
grp = hdf_file.create_group('/data/traces')
print('Saving traces...')
dset = grp.create_dataset(self.device_name, data=data)
dset.attrs.update(wfmp[ch])
I could fix this by checking if the group exists before creating it.
`
with h5py.File(self.h5file, 'r+') as hdf_file:
check_grp = '/data/traces' in hdf_file
if check_grp == False:
grp = hdf_file.create_group('/data/traces')
dset = grp.create_dataset(self.device_name, data=data)
else:
dset = hdf_file.create_dataset('/data/traces/' + self.device_name, data=data)
print('Saving traces...')
dset.attrs.update(wfmp[ch]) `
I tested it with two scopes connected and is working.
The text was updated successfully, but these errors were encountered:
Blacs complains when try to save the data from the scope if multiple scopes are connected.
Line 57 (
transition_to_buffer
) inlabscript-devices/labscript_devices/TekScope/blacs_workers.py
creates a group in the .h5 file to save the scope data. However, when the group is already created by the first connected scope, the second scope gets an error because the group already exists.`
I could fix this by checking if the group exists before creating it.
`
I tested it with two scopes connected and is working.
The text was updated successfully, but these errors were encountered: