class documentation
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 |
Find the turing point from the recorded coordinates. |
| Method | fit |
Quadratic fit stage z against x or y and return poly1d of fit. |
| Method | predict |
Predict the z-displacement needed for a given movement. |
| Method | record |
Record the current position and the measured offset of the last move. |
| Instance Variable | offsets |
Undocumented |
| Instance Variable | stage |
Undocumented |
| Property | final |
The last stage coordinate recorded. |
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[ | The axis which is being measured. This must be 'x' or 'y'. |
stageMapping[ | The movement to be performed in stage coordinates. |
stageMapping[ | The current stage position in stage coordinates. |
| Returns | |
int | The predicted relative z displacement needed to stay in focus. |