From 9a878db49a6290b3429a9c2177485675a619e2c6 Mon Sep 17 00:00:00 2001 From: gac-x05la Date: Wed, 16 Apr 2025 15:47:28 +0200 Subject: [PATCH] Device code to 9.6 --- tomcat_bec/devices/__init__.py | 1 - .../devices/aerotech/AerotechDriveDataCollection.py | 1 + tomcat_bec/devices/aerotech/AerotechPso.py | 5 +++-- tomcat_bec/devices/aerotech/AerotechTasks.py | 9 +++++++-- tomcat_bec/devices/aerotech/__init__.py | 7 ++++++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tomcat_bec/devices/__init__.py b/tomcat_bec/devices/__init__.py index a9d2c1d..0d91887 100644 --- a/tomcat_bec/devices/__init__.py +++ b/tomcat_bec/devices/__init__.py @@ -1,7 +1,6 @@ from .aerotech import ( aa1AxisDriveDataCollection, aa1AxisPsoDistance, - aa1Controller, aa1GlobalVariableBindings, aa1GlobalVariables, aa1Tasks, diff --git a/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py b/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py index b8c8efc..5bcc858 100644 --- a/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py +++ b/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py @@ -63,6 +63,7 @@ class aa1AxisDriveDataCollection(PSIDeviceBase, Device): USER_ACCESS = ["configure", "reset", "arm", "disarm"] + # pylint: disable=duplicate-code, too-many-arguments def __init__( self, prefix="", diff --git a/tomcat_bec/devices/aerotech/AerotechPso.py b/tomcat_bec/devices/aerotech/AerotechPso.py index 9e97f0e..cdd29d6 100644 --- a/tomcat_bec/devices/aerotech/AerotechPso.py +++ b/tomcat_bec/devices/aerotech/AerotechPso.py @@ -17,7 +17,7 @@ from bec_lib import bec_logger logger = bec_logger.logger -class aa1AxisPsoBase(PSIDeviceBase, Device): +class AerotechPsoBase(PSIDeviceBase, Device): """Position Sensitive Output - Base class This class provides convenience wrappers around the Aerotech IOC's PSO @@ -91,6 +91,7 @@ class aa1AxisPsoBase(PSIDeviceBase, Device): outPin = Component(EpicsSignalRO, "PIN", auto_monitor=True, kind=Kind.config) outSource = Component(EpicsSignal, "SOURCE", put_complete=True, kind=Kind.config) + # pylint: disable=duplicate-code, too-many-arguments def __init__( self, prefix="", @@ -168,7 +169,7 @@ class aa1AxisPsoBase(PSIDeviceBase, Device): self.outSource.set("Window").wait() -class aa1AxisPsoDistance(aa1AxisPsoBase): +class aa1AxisPsoDistance(AerotechPsoBase): """Position Sensitive Output - Distance mode This class provides convenience wrappers around the Aerotech API's PSO functionality in diff --git a/tomcat_bec/devices/aerotech/AerotechTasks.py b/tomcat_bec/devices/aerotech/AerotechTasks.py index d7a2639..a094c0d 100644 --- a/tomcat_bec/devices/aerotech/AerotechTasks.py +++ b/tomcat_bec/devices/aerotech/AerotechTasks.py @@ -6,7 +6,7 @@ interface. @author: mohacsi_i """ from ophyd import Device, Component, EpicsSignal, EpicsSignalRO, Kind -from ophyd.status import DeviceStatus, SubscriptionStatus +from ophyd.status import SubscriptionStatus from ophyd_devices.interfaces.base_classes.psi_device_base import PSIDeviceBase @@ -63,6 +63,7 @@ class aa1Tasks(PSIDeviceBase, Device): EpicsSignal, "FILEWRITE", string=True, kind=Kind.omitted, put_complete=True ) + # pylint: disable=duplicate-code, too-many-arguments def __init__( self, prefix="", @@ -88,7 +89,11 @@ class aa1Tasks(PSIDeviceBase, Device): ) def configure(self, d: dict) -> tuple: - """Configuration interface for flying""" + """Configure the scripting interface + + Handles AeroScript loading and the launching of existing script files + on the Automation1 iSMC. The interface is meant to be used for flying. + """ # Common operations old = self.read_configuration() self.switch.set("Reset").wait() diff --git a/tomcat_bec/devices/aerotech/__init__.py b/tomcat_bec/devices/aerotech/__init__.py index 477e0be..5fe62b6 100644 --- a/tomcat_bec/devices/aerotech/__init__.py +++ b/tomcat_bec/devices/aerotech/__init__.py @@ -1,4 +1,9 @@ from .AerotechTasks import aa1Tasks from .AerotechPso import aa1AxisPsoDistance from .AerotechDriveDataCollection import aa1AxisDriveDataCollection -from .AerotechAutomation1 import aa1Controller, aa1GlobalVariables, aa1GlobalVariableBindings, aa1AxisIo +from .AerotechAutomation1 import ( + aa1Controller, + aa1GlobalVariables, + aa1GlobalVariableBindings, + aa1AxisIo, +)