From 8a6f254dc8817e49418e16145beaf2c14bf3c3a9 Mon Sep 17 00:00:00 2001 From: Vonka Jakub Date: Thu, 27 Mar 2025 10:44:22 +0100 Subject: [PATCH] Added I0 chamber --- beamline/components.py | 4 ++++ beamline/i0_chamber.py | 30 ++++++++++++++++++++++++++++++ cristallina.py | 1 + 3 files changed, 35 insertions(+) create mode 100644 beamline/i0_chamber.py diff --git a/beamline/components.py b/beamline/components.py index 1bdd8fc..49edbf9 100755 --- a/beamline/components.py +++ b/beamline/components.py @@ -10,6 +10,7 @@ from slic.devices.xoptics.kb import KBHor, KBVer from slic.devices.xoptics.offsetmirrors import OffsetMirror from .pp_shutter import PP_Shutter +from .i0_chamber import i0_chamber # Attenuators upstream_attenuator = Attenuator("SARFE10-OATT053", description="Aramis attenuator OATT053") @@ -67,3 +68,6 @@ mono = CristallinaMono("SAROP31-ODCC110") # Offset mirrors m3 = OffsetMirror('SAROP31-ODMV152') #TODO the other two offset mirros + +# I0 chamber +i0 = i0_chamber('SARES30-MCS20610') \ No newline at end of file diff --git a/beamline/i0_chamber.py b/beamline/i0_chamber.py new file mode 100644 index 0000000..bbbc5ec --- /dev/null +++ b/beamline/i0_chamber.py @@ -0,0 +1,30 @@ +from slic.core.device import Device +from slic.core.adjustable import PVAdjustable +from slic.devices.general.motor import Motor + +class i0_chamber(Device): + def __init__(self, ID, name="Cristallina I0 chamber with slits and foils", process_time=1, **kwargs): + super().__init__(ID, name=name, **kwargs) + + self.foils = Motor(ID+":MCS3", name="Cristallina I0 chamber foil selecting smaract stage") + self.slits = i0_slits_unit(ID,name="Cristallina I0 chamber slits") + +class i0_slits_unit(Device): + def __init__(self, ID, **kwargs): + super().__init__(ID, **kwargs) + + self.x_center = PVAdjustable(ID + "-XSLIT:SLIT_POS") + self.width = PVAdjustable(ID + "-XSLIT:SLIT_WIDTH") + self.y_center = PVAdjustable(ID + "-YSLIT:SLIT_POS") + self.height = PVAdjustable(ID + "-YSLIT:SLIT_WIDTH") + + self.motors = i0_slits_motors(ID,name='Individual I0 chamber slit motors') + +class i0_slits_motors(Device): + def __init__(self, ID, **kwargs): + super().__init__(ID, **kwargs) + + self.x1 = Motor(ID + ":MCS4") + self.x2 = Motor(ID + ":MCS5") + self.y1 = Motor(ID + ":MCS2") + self.y2 = Motor(ID + ":MCS1") diff --git a/cristallina.py b/cristallina.py index c8d8585..db14962 100755 --- a/cristallina.py +++ b/cristallina.py @@ -107,6 +107,7 @@ from beamline.components import ( pbps113, mono, m3, + i0, ) from beamline.components import kbHor, kbVer