navigate.model.devices.filter_wheel.filter_wheel_synthetic.SyntheticFilterWheel
- class navigate.model.devices.filter_wheel.filter_wheel_synthetic.SyntheticFilterWheel(device_connection, device_config)
Bases:
FilterWheelBase
SyntheticFilterWheel Class
- comport
Comport for communicating with the filter wheel, e.g., COM1.
- Type:
str
- baudrate
Baud rate for communicating with the filter wheel, e.g., 9600.
- Type:
int
- filter_dictionary
Dictionary with installed filter names, e.g., filter_dictionary = {‘GFP’, 0}.
- Type:
dict
- number_of_filter_wheels
Number of installed filter wheels.
- Type:
int
- wheel_position
Default filter wheel position
- Type:
int
- wait_until_done_delay = float
Duration of time to wait for a filter wheel change.
- wait_until_done = bool
Flag for enabling the wait period for a filter wheel change.
- __init__(device_connection, device_config)
Initialize the FilterWheelBase class.
- Parameters:
device_connection (dict) – Dictionary of device connections.
device_config (dict) – Dictionary of device configuration parameters.
Methods
__init__
(device_connection, device_config)Initialize the FilterWheelBase class.
check_if_filter_in_filter_dictionary
(filter_name)Checks if the filter designation (string) given exists in the filter dictionary
close
()Close the SyntheticFilterWheel.
filter_change_delay
(filter_name)Calculate duration of time necessary to change filter wheel positions
read
(num_bytes)Reads the specified number of bytes from the serial port.
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)
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()
Close the SyntheticFilterWheel.
Sets the filter wheel to the Empty-Alignment position and then closes the port.
- filter_change_delay(filter_name)
Calculate duration of time necessary to change filter wheel positions
- Parameters:
filter_name (str) – Name of the filter that we want to move to
- read(num_bytes)
Reads the specified number of bytes from the serial port.
- Parameters:
num_bytes (int) – Number of bytes to read from the serial port.
- set_filter(filter_name, wait_until_done=True)
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.
- filter_dictionary
Dictionary of filters available on the filter wheel.
- Type:
dict
- filter_wheel_number
index of filter wheel
- Type:
int
- wheel_position
Filter wheel position.
- Type:
int