changed bsacquisition to avoid asigning an array to an element of an array with scalar elements

This commit is contained in:
2025-02-07 15:23:40 +01:00
parent 68cd4d5633
commit f5b6f29efc
2 changed files with 25 additions and 22 deletions
+6 -2
View File
@@ -94,9 +94,13 @@ def writeData(hid, data, scanrun=1):
dset.attrs['system'] = getDatasetSystem(name[0])
dset.attrs['units'] = 'unknown'
# this part is obsolete - dimension should be given from the individual datasets
if not 'pid' in data.keys():
shape = None
if 'pid' in data.keys():
shape = data['pid'].shape
if 'pulse_id' in data.keys():
shape = data['pulse_id'].shape
if shape is None:
return
shape = data['pid'].shape
ndim = len(shape)
nsam = shape[-1]
nrec = 0