fix: update time param in aarescan calls for screening and raster
CI / lint (pull_request) Successful in 42s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m3s
CI / test (3.14) (pull_request) Successful in 1m4s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m5s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m12s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m21s
CI / test-with-coverage (pull_request) Successful in 1m31s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 33s
Docs build and publish / docker (push) Successful in 15s
CI / test (3.12) (push) Canceled after 41s
CI / test (3.13) (push) Canceled after 39s
CI / test (3.14) (push) Canceled after 36s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 34s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 31s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 29s
CI / test-with-coverage (push) Canceled after 26s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 28s

This commit was merged in pull request #225.
This commit is contained in:
2026-09-14 12:41:06 +02:00
parent d37c5712d5
commit 9b58d77e5b
5 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ dependencies = [
"pyJWT",
"pyzmq",
"opencv-python-headless",
"PySide6==6.9.0",
"PySide6",
"requests",
"pyepics~=3.5",
"redis",
@@ -26,7 +26,7 @@ dependencies = [
"psi-pshell==2.1.0",
"bec_lib>=3.130.3",
"bec-ipython-client>=3.130.3",
"aarescan-client>=1.0.0rc14",
"aarescan-client>=1.0.0rc15",
"aarelcinfer-client==0.1.1a8",
"matplotlib>=3.10.3",
"httpx>=0.28.1",
+1 -1
View File
@@ -421,7 +421,7 @@ class RasterService:
grid_elem_size_x_um=request.grid_size_mm.x * 1000,
grid_elem_count_x=request.n_x,
grid_elem_count_y=request.n_y,
time_sec=request.exp_time_s,
time_per_element_s=request.exp_time_s,
run_async=True,
)
self.ctx.deps.devs.aerotech.wait_till_done(
+1 -1
View File
@@ -45,7 +45,7 @@ class RotationService:
self.ctx.deps.devs.aerotech.screening_scan(
rotation_deg=request.incr_omega_deg,
wedge_deg=request.wedge_omega_deg,
time_sec=total_time,
time_per_element_s=request.exp_time_s,
steps=request.steps,
run_async=True,
)
+8 -8
View File
@@ -142,7 +142,7 @@ class AerotechController:
):
payload = RotationRequest(
rotation_deg=rotation_deg,
time_sec=time_sec,
total_time_sec=time_sec,
start_pos_deg=start_pos_deg,
run_async=run_async,
)
@@ -162,7 +162,7 @@ class AerotechController:
):
payload = RotationRequest(
rotation_deg=rotation_deg,
time_sec=time_sec,
total_time_sec=time_sec,
start_pos_deg=start_pos_deg,
run_async=run_async,
)
@@ -181,7 +181,7 @@ class AerotechController:
self,
grid_elem_count_y: int,
grid_elem_size_y_um: float,
time_sec: float,
time_per_element_s: float,
grid_elem_size_x_um: float,
grid_elem_count_x: int,
run_async: bool = False,
@@ -191,7 +191,7 @@ class AerotechController:
grid_elem_count_y=grid_elem_count_y,
grid_elem_size_x_um=grid_elem_size_x_um,
grid_elem_size_y_um=grid_elem_size_y_um,
time_sec=time_sec,
time_per_element_sec=time_per_element_s,
run_async=run_async,
)
logger.debug(f"Payload sent to AareScan for grid_scan execution: {payload}")
@@ -221,7 +221,7 @@ class AerotechController:
grid_elem_count_y=grid_elem_count_y,
grid_elem_size_x_um=grid_elem_size_x_um,
grid_elem_size_y_um=grid_elem_size_y_um,
time_sec=time_sec,
time_per_element_sec=time_sec,
run_async=run_async,
)
logger.debug(f"Payload sent to AareScan for grid_scan validation: {payload}")
@@ -241,14 +241,14 @@ class AerotechController:
self,
rotation_deg: float,
wedge_deg: float,
time_sec: float,
time_per_element_s: float,
steps: int,
run_async: bool = False,
):
payload = ScreenRequest(
rotation_deg=rotation_deg,
wedge_deg=wedge_deg,
time_sec=time_sec,
time_per_element_sec=time_per_element_s,
steps=steps,
run_async=run_async,
)
@@ -276,7 +276,7 @@ class AerotechController:
payload = ScreenRequest(
rotation_deg=rotation_deg,
wedge_deg=wedge_deg,
time_sec=time_sec,
time_per_element_sec=time_sec,
steps=steps,
run_async=run_async,
)
+11 -11
View File
@@ -45,12 +45,12 @@ def test_init_simulated():
assert controller._simulated is True
def test_cancel(aerotech_controller, mock_aerotech_api):
def test_cancel(aerotech_controller: AerotechController, mock_aerotech_api):
aerotech_controller.cancel()
mock_aerotech_api.cancel_post.assert_called_once()
def test_is_idle(aerotech_controller, mock_aerotech_api):
def test_is_idle(aerotech_controller: AerotechController, mock_aerotech_api):
mock_aerotech_api.status_get.return_value.state = "Idle"
assert aerotech_controller.is_idle() is True
@@ -58,7 +58,7 @@ def test_is_idle(aerotech_controller, mock_aerotech_api):
assert aerotech_controller.is_idle() is False
def test_get_position(aerotech_controller, mock_aerotech_api):
def test_get_position(aerotech_controller: AerotechController, mock_aerotech_api):
status = MagicMock()
status.x.pos = 1.0
status.y.pos = 2.0
@@ -73,39 +73,39 @@ def test_get_position(aerotech_controller, mock_aerotech_api):
assert pos.omega_deg == 90.0
def test_move_home(aerotech_controller, mock_aerotech_api):
def test_move_home(aerotech_controller: AerotechController, mock_aerotech_api):
aerotech_controller.move_home()
mock_aerotech_api.position_post.assert_called_once()
def test_position(aerotech_controller, mock_aerotech_api):
def test_position(aerotech_controller: AerotechController, mock_aerotech_api):
target = AerotechCoordinate(at_mm=Coordinate(x=1, y=2, z=3), omega_deg=45)
aerotech_controller.position(target)
mock_aerotech_api.position_post.assert_called_once()
def test_rotation_scan(aerotech_controller, mock_aerotech_api):
def test_rotation_scan(aerotech_controller: AerotechController, mock_aerotech_api):
aerotech_controller.rotation_scan(rotation_deg=360, time_sec=10, start_pos_deg=0)
mock_aerotech_api.rotation_scan_post.assert_called_once()
def test_grid_scan(aerotech_controller, mock_aerotech_api):
def test_grid_scan(aerotech_controller: AerotechController, mock_aerotech_api):
aerotech_controller.grid_scan(
grid_elem_count_y=10,
grid_elem_size_y_um=10,
grid_elem_count_x=10,
grid_elem_size_x_um=10,
time_sec=5,
time_per_element_s=5,
)
mock_aerotech_api.grid_scan_post.assert_called_once()
def test_screening_scan(aerotech_controller, mock_aerotech_api):
aerotech_controller.screening_scan(rotation_deg=10, wedge_deg=2, time_sec=1, steps=5)
def test_screening_scan(aerotech_controller: AerotechController, mock_aerotech_api):
aerotech_controller.screening_scan(rotation_deg=10, wedge_deg=2, time_per_element_s=1, steps=5)
mock_aerotech_api.screening_post.assert_called_once()
def test_api_error(aerotech_controller, mock_aerotech_api):
def test_api_error(aerotech_controller: AerotechController, mock_aerotech_api):
mock_aerotech_api.status_get.side_effect = Exception("API Error")
with pytest.raises(AerotechCommunicationError):
aerotech_controller.is_idle()