navigate.model.devices.filter_wheel.asi.ASIFilterWheel
- class navigate.model.devices.filter_wheel.asi.ASIFilterWheel(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Bases:
FilterWheelBase,SerialDeviceASIFilterWheel - Class for controlling ASI Filter Wheels
Note
Additional information on the ASI Filter Wheel can be found at: https://asiimaging.com/docs/fw_1000#fw-1000_ascii_command_set
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0) → None
Initialize the ASIFilterWheel class.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (TigerController) – Communication object for the ASI Filter Wheel.
configuration (dict) – Global configuration of the microscope.
device_id (int) – The ID of the device. Default is 0.
Methods
__init__(microscope_name, device_connection, ...)Initialize the ASIFilterWheel class.
check_if_filter_in_filter_dictionary(filter_name)Checks if the filter designation (string) given exists in the filter dictionary
close()Close the ASI Filter Wheel serial port.
connect(port[, baudrate, timeout])Build ASIFilterWheel Serial Port connection
Disconnect from serial device.
filter_change_delay(filter_name)Estimate duration of time necessary to move the filter wheel
set_filter(filter_name[, wait_until_done])Change the filter wheel to the filter designated by the filter position argument.
Attributes
- check_if_filter_in_filter_dictionary(filter_name: str) → bool
Checks if the filter designation (string) given exists in the filter dictionary
- Parameters:
filter_name (str) – Name of filter.
- Returns:
filter_exists – Flag if filter exists in the filter dictionary.
- Return type:
bool
- Raises:
ValueError – If filter name is not in the filter dictionary.
- close() → None
Close the ASI Filter Wheel serial port.
Sets the filter wheel to the home position and then closes the port.
- classmethod connect(port: str, baudrate: int = 115200, timeout: float = 0.25) → navigate.model.devices.APIs.asi.asi_tiger_controller.TigerController
Build ASIFilterWheel 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.
- filter_change_delay(filter_name: str) → None
Estimate duration of time necessary to move the filter wheel
Assumes that it is ~40ms per adjacent position. Depends on filter wheel parameters and load.
- Parameters:
filter_name (str) – Name of filter to move to.
- set_filter(filter_name: str, wait_until_done=True) → None
Change the filter wheel to the filter designated by the filter position argument.
- Parameters:
filter_name (str) – Name of filter to move to.
wait_until_done (bool) – Waits duration of time necessary for filter wheel to change positions.
- configuration_schema = {'available_filters': CollectionSpec(item_schema={'name': SettingSpec(value_type=<class 'str'>, default=None, label='Filter Name', help_text='Display name for this filter position.', 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 'int'>, default=None, label='Position', help_text='Numeric position used by the filter-wheel controller.', choices=None, choice_values=None, minimum=0, exclusive_minimum=None, maximum=99, step=1, required=True, dynamic_source=None, depends_on=None)}, storage='mapping', key_field='name', value_field='position', storage_fields=None, label='Available Filters', help_text='Filter names and their corresponding wheel positions.', dynamic_source=None, minimum_items=1, none_option_label=None), 'filter_wheel_delay': SettingSpec(value_type=<class 'float'>, default=0.03, label='Filter Wheel Delay (s)', help_text='Estimated delay in seconds while the filter wheel changes position.', choices=None, choice_values=None, minimum=0, exclusive_minimum=None, maximum=60, step=0.001, required=True, dynamic_source=None, depends_on=None), 'hardware/wheel_number': SettingSpec(value_type=<class 'int'>, default=0, label='Wheel Number', help_text='Filter wheel identifier used by its controller. Some controllers use zero-based wheel numbers.', choices=None, choice_values=None, minimum=0, exclusive_minimum=None, maximum=16, step=1, required=True, dynamic_source=None, depends_on=None), 'name': SettingSpec(value_type=<class 'str'>, default='', label='Name', help_text='Display name for this filter wheel in the main application.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None)}
- device_connection
Device connection object.
- Type:
Any
- device_name
Name of the device, used as a unique identifier.
- Type:
str
- filter_dictionary
Dictionary of filters available on the filter wheel.
- Type:
dict
- filter_wheel_number
index of filter wheel
- Type:
int
- filter_wheel_position
Filter wheel position.
- Type:
int
- unique_id
Unique identifier for the device,
serial_followed by the port.- Type:
str
- wait_until_done_delay
Delay for filter wheel to change positions.
- Type:
float
- wheel_position
Filter wheel position.
- Type:
int