merged and untested
This commit is contained in:
@ -24,15 +24,17 @@ class BSCAcquisition(Acquisition):
|
||||
data.append(next(self.bscache))
|
||||
#print('Received %i' % i)
|
||||
|
||||
# write out the data file
|
||||
with h5py.File(filename,'a') as hid:
|
||||
# save the pulse ID
|
||||
singledata = [ele['pid'] for ele in data]
|
||||
pidname = 'pulse_id/group%d' % self.grp
|
||||
hid.create_dataset(pidname, data=singledata)
|
||||
for chn in channels:
|
||||
singledata = [ele[chn] for ele in data]
|
||||
gid = hid.create_group(chn)
|
||||
gid.create_dataset('data', data=singledata)
|
||||
|
||||
singledata = [ele['pid'] for ele in data]
|
||||
if self.grp == 0:
|
||||
hid.create_dataset('pulse_id', data=singledata)
|
||||
else:
|
||||
hid.create_dataset('pulse_id_grp%d' % self.grp, data=singledata)
|
||||
if not chn == 'pid':
|
||||
dname = chn.replace(':','/')+'/data'
|
||||
hid.create_dataset(dname, data=singledata)
|
||||
dpid = dname.replace('/data','/pid')
|
||||
hid[dpid] = hid[pidname]
|
||||
|
||||
|
Reference in New Issue
Block a user