fix: pass timeout to smargon nudge
CI for mx_bec / e2e tests with pxi_bec (pull_request) Failing after 1m22s
CI for mx_bec / e2e tests with pxi_bec (push) Failing after 1m29s
CI for mx_bec / e2e tests with pxii_bec (push) Failing after 1m29s
CI for mx_bec / e2e tests with pxiii_bec (push) Failing after 1m31s
CI for mx_bec / e2e tests with pxii_bec (pull_request) Failing after 1m24s
CI for mx_bec / unit tests with pxii_bec (push) Successful in 1m51s
CI for mx_bec / unit tests with pxii_bec (pull_request) Successful in 1m47s
CI for mx_bec / unit tests with pxiii_bec (push) Failing after 1m59s
CI for mx_bec / unit tests with pxi_bec (pull_request) Failing after 2m1s
CI for mx_bec / unit tests with pxi_bec (push) Failing after 2m9s
CI for mx_bec / e2e tests with pxiii_bec (pull_request) Failing after 1m5s
CI for mx_bec / unit tests with pxiii_bec (pull_request) Failing after 1m42s
CI for mx_bec / e2e tests with pxi_bec (pull_request) Failing after 1m22s
CI for mx_bec / e2e tests with pxi_bec (push) Failing after 1m29s
CI for mx_bec / e2e tests with pxii_bec (push) Failing after 1m29s
CI for mx_bec / e2e tests with pxiii_bec (push) Failing after 1m31s
CI for mx_bec / e2e tests with pxii_bec (pull_request) Failing after 1m24s
CI for mx_bec / unit tests with pxii_bec (push) Successful in 1m51s
CI for mx_bec / unit tests with pxii_bec (pull_request) Successful in 1m47s
CI for mx_bec / unit tests with pxiii_bec (push) Failing after 1m59s
CI for mx_bec / unit tests with pxi_bec (pull_request) Failing after 2m1s
CI for mx_bec / unit tests with pxi_bec (push) Failing after 2m9s
CI for mx_bec / e2e tests with pxiii_bec (pull_request) Failing after 1m5s
CI for mx_bec / unit tests with pxiii_bec (pull_request) Failing after 1m42s
This commit is contained in:
1 parent
50c34af1bb
commit
8d53cb1591
2 files changed
+9
-4
No files matched your search
@@ -54,7 +54,12 @@ class Smargon(HttpOphydDevice):
|
||||
chi = Cpt(HttpDeviceSignal, axis_identifier="CHI", tolerance=0.01)
|
||||
|
||||
def nudge_in_lab_frame(
|
||||
self, x_mm: float, y_mm: float, z_mm: float = 0.0, omega_deg: float = 0.0
|
||||
self,
|
||||
x_mm: float,
|
||||
y_mm: float,
|
||||
z_mm: float = 0.0,
|
||||
omega_deg: float = 0.0,
|
||||
timeout_s: float | None = 2.0,
|
||||
):
|
||||
"""Apply a relative move in the lab frame (adjusted for the rotation angle, assuming that
|
||||
the frames are identical when omega = phi = chi = 0). `omega_deg` is the angle of the
|
||||
@@ -66,7 +71,7 @@ class Smargon(HttpOphydDevice):
|
||||
self.x.set(self.x.get() + x_mm)
|
||||
& self.y.set(self.y.get() + y_mm)
|
||||
& self.z.set(self.z.get() + z_mm)
|
||||
).wait()
|
||||
).wait(timeout=timeout_s)
|
||||
|
||||
def _lab_frame_offset_to_smargon_nudge(
|
||||
self, x_mm: float, y_mm: float, z_mm: float = 0.0, omega_deg: float = 0.0
|
||||
|
||||
@@ -66,11 +66,11 @@ def test_set_sends_only_that_axis(smargon):
|
||||
|
||||
def test_nudge_in_lab_frame_at_zero_angles(smargon):
|
||||
# With omega = phi = chi = 0 a lab-frame x offset is a smargon -z move, y -> -x, z -> -y
|
||||
smargon.nudge_in_lab_frame(0.2, 0.0, 0.0).wait(timeout=2)
|
||||
smargon.nudge_in_lab_frame(0.2, 0.0, 0.0)
|
||||
assert smargon.z.get() == pytest.approx(-0.2, abs=TOL)
|
||||
assert smargon.x.get() == pytest.approx(0.0, abs=TOL)
|
||||
assert smargon.y.get() == pytest.approx(0.0, abs=TOL)
|
||||
smargon.nudge_in_lab_frame(0.0, 0.2, 0.0).wait(timeout=2)
|
||||
smargon.nudge_in_lab_frame(0.0, 0.2, 0.0)
|
||||
assert smargon.x.get() == pytest.approx(-0.2, abs=TOL)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user