navigate.model.devices.daq.base.DAQBase
- class navigate.model.devices.daq.base.DAQBase(configuration: dict[str, Any])
Bases:
ABC
Abstract base class for Data Acquisition (DAQ) devices.
This class provides the interface and common functionality for controlling data acquisition hardware with navigate. It handles waveform generation based on configuration parameters, exposure times, and sweep times for different imaging channels.
- __init__(configuration: dict[str, Any]) → None
Initializes the DAQBase class.
- Parameters:
configuration (Dict[str, Any]) – Dictionary of configuration parameters
Methods
__init__
(configuration)Initializes the DAQBase class.
calculate_all_waveforms
(microscope_name, ...)Pre-calculates all waveforms necessary for the acquisition and organizes in a dictionary format.
enable_microscope
(microscope_name)Enables the microscope.
prepare_acquisition
(channel_key)Prepare the acquisition.
run_acquisition
([wait_until_done])Run acquisition.
set_external_trigger
([external_trigger])Set the external trigger.
Stops the acquisition.
update_analog_task
(board_name)Update the analog task.
Wait acquisition tasks done
Attributes
Dictionary of configuration parameters
Dictionary of waveform constants
Name of the active microscope
Dictionary of DAQ parameters
Sample rate of the DAQ
Sweep times for different channels
exposure times for different channels
Camera delay percentage
Dictionary of waveforms.
Number of times to repeat the waveform
Number of times to expand the waveform
Trigger mode.
- calculate_all_waveforms(microscope_name, exposure_times, sweep_times)
Pre-calculates all waveforms necessary for the acquisition and organizes in a dictionary format.
- Parameters:
microscope_name (str) – Name of the active microscope
exposure_times (dict) – Dictionary of exposure times for each selected channel
sweep_times (dict) – Dictionary of sweep times for each selected channel
- Returns:
self.waveform_dict – Dictionary of waveforms to pass to galvo and ETL, plus a camera waveform for display purposes.
- Return type:
dict
- enable_microscope(microscope_name: str) → None
Enables the microscope.
- Parameters:
microscope_name (str) – Name of the active microscope
- abstract prepare_acquisition(channel_key: str) → None
Prepare the acquisition.
This abstract method must be implemented by all subclasses.
- Parameters:
channel_key (str) – Channel key for current channel.
- abstract run_acquisition(wait_until_done: bool = True) → None
Run acquisition.
This abstract method must be implemented by all subclasses.
- Parameters:
wait_until_done (bool, optional) – Whether to wait until the acquisition is done, by default True
- set_external_trigger(external_trigger: Optional[str] = None) → None
Set the external trigger.
- Parameters:
external_trigger (str, optional) – Name of external trigger.
- abstract stop_acquisition() → None
Stops the acquisition.
This abstract method must be implemented by all subclasses.
- update_analog_task(board_name: str) → None
Update the analog task.
This abstract method must be implemented by all subclasses.
- Parameters:
board_name (str) – Name of board.
- abstract wait_acquisition_done() → None
Wait acquisition tasks done
This abstract method must be implemented by all subclasses.
- camera_delay
Camera delay percentage
- Type:
float
- configuration
Dictionary of configuration parameters
- Type:
dict
- daq_parameters
Dictionary of DAQ parameters
- Type:
dict
- exposure_times
exposure times for different channels
- Type:
dict
- microscope_name
Name of the active microscope
- Type:
str
- sample_rate
Sample rate of the DAQ
- Type:
float
- sweep_times
Sweep times for different channels
- Type:
dict
- trigger_mode
Trigger mode. Self-trigger or external-trigger.
- Type:
str
- waveform_constants
Dictionary of waveform constants
- Type:
dict
- waveform_dict
Dictionary of waveforms.
- Type:
dict
- waveform_expand_num
Number of times to expand the waveform
- Type:
int
- waveform_repeat_num
Number of times to repeat the waveform
- Type:
int