Support for various app and slic wrapper

This commit is contained in:
2023-06-13 14:18:09 +02:00
parent f22a17852c
commit dc5df0ca2a
13 changed files with 488 additions and 31 deletions

View File

@ -50,7 +50,8 @@ def saveDataset(program,data,actuator=None,snap=None,analysis=None,figures=None)
writeSnap(hid,snap)
hid.close()
writeFigure(filename,figures)
if figures:
writeFigure(filename,figures)
return filename
@ -83,6 +84,16 @@ def openDataset(program):
def writeData(hid, data, scanrun=1):
# write the sensor raw value
for ele in data.keys():
name=ele.split(':')
if len(name)>1:
dset=hid.create_dataset('scan_%d/data/%s/%s' % (scanrun, name[0], name[1]), data=data[ele])
else:
dset=hid.create_dataset('scan_%d/data/%s' % (scanrun, name[0]), data=data[ele])
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():
return
shape = data['pid'].shape
@ -95,15 +106,7 @@ def writeData(hid, data, scanrun=1):
hid.create_dataset("scan_%d/method/samples" % scanrun,data=[nsam])
hid.create_dataset("scan_%d/method/dimension" % scanrun,data=[ndim])
hid.create_dataset("scan_%d/method/reducedData" % scanrun,data=[0]) # indicating that there is at least a 2D array for scalar data
# write the sensor raw value
for ele in data.keys():
name=ele.split(':')
if len(name)>1:
dset=hid.create_dataset('scan_%d/data/%s/%s' % (scanrun, name[0], name[1]), data=data[ele])
else:
dset=hid.create_dataset('scan_%d/data/%s' % (scanrun, name[0]), data=data[ele])
dset.attrs['system'] = getDatasetSystem(name[0])
dset.attrs['units'] = 'unknown'
def writeActuator(hid,act,scanrun=1):
if not act: