navigate.model.devices.stage.pi.PIStage
- class navigate.model.devices.stage.pi.PIStage(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Bases:
StageBase
,IntegratedDevice
Physik Instrumente (PI) Stage Class
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Initialize the Physik Instrumente (PI) Stage Class
- Parameters:
microscope_name (str) – Name of microscope in configuration
device_connection (Any) – Hardware device to connect to
configuration (Dict[str, Any]) – Global configuration of the microscope
device_id (int) – Unique identifier for the device, by default 0
Methods
__init__
(microscope_name, device_connection, ...)Initialize the Physik Instrumente (PI) Stage Class
close
()Close the stage.
connect
(controller_name, serial_number, ...)Connect to the Physik Instrumente (PI) Stage
get_abs_position
(axis, axis_abs)Ensure the requested position is within axis bounds and return it.
Register the parameters required to connect to the stage.
Return a dictionary with the saved stage positions.
move_absolute
(move_dictionary[, wait_until_done])Move Absolute Method.
move_axis_absolute
(axis, abs_pos[, ...])Move stage along a single axis.
Reports the position for all axes, and create position dictionary.
stop
()Stop all stage movement abruptly.
update_limits
()verify_abs_position
(move_dictionary[, is_strict])Ensure the requested moving positions are within axes bounds
wait_on_target
([axes])Wait on target
Attributes
Physik Instrumente (PI) device
Physik Instrumente (PI) device
List of PI axes available.
- close() → None
Close the stage.
- classmethod connect(controller_name: str, serial_number: str, stages: list[str], reference_modes: list[str]) → dict[str, Any]
Connect to the Physik Instrumente (PI) Stage
- Parameters:
controller_name (str) – Name of the controller, e.g., “C-863.11”
serial_number (str) – Serial number of the controller, e.g., “0112345678”
stages (str) – Stages to connect to, e.g., “M-111.1DG”
reference_modes (str) – Reference modes for the stages, e.g., “FRF”
- Returns:
stage_connection – Dictionary containing the pi_tools and pi_device objects
- Return type:
dict
- 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
- classmethod get_connect_params() → list[str]
Register the parameters required to connect to the stage.
- Returns:
List of parameters required to connect to the stage.
- Return type:
list
- 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 = False) → bool
Move Absolute Method.
XYZF Values are converted to millimeters for PI API. Theta Values are not converted.
- Parameters:
move_dictionary (dict) – A dictionary of values required for movement. Includes ‘x_abs’, etc. for one or more axes. Expect values in micrometers, except for theta, which is in degrees.
wait_until_done (bool) – Block until stage has moved to its new spot.
- Returns:
Was the move successful?
- Return type:
bool
- move_axis_absolute(axis: str, abs_pos: float, wait_until_done: bool = False) → bool
Move stage 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 create position dictionary.
Positions from Physik Instrumente device are in millimeters
- Returns:
position_dict – Dictionary containing the position of all axes
- Return type:
dict
- stop() → None
Stop all stage movement abruptly.
- 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
- wait_on_target(axes: Optional[Any] = None)
Wait on target
- Parameters:
axes (list or tuple or str) – Axes to wait for or None to wait for all axes.
- Returns:
Was the wait on target delay successful?
- Return type:
bool
- axes
List of stage axes available.
- Type:
list
- axes_mapping
Initial setting for all positions self.x_pos, self.y_pos etc are the true axis positions, no matter whether the stages are zeroed or not. All units are in microns.
- device_connection
Device connection object.
- Type:
Any
- pi_axes
List of PI axes available.
- Type:
list
- pi_device
Physik Instrumente (PI) device
- Type:
object
- pi_tools
Physik Instrumente (PI) device
- 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