navigate.model.devices.daq.asi.ASIDaq
- class navigate.model.devices.daq.asi.ASIDaq(microscope_name, device_connection, configuration: dict[str, Any], device_id)
Bases:
DAQBase,SerialDeviceASIDAQ class for Data Acquisition (DAQ).
Representation of Tiger Controller in action. Triggers all devices and outputs to camera trigger channel.
- __init__(microscope_name, device_connection, configuration: dict[str, Any], device_id) → None
Initialize the ASI DAQ.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (Any) – Connection to the Tiger Controller.
configuration (Dict[str, Any]) – Dictionary of configuration parameters.
device_id (int) – Parameter necessary for start_device but not used here.
Methods
__init__(microscope_name, device_connection, ...)Initialize the ASI DAQ.
calculate_all_waveforms(microscope_name, ...)Pre-calculates all waveforms necessary for the acquisition and organizes in a dictionary format.
connect(port[, baudrate, timeout])Build ASIDaq Serial Port connection
Disconnect from serial device.
enable_microscope(microscope_name)Enables the microscope.
prepare_acquisition(channel_key)Prepare the acquisition.
Run DAQ Acquisition.
set_external_trigger([external_trigger])Set the external trigger.
Stop Acquisition.
update_analog_task(board_name)Update the analog task.
Wait for acquisition to be done.
Attributes
Lock for waiting to run.
Flag for updating analog task.
Mapping of device to tiger axis.
Device connection.
microscope name
zoom
Flag for z-stack acquisition.
Flag for single acquisition.
list of galvo phases.
Mapping of navigate axes to tiger axes.
Mapping of tiger axes to addresses.
- 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
- classmethod connect(port, baudrate=115200, timeout=0.25)
Build ASIDaq Serial Port connection
- Parameters:
port (str) – Port for communicating with the filter wheel, e.g., COM1.
baudrate (int) – Baud rate for communicating with the filter wheel, default is 115200.
timeout (float) – Timeout for communicating with the filter wheel, default is 0.25.
- Returns:
tiger_controller – ASI Tiger Controller object.
- Return type:
TigerController
- disconnect() → None
Disconnect from serial device.
- enable_microscope(microscope_name: str) → None
Enables the microscope.
- Parameters:
microscope_name (str) – Name of the active microscope
- prepare_acquisition(channel_key: str) → None
Prepare the acquisition.
Creates and configures the DAQ tasks. Writes the waveforms to each task.
- Parameters:
channel_key (str) – Channel key for current channel.
- run_acquisition() → None
Run DAQ Acquisition.
Run the tasks for triggering, analog and counter outputs. The master trigger initiates all other waveforms via a shared trigger For this to work, all analog output and counter tasks have to be primed so that they are waiting for the trigger signal.
If it is a z-stack acquisition, wait for the loop to complete before returning.
- set_external_trigger(external_trigger: Optional[str] = None) → None
Set the external trigger.
- Parameters:
external_trigger (str, optional) – Name of external trigger.
- stop_acquisition() → None
Stop Acquisition.
Stop control loop.
- 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.
- wait_acquisition_done() → None
Wait for acquisition to be done.
- analog_outputs
Mapping of device to tiger axis.
- Type:
dict
- axis_addr
Mapping of tiger axes to addresses.
- Type:
Dict
- axis_map
Mapping of navigate axes to tiger axes.
- Type:
Dict
- camera_delay
Camera delay percentage
- Type:
float
- configuration
Dictionary of configuration parameters
- Type:
dict
- daq
Device connection.
- Type:
Any
- daq_parameters
Dictionary of DAQ parameters
- Type:
dict
- device_name
Name of the device, used as a unique identifier.
- Type:
str
- exposure_times
exposure times for different channels
- Type:
dict
- is_updating_analog_task
Flag for updating analog task.
- Type:
bool
- microscope_name
microscope name
- Type:
str
- phases
list of galvo phases.
- Type:
List
- sample_rate
Sample rate of the DAQ
- Type:
float
- single
Flag for single acquisition.
- Type:
bool
- sweep_times
Sweep times for different channels
- Type:
dict
- trigger_mode
Trigger mode. Self-trigger or external-trigger.
- Type:
str
- wait_to_run_lock
Lock for waiting to run.
- Type:
Lock
- 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
- zoom
zoom
- Type:
str
- zstack
Flag for z-stack acquisition.
- Type:
bool