merged and untested
This commit is contained in:
@ -27,8 +27,8 @@ class AdaptiveOrbit:
|
||||
idx = '070'
|
||||
if bpm == 5 or bpm ==14:
|
||||
idx='410'
|
||||
self.ATchx.append('SATUN%2.2d-DBPM%s:X2' % (bpm,idx))
|
||||
self.ATchy.append('SATUN%2.2d-DBPM%s:Y2' % (bpm,idx))
|
||||
self.ATchx.append('SATUN%2.2d-DBPM%s:X1' % (bpm,idx))
|
||||
self.ATchy.append('SATUN%2.2d-DBPM%s:Y1' % (bpm,idx))
|
||||
self.bsAT = self.initBSStream([self.ATch0]+self.ATchx+self.ATchy)
|
||||
self.pvAT = self.initPV(self.ATchx)
|
||||
self.kickerAT = self.initPV(['SATMA01-MCRX610:I-SET','SATMA01-MCRY610:I-SET','SATUN05-MCRX420:I-SET','SATUN05-MCRY420:I-SET','SFB_ORBIT_SAT:ONOFF1'])
|
||||
|
@ -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