navigate.model.devices.remote_focus.equipment_solutions.EquipmentSolutionsASIRemoteFocus
- class navigate.model.devices.remote_focus.equipment_solutions.EquipmentSolutionsASIRemoteFocus(microscope_name: str, device_connection: Any, configuration: Dict[str, Any], *args, **kwargs)
Bases:
ASIRemoteFocus,SerialDevice,ASIDeviceASIRemoteFocusEquipmentSolutions Class
Note
The SCA814 has a single character input buffer that can be overflowed if the proper steps are not taken. To avoid overflowing the input buffer the user should send a single character at a time and wait for that same character to be echoed back by the controller. While not necessary, it is advisable to verify that the character received from the controller is the same character sent. Once the character is received the next character can be processed.
- __init__(microscope_name: str, device_connection: Any, configuration: Dict[str, Any], *args, **kwargs) → None
Initialize the RemoteFocusEquipmentSolutions Class
- Parameters:
microscope_name (str) – Name of the microscope
device_connection (Any) – Connection to the device
configuration (Dict[str, Any]) – Configuration dictionary
Methods
__init__(microscope_name, device_connection, ...)Initialize the RemoteFocusEquipmentSolutions Class
adjust(exposure_times, sweep_times[, offset])Adjust the waveform.
close()Close the ASI remote_focus serial port.
connect([port, baudrate, timeout])Connect to Serial Communication Port
Disconnect from serial device.
move(exposure_times, sweep_times[, offset])Move the remote focus.
ramp([exposure_time, flyback_time, ...])Sends the tiger controller commands to initiate the ramp wave.
read_bytes(num_bytes)Read the specified number of bytes from RemoteFocusEquipmentSolutions.
send_command(message)Send write command to the RemoteFocusEquipmentSolutions device.
triangle([sweep_time, amplitude, offset])Sends the tiger controller commands to initiate the triangle wave.
turn_off()Stops the remote focus waveform
Attributes
Name of the RS232 communication port.
Timeout for the serial port.
Read on initialization.
Debug mode.
- adjust(exposure_times: dict[str, float], sweep_times: dict[str, float], offset: Optional[float] = None) → dict[str, Any]
Adjust the waveform.
This method adjusts the waveform parameters. Based on the sensor mode and readout direction, either the triangle or ramp function will be called.
- Parameters:
exposure_times (dict) – Dictionary of exposure times for each selected channel
sweep_times (dict) – Dictionary of sweep times for each selected channel
offset (float, optional) – Offset value for the remote focus waveform, by default None
- close()
Close the ASI remote_focus serial port.
Stops the remote focus waveform and then closes the port.
- classmethod connect(port: str = 'COM1', baudrate: int = 115200, timeout: float = 1.25) → Serial
Connect to Serial Communication Port
- Parameters:
port (str) – Serial Port (default is “COM1”)
baudrate (int, optional) – Baud rate of the serial port (default is 115200)
timeout (float, optional) – Time out (default is 1.25)
- Returns:
An instance of the serial connection
- Return type:
serial.Serial
- Raises:
UserWarning – If there is a communication error with the serial port
- disconnect() → None
Disconnect from serial device.
- move(exposure_times: dict[str, float], sweep_times: dict[str, float], offset: Optional[float] = None) → None
Move the remote focus.
This method moves the remote focus.
- Parameters:
exposure_times (dict) – Dictionary of exposure times for each selected channel
sweep_times (dict) – Dictionary of sweep times for each selected channel
offset (float) – The offset of the signal in volts.
- ramp(exposure_time: float = 0.2, flyback_time: float = 20, amplitude: float = 1, offset: float = 0.5)
Sends the tiger controller commands to initiate the ramp wave.
The waveform starts at offset and immediately rises linearly to 2x amplitude (amplitude here refers to 1/2 peak-to-peak) and then immediately drops back down to the offset voltage during the fall period.
There is a delay period after each cycle that comes from the PLC, which is not included in this function.
- Parameters:
exposure_time (Float) – Unit - Seconds
flyback_time (Float) – Unit - milliseconds
amplitude (Float) – Unit - Volts
offset (Float) – Unit - Volts
- read_bytes(num_bytes: int) → bytes
Read the specified number of bytes from RemoteFocusEquipmentSolutions.
- Parameters:
num_bytes (int) – Number of bytes to receive
- Returns:
received_bytes – Number of bytes received from the RemoteFocusEquipmentSolutions device.
- Return type:
bytes
- Raises:
UserWarning – If the serial port to the RemoteFocusEquipmentSolutions is connected, but it isn’t responding as expected.
- send_command(message: str)
Send write command to the RemoteFocusEquipmentSolutions device.
- Parameters:
message (str) – Message to send to the RemoteFocusEquipmentSolutions device. If str == ‘close’, shutdown device.
- Raises:
UserWarning – If there is an error in communicating with the RemoteFocusEquipmentSolutions device.
- triangle(sweep_time: float = 0.24, amplitude: float = 1, offset: float = 0)
Sends the tiger controller commands to initiate the triangle wave.
The waveform starts at the offset and immediately rises linearly to 2x amplitude (amplitude here refers to 1/2 peak-to-peak) and immediately falls linearly back to the offset. The waveform is a periodic waveform with no delay periods between cycles.
- Parameters:
sweep_time (Float) – Unit - Seconds
amplitude (Float) – Unit - Volts
offset (Float) – Unit - Volts
- turn_off()
Stops the remote focus waveform
- axis
Output axis on Tiger Controller
- Type:
str
- camera_delay
Camera delay percent.
- Type:
float
- comport
Name of the RS232 communication port.
- Type:
str
- configuration
Configuration dictionary.
- Type:
dict
- debug
Debug mode.
- Type:
bool
- device_config
Remote focus device parameters.
- Type:
dict
- device_connection
Device connection object.
- Type:
Any
- device_name
Name of the device, used as a unique identifier.
- Type:
str
- microscope_name
Name of the microscope.
- Type:
str
- read_on_init
Read on initialization.
- Type:
bool
- remote_focus
Device connection object.
- Type:
Any
- remote_focus_max_voltage
Remote focus max voltage.
- Type:
float
- remote_focus_min_voltage
Remote focus min voltage.
- Type:
float
- sample_rate
Sample rate of the DAQ.
- Type:
int
- sweep_time
Sweep time of the DAQ.
- Type:
float
- timeout
Timeout for the serial port.
- Type:
float
- waveform_dict
Waveform dictionary.
- Type:
dict