navigate.model.devices.galvo.base.GalvoBase
- class navigate.model.devices.galvo.base.GalvoBase(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Bases:
ABC
Abstract base class for galvanometer devices.
This class provides the interface and common functionality for controlling galvanometers with navigate. It handles waveform generation based on configuration parameters and experimental settings.
The class generates appropriate control waveforms (sawtooth, sine, halfsaw) according to camera exposure times and configuration parameters. Child classes must implement the turn_off method to control hardware-specific behaviors.
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0) → None
Initialize the GalvoBase class.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (Any) – Device connection.
configuration (dict[str, Any]) – Dictionary of configuration parameters.
device_id (int) – Galvo ID. Default is 0.
Methods
__init__
(microscope_name, device_connection, ...)Initialize the GalvoBase class.
adjust
(exposure_times, sweep_times)Adjust the galvo waveform to account for the camera readout time.
turn_off
()Turn off the galvo.
Attributes
Device connection.
Dictionary of microscope configuration parameters.
Name of the microscope.
Name of the galvo.
Dictionary of device connections.
Sample rate.
Sweep time.
Camera delay
Galvo max voltage.
Galvo min voltage.
Galvo waveform.
Dictionary of galvo waveforms.
- abstract adjust(exposure_times: dict[str, float], sweep_times: dict[str, float]) → dict
Adjust the galvo waveform to account for the camera readout time.
- Parameters:
exposure_times (dict) – Dictionary of camera exposure time in seconds on a per-channel basis. e.g., exposure_times = {“channel_1”: 0.1, “channel_2”: 0.2}
sweep_times (dict) – Dictionary of acquisition sweep time in seconds on a per-channel basis. e.g., sweep_times = {“channel_1”: 0.1, “channel_2”: 0.2}
- Returns:
waveform_dict – Dictionary that includes the galvo waveforms on a per-channel basis.
- Return type:
dict
- abstract turn_off() → None
Turn off the galvo.
- camera_delay
Camera delay
- Type:
float
- configuration
Dictionary of microscope configuration parameters.
- Type:
dict
- device_config
Dictionary of device connections.
- Type:
dict
- device_connection
Device connection.
- Type:
Any
- galvo_max_voltage
Galvo max voltage.
- Type:
float
- galvo_min_voltage
Galvo min voltage.
- Type:
float
- galvo_name
Name of the galvo.
- Type:
str
- galvo_waveform
Galvo waveform. Waveform or Sawtooth.
- Type:
str
- microscope_name
Name of the microscope.
- Type:
str
- sample_rate
Sample rate.
- Type:
int
- sweep_time
Sweep time.
- Type:
float
- waveform_dict
Dictionary of galvo waveforms.
- Type:
dict