navigate.model.devices.filter_wheel.ni.NIFilterWheel
- class navigate.model.devices.filter_wheel.ni.NIFilterWheel(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0)
Bases:
FilterWheelBase,NIDeviceDAQFilterWheel - Class for controlling filter wheels with a DAQ.
- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], device_id: int = 0) → None
Initialize the DAQFilterWheel class.
- Parameters:
microscope_name (str) – Name of the microscope.
device_connection (Any) – The communication instance with the device.
configuration (Dict[str, Any]) – Global configuration dictionary.
device_id (int) – The ID of the device. Default is 0.
Methods
__init__(microscope_name, device_connection, ...)Initialize the DAQFilterWheel class.
check_if_filter_in_filter_dictionary(filter_name)Checks if the filter designation (string) given exists in the filter dictionary
close()Close the DAQ 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 DAQ Filter Wheel
Sets the filter wheel to the home position and then closes the port.
- set_filter(filter_name: str, wait_until_done: bool = True) → None
Change the filter wheel to the filter designated by the filter position argument. Requires a digital port on the DAQ.
- 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 selection.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'channel': SettingSpec(value_type=<class 'str'>, default=None, label='NI DAQ DO Channel Name', help_text='NI digital-output line that selects this filter.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None)}, storage='mapping', key_field='name', value_field='channel', storage_fields=None, label='Available Filters', help_text='Filter names and the NI DAQ digital output line used for each.', dynamic_source=None, minimum_items=1, none_option_label=None)}
- device_connection
Device connection object.
- Type:
Any
- filter_dictionary
Dictionary of filters available on the filter wheel.
- Type:
dict
- filter_wheel_number
index of filter wheel
- Type:
int
- filter_wheel_value = {}
- wait_until_done_delay
Delay for filter wheel to change positions.
- Type:
float
- wheel_position
Filter wheel position.
- Type:
int