first promissing implementation
This commit is contained in:
@@ -61,6 +61,7 @@ debug code:
|
|||||||
ssh root@$PPMAC
|
ssh root@$PPMAC
|
||||||
sendgetsends -1
|
sendgetsends -1
|
||||||
|
|
||||||
|
cmdt.py -tpbg -p EXPMX1
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@@ -830,15 +831,23 @@ class ShapePath(MotionBase):
|
|||||||
prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid
|
prg+=f' linear abs\n X{ox-px:g} Y{oy-py:g}\n' # start one position out of grid
|
||||||
else: #mode==6: #### pvt motion, hit and return using grid parameters
|
else: #mode==6: #### pvt motion, hit and return using grid parameters
|
||||||
g=kwargs['grid']
|
g=kwargs['grid']
|
||||||
|
nx,ny=g['count'] #total count of wells
|
||||||
|
#TODO: rework pt calculation
|
||||||
|
xx, yy=np.meshgrid(range(nx), range(ny))
|
||||||
|
xx=xx.T
|
||||||
|
yy=yy.T
|
||||||
|
pt=np.array([xx.reshape(-1), yy.reshape(-1)], dtype=np.float64).transpose() #*pitch
|
||||||
|
pt=np.tile(pt,(2,1)) # not yet perfect... but at least roughly ok
|
||||||
try:
|
try:
|
||||||
trf=kwargs['trf']
|
trf=kwargs['trf']
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
ox, oy=g['pos']
|
ox, oy=g['pos']
|
||||||
px, py=g['pitch']
|
px, py=g['pitch']
|
||||||
|
self.mot_pts=pt*np.array(g['pitch'], np.float)+np.array(g['pos'], np.float)
|
||||||
else:
|
else:
|
||||||
ox, oy=(0,0)
|
ox, oy=(0,0)
|
||||||
px, py=(1,1)
|
px, py=(1,1)
|
||||||
nx,ny=g['count'] #total count of wells
|
self.mot_pts=(np.hstack((pt, np.ones((pt.shape[0], 1))))*np.asmatrix(trf)).A # pt*trf
|
||||||
sx,sy=kwargs['ssz'] #section size (in wells)
|
sx,sy=kwargs['ssz'] #section size (in wells)
|
||||||
tmx,tmy=kwargs['smv'] #time(in num of shots) to move to next section (horiz/vert)
|
tmx,tmy=kwargs['smv'] #time(in num of shots) to move to next section (horiz/vert)
|
||||||
swait=kwargs['smv'] #wait after <swait> section for motion trigger. swait=0:never wait
|
swait=kwargs['smv'] #wait after <swait> section for motion trigger. swait=0:never wait
|
||||||
@@ -1276,7 +1285,6 @@ if __name__=='__main__':
|
|||||||
sp.setup_motion(fnPrg=fn+'.prg',scale=1.,cnt=1,dwell=100,mode=5,grid=grid,tmove=tmove,twait=twait)
|
sp.setup_motion(fnPrg=fn+'.prg',scale=1.,cnt=1,dwell=100,mode=5,grid=grid,tmove=tmove,twait=twait)
|
||||||
elif mode==6:
|
elif mode==6:
|
||||||
sp.setup_motion(fnPrg=fn+'.prg',scale=1.,cnt=1,dwell=100,mode=6,grid=grid,ssz=ssz,smv=smv,swait=swait)
|
sp.setup_motion(fnPrg=fn+'.prg',scale=1.,cnt=1,dwell=100,mode=6,grid=grid,ssz=ssz,smv=smv,swait=swait)
|
||||||
_log.info('terurns just for testing');return
|
|
||||||
else:
|
else:
|
||||||
raise(ValueError(f'unsupported mode:{mode}'))
|
raise(ValueError(f'unsupported mode:{mode}'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user