navigate.model.devices.filter_wheel.sutter.SutterFilterWheel
- class navigate.model.devices.filter_wheel.sutter.SutterFilterWheel(device_connection, device_config)
Bases:
FilterWheelBase
SutterFilterWheel - Class for controlling Sutter Lambda Filter Wheels
Note
Additional information on the Sutter Lambda 10-B can be found at: https://www.sutter.com/manuals/LB10-3_OpMan.pdf
- __init__(device_connection, device_config)
Initialize the SutterFilterWheel class.
- Parameters:
device_connection (serial.Serial) – The communication instance with the filter wheel.
device_config (Dict[str, Any]) – Dictionary of device configuration parameters.
Methods
__init__
(device_connection, device_config)Initialize the SutterFilterWheel class.
check_if_filter_in_filter_dictionary
(filter_name)Checks if the filter designation (string) given exists in the filter dictionary
close
()Close the SutterFilterWheel serial port.
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
Serial port connection to the filter wheel.
Wait until filter wheel has completed movement.
Delay in s for the wait until done function.
Read on initialization.
Filter wheel speed.
Delay matrix for filter wheel.
Software initialization complete flag.
- 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 SutterFilterWheel serial port.
Sets the filter wheel to the Empty-Alignment position and then closes the port.
- filter_change_delay(filter_name: str) → None
Calculate duration of time necessary to change filter wheel positions.
Calculate duration of time necessary to change filter wheel positions. Identifies the number of positions that must be switched, and then retrieves the duration of time necessary to perform the switch from self.delay_matrix.
- Parameters:
filter_name (str) – Name of filter that we want to move to.
Note
Detailed information on timing located on page 38: https://www.sutter.com/manuals/LB10-3_OpMan.pdf
- Warns:
Delay matrix should be model specific.
- Returns:
If the filter wheel position is out of range.
- Return type:
Index Error
- read(num_bytes: int) → bytes
Reads the specified number of bytes from the serial port.
- Parameters:
num_bytes (int) – Number of bytes to read from the serial port.
- Returns:
response – The bytes read from the serial port.
- Return type:
bytes
- Raises:
UserWarning – The serial port to the Sutter Lambda 10-B is on, but it isn’t responding as expected.
- set_filter(filter_name: str, wait_until_done: bool = 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.
- delay_matrix
Delay matrix for filter wheel.
- Type:
np.matrix
- device_config
Dictionary of device configuration parameters.
- Type:
Dict[str, Any]
- 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
- init_finished
Software initialization complete flag.
- Type:
bool
- read_on_init
Read on initialization.
- Type:
bool
- serial
Serial port connection to the filter wheel.
- Type:
serial.Serial
- speed
Filter wheel speed.
- Type:
int
- wait_until_done
Wait until filter wheel has completed movement.
- Type:
bool
- wait_until_done_delay
Delay in s for the wait until done function.
- Type:
float
- wheel_position
Filter wheel position.
- Type:
int