From ea8b8d6058b3ef4a884790f767b7043d9b4dce80 Mon Sep 17 00:00:00 2001 From: Vonka Jakub Date: Thu, 27 Mar 2025 15:54:21 +0100 Subject: [PATCH] Setting up all slits to have consistent naming and definitions --- beamline/components.py | 12 ++++++++++-- beamline/i0_chamber.py | 19 ++++++++++++------- channels/bs_channels.py | 2 +- cristallina.py | 3 ++- gp_exp/components.py | 4 +++- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/beamline/components.py b/beamline/components.py index 49edbf9..e96157d 100755 --- a/beamline/components.py +++ b/beamline/components.py @@ -8,9 +8,11 @@ from .alignment_laser import AlignmentLaser from slic.devices.xoptics.kb import KBHor, KBVer from slic.devices.xoptics.offsetmirrors import OffsetMirror +from slic.devices.xoptics.slits import SlitUnitCenterWidth from .pp_shutter import PP_Shutter from .i0_chamber import i0_chamber +from .apertures import slits107, slits149 # Attenuators upstream_attenuator = Attenuator("SARFE10-OATT053", description="Aramis attenuator OATT053") @@ -58,6 +60,14 @@ pbps149 = IntensityMonitorPBPS( description="Intensity/position monitor in the experimental hutch", ) +# I0 chamber +i0 = i0_chamber('SARES30-MCS20610') + +# Slits +slits149 = SlitUnitCenterWidth('SAROP31-OAPU149') +slits107 = SlitUnitCenterWidth('SAROP31-OAPU107') +slitsi0 = i0.slits + # KB mirrors kbHor = KBHor("SAROP31-OKBH154", description="Cristallina horizontal KB mirror") kbVer = KBVer("SAROP31-OKBV153", description="Cristallina vertical KB mirror") @@ -69,5 +79,3 @@ mono = CristallinaMono("SAROP31-ODCC110") 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 index bbbc5ec..c2c78e4 100644 --- a/beamline/i0_chamber.py +++ b/beamline/i0_chamber.py @@ -1,4 +1,4 @@ -from slic.core.device import Device +from slic.core.device import Device, SimpleDevice from slic.core.adjustable import PVAdjustable from slic.devices.general.motor import Motor @@ -6,20 +6,25 @@ 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.foils = Motor(ID+":MCS3") 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.x = SimpleDevice(ID + "-X", + center = PVAdjustable(ID + "-XSLIT:SLIT_POS",units='mm'), + width = PVAdjustable(ID + "-XSLIT:SLIT_WIDTH",units='mm') + ) + self.y = SimpleDevice(ID + "-Y", + center = PVAdjustable(ID + "-YSLIT:SLIT_POS",units='mm'), + width = PVAdjustable(ID + "-YSLIT:SLIT_WIDTH",units='mm') + ) + 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) diff --git a/channels/bs_channels.py b/channels/bs_channels.py index 370a40c..ce195c3 100755 --- a/channels/bs_channels.py +++ b/channels/bs_channels.py @@ -9,7 +9,7 @@ from slic.core.acquisition.detcfg import DetectorConfig detectors = [ "JF16T03V02", # 1.5M from 2025 # "JF16T03V01", # 1.5M from 2022 -# "JF17T16V01", # 8M + "JF17T16V01", # 8M "JF20T01V01", # IO # "JF05T01V01", # 0.5M stripsel borrowed from Bernina, now registered in esc network ] diff --git a/cristallina.py b/cristallina.py index db14962..ffaefee 100755 --- a/cristallina.py +++ b/cristallina.py @@ -105,6 +105,7 @@ from beamline.components import ( pulsepicker, alignment_laser, pbps113, + slits107,slits149,slitsi0, mono, m3, i0, @@ -114,7 +115,7 @@ from beamline.components import kbHor, kbVer from systems.components import cta -from gp_exp.components import Newport_large, OWIS +from gp_exp.components import Newport_large, OWIS, slitsjj diff --git a/gp_exp/components.py b/gp_exp/components.py index df74e60..cdf0e0a 100755 --- a/gp_exp/components.py +++ b/gp_exp/components.py @@ -1,6 +1,8 @@ from slic.devices.general.motor import Motor - +from gp_exp.jj_device_def import SlitUnitCenterWidthJJ OWIS = Motor("SARES30-MOBI1:MOT_6") # small OWIS linear stage Newport_large = Motor("SARES30-MOBI1:MOT_5") + +slitsjj = SlitUnitCenterWidthJJ("SARES30-MOBI2", motor_naming="MOT")