enhance triggering

This commit is contained in:
2019-03-20 14:34:12 +01:00
parent eda8caf985
commit 399282cba9
9 changed files with 36 additions and 23 deletions

View File

@@ -289,7 +289,7 @@ class DebugPlot:
idxTrigger = np.where(np.diff(idxTrigger) == 1)[0] + 1
if idxTrigger.shape[0] > 0:
hl += ax.plot(rec[idxTrigger, 1], rec[idxTrigger, 0], 'xr', label='trig') # actual path
hl2 += ax2.plot(rec[:, 4], 'b-', label='trigger')
hl2 += ax2.plot(rec[:, 4]*10, 'b-', label='trigger')
ax.xaxis.set_label_text('x-pos um')
ax.yaxis.set_label_text('y-pos um')
@@ -854,7 +854,8 @@ if __name__=='__main__':
#sp.gen_closed_shifted()
#sp.gen_swissmx_points(width=1000,ofs=(-500,0))
#sp.gen_swissfel_points(width=1000,ofs=(-500,0))
sp.gen_rand_points(n=2000, scale=1000);sp.sort_points(xy=False)
#sp.gen_rand_points(n=20, scale=100,ofs=(-950,+2780));sp.sort_points(xy=False)
sp.gen_rand_points(n=200, scale=100,ofs=(0,+2000));sp.sort_points(xy=False)
#sp.gen_swissmx_points(width=1000, ofs=(-500, 0));
#sp.gen_spiral_points(rStart=100,rInc=10,numSeg=4,numCir=60, ofs=(0, 0))
#sp.gen_spiral_points(rStart=100,rInc=130,numSeg=4,numCir=2, ofs=(0, 0))
@@ -868,7 +869,7 @@ if __name__=='__main__':
gtMaxLn=116508;ovhdTime=100
acq_per=int(np.ceil((sp.meta['pt2pt_time']*sp.points.shape[0]+ovhdTime)/(gtMaxLn*sp.meta['srv_per'])))
sp.setup_gather(acq_per=acq_per)
sp.setup_sync(verbose=args.verbose&32)
sp.setup_sync(verbose=args.verbose&32,timeOfs=0.55)
sp.setup_coord_trf() # reset to shape path system
#sp.meta['pt2pt_time']=10 #put between setup_sync and setup_motion to have more motion points than FEL syncs
sp.setup_motion(fnPrg=fn+'.prg', mode=3, scale=1.,dwell=10)