Sangaboard Microscope Stage¶
-
class
openflexure_microscope.stage.sanga.
SangaStage
(port=None, **kwargs)[source]¶ Sangaboard v0.2 and v0.3 powered Stage object
Parameters: port (str) – Serial port on which to open communication -
board
¶ Parent Sangaboard object.
Type: openflexure_microscope.stage.sangaboard.Sangaboard
-
_backlash
¶ 3-element (element-per-axis) list of backlash compensation in steps.
Type: list
-
state
¶ The general state dictionary of the board.
-
configuration
¶ The general stage configuration.
-
n_axes
¶ The number of axes this stage has.
-
position
¶ The current position, as a list
-
backlash
¶ The distance used for backlash compensation. Software backlash compensation is enabled by setting this property to a value other than None. The value can either be an array-like object (list, tuple, or numpy array) with one element for each axis, or a single integer if all axes are the same. The property will always return an array with the same length as the number of axes. The backlash compensation algorithm is fairly basic - it ensures that we always approach a point from the same direction. For each axis that’s moving, the direction of motion is compared with
backlash
. If the direction is opposite, then the stage will overshoot by the amount in-backlash[i]
and then move back bybacklash[i]
. This is computed per-axis, so if some axes are moving in the same direction asbacklash
, they won’t do two moves.
-
move_rel
(displacement: Union[int, Tuple[int, int, int], numpy.ndarray], axis: Optional[typing_extensions.Literal['x', 'y', 'z'][x, y, z]] = None, backlash: bool = True)[source]¶ Make a relative move, optionally correcting for backlash. displacement: integer or array/list of 3 integers axis: None (for 3-axis moves) or one of ‘x’,’y’,’z’ backlash: (default: True) whether to correct for backlash.
Backlash Correction: This backlash correction strategy ensures we’re always approaching the end point from the same direction, while minimising the amount of extra motion. It’s a good option if you’re scanning in a line, for example, as it will kick in when moving to the start of the line, but not for each point on the line. For each axis where we’re moving in the opposite direction to self.backlash, we deliberately overshoot:
-
-
class
openflexure_microscope.stage.sanga.
SangaDeltaStage
(port: Optional[str] = None, flex_h: int = 80, flex_a: int = 50, flex_b: int = 50, camera_angle: float = 0, **kwargs)[source]¶ -
position
¶ The current position, as a list
-
move_rel
(displacement: Union[int, Tuple[int, int, int], numpy.ndarray], axis: Optional[typing_extensions.Literal['x', 'y', 'z'][x, y, z]] = None, backlash: bool = True)[source]¶ Make a relative move, optionally correcting for backlash. displacement: integer or array/list of 3 integers axis: None (for 3-axis moves) or one of ‘x’,’y’,’z’ backlash: (default: True) whether to correct for backlash.
Backlash Correction: This backlash correction strategy ensures we’re always approaching the end point from the same direction, while minimising the amount of extra motion. It’s a good option if you’re scanning in a line, for example, as it will kick in when moving to the start of the line, but not for each point on the line. For each axis where we’re moving in the opposite direction to self.backlash, we deliberately overshoot:
-