navigate.model.devices.zoom.synthetic.SyntheticZoom
- class navigate.model.devices.zoom.synthetic.SyntheticZoom(microscope_name: str, device_connection: Any, configuration: dict[str, Any], *args: Optional[Any], **kwargs: Optional[Any])
Bases:
ZoomBaseSyntheticZoom Class - Controls the SyntheticZoom Servo.
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], *args: Optional[Any], **kwargs: Optional[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])Set the zoom position.
Attributes
- build_stage_dict() → None
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: int, wait_until_done: bool = False) → None
Move the Zoom Servo
- Parameters:
position (int) – Location to move to.
wait_until_done (bool) – Delay parameter
- read_position() → int
Read the position of the Zoom Servo
- Returns:
cur_position – Current position of Zoom
- Return type:
int
- set_zoom(zoom: dict, wait_until_done=False) → None
Set the zoom position.
- configuration
Configuration dictionary for the device.
- Type:
dict
- configuration_schema = {'stage_positions': CollectionSpec(item_schema={'solvent': SettingSpec(value_type=<class 'str'>, default=None, label='Solvent', help_text='Immersion solvent for this calibration.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'axis': SettingSpec(value_type=<class 'str'>, default=None, label='Stage Axis', help_text='Stage axis adjusted for this calibration.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'zoom': SettingSpec(value_type=<class 'str'>, default=None, label='Zoom', help_text='Zoom label for this calibration point.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'position': SettingSpec(value_type=<class 'float'>, default=None, label='Position', help_text='Stage position offset for this calibration point.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None)}, storage='nested_mapping', key_field='solvent', value_field='position', storage_fields=None, label='Stage Position Calibration', help_text=None, dynamic_source=None, minimum_items=0, none_option_label=None), 'zoom_values': CollectionSpec(item_schema={'zoom': SettingSpec(value_type=<class 'str'>, default=None, label='Zoom', help_text='Zoom label used by the application.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'position': SettingSpec(value_type=<class 'float'>, default=None, label='Position', help_text='Device position for this zoom label.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'pixel_size': SettingSpec(value_type=<class 'float'>, default=None, label='Pixel Size (um)', help_text='Positive object-space pixel size at this zoom, in micrometres.', choices=None, choice_values=None, minimum=1e-06, exclusive_minimum=None, maximum=None, step=0.001, required=True, dynamic_source=None, depends_on=None)}, storage='parallel_mappings', key_field='zoom', value_field='position', storage_fields=('position', 'pixel_size'), label='Zoom Values', help_text=None, dynamic_source=None, minimum_items=0, none_option_label=None)}
- zoomdict
Zoom dictionary
- Type:
dict
- zoomvalue
the desired zoom setting
- Type:
float