Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/dodal/devices/motors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

from dodal.common.maths import rotate_clockwise, rotate_counter_clockwise

_X, _Y, _Z = "X", "Y", "Z"
_X = "X"
_Y = "Y"
_Z = "Z"

_OMEGA = "OMEGA"
_POLAR = "POLAR"
Expand All @@ -17,9 +19,10 @@

class Stage(StandardReadable, ABC):
"""For these devices, the following co-ordinates are typical but not enforced:
- z is horizontal & parallel to the direction of beam travel
- z is horizontal & parallel to the direction of synchrotron electrons.
( Usually the x-rays have the same direction: But z is defined by the electrons )
- y is vertical and antiparallel to the force of gravity
- x is the cross product of y🞬z
- x is the cross product of y with z

Attributes:
prefix (str): Common part of the EPICS PV for all motors, including ":".
Expand All @@ -33,7 +36,7 @@ class Stage(StandardReadable, ABC):


class XThetaStage(Stage):
"""Two-axis stage with an x and a theta motor."""
"""Two-axis stage with an x motor and a theta motor."""

def __init__(
self, prefix: str, name: str = "", x_infix: str = _X, theta_infix: str = "A"
Expand All @@ -45,7 +48,7 @@ def __init__(


class XYStage(Stage):
"""A standard two-axis stage with an x and a y motor."""
"""A standard two-axis stage with an x motor and a y motor."""

def __init__(
self, prefix: str, name: str = "", x_infix: str = _X, y_infix: str = _Y
Expand All @@ -57,7 +60,7 @@ def __init__(


class XYZStage(XYStage):
"""A standard three-axis stage with an x, a y, and a z motor."""
"""A standard three-axis stage with an x motor, a y motor and a z motor."""

def __init__(
self,
Expand Down Expand Up @@ -236,7 +239,7 @@ def __init__(


class XYZPitchYawRollStage(XYZStage):
"""Five-axis stage with a standard xyz stage and three axes of rotation: pitch, yaw,
"""Six-axis stage with a standard xyz stage and three axes of rotation: pitch, yaw,
and roll.
"""

Expand Down Expand Up @@ -306,7 +309,7 @@ def __init__(


class YZStage(Stage):
"""Two-axis stage with an x and a z motor."""
"""Two-axis stage with a y motor and a z motor."""

def __init__(
self, prefix: str, name: str = "", y_infix: str = _Y, z_infix: str = _Z
Expand Down