diff --git a/src/instrument/devices/__init__.py b/src/instrument/devices/__init__.py index f950f7a..605dc60 100755 --- a/src/instrument/devices/__init__.py +++ b/src/instrument/devices/__init__.py @@ -36,6 +36,8 @@ from .slit_base import sl4_base, sl5_base, sl7_base, sl8_base, sl9_base from .slit import sl4, sl5, sl7, sl8, sl9 from .granite import granite +from .transfocator_8idd.py import rl1 +from .transfocator_8ide.py import rl2 from .win import win_e, win_i ## Beamline Area Detectors diff --git a/src/instrument/devices/transfocator_8idd.py b/src/instrument/devices/transfocator_8idd.py new file mode 100644 index 0000000..3bb55ae --- /dev/null +++ b/src/instrument/devices/transfocator_8idd.py @@ -0,0 +1,40 @@ +""" +RL1: Transfocator (compound refractive lens, CRL) in 8-ID-D + +.. note:: POLAR instrument has some related functions (`transfocator.py`). + https://github.com/APS-4ID-POLAR/polar_instrument/pull/7/files +""" + +__all__ = """ + rl1 +""".split() + +import logging + +from ophyd import Component +from ophyd import EpicsMotor +from ophyd import MotorBundle + +logger = logging.getLogger(__name__) +logger.info(__file__) + + +class Transfocator(MotorBundle): + y = Component(EpicsMotor, "m1") + x = Component(EpicsMotor, "m2") + yaw = Component(EpicsMotor, "m3") + pitch = Component(EpicsMotor, "m4") + + lens1 = Component(EpicsMotor, "m5") + lens2 = Component(EpicsMotor, "m6") + lens3 = Component(EpicsMotor, "m7") + lens4 = Component(EpicsMotor, "m8") + lens5 = Component(EpicsMotor, "m9") + lens6 = Component(EpicsMotor, "m10") + lens7 = Component(EpicsMotor, "m11") + lens8 = Component(EpicsMotor, "m12") + lens9 = Component(EpicsMotor, "m13") + lens10 = Component(EpicsMotor, "m14") + + +rl1 = Transfocator("8iddSoft:TRANS:", name="rl1") diff --git a/src/instrument/devices/transfocator_8ide.py b/src/instrument/devices/transfocator_8ide.py new file mode 100644 index 0000000..063dbca --- /dev/null +++ b/src/instrument/devices/transfocator_8ide.py @@ -0,0 +1,40 @@ +""" +RL2: Transfocator (compound refractive lens, CRL) in 8-ID-E + +.. note:: POLAR instrument has some related functions (`transfocator.py`). + https://github.com/APS-4ID-POLAR/polar_instrument/pull/7/files +""" + +__all__ = """ + rl2 +""".split() + +import logging + +from ophyd import Component +from ophyd import EpicsMotor +from ophyd import MotorBundle + +logger = logging.getLogger(__name__) +logger.info(__file__) + + +class Transfocator(MotorBundle): + y = Component(EpicsMotor, "m25") + x = Component(EpicsMotor, "m26") + yaw = Component(EpicsMotor, "m27") + pitch = Component(EpicsMotor, "m28") + + lens1 = Component(EpicsMotor, "m15") + lens2 = Component(EpicsMotor, "m16") + lens3 = Component(EpicsMotor, "m17") + lens4 = Component(EpicsMotor, "m18") + lens5 = Component(EpicsMotor, "m19") + lens6 = Component(EpicsMotor, "m20") + lens7 = Component(EpicsMotor, "m21") + lens8 = Component(EpicsMotor, "m22") + lens9 = Component(EpicsMotor, "m23") + lens10 = Component(EpicsMotor, "m24") + + +rl2 = Transfocator("8iddSoft:TRANS:", name="rl2")