navigate.model.devices.zoom.synthetic.SyntheticZoom
- class navigate.model.devices.zoom.synthetic.SyntheticZoom(microscope_name: str, device_connection: Any, configuration: Dict[str, Any])
Bases:
ZoomBase
SyntheticZoom Class - Controls the SyntheticZoom Servo.
- __init__(microscope_name: str, device_connection: Any, configuration: Dict[str, Any]) → None
Initialize the SyntheticZoom Servo.
- 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
Methods
__init__
(microscope_name, device_connection, ...)Initialize the SyntheticZoom Servo.
Construct a dictionary of stage offsets in between different zoom values.
move
([position, wait_until_done])Move the Zoom Servo
Read the position of the Zoom Servo
set_zoom
(zoom[, wait_until_done])Change the microscope zoom.
Attributes
- 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=0, wait_until_done=False)
Move the Zoom Servo
- Parameters:
position (int) – Location to move to.
wait_until_done (bool) – Delay parameter
- read_position()
Read the position of the Zoom Servo
- Returns:
cur_position – Current position of Zoom
- Return type:
int
- set_zoom(zoom, wait_until_done=False)
Change the microscope zoom.
Confirms tha the zoom position is available in the zoomdict
- Parameters:
zoom (dict) – Zoom dictionary
wait_until_done (bool) – Delay parameter.
exists (Changes zoom after checking that the commanded value) –
- configuration
Configuration dictionary for the device.
- Type:
dict
- zoomdict
Zoom dictionary
- Type:
dict
- zoomvalue
the desired zoom setting
- Type:
float