Skip to content

Commit

Permalink
Merge pull request #916 from TheDeanLab/conor-develop-20240503-update
Browse files Browse the repository at this point in the history
Conor develop 20240503 update
  • Loading branch information
AdvancedImagingUTSW authored Jun 6, 2024
2 parents 072e9bc + e1cb80e commit f77ffba
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 39 deletions.
64 changes: 64 additions & 0 deletions docs/source/user_guide/hardware/filter_wheel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,70 @@ for the stage. A single communication instance is used for both the stage and fi
--------------

LUDL Electronic Products
------------------

MAC6000
~~~~~~~

.. note::
Currently, the software only supports a single filter wheel for the MAC6000
device. Should additional filter wheels be necessary, please reach out to the
**navigate** team by placing a feature request on GitHub.


.. collapse:: Configuration File

.. code-block:: yaml
microscopes:
microscope_name:
filter_wheel:
hardware:
type: LUDLFilterWheel
wheel_number: 1
port: COM1
baudrate: 9600
filter_wheel_delay: 0.03
available_filters:
Empty-Alignment: 0
GFP: 1
RFP: 2
Far-Red: 3
|
-------------

Analog/Digital Devices
------------------

Some manufacturers provide filter wheels that are controlled by analog or digital signals.
Here, each digital signal corresponds to a filter position. The user must specify the
number of filters in the filter wheel and the digital signal that corresponds to each
filter position.

.. collapse:: Configuration File

.. code-block:: yaml
microscopes:
microscope_name:
filter_wheel:
hardware:
type: NI
wheel_number: 1
filter_wheel_delay: 0.050
available_filters:
473nm: Dev2/port0/line1
561nm: Dev2/port0/line3
638nm: Dev2/port0/line5
Empty: Dev2/port0/line7
|
-------------

Synthetic Filter Wheel
----------------------
If no filter wheel is present, one must configure the software to use a synthetic
Expand Down
87 changes: 68 additions & 19 deletions src/navigate/config/configuration_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@
{"On": 2.0, "Off": 1.0},
None,
],
"delay": ["Delay (ms)", "Spinbox", "float", {"from": 0, "to": 100, "step": 0.1}, None],
"settle_down": ["Settle Down (ms)", "Spinbox", "float", {"from": 0, "to": 100, "step": 0.1}, None],
"delay": [
"Delay (ms)",
"Spinbox",
"float",
{"from": 0, "to": 100, "step": 0.1},
None,
],
"settle_down": [
"Settle Down (ms)",
"Spinbox",
"float",
{"from": 0, "to": 100, "step": 0.1},
None,
],
"flip_x": ["Flip X", "Checkbutton", "bool", None, None],
"flip_y": ["Flip Y", "Checkbutton", "bool", None, None],
"supported_channel_count": [
Expand All @@ -46,6 +58,8 @@
filter_wheel_device_types = {
"Sutter Instruments": "SutterFilterWheel",
"Applied Scientific Instrumentation": "ASI",
"Ludl Electronic Products": "LUDLFilterWheel",
"Analog/Digital Device": "NI",
"Virtual Device": "synthetic",
}

Expand Down Expand Up @@ -164,17 +178,45 @@
stage_hardware_widgets = {
"type": ["Device Type", "Combobox", "string", stage_device_types, None],
"serial_number": ["Serial Number", "Input", "string", None, None],
"axes": ["Axes", "Input", "string", None,"Example: [x, y, z, theta, f]", "[x, y, z]"],
"axes_mapping": ["Axes Mapping", "Input", "string", None, "Example: [X, M, Y, D, E]", "[X, M, Y]"],
"feedback_alignment": ["Feedback Alighment", "Input", "string", None, "*ASI stage only. Example: [90, 90, 90, 0, 90]", "[90, 90, 90]"],
"device_units_per_mm": ["Device Units Per Micron", "Input", "float", None, "*KST101 only. Example: 2000.0", 1000.25],
"axes": [
"Axes",
"Input",
"string",
None,
"Example: [x, y, z, theta, f]",
"[x, y, z]",
],
"axes_mapping": [
"Axes Mapping",
"Input",
"string",
None,
"Example: [X, M, Y, D, E]",
"[X, M, Y]",
],
"feedback_alignment": [
"Feedback Alighment",
"Input",
"string",
None,
"*ASI stage only. Example: [90, 90, 90, 0, 90]",
"[90, 90, 90]",
],
"device_units_per_mm": [
"Device Units Per Micron",
"Input",
"float",
None,
"*KST101 only. Example: 2000.0",
1000.25,
],
"volts_per_micron": [
"Volts Per Micron",
"Input",
"string",
None,
"*Analog/Digital Device only. Example: '0.1*x+0.05'",
"0.1*x+0.05"
"0.1*x+0.05",
],
"min": [
"Minimum Volts",
Expand All @@ -193,20 +235,20 @@
5,
],
"distance_threshold": [
"Distance Threshold",
"Distance Threshold",
"Spinbox",
"float",
{"from": 0, "to": 100, "step": 1},
"*Analog-Controlled Galvo/Peizo only",
5
5,
],
"settle_duration_ms": [
"Settle Duration (ms)",
"Spinbox",
"float",
{"from": 0, "to": 100, "step": 1},
"*Analog-Controlled Galvo/Peizo only",
20
20,
],
"controllername": [
"Controller Name",
Expand Down Expand Up @@ -250,62 +292,69 @@
}

stage_constants_widgets = {
"joystick_axes": ["Joystick Axes", "Input", "string", None, "Example: [x, y, z]", "[x, y, z]"],
"joystick_axes": [
"Joystick Axes",
"Input",
"string",
None,
"Example: [x, y, z]",
"[x, y, z]",
],
"x_min": [
"Min X",
"Spinbox",
"float",
{"from": -100000, "to": 100000, "step": 1000},
None,
-10000
-10000,
],
"x_max": [
"Max X",
"Spinbox",
"float",
{"from": 0, "to": 100000, "step": 1000},
None,
10000
10000,
],
"y_min": [
"Min Y",
"Spinbox",
"float",
{"from": -100000, "to": 100000, "step": 1000},
None,
-10000
-10000,
],
"y_max": [
"Max Y",
"Spinbox",
"float",
{"from": 0, "to": 100000, "step": 1000},
None,
10000
10000,
],
"z_min": [
"Min Z",
"Spinbox",
"float",
{"from": -100000, "to": 10000, "step": 1000},
None,
-10000
-10000,
],
"z_max": [
"Max Z",
"Spinbox",
"float",
{"from": 0, "to": 100000, "step": 1000},
None,
10000
10000,
],
"theta_min": [
"Min Theta",
"Spinbox",
"float",
{"from": 0, "to": 360, "step": 1},
None,
0
0,
],
"theta_max": [
"Max Theta",
Expand Down Expand Up @@ -450,7 +499,7 @@
"float",
{"from": 0, "to": 10, "step": 0.1},
"Example: 1.57",
0
0,
],
"button_1": ["Delete", "Button", {"delete": True}],
"frame_config": {
Expand Down
18 changes: 18 additions & 0 deletions src/navigate/model/device_startup_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,17 @@ def load_filter_wheel_connection(configuration, is_synthetic=False, plugin_devic
exception=Exception,
)

elif device_type == "LUDLFilterWheel":
from navigate.model.devices.filter_wheel.filter_wheel_ludl import (
build_filter_wheel_connection,
)

return auto_redial(
build_filter_wheel_connection,
(device_info["port"], device_info["baudrate"], 0.25),
exception=Exception,
)

elif device_type == "ASI":
from navigate.model.devices.filter_wheel.filter_wheel_asi import (
build_filter_wheel_connection,
Expand Down Expand Up @@ -933,6 +944,13 @@ def start_filter_wheel(

return SutterFilterWheel(microscope_name, device_connection, configuration)

elif device_type == "LUDLFilterWheel":
from navigate.model.devices.filter_wheel.filter_wheel_ludl import (
LUDLFilterWheel,
)

return LUDLFilterWheel(microscope_name, device_connection, configuration)

elif device_type == "ASI":
from navigate.model.devices.filter_wheel.filter_wheel_asi import ASIFilterWheel

Expand Down
Loading

0 comments on commit f77ffba

Please sign in to comment.