etalumacontrol.stage
Module Contents
Classes
This class provides access to the motorized stage of an Etaluma microscope. |
Attributes
- etalumacontrol.stage.LUMAUSB_DLL
- exception etalumacontrol.stage.StageError
Bases:
ExceptionCommon base class for all non-exit exceptions.
- class etalumacontrol.stage.EtalumaStage(_init=True)
Bases:
objectThis class provides access to the motorized stage of an Etaluma microscope. When instantiated, the stage will first initialize and home all axes.
This class supports the context manager, and thus the following code will ensure that resources are properly disposed handled:
with EtalumaStage() as stage: # perform some operations
The stage may also be used directly as an object, but then its
close()method should manually be called after use:try: stage = EtalumaStage() # perform some operations finally: stage.close()
- __enter__(self)
- __exit__(self, exc_type, exc_value, traceback)
- close(self)
Closes the USB to serial link.
- static mm_to_microsteps(value: float, axis: str = 'X') int
Convert a value from millimeters to microsteps.
Arguments: * value – The value to convert.
- static _check_axis(axis: str)
- get_pos(self, axis: str, microsteps: bool = False) Union[float, int, bool]
Return the stage’s current absolute position.
Arguments: * axis – The axis to query. Valid values are [‘x’, ‘y’, ‘z’],
case-independent.
microsteps – Whether to return the value in microsteps instead of millimeters. Defaults to False.
- move(self, axis: str, pos: Union[int, float], microsteps: int = False, blocking: bool = True) None
Moves the stage to the specified absolute position. Raises StageError if the position is outside of the allowed range. Note: If using LumaView to determine values, beware that the Z axis values in LumaView are reported in micrometers.
Arguments: * axis – The axis to query. Valid values are [‘x’, ‘y’, ‘z’],
case-independent.
pos – The absolute position to travel to.
microsteps – Specify position in microsteps instead of millimeters. Defaults to False.
blocking – Specifies whether the method waits until movement is complete before returning. Defaults to True. Also see
stop().