class documentation

class RomDataTracker: (source)

Constructor: RomDataTracker()

View In Hierarchy

Class for tracking range of motion data.

The attributes storing data are:

  • stage_coords A list of the the stage coordinates at each measurement location
  • displacements A list of the displacement calculated after each movement
Method __init__ Define useful data tracked throughout test.
Method find_turning_point Find the turing point from the recorded coordinates.
Method fit_axis Quadratic fit stage z against x or y and return poly1d of fit.
Method predict_z_displacement Predict the z-displacement needed for a given movement.
Method record_movement Record the current position and the measured offset of the last move.
Instance Variable offsets Undocumented
Instance Variable stage_coords Undocumented
Property final_position The last stage coordinate recorded.
def __init__(self): (source)

Define useful data tracked throughout test.

def find_turning_point(self, axis: Literal['x', 'y']) -> Mapping[str, int]: (source)

Find the turing point from the recorded coordinates.

def fit_axis(self, axis: Literal['x', 'y']) -> np.poly1d: (source)

Quadratic fit stage z against x or y and return poly1d of fit.

Note that this considers only one of x and y, and ignores the other coordinate. If this function is used on moves where both x and y are changing, it will give misleading results.

def predict_z_displacement(self, axis: Literal['x', 'y'], stage_movement: Mapping[str, int], stage_position: Mapping[str, int]) -> int: (source)

Predict the z-displacement needed for a given movement.

Parameters
axis:Literal['x', 'y']The axis which is being measured. This must be 'x' or 'y'.
stage_movement:Mapping[str, int]The movement to be performed in stage coordinates.
stage_position:Mapping[str, int]The current stage position in stage coordinates.
Returns
intThe predicted relative z displacement needed to stay in focus.
def record_movement(self, current_pos: Mapping[str, int], offset: Mapping[str, float]): (source)

Record the current position and the measured offset of the last move.

offsets: list[Mapping[str, float]] = (source)

Undocumented

stage_coords: list[Mapping[str, int]] = (source)

Undocumented

@property
final_position: Mapping[str, int] = (source)

The last stage coordinate recorded.