LaPD6KTransform

class bapsf_motion.transform.lapd.LaPD6KTransform(drive, *, pivot_to_center: float = 58.771, pivot_to_drive: float = 116.84, pivot_to_feedthru: float = 53.76926, probe_axis_offset: float = 9.36752, drive_polarity: Tuple[int, int] = (1, -1), mspace_polarity: Tuple[int, int] = (-1, 1), six_k_arm_length: float = 93.345, droop_correct: bool = False, droop_scale: int | float = 1.0)

Bases: LaPDXYTransform

Class that defines a coordinate transform for a LaPD β€œ6K Compumotor” probe drive.

transform type: 'lapd_6k'

Parameters:
  • drive (Drive) – The instance of Drive the coordinate transformer will be working with.

  • pivot_to_center (float) – Distance from the center of the LaPD to the center β€œpivot” point of the ball valve. A positive value indicates the probe drive is set up on the East side of the LaPD and a negative value indicates the West side. (DEFAULT: 58.771 cm)

  • pivot_to_drive (float) – Distance from the center line of the probe drive vertical axis to the center β€œpivot” point of the ball valve. (DEFAULT: 116.84 cm)

  • pivot_to_feedthru (float) – Distance from the center β€œpivot” point of the ball valve to the nearest face of the probe drive feed-through. (DEFAULT: 53.76926 cm)

  • probe_axis_offset (float) – Perpendicular distance from the center line of the probe shaft to the probe drive pivot point on the vertical axis. (DEFAULT: 9.36752 cm)

  • drive_polarity (2D tuple, optional) – A two element tuple of +/- 1 values indicating the polarity of the probe drive motion to how the math was done for the underlying matrix transformations. For example, a value of (1, 1) would indicate that positive movement (in probe drive coordinates) of the drive would be inwards and downwards. However, this is inconsistent if the vertical axis has the motor mounted to the bottom of the axis. In this case the drive_polarity would be (1, -1). (DEFAULT: (1, -1))

  • mspace_polarity (2D tuple, optional) – A two element tuple of +/- 1 values indicating the polarity of the motion space motion to how the math was done for the underlying matrix transformations. For example, a value of (-1, 1) for a probe mounted on an East port would indicate that inward probe drive movement would correspond to a LaPD -X movement and downward probe drive movement would correspond to LaPD +Y. If the probe was mounted on a West port then the polarity would need to be (1, 1) since inward probe drive movement corresponds to +X LaPD coordinate movement. (DEFAULT: (-1, 1))

  • six_k_arm_length (float) – Length of the vertical pivoting arm of the 6K Compumotor probe drive. (DEFAULT: 93.345 cm)

  • droop_correct (bool) – Set True for the coordinate transform to correct for the droop of a probe shaft. This will use LaPDXYDroopCorrect to correct for the droop of a stainless steel 304 probe shaft of size .375” OD x 0.035” wall. Set False for no droop correction. (DEFAULT: False)

  • droop_scale (float) – (DEFAULT 1.0) A float >= 0.0 indicating how much to scale the droop calculation by. A value of 0 would indicate no droop. A value between 0 and 1 indicates a droop less than the default model. A value of 1 indicates the default model droop. A value > 1 indicates more droop.

Examples

Let’s set up a transformer for a probe drive mounted on an east port. In this case the motor for the vertical axis is mounted at the base of the probe drive vertical axis. (Values are NOT accurate to actual LaPD values.)

tr = LaPD6KTransform(
    drive,
    pivot_to_center = 58.771,
    pivot_to_drive = 133.51,
    pivot_to_feedthru = 53.22,
    probe_axis_offset = 9.37,
    six_k_arm_length = 93.345,
)

Now, let’s do the same thing for a probe drive mounted on a West port and has the vertical axis motor mounted at the base.

tr = LaPD6KTransform(
    drive,
    pivot_to_center = -62.94,
    pivot_to_drive = 133.51,
    pivot_to_feedthru = 21.6,
    probe_axis_offset = 20.16,
    six_k_arm_length = 93.345,
    mspace_polarity = (1, 1),
)

Note

For further details reference the jupyter notebook for LaPD6KYTransform.

Attributes Summary

axes

A list of axis identifiers.

beta

config

A dictionary containing the coordinate transformation configuration.

deployed_side

dimensionality

The designed dimensionality of the transform.

drive_polarity

A two element array of +/- 1 values indicating the polarity of the probe drive motion to how the math was done for the underlying matrix transformations.

droop_correct

droop_scale

Scale value for how much to adjust the droop from the default model.

mspace_polarity

A two element array of +/- 1 values indicating the polarity of the motion space motion to how the math was done for the underlying matrix transformations.

naxes

The number of axes of the probe drive.

pivot_to_center

Distance from the center of the LaPD to the center "pivot" point of the ball valve.

pivot_to_drive

Distance from the center line of the probe drive vertical axis to the center "pivot" point of the ball valve.

pivot_to_drive_pinion

pivot_to_feedthru

probe_axis_offset

Perpendicular distance from the center line of the probe shaft to the probe drive pivot point on the vertical axis.

six_k_arm_length

transform_type

String naming the coordinate transformation type.

Methods Summary

__call__(points[,Β to_coords])

Perform a coordinate transformation on the supplied points.

matrix(points[,Β to_coords])

The transformation matrix used to transform from probe drive coordinates to motion space coordinates, and vice versa.

Attributes Documentation

axes

A list of axis identifiers.

beta
config

A dictionary containing the coordinate transformation configuration.

deployed_side
dimensionality

The designed dimensionality of the transform. If -1, then the transform does not have a fixed dimensionality, and it can morph to the associated Drive.

drive_polarity

A two element array of +/- 1 values indicating the polarity of the probe drive motion to how the math was done for the underlying matrix transformations.

For example, a value of [1, 1] would indicate that positive movement (in probe drive coordinates) of the drive would be inwards and downwards. However, this is inconsistent if the vertical axis has the motor mounted to the bottom of the axis. In this case the drive_polarity would be (1, -1).

droop_correct
droop_scale

Scale value for how much to adjust the droop from the default model.

mspace_polarity

A two element array of +/- 1 values indicating the polarity of the motion space motion to how the math was done for the underlying matrix transformations.

For example, a value of (-1, 1) for a probe mounted on an East port would indicate that inward probe drive movement would correspond to a LaPD -X movement and downward probe drive movement would correspond to LaPD +Y. If the probe was mounted on a West port then the polarity would need to be (1, 1) since inward probe drive movement corresponds to +X LaPD coordinate movement.

naxes

The number of axes of the probe drive.

This is the same as the motion space dimensionality.

pivot_to_center

Distance from the center of the LaPD to the center β€œpivot” point of the ball valve.

pivot_to_drive

Distance from the center line of the probe drive vertical axis to the center β€œpivot” point of the ball valve.

pivot_to_drive_pinion
pivot_to_feedthru
probe_axis_offset

Perpendicular distance from the center line of the probe shaft to the probe drive pivot point on the vertical axis.

six_k_arm_length
transform_type

String naming the coordinate transformation type. This is unique among all subclasses of BaseTransform.

Methods Documentation

__call__(points, to_coords='drive') ndarray

Perform a coordinate transformation on the supplied points.

Parameters:
  • points (array_like) – A single point or array of points for which the transformation will be generated. The array of points needs to be of size \(M\) or \(N \times M\) where \(M\) is the dimensionality of the motion space and \(N\) is the number of points to be transformed.

  • to_coords (str) – If "drive", then generate a transformation matrix that converts motion space coordinates to probe drive coordinates. If "motion space", then generate a transformation matrix that converts probe drive coordinates to motion space coordinates. (DEFAULT: "drive")

Returns:

tr_points – The points calculated from the coordinate transformation of points. The returned array has the same dimensionality as points.

Return type:

array_like

matrix(points, to_coords='drive') ndarray

The transformation matrix used to transform from probe drive coordinates to motion space coordinates, and vice versa.

Parameters:
  • points (array_like) – A single point or array of points for which the transformation matrix will be generated. The array of points needs to be of size \(M\) or \(N \times M\) where \(M\) is the dimensionality of the motion space and \(N\) is the number of points to be transformed.

  • to_coords (str) – If "drive", then generate a transformation matrix that converts motion space coordinates to probe drive coordinates. If "motion space", then generate a transformation matrix that converts probe drive coordinates to motion space coordinates. (DEFAULT: "drive")

Returns:

matrix – A transformation matrix of size \(N \times M+1 \times M+1\). The \(M+1\) dimensionality allows for the inclusion of a dimension for coordinate translations.

Return type:

array_like

Notes

The generated matrix must have a dimensionality of \(N \times M+1 \times M+1\) where \(M\) is the dimensionality of the motion space and \(N\) is the number of points passed in. The +1 in the transformation matrix dimensionality corresponds to a dimension that allows for translational shifts in the coordinate transformation. For example, if a 2D probe drive is being used then the generated matrix for a single point would have a size of \(1 \times 3 \times 3\).

The matrix generation takes a points argument because not all transformations are agnostic of the starting location, for example, the XY LaPD probe drive.