from types import SimpleNamespace from time import sleep from epics import PV #from slic.core.adjustable import Adjustable from slic.devices.device import Device from slic.devices.simpledevice import SimpleDevice from slic.devices.general.motor import Motor from slic.devices.general.smaract import SmarActAxis from slic.devices.xoptics.dcm import CoupledDoubleCrystalMonoEnergyWithTimeCorrection laser_pitch = SmarActAxis("SARES11-XICM125:ROX1") laser_trans = SmarActAxis("SARES11-XICM125:TRX1") laser_yaw = SmarActAxis("SARES11-XICM125:ROY1") microscope_pitch = SmarActAxis("SARES11-XMI125:ROY1") microscope_yaw = SmarActAxis("SARES11-XMI125:ROZ1") CDCMEWTC = CoupledDoubleCrystalMonoEnergyWithTimeCorrection(limit_low=2450, limit_high=2520) PSSS = Motor("SARFE10-PSSS059:MOTOR_Y3", name="PSSS XTAL y") class TXS(Device): def __init__(self, Id="SAROP11-PTXS128", name="TXS"): super().__init__(Id, name=name) self.x = Motor(Id + ":TRX1") self.y = Motor(Id + ":TRY1") self.z = Motor(Id + ":TRZ1") self.crystals = SimpleDevice("TXS Crystals", left = SimpleDevice("Left Crystals", linear = SmarActAxis(Id + ":TRX11"), rotary = SmarActAxis(Id + ":ROTY11"), gonio1 = SmarActAxis(Id + ":ROTX11"), gonio2 = SmarActAxis(Id + ":ROTX12"), gonio3 = SmarActAxis(Id + ":ROTX13") ), right = SimpleDevice("Right Crystals", linear = SmarActAxis(Id + ":TRX21"), rotary = SmarActAxis(Id + ":ROTY21"), gonio1 = SmarActAxis(Id + ":ROTX21"), gonio2 = SmarActAxis(Id + ":ROTX22"), gonio3 = SmarActAxis(Id + ":ROTX23") ) )