navigate.model.devices.stage.sutter.MP285Stage
- class navigate.model.devices.stage.sutter.MP285Stage(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Bases:
StageBase,SerialDeviceMP285Stage Class for MP-285.
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0) → None
Initialize the MP285Stage.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (Any) – MP285 stage connection.
configuration (Dict[str, Any]) – Configuration dictionary for the MP285Stage.
device_id (int) – Device ID for the MP285Stage.
- Raises:
UserWarning – Error while connecting to the MP285Stage.
UserWarning – Error while setting resolution and velocity.
UserWarning – Error while setting absolute operation mode.
Methods
__init__(microscope_name, device_connection, ...)Initialize the MP285Stage.
close()Close the stage.
connect(port[, baud_rate, timeout])Connect to the MP285Stage.
Disconnect from serial device.
get_abs_position(axis, axis_abs)Ensure the requested position is within axis bounds and return it.
Return a dictionary with the saved stage positions.
move_absolute(move_dictionary[, wait_until_done])Move stage along a single axis.
move_axis_absolute(axis, abs_pos[, ...])Implement movement logic along a single axis.
Reports the position for all axes, and creates a position dictionary.
stop()Stop all stage movement abruptly.
verify_abs_position(move_dictionary[, is_strict])Ensure the requested moving positions are within axes bounds
Attributes
- close() → None
Close the stage.
- classmethod connect(port: str, baud_rate: int = 115200, timeout: float = 0.25) → navigate.model.devices.APIs.sutter.MP285.MP285
Connect to the MP285Stage.
- disconnect() → None
Disconnect from serial device.
- get_abs_position(axis: str, axis_abs: float) → float
Ensure the requested position is within axis bounds and return it.
- Parameters:
axis (str) – An axis: x, y, z, f, theta
axis_abs (float) – Absolute position value
- Returns:
Position to move the stage to for this axis.
- Return type:
float
- get_position_dict() → dict[str, float]
Return a dictionary with the saved stage positions.
- Returns:
Dictionary of stage positions.
- Return type:
dict
- move_absolute(move_dictionary: dict[str, float], wait_until_done: bool = True) → bool
Move stage along a single axis.
- Parameters:
move_dictionary (dict) – A dictionary of values required for movement. Includes ‘x_abs’, ‘x_min’, etc. for one or more axes. Expects values in micrometers, except for theta, which is in degrees.
wait_until_done (bool) – Wait until the stage has finished moving before returning.
- Returns:
Was the move successful?
- Return type:
bool
- move_axis_absolute(axis: str, abs_pos: float, wait_until_done: bool = False) → bool
Implement movement logic along a single axis.
- Parameters:
axis (str) – An axis. For example, ‘x’, ‘y’, ‘z’, ‘f’, ‘theta’.
abs_pos (float) – Absolute position value
wait_until_done (bool) – Block until stage has moved to its new spot.
- Returns:
Was the move successful?
- Return type:
bool
- report_position() → dict[str, float]
Reports the position for all axes, and creates a position dictionary.
Positions from the MP-285 are converted to microns.
- Returns:
position – Dictionary containing the position of all axes
- Return type:
dict
- stop() → None
Stop all stage movement abruptly.
- update_limits() → None
- verify_abs_position(move_dictionary: dict, is_strict=False) → dict
Ensure the requested moving positions are within axes bounds
- Parameters:
move_dictionary (dict) – A dictionary of values required for movement. Includes ‘x_abs’, ‘y_abs’, etc. for one or more axes. Expect values in micrometers, except for theta, which is in degrees.
is_strict (bool, optional) – If True, return an empty dict if any axis is out of bounds.
- Returns:
a verified moving dict {axis: abs_position}
- Return type:
dict
- axes
List of stage axes available.
- Type:
list
- axes_mapping
Dictionary of stage axes and their corresponding hardware axes.
- Type:
dict
- configuration_schema = {'axes': SettingSpec(value_type=<class 'str'>, default='', label='Axes', help_text='Comma-separated software axes provided by this stage.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'axes_mapping': SettingSpec(value_type=<class 'str'>, default='', label='Axes Mapping', help_text='Controller-axis mapping corresponding to the configured axes.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None), 'coupled_axes': SettingSpec(value_type=<class 'str'>, default='', label='Coupled Axes', help_text='Enter comma-separated leader:follower pairs for axes that move together, for example: x:x1, y:y1.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None), 'joystick_axes': SettingSpec(value_type=<class 'str'>, default='', label='Joystick Axes', help_text='Stage axes controlled by the joystick, saved as a list.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None)}
- device_axes
Dictionary of hardware axes and their corresponding stage axes.
- Type:
dict
- device_connection
Device connection object.
- Type:
Any
- device_name
Name of the device, used as a unique identifier.
- Type:
str
- resolution
Resolution of the stage.
- Type:
str
- speed
Speed of the stage in units microns/s.
- Type:
int
- stage
MP285 stage.
- Type:
object
- stage_configuration
stage_configuration
- stage_feedback
Feedback alignment value for the stage. Default is None.
- Type:
int
- stage_limits
Whether the stage has limits enabled or not. Default is True.
- Type:
bool
- stage_x_pos
Position of the stage along the x-axis.
- Type:
float
- stage_y_pos
Position of the stage along the y-axis.
- Type:
float
- stage_z_pos
Position of the stage along the z-axis.
- Type:
float
- unique_id
Unique identifier for the device,
serial_followed by the port.- Type:
str