Skip to content

Commit

Permalink
added rasor motors
Browse files Browse the repository at this point in the history
  • Loading branch information
Relm-Arrowny committed Nov 29, 2024
1 parent 37cd4c1 commit a08d7e8
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 2 deletions.
36 changes: 34 additions & 2 deletions src/dodal/beamlines/i10.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@
I10Apple2Pol,
LinearArbitraryAngle,
)
from dodal.devices.i10.i10_current_amp import RasorFemto, RasorSR570
from dodal.devices.i10.i10_scaler_cards import rasor_scaler_card_1
from dodal.devices.i10.i10_setting_data import I10Grating
from dodal.devices.i10.rasor.rasor_current_amp import RasorFemto, RasorSR570
from dodal.devices.i10.rasor.rasor_motors import (
DetSlits,
Diffractometer,
PaStage,
PinHole,
)
from dodal.devices.i10.rasor.rasor_scaler_cards import rasor_scaler_card_1
from dodal.devices.motors import XYZPositioner
from dodal.devices.pgm import PGM
from dodal.log import set_beamline as set_log_beamline
from dodal.utils import BeamlinePrefix, get_beamline_name
Expand Down Expand Up @@ -263,6 +270,31 @@ def idd_la_angle(
"Raosr devices"


@device_factory()
def pin_hole() -> PinHole:
return PinHole(prefix="ME01D-EA-PINH-01:")


@device_factory()
def det_slits() -> DetSlits:
return DetSlits(prefix="ME01D-MO-APTR-0")


@device_factory()
def diffractometer() -> Diffractometer:
return Diffractometer(prefix="ME01D-MO-DIFF-01:")


@device_factory()
def pa_stage() -> PaStage:
return PaStage(prefix="ME01D-MO-POLAN-01:")


@device_factory()
def simple_stage() -> XYZPositioner:
return XYZPositioner(prefix="ME01D-MO-CRYO-01:")


@device_factory()
def rasor_femto() -> RasorFemto:
return RasorFemto(
Expand Down
File renamed without changes.
62 changes: 62 additions & 0 deletions src/dodal/devices/i10/rasor/rasor_motors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
from ophyd_async.core import StandardReadable
from ophyd_async.epics.motor import Motor


class PinHole(StandardReadable):
"Two motors stage for rasor pinhole"

def __init__(
self,
prefix: str,
name: str = "",
):
with self.add_children_as_readables():
self.x = Motor(prefix + "X")
self.y = Motor(prefix + "Y")
super().__init__(name=name)


class Diffractometer(StandardReadable):
def __init__(
self,
prefix: str,
name: str = "",
):
with self.add_children_as_readables():
self.tth = Motor(prefix + "TWOTHETA")
self.th = Motor(prefix + "THETA")
self.chi = Motor(prefix + "CHI")
self.chamber_x = Motor(prefix + "X")
self.alpha = Motor(prefix + "ALPHA")
super().__init__(name=name)


class DetSlits(StandardReadable):
"Detector slits"

def __init__(
self,
prefix: str,
name: str = "",
):
with self.add_children_as_readables():
self.upstream = Motor(prefix + "1:TRANS")
self.downstream = Motor(prefix + "2:TRANS")
super().__init__(name=name)


class PaStage(StandardReadable):
"Rasor detector stage"

def __init__(
self,
prefix: str,
name: str = "",
):
with self.add_children_as_readables():
self.ttp = Motor(prefix + "TWOTHETA")
self.thp = Motor(prefix + "THETA")
self.y = Motor(prefix + "Y")
self.z = Motor(prefix + "Z")
self.eta = Motor(prefix + "ETA")
super().__init__(name=name)
File renamed without changes.

0 comments on commit a08d7e8

Please sign in to comment.