93 lines
2.2 KiB
Python
93 lines
2.2 KiB
Python
|
|
class LXT:
|
|
pass
|
|
|
|
lxt = LXT()
|
|
|
|
|
|
from slic.devices.xoptics.dcm import CoupledDoubleCrystalMono
|
|
|
|
monoFEL = CoupledDoubleCrystalMono("SAROP11-ODCM105")
|
|
|
|
|
|
from slic.devices.general.smaract import SmarActAxis
|
|
|
|
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")
|
|
|
|
|
|
#TODO: just some generic examples:
|
|
from slic.devices.device import Device
|
|
|
|
shut_und = Device(
|
|
"SARFE10-OPSH044",
|
|
description="Photon shutter after Undulator"
|
|
)
|
|
|
|
pbps_und = Device(
|
|
"SARFE10-PBPS053",
|
|
z_undulator=44,
|
|
description="Intensity position monitor after Undulator (PBPS)"
|
|
)
|
|
|
|
#print(shut_und)
|
|
#print(pbps_und)
|
|
|
|
|
|
|
|
from types import SimpleNamespace
|
|
from slic.devices.basedevice import BaseDevice
|
|
from slic.devices.general.motor import Motor
|
|
from slic.devices.general.smaract import SmarActAxis
|
|
from slic.utils.printing import printable_dict
|
|
|
|
|
|
class TXS(BaseDevice):
|
|
|
|
def __init__(self):
|
|
self.Id = Id = "SAROP11-PTXS128"
|
|
|
|
self.x = Motor(Id + ":TRX1")
|
|
self.y = Motor(Id + ":TRY1")
|
|
self.z = Motor(Id + ":TRZ1")
|
|
|
|
self.crystals = SimpleNamespace(
|
|
left = SimpleNamespace(
|
|
linear = SmarActAxis(Id + ":TRX11"),
|
|
rotary = SmarActAxis(Id + ":ROTY11"),
|
|
gonio1 = SmarActAxis(Id + ":ROTX11"),
|
|
gonio2 = SmarActAxis(Id + ":ROTX12"),
|
|
gonio3 = SmarActAxis(Id + ":ROTX13")
|
|
),
|
|
right = SimpleNamespace(
|
|
linear = SmarActAxis(Id + ":TRX21"),
|
|
rotary = SmarActAxis(Id + ":ROTY21"),
|
|
gonio1 = SmarActAxis(Id + ":ROTX21"),
|
|
gonio2 = SmarActAxis(Id + ":ROTX22"),
|
|
gonio3 = SmarActAxis(Id + ":ROTX23")
|
|
)
|
|
)
|
|
|
|
|
|
def __repr__(self):
|
|
to_print = {}
|
|
for key, item in self.__dict__.items():
|
|
if not isinstance(item, Motor):
|
|
continue
|
|
to_print[key] = str(item)
|
|
|
|
head = "TXS"
|
|
return printable_dict(to_print, head)
|
|
|
|
|
|
|
|
|
|
|
|
txs = TXS()
|
|
|
|
|
|
|