diff --git a/src/aare/devices/aerotech.py b/src/aare/devices/aerotech.py index 45da1694..aaecfc37 100644 --- a/src/aare/devices/aerotech.py +++ b/src/aare/devices/aerotech.py @@ -3,15 +3,7 @@ from aarecommon.config.logger import setup_logger from aarecommon.errors.exception_handler import AerotechCommunicationError from aarecommon.math.coordinate import AerotechCoordinate, Coordinate from aarecommon.models.beamline import MXBeamline -from aarescan_client import ( - ApiClient, - AxisStatus, - Configuration, - DefaultApi, - RotationRequest, - Status, - Target, -) +from aarescan_client import ApiClient, Configuration, DefaultApi, RotationRequest, Status, Target from aarescan_client.models.grid_request import GridRequest from aarescan_client.models.screen_request import ScreenRequest @@ -95,42 +87,6 @@ class AerotechController: ) def status(self) -> Status: - if self._simulated: - return Status( - state=Status.State.IDLE, - x=AxisStatus( - pos=self._pos.x, - vel=self._vel, - enabled=False, - homed=False, - moving=False, - fault=False, - ), - y=AxisStatus( - pos=self._pos.y, - vel=self._vel, - enabled=False, - homed=False, - moving=False, - fault=False, - ), - z=AxisStatus( - pos=self._pos.z, - vel=self._vel, - enabled=False, - homed=False, - moving=False, - fault=False, - ), - u=AxisStatus( - pos=self._pos.u, - vel=self._vel, - enabled=False, - homed=False, - moving=False, - fault=False, - ), - ) try: return self._api.status_get() except Exception as e: @@ -226,9 +182,9 @@ class AerotechController: grid_elem_count_y: int, grid_elem_size_y_um: float, time_sec: float, - grid_elem_size_x_um: float | None = None, - grid_elem_count_x: int | None = None, - run_async: bool | None = False, + grid_elem_size_x_um: float, + grid_elem_count_x: int, + run_async: bool = False, ): payload = GridRequest( grid_elem_count_x=grid_elem_count_x, @@ -328,7 +284,7 @@ class AerotechController: logger.info( f"sending screening scan request to aarescan for validation with payload {payload}" ) - return self._api.screening_post(payload) + return self._api.validate_screening_post(payload) except Exception as e: raise AerotechCommunicationError( f"Aerotech screening validation failed: {e}",