navigate.model.devices.zoom.dynamixel.DynamixelZoom
- class navigate.model.devices.zoom.dynamixel.DynamixelZoom(microscope_name, device_connection, configuration)
Bases:
ZoomBase
DynamixelZoom Class - Controls the Dynamixel Servo.
- __init__(microscope_name, device_connection, configuration)
Initialize the DynamixelZoom Servo.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (int) – Connection string for the device.
configuration (dict) – Configuration dictionary for the device.
Methods
__init__
(microscope_name, device_connection, ...)Initialize the DynamixelZoom Servo.
Construct a dictionary of stage offsets in between different zoom values.
move
(position[, wait_until_done])Move the DynamixelZoom Servo
Read the position of the Zoom Servo.
set_zoom
(zoom[, wait_until_done])Change the DynamixelZoom Servo.
Attributes
DynamixelZoom object.
DynamixelZoom ID.
DynamixelZoom torque enable.
DynamixelZoom goal position.
DynamixelZoom present position.
DynamixelZoom p gain.
DynamixelZoom torque limit.
DynamixelZoom moving speed.
DynamixelZoom goal position offset.
DynamixelZoom sleep time.
DynamixelZoom timeout duration.
DynamixelZoom torque enable.
DynamixelZoom torque disable.
DynamixelZoom port number.
- build_stage_dict()
Construct a dictionary of stage offsets in between different zoom values.
This assumes self.configuration[“stage_positions”] is a dictionary of ideal focus positions for the same object taken in the same solvent at each magnification. e.g.,
- stage_positions:
- BABB:
- f:
0.63x: 0 1x: 70775 2x: 72455 3x: 72710 4x: 72795 5x: 72850 6x: 72880
The resulting dictionary is keyed first on solvent (refractive index), followed by the stage axis to offset, followed by the current magnification and then the target magnification.
- move(position, wait_until_done=False)
Move the DynamixelZoom Servo
- Parameters:
position (int) – Location to move to.
wait_until_done (bool) – Delay parameter
- read_position()
Read the position of the Zoom Servo.
Returned position is an int between 0 and 4096. Opens and closes the port.
- Returns:
cur_position – Servo position.
- Return type:
int
- set_zoom(zoom, wait_until_done=False)
Change the DynamixelZoom Servo.
Confirms that the zoom position is available in the zoomdict, and then changes to that zoom value.
- Parameters:
zoom (dict) – Zoom dictionary
wait_until_done (bool) – Delay parameter.
- Raises:
ValueError – If the zoom designation is not in the configuration.
- addr_mx_goal_position
DynamixelZoom goal position.
- Type:
int
- addr_mx_moving_speed
DynamixelZoom moving speed.
- Type:
int
- addr_mx_p_gain
DynamixelZoom p gain.
- Type:
int
- addr_mx_present_position
DynamixelZoom present position.
- Type:
int
- addr_mx_torque_enable
DynamixelZoom torque enable.
- Type:
int
- addr_mx_torque_limit
DynamixelZoom torque limit.
- Type:
int
- configuration
Configuration dictionary for the device.
- Type:
dict
- dynamixel
DynamixelZoom object.
- Type:
object
- goal_position_offset
DynamixelZoom goal position offset.
- Type:
int
- id
DynamixelZoom ID.
- Type:
int
- port_num
DynamixelZoom port number.
- Type:
obj
- sleeptime
DynamixelZoom sleep time.
- Type:
float
- timeout
DynamixelZoom timeout duration.
- Type:
float
- torque_disable
DynamixelZoom torque disable.
- Type:
int
- torque_enable
DynamixelZoom torque enable.
- Type:
int
- zoomdict
Zoom dictionary
- Type:
dict
- zoomvalue
the desired zoom setting
- Type:
float