From 4b236edd4e3f9f0690c4db9ede206b4e4abfa12b Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 4 Dec 2020 17:37:43 +0100 Subject: [PATCH] switch LaserExp to Device class --- slic/devices/loptics/alvra_experiment.py | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/slic/devices/loptics/alvra_experiment.py b/slic/devices/loptics/alvra_experiment.py index 17232d44..4c78d5b1 100755 --- a/slic/devices/loptics/alvra_experiment.py +++ b/slic/devices/loptics/alvra_experiment.py @@ -1,17 +1,15 @@ -from slic.core.adjustable import Adjustable, PVAdjustable +from slic.core.adjustable import PVAdjustable from slic.devices.general.motor import Motor -from slic.utils.printing import printable_dict -from ..basedevice import BaseDevice +from ..device import Device from ..general.delay_stage import DelayStage from ..timing.lasertiming import ETiming -class LaserExp(BaseDevice): - """Experiment laser hardware""" +class LaserExp(Device): def __init__(self): - self.Id = Id = "SLAAR11-LMOT" - self.z_undulator = 122 + Id = "SLAAR11-LMOT" + super().__init__(Id, "Experiment laser hardware", "Laser motor positions", 122) # Laser repetition rate self.repRate = PVAdjustable("SIN-TIMAST-TMA:Evt-20-Freq-I") @@ -53,15 +51,4 @@ class LaserExp(BaseDevice): self.eTiming = ETiming(Id + "-eTiming") - def __repr__(self): - to_print = {} - for key, item in self.__dict__.items(): - if not isinstance(item, (Adjustable, BaseDevice)): - continue - to_print[key] = str(item) - - head = "Laser motor positions" - return printable_dict(to_print, head) - -