refactoring and log of coorinate work
This commit is contained in:
234
swissmx.py
234
swissmx.py
@@ -659,7 +659,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
if type(v)==tuple:
|
||||
if v==tuple(paramSv[k]):
|
||||
continue
|
||||
#cam.set_param(paramSv)
|
||||
cam.set_param(**paramSv)
|
||||
#cfg.setValue(AppCfg.GEO_CAM_PARAM, param)
|
||||
#break
|
||||
_log.debug(f'diff:{k},{v} != {paramSv[k]}')
|
||||
@@ -773,6 +773,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
obj._pos_eu=bm_pos=-geo.pix2pos(bm_pos+opt_ctr+bm_sz/2)
|
||||
_log.debug(f'{obj}->{bm_pos} !!! NOT SAVED IN CONFIG !!!')
|
||||
#cfg.setValue(AppCfg.GEO_BEAM_POS,bm_pos)
|
||||
self.track_objects()
|
||||
|
||||
def cb_zoom_changed(self, value):
|
||||
#self.zoomChanged.emit(value)
|
||||
@@ -962,15 +963,22 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
pTrk=pg.Point(self._goTracked.mapFromScene(pos))
|
||||
fx=self.tweakers["fast_x"].get_val()
|
||||
fy=self.tweakers["fast_y"].get_val()
|
||||
pTrk=pTrk-(fx,fy)
|
||||
pRel=pTrk-(fx,fy)
|
||||
#s=f'pImg{pImg} pTrk{pTrk} bm._pos_eu{bm._pos_eu}'
|
||||
|
||||
try:
|
||||
pln=geo._fitPlane
|
||||
except AttributeError:
|
||||
cz=np.nan
|
||||
else:
|
||||
cz=pln[0]*pTrk[0]+pln[1]*pTrk[1]+pln[2] # z=ax+by+c
|
||||
|
||||
s=\
|
||||
f'img pix ({pImg[0]:>0.1f} {pImg[1]:>0.1f})px \u23A2 ' \
|
||||
f'dist to beam ({pTrk[0]:>0.6g} {pTrk[1]:>0.6g}mm) '
|
||||
f'img pix ({pImg[0]:0.1f} {pImg[1]:0.1f})px \u23A2 ' \
|
||||
f'stage ({pTrk[0]:0.4f} {pTrk[1]:>0.4f} {cz:>0.4f})mm \u23A2 ' \
|
||||
f'dist to beam ({pRel[0]:>0.4f} {pRel[1]:>0.4f})mm '
|
||||
#f'dist to beam ({pRel[0]:>0.6g} {pRel[1]:>0.6g}mm) '
|
||||
|
||||
_log.debug(s)
|
||||
#_log.debug(s)
|
||||
self._lb_coords.setText(s)
|
||||
#self._lb_coords.setText(
|
||||
# "\u23FA{:>}:{:>6.0f} {:<.0f}"
|
||||
@@ -986,6 +994,33 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
# )
|
||||
#)
|
||||
|
||||
def cb_mouse_click_geometry_calib(self, event):
|
||||
app=QApplication.instance()
|
||||
zoom = app._zoom.get_val()
|
||||
fast_x=self.tweakers["fast_x"];fast_y=self.tweakers["fast_y"]
|
||||
if self._btn_pix2pos.isChecked():
|
||||
try:
|
||||
raw=app._raw_pix2pos[zoom]
|
||||
except KeyError as e:
|
||||
raw=app._raw_pix2pos[zoom]=list()
|
||||
imgPos=self._goImg.mapFromScene(event.scenePos())
|
||||
fx=fast_x.get_rbv();
|
||||
fy=fast_y.get_rbv()
|
||||
x=imgPos.x();y=imgPos.y()
|
||||
_log.debug('append calib: zoom:{} stage_x_y:{}/{} cam_pix_x_y:{}/{}'.format(zoom, fx, fy, x, y))
|
||||
raw.append((fx, fy, x, y))
|
||||
elif self._btn_opt_ctr.isChecked():
|
||||
try:
|
||||
raw=app._raw_opt_ctr[zoom]
|
||||
except KeyError as e:
|
||||
raw=app._raw_opt_ctr[zoom]=list()
|
||||
imgPos=self._goImg.mapFromScene(event.scenePos())
|
||||
x=imgPos.x();y=imgPos.y()
|
||||
_log.debug('append calib: zoom:{} cam_pix_x_y:{}/{}'.format(zoom, x, y))
|
||||
raw.append(( x, y))
|
||||
else:
|
||||
QMessageBox.warning(self, "calibration", "no calibration started yet.\nPress 'pix2pos' or 'opt_ctr' button first")
|
||||
|
||||
def cb_mouse_click(self, event):
|
||||
#_log.debug("{}".format(event))
|
||||
#_log.debug("screen pos {}".format(event.screenPos())) #pixel position on the whole screen
|
||||
@@ -997,19 +1032,20 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
# _log.debug(f"{type(o)} pos {o.mapFromScene(p)}") #pixel position on the scene (including black frame)
|
||||
|
||||
#_log.debug(f"currentItem:{event.currentItem}")
|
||||
app=QApplication.instance()
|
||||
mod=event.modifiers()
|
||||
btn=event.button()
|
||||
task = self.active_task()
|
||||
if task==TASK_SETUP_GEOMETRY_CALIB:
|
||||
self.mouse_click_event_geometry_calib(event)
|
||||
return
|
||||
if btn==Qt.LeftButton and not mod&Qt.ControlModifier:
|
||||
self.cb_mouse_click_geometry_calib(event)
|
||||
return
|
||||
################################
|
||||
# Ctrl-left : move to position
|
||||
# Ctrl-right : object tree
|
||||
################################
|
||||
|
||||
#dblclick = event.double()
|
||||
app=QApplication.instance()
|
||||
mod=event.modifiers()
|
||||
btn=event.button()
|
||||
if btn==Qt.LeftButton:
|
||||
if mod&Qt.ShiftModifier:
|
||||
pass
|
||||
@@ -1017,28 +1053,28 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
pos=event.scenePos()
|
||||
_log.debug(f'move to position :scene pos {pos}')
|
||||
geo=app._geometry
|
||||
#geo.interp_zoom(1)
|
||||
bm=self._goBeamMarker
|
||||
p1=self._goImg.mapFromScene(pos)
|
||||
p2=bm.pos()+bm.size()/2
|
||||
px=p2+p1
|
||||
mm=geo.pix2pos(px)
|
||||
_log.debug(f'{px} -> {mm}')
|
||||
|
||||
pImg=pg.Point(self._goImg.mapFromScene(pos))
|
||||
pTrk=pg.Point(self._goTracked.mapFromScene(pos))
|
||||
fx=self.tweakers["fast_x"].get_val()
|
||||
fy=self.tweakers["fast_y"].get_val()
|
||||
pRel=pTrk-(fx, fy)
|
||||
_log.debug(f'dist to beam ({pTrk[0]:>0.6g} {pTrk[1]:>0.6g}mm)')
|
||||
fx_motor=self.tweakers["fast_x"]
|
||||
fy_motor=self.tweakers["fast_y"]
|
||||
#bz=self.tweakers["base_z"].get_rbv()
|
||||
#fx_motor, fy_motor, bx_motor, bz_motor, omega_motor=self.get_gonio_tweakers()
|
||||
#fx=fx_motor.get_position()
|
||||
#fy=fy_motor.get_position()
|
||||
#dx=(x-bx)/ppm
|
||||
#dy=-(y-by)/ppm
|
||||
#fx+=dx
|
||||
#fy+=dy
|
||||
fx_motor.move_relative(-mm[0])
|
||||
fy_motor.move_relative(-mm[1])
|
||||
#self.fast_dx_position.emit(dx)
|
||||
#self.fast_dy_position.emit(dy)
|
||||
|
||||
#fx_motor.move_rel(pRel[0])
|
||||
#fy_motor.move_rel(pRel[1])
|
||||
fx_motor.move_abs(pTrk[0])
|
||||
fy_motor.move_abs(pTrk[1])
|
||||
try:
|
||||
pln=geo._fitPlane
|
||||
except AttributeError: pass
|
||||
else:
|
||||
cz_motor=self.tweakers["base_z"]
|
||||
cz=pln[0]*pTrk[0]+pln[1]*pTrk[1]+pln[2] #z=ax+by+c
|
||||
cz_motor.move_abs(cz)
|
||||
_log.debug(f'cz={pln[0]:.4g}*{pTrk[0]:.4g}+{pln[1]:.4g}*{pTrk[1]:.4g}+{pln[2]:.4g}={cz}')
|
||||
pass
|
||||
elif mod&Qt.AltModifier:
|
||||
pass
|
||||
@@ -1118,14 +1154,14 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
dx = (x - bx) / ppm
|
||||
dy = -(y - by) / ppm
|
||||
_log.info("moving base_X, fast_Y {:.3f}, {:.3f}".format(dx, dy))
|
||||
bx_motor.move_relative(dx)
|
||||
fy_motor.move_relative(dy)
|
||||
bx_motor.move_rel(dx)
|
||||
fy_motor.move_rel(dy)
|
||||
else:
|
||||
dx = np.cos(omega * np.pi / 180) * (x - bx) / ppm
|
||||
dy = -(y - by) / ppm
|
||||
_log.info("moving fast x/y to {:.3f}, {:.3f}".format(dx, dy))
|
||||
fx_motor.move_relative(dx)
|
||||
fy_motor.move_relative(dy)
|
||||
fx_motor.move_rel(dx)
|
||||
fy_motor.move_rel(dy)
|
||||
self.fast_dx_position.emit(dx)
|
||||
self.fast_dy_position.emit(dy)
|
||||
return
|
||||
@@ -1134,7 +1170,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
if ctrl and not (shft or alt):
|
||||
mm = np.sign(y - by) * pixel_dist / 10000.
|
||||
_log.debug("moving Z stage by {:.3f} mm".format(mm))
|
||||
bz_motor.move_relative(mm)
|
||||
bz_motor.move_rel(mm)
|
||||
return
|
||||
|
||||
if task in (TASK_SETUP_PPM_CALIBRATION, TASK_SETUP_BEAM_CENTER):
|
||||
@@ -1335,30 +1371,36 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
except AttributeError as e:
|
||||
_log.warning(f'no scan parameters for object->skipped:{go}')
|
||||
continue
|
||||
# names consists of abrevations
|
||||
# part 0: po=position dt=delta
|
||||
# part 1: px=pixel eu=engineering units (e.g. mm)
|
||||
po_px=go.pos()
|
||||
dt_px=-opt_ctr-po_px
|
||||
po_eu=geo.pix2pos(dt_px)+(fx,fy) # position of the 0/0 poit of the ROI in engineering units
|
||||
|
||||
p=param['points']
|
||||
trf=np.asmatrix(param['trf']*1000) #fix shear/rotation um->um
|
||||
pos=np.array(param['grid']['pos']) #in um
|
||||
pitch=np.array(param['grid']['pitch']) #in um
|
||||
trf=param['trf'] #fix shear/rotation um->um
|
||||
trf=np.asmatrix(np.diag(pitch))*np.asmatrix(trf)*geo._pix2pos
|
||||
po_eu*=1000 #mm to um
|
||||
trf*=1000 #mm to um
|
||||
#pix2pos: return np.asarray(self._pix2pos*np.mat(p).T).ravel()
|
||||
|
||||
for i in range(p.shape[0]):
|
||||
p[i,:]=po_eu+(trf*np.asmatrix(p[i,:]).T).A.ravel()
|
||||
|
||||
#t=np.matrix((0,0,1)).T
|
||||
#for i in range(p.shape[0]):
|
||||
# t.A[:2,0]=pos+p[i,:]*pitch
|
||||
# p[i,:]=(trf*t).A.ravel()
|
||||
# Same but much faster !
|
||||
m=np.hstack((p*pitch+pos,np.ones((p.shape[0],1))))
|
||||
p=(trf*np.asmatrix(m).T).T.A
|
||||
|
||||
# add up to 100 test fiducial
|
||||
grp=self._goTracked
|
||||
mft=self._moduleFixTarget
|
||||
n=int(p.shape[0]/100)+1
|
||||
for i in range(0,p.shape[0],n):
|
||||
fx,fy=p[i, :]/1000
|
||||
l=.06
|
||||
go=UsrGO.Fiducial((fx-l/2, fy-l/2), (l, l), i)
|
||||
grp.addItem(go)
|
||||
mft._tree.setData(grp.childItems())
|
||||
|
||||
print('DEBUG: first point:')
|
||||
print(p[0,:])
|
||||
print('DEBUG: difference from point to point:')
|
||||
print(np.diff(p, axis=0))
|
||||
self.daq_collect(**param)
|
||||
#self.daq_collect(**param)
|
||||
|
||||
elif task == TASK_GRID:
|
||||
self.re_connect_collect_button(
|
||||
@@ -1623,7 +1665,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
<li>for each zoom level:
|
||||
<li>choose a good fiducial mark
|
||||
<li>move the stage x/y at min. 3 different locations
|
||||
<li>CTRL-Click (left mouse button) on the fiducial mark
|
||||
<li>Click (left mouse button) on the fiducial mark
|
||||
<li>un-click: <b>pix2pos</b></li>
|
||||
</ol>
|
||||
<h2>optical center calibration</h2>
|
||||
@@ -1631,7 +1673,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
<li>press: <b>opt_ctr</b></li>
|
||||
<li>choose at least 3 fiducial mark visible at various zoom levels
|
||||
<li>for at least two zoom level:
|
||||
<li>CTRL-Click (left mouse button) on the fiducial marks
|
||||
<li>Click (left mouse button) on the fiducial marks
|
||||
<li>un-click: <b>opt_ctr</b></li>
|
||||
</ol>
|
||||
</body>
|
||||
@@ -1722,7 +1764,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
res=QMessageBox.question(self, "calibration", f"use calibration\n{s} ? ")
|
||||
if res==QMessageBox.Yes:
|
||||
geo=app._geometry
|
||||
geo.cb_update_pix2pos(app._raw_pix2pos)
|
||||
geo.update_pix2pos(app._raw_pix2pos)
|
||||
app._cfg.setValue(AppCfg.GEO_PIX2POS, geo._lut_pix2pos)
|
||||
del app._raw_pix2pos
|
||||
|
||||
@@ -1766,7 +1808,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
if idx==0:
|
||||
#go=UsrGO.Fiducial(bm_pos+bm_sz/2-(20, 20), (40, 40),(fx,fy,bz))
|
||||
l=.120
|
||||
go=UsrGO.Fiducial((fx-l/2,fy-l/2), (l, l),(fx,fy,bz))
|
||||
go=UsrGO.Fiducial((fx-l/2,fy-l/2), (l, l),bz)
|
||||
elif idx==1:
|
||||
v=geo.pos2pix((12.5, 0))
|
||||
l=np.linalg.norm(v)
|
||||
@@ -1834,7 +1876,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
j=0
|
||||
elif type(go)==UsrGO.Fiducial:
|
||||
ptFitTrf[j]=go.pos()+go.size()/2
|
||||
ptFitPlane[i]=go._xyz
|
||||
ptFitPlane[i]=go.ctr()
|
||||
i+=1;j+=1
|
||||
app=QApplication.instance()
|
||||
geo=app._geometry
|
||||
@@ -2366,33 +2408,6 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
self._mouse_tracking = False
|
||||
self._lb_coords.setText("")
|
||||
|
||||
def _OLD_mouse_click_event_geometry_calib(self, event):
|
||||
app=QApplication.instance()
|
||||
zoom = app._zoom.get_val()
|
||||
fast_x=self.tweakers["fast_x"];fast_y=self.tweakers["fast_y"]
|
||||
if self._btn_pix2pos.isChecked():
|
||||
try:
|
||||
raw=app._raw_pix2pos[zoom]
|
||||
except KeyError as e:
|
||||
raw=app._raw_pix2pos[zoom]=list()
|
||||
imgPos=self._goImg.mapFromScene(event.scenePos())
|
||||
fx=fast_x.get_rbv();
|
||||
fy=fast_y.get_rbv()
|
||||
x=imgPos.x();y=imgPos.y()
|
||||
_log.debug('append calib: zoom:{} stage_x_y:{}/{} cam_pix_x_y:{}/{}'.format(zoom, fx, fy, x, y))
|
||||
raw.append((fx, fy, x, y))
|
||||
elif self._btn_opt_ctr.isChecked():
|
||||
try:
|
||||
raw=app._raw_opt_ctr[zoom]
|
||||
except KeyError as e:
|
||||
raw=app._raw_opt_ctr[zoom]=list()
|
||||
imgPos=self._goImg.mapFromScene(event.scenePos())
|
||||
x=imgPos.x();y=imgPos.y()
|
||||
_log.debug('append calib: zoom:{} cam_pix_x_y:{}/{}'.format(zoom, x, y))
|
||||
raw.append(( x, y))
|
||||
else:
|
||||
QMessageBox.warning(self, "calibration", "no calibration started yet.\nPress 'pix2pos' or 'opt_ctr' button first")
|
||||
|
||||
def _OLD_get_beam_mark_on_camera_xy(self):
|
||||
app=QApplication.instance()
|
||||
z = app._zoom.get_val()
|
||||
@@ -2580,14 +2595,14 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
_log.info("moving collimator {} to X,Y = {:.3f}, {:.3f}".format(pos, x_pos, y_pos))
|
||||
|
||||
if pos == "out":
|
||||
cy.move_motor_to_position(y_pos + dy, assert_position=True)
|
||||
cx.move_motor_to_position(x_pos + dx, assert_position=True)
|
||||
cy.move_abs(y_pos+dy, assert_position=True)
|
||||
cx.move_abs(x_pos+dx, assert_position=True)
|
||||
elif pos == "in":
|
||||
cx.move_motor_to_position(x_pos, assert_position=True)
|
||||
cy.move_motor_to_position(y_pos, assert_position=True)
|
||||
cx.move_abs(x_pos, assert_position=True)
|
||||
cy.move_abs(y_pos, assert_position=True)
|
||||
elif pos == "ready":
|
||||
cx.move_motor_to_position(x_pos, assert_position=True)
|
||||
cy.move_motor_to_position(y_pos + dy, assert_position=True)
|
||||
cx.move_abs(x_pos, assert_position=True)
|
||||
cy.move_abs(y_pos+dy, assert_position=True)
|
||||
else:
|
||||
raise UnknownLabeledPosition("Collimator position *{}* is not known!!")
|
||||
|
||||
@@ -2601,7 +2616,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
to_pos = settings.value(key, 1e10, type=float)
|
||||
if to_pos > 1e9:
|
||||
raise IncompleteConfiguration(f"CRYOJET configuration is incomplete! Missing {key}")
|
||||
cx.move_motor_to_position(to_pos, assert_position=True)
|
||||
cx.move_abs(to_pos, assert_position=True)
|
||||
|
||||
def _OLD_build_cryo_group(self, toolbox):
|
||||
qutilities.add_item_to_toolbox(
|
||||
@@ -2706,10 +2721,10 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
|
||||
if dir == "in":
|
||||
_log.info("move post sample tube in")
|
||||
usy.move_motor_to_position(y_up)
|
||||
dsy.move_motor_to_position(y_down)
|
||||
usx.move_motor_to_position(x_up)
|
||||
dsx.move_motor_to_position(x_down)
|
||||
usy.move_abs(y_up)
|
||||
dsy.move_abs(y_down)
|
||||
usx.move_abs(x_up)
|
||||
dsx.move_abs(x_down)
|
||||
try:
|
||||
app_utils.assert_tweaker_positions([
|
||||
(usy, y_up, 0.1),
|
||||
@@ -2722,7 +2737,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
_log.warning(e)
|
||||
QMessageBox.warning(self, "failed to move post sample tube XY {in}", "failed to move post sample tube XY {in}",)
|
||||
raise
|
||||
tube_z.move_motor_to_position(tz_in, wait=True)
|
||||
tube_z.move_abs(tz_in, wait=True)
|
||||
try:
|
||||
app_utils.assert_tweaker_positions([(tube_z, tz_in, 0.1)])
|
||||
except app_utils.PositionsNotReached as e:
|
||||
@@ -2733,7 +2748,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
|
||||
elif dir == "out":
|
||||
_log.info("move post sample tube out")
|
||||
tube_z.move_motor_to_position(tz_out, wait=True)
|
||||
tube_z.move_abs(tz_out, wait=True)
|
||||
try:
|
||||
app_utils.assert_tweaker_positions([(tube_z, tz_out, 0.1)])
|
||||
except app_utils.PositionsNotReached as e:
|
||||
@@ -2741,10 +2756,10 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
_log.warning(e)
|
||||
QMessageBox.warning(self,"failed to move post sample tube Z {out}","failed to move post sample tube Z {out}",)
|
||||
raise
|
||||
usy.move_motor_to_position(y_up + dy)
|
||||
dsy.move_motor_to_position(y_down + dy)
|
||||
usx.move_motor_to_position(x_up + dx)
|
||||
dsx.move_motor_to_position(x_down + dx)
|
||||
usy.move_abs(y_up+dy)
|
||||
dsy.move_abs(y_down+dy)
|
||||
usx.move_abs(x_up+dx)
|
||||
dsx.move_abs(x_down+dx)
|
||||
try:
|
||||
app_utils.assert_tweaker_positions([
|
||||
(usy, y_up + dy, 0.1),
|
||||
@@ -2759,20 +2774,20 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
raise
|
||||
elif dir == "x-pos":
|
||||
_log.info("tamdem move post sample tube X-pos by {} mm".format(tandem_twv))
|
||||
usx.move_relative(tandem_twv)
|
||||
dsx.move_relative(tandem_twv)
|
||||
usx.move_rel(tandem_twv)
|
||||
dsx.move_rel(tandem_twv)
|
||||
elif dir == "x-neg":
|
||||
_log.info("tamdem move post sample tube X-neg {} mm".format(tandem_twv))
|
||||
usx.move_relative(-tandem_twv)
|
||||
dsx.move_relative(-tandem_twv)
|
||||
usx.move_rel(-tandem_twv)
|
||||
dsx.move_rel(-tandem_twv)
|
||||
elif dir == "up":
|
||||
_log.info("tamdem move post sample tube UP {} mm".format(tandem_twv))
|
||||
usy.move_relative(tandem_twv)
|
||||
dsy.move_relative(tandem_twv)
|
||||
usy.move_rel(tandem_twv)
|
||||
dsy.move_rel(tandem_twv)
|
||||
elif dir == "down":
|
||||
_log.info("tamdem move post sample tube DOWN {} mm".format(tandem_twv))
|
||||
usy.move_relative(-tandem_twv)
|
||||
dsy.move_relative(-tandem_twv)
|
||||
usy.move_rel(-tandem_twv)
|
||||
dsy.move_rel(-tandem_twv)
|
||||
|
||||
def _OLD_add_tweaker(self, pv, alias=None, label=None, mtype="epics_motor", layout=None):
|
||||
if layout is None:
|
||||
@@ -3520,8 +3535,8 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
def _OLD_move_fast_stage(self, x, y):
|
||||
_log.info(f"received request to move gonio to x, y = {x:.3f}, {y:.3f} mm")
|
||||
fx_motor, fy_motor, bx_motor, bz_motor, omega_motor = self.get_gonio_tweakers()
|
||||
fx_motor.move_motor_to_position(x)
|
||||
fy_motor.move_motor_to_position(y)
|
||||
fx_motor.move_abs(x)
|
||||
fy_motor.move_abs(y)
|
||||
|
||||
def _OLD_toggle_maximized(self):
|
||||
if self.isMaximized():
|
||||
@@ -3657,6 +3672,7 @@ if __name__=="__main__":
|
||||
|
||||
app._geometry=geometry.geometry()
|
||||
app._geometry._lut_pix2pos=cfg.value(cfg.GEO_PIX2POS)
|
||||
|
||||
app._geometry._opt_ctr=cfg.value(cfg.GEO_OPT_CTR)
|
||||
|
||||
startupWin.set(15, f'connect backlight')
|
||||
|
||||
Reference in New Issue
Block a user