Skip to content

Commit ba98107

Browse files
Redundant logic removed
1 parent 4c6169c commit ba98107

File tree

3 files changed

+1
-78
lines changed

3 files changed

+1
-78
lines changed

src/navigate/model/devices/APIs/asi/asi_tiger_controller.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,6 @@ def square_wave(self, on_time: int, delay_time: int) -> None:
955955
delay_time : int
956956
Delay time in quarter milliseconds
957957
"""
958-
959958
commands = [
960959
"CCA X=0",
961960
"M E=2",
@@ -993,7 +992,6 @@ def logic_card_on(self, axis: str) -> None:
993992
axis : str
994993
The axis of the logic card
995994
"""
996-
997995
axis = int(axis) + 32
998996
self.send_command(f"6 M E = {axis}\r")
999997
self.read_response()
@@ -1031,8 +1029,6 @@ def SA_waveform(
10311029
offset: int
10321030
sets the center position of the waveform
10331031
"""
1034-
1035-
# TODO: Verify if this is for synchronous or asynchronous
10361032
self.send_command(f"SAP {axis}={waveform}")
10371033
self.read_response()
10381034
self.send_command(f"SAA {axis}={amplitude}")
@@ -1056,6 +1052,5 @@ def SAM(self, axis: str, mode: int) -> None:
10561052
mode: int
10571053
Integer code.
10581054
"""
1059-
10601055
self.send_command(f"SAM {axis}={mode}")
10611056
self.read_response()

src/navigate/model/devices/galvo/asi.py

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -84,45 +84,7 @@ def __init__(
8484
#: int: Galvo ID.
8585
self.galvo_id = device_id
8686

87-
#: str: Name of the NI port for galvo control.
88-
self.trigger_source = configuration["configuration"]["microscopes"][
89-
microscope_name
90-
]["daq"]["trigger_source"]
91-
92-
#: str: Name of the galvo.
93-
self.galvo_name = "Galvo " + str(device_id)
94-
95-
#: dict: Dictionary of device connections.
96-
self.device_config = configuration["configuration"]["microscopes"][
97-
microscope_name
98-
]["galvo"][device_id]
99-
100-
#: int: Sample rate.
101-
self.sample_rate = configuration["configuration"]["microscopes"][
102-
microscope_name
103-
]["daq"]["sample_rate"]
104-
105-
#: float: Sweep time.
106-
self.sweep_time = 0
107-
108-
#: float: Camera delay
109-
self.camera_delay = (
110-
configuration["configuration"]["microscopes"][microscope_name]["camera"][
111-
"delay"
112-
]
113-
/ 1000
114-
)
115-
116-
#: float: Galvo max voltage.
117-
self.galvo_max_voltage = self.device_config["hardware"]["max"]
118-
119-
#: float: Galvo min voltage.
120-
self.galvo_min_voltage = self.device_config["hardware"]["min"]
121-
122-
# Galvo Waveform Information
123-
#: str: Galvo waveform. Waveform or Sawtooth.
124-
self.galvo_waveform = self.device_config.get("waveform", "sawtooth")
125-
87+
#: str: Galvo Axis
12688
self.axis = self.device_config["hardware"]["axis"]#.get("axis","B")
12789
logger.debug(f'galvo axis: {self.axis}')
12890

src/navigate/model/devices/remote_focus/asi.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -77,40 +77,6 @@ def __init__(
7777
#: Any: Device connection object.
7878
self.remote_focus = device_connection
7979

80-
#: dict: Configuration dictionary.
81-
self.configuration = configuration
82-
83-
#: str: Name of the microscope.
84-
self.microscope_name = microscope_name
85-
86-
#: dict: Remote focus device parameters.
87-
self.device_config = configuration["configuration"]["microscopes"][
88-
microscope_name
89-
]["remote_focus"]
90-
91-
#: float: Sweep time of the DAQ.
92-
self.sweep_time = 0
93-
94-
#: float: Camera delay percent.
95-
self.camera_delay = (
96-
configuration["configuration"]["microscopes"][microscope_name]["camera"][
97-
"delay"
98-
]
99-
/ 1000
100-
)
101-
102-
# Waveform Parameters
103-
#: float: Remote focus max voltage.
104-
self.remote_focus_max_voltage = self.device_config["hardware"]["max"]
105-
106-
#: float: Remote focus min voltage.
107-
self.remote_focus_min_voltage = self.device_config["hardware"]["min"]
108-
109-
#: str: The trigger source (e.g., physical channel).
110-
self.trigger_source = configuration["configuration"]["microscopes"][
111-
microscope_name
112-
]["daq"]["trigger_source"]
113-
11480
#: str: Output axis on Tiger Controller
11581
self.axis = self.device_config["hardware"]["axis"]
11682

0 commit comments

Comments
 (0)