navigate.model.devices.zoom.base.ZoomBase
- class navigate.model.devices.zoom.base.ZoomBase(microscope_name, device_controller, configuration)
Bases:
object
ZoomBase parent class.
- __init__(microscope_name, device_controller, configuration)
Initialize the parent zoom class.
- Parameters:
microscope_name (str) – Name of microscope in configuration
device_controller (object) – Hardware device to connect to
configuration (multiprocesing.managers.DictProxy) – Global configuration of the microscope
Methods
__init__
(microscope_name, device_controller, ...)Initialize the parent zoom class.
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
Configuration dictionary for the device.
Zoom dictionary
the desired zoom setting
- 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