dodal.devices.motors#

Classes

SixAxisGonio

Six-axis goniometer with a standard xyz stage and three axes of rotation: kappa, phi and omega.

SixAxisGonioKappaPhi

Six-axis goniometer with a standard xyz stage and two axes of rotation: kappa and phi.

Stage

For these devices, the following co-ordinates are typical but not enforced: - z is tangential to the electrons (as they orbit inside the synchrotron); the x-rays are generated in that tangential 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 with z.

XThetaStage

Two-axis stage with an x motor and a theta motor.

XYPhiStage

Three-axis stage with a standard xy stage and one axis of rotation: phi.

XYPitchStage

Three-axis stage with a standard xy stage and one axis of rotation: pitch.

XYRollStage

Three-axis stage with a standard xy stage and one axis of rotation: roll.

XYStage

A standard two-axis stage with an x motor and a y motor.

XYZAzimuthPolarStage

Five-axis stage with a standard xyz stage and two axis of rotation: azimuth and polar.

XYZAzimuthStage

Four-axis stage with a standard xyz stage and one axis of rotation: azimuth.

XYZAzimuthTiltPolarStage

Six-axis stage with a standard xyz stage and three axis of rotation: azimuth, tilt and polar.

XYZAzimuthTiltStage

Five-axis stage with a standard xyz stage and two axis of rotation: azimuth and tilt.

XYZOmegaStage

Four-axis stage with a standard xyz stage and one axis of rotation: omega.

XYZPitchYawRollStage

Six-axis stage with a standard xyz stage and three axes of rotation: pitch, yaw, and roll.

XYZPitchYawStage

Five-axis stage with a standard xyz stage and two axes of rotation: pitch and yaw.

XYZStage

A standard three-axis stage with an x motor, a y motor and a z motor.

XYZThetaStage

Four-axis stage with a standard xyz stage and one axis of rotation: theta.

YZStage

Two-axis stage with a y motor and a z motor.

Functions

create_axis_perp_to_rotation(motor_theta, ...)

Given a signal that controls a motor in a rotation axis and two other signals controlling motors on a pair of orthogonal axes, these axes being in the rotating frame of reference created by the first axis, create a derived signal that is a projection of the two axes in the non-rotating frame of reference.

create_rotational_ij_component_signals(...)

Create virtual i/j signals representing a Cartesian coordinate frame that is rotated by a given angle relative to the underlying equipment axes.

dodal.devices.motors.create_axis_perp_to_rotation(motor_theta: Motor, motor_i: Motor, motor_j: Motor) SignalRW[float][source]#

Given a signal that controls a motor in a rotation axis and two other signals controlling motors on a pair of orthogonal axes, these axes being in the rotating frame of reference created by the first axis, create a derived signal that is a projection of the two axes in the non-rotating frame of reference.

The projection is onto the axis defined by i when the rotation angle is 0 and defined by j when the angle is at 90.

The usual use case for this is translating from sample space to lab space. For example, if you have a sample that is mounted on a goniometer to the right hand side of an OAV view this can provide an axis that will move the sample up/down in that view regardless of the omega orientation of the sample.

Parameters:
  • motor_theta (Motor) – this is the rotation axis of the sample.

  • motor_i (Motor) – this is the axis that, when the sample is at 0 deg rotation, a move here is entirely parallel with the derived axis.

  • motor_j (Motor) – this is the axis that, when the sample is at 90 deg rotation, a move here is entirely parallel with the derived axis.

Return type:

SignalRW[float]

dodal.devices.motors.create_rotational_ij_component_signals(i_read: SignalR[float], j_read: SignalR[float], i_write: Movable[float], j_write: Movable[float], angle_deg: float | SignalR[float], clockwise_frame: bool = True) tuple[SignalRW[float], SignalRW[float]][source]#

Create virtual i/j signals representing a Cartesian coordinate frame that is rotated by a given angle relative to the underlying equipment axes.

The returned signals expose the position of the system in a rotated frame of reference (e.g. the sample or stage frame), while transparently mapping reads and writes onto the real i/j signals in the fixed equipment (lab) frame.

From the user’s point of view, i and j behave like ordinary orthogonal Cartesian axes attached to the rotating object. Internally, all reads apply a rotation to the real motor positions, and all writes apply the inverse rotation so that the requested motion is achieved in the rotated frame.

Parameters:
  • i_read (SignalR[float]) – SignalR representing the i motor readback.

  • j_read (SignalR[float]) – representing the j motor readback.

  • i_write (Movable[float]) – object for setting the i position.

  • j_write (Movable[float]) – object for setting the j position.

  • angle_deg (float | SignalR[float]) – Rotation angle in degrees.

  • clockwise_frame (boolean, optional) – If True, the rotated frame is using a clockwise rotation; otherwise, a counter-clockwise rotation is used. Default is True.

Return type:

tuple[SignalRW[float], SignalRW[float]]

Returns:

tuple[SignalRW[float], SignalRW[float]] Two virtual read/write signals corresponding to the rotated i and j components.