Skip to content

ASI RFVC Changes to be merged in Navigate #1099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
1ba1a81
Create asi.py
EashaS Mar 21, 2025
0150f56
adds ramp wave to rfvc
vmcspadden Apr 4, 2025
a3d2e4e
class init for asidaq
joelaugustine099 Apr 4, 2025
11ee2c3
Update asi_tiger_controller.py
EashaS Apr 8, 2025
07046df
Update asi.py
EashaS Apr 8, 2025
51d4559
Update asi.py
EashaS Apr 8, 2025
074cba4
Update asi.py
EashaS Apr 8, 2025
a17aae7
prepare acquisition
joelaugustine099 Apr 8, 2025
2ac3ec1
Update asi.py
EashaS Apr 8, 2025
2fe12a9
Merge branch 'asi_daq' of https://github.com/Daniel-Buckelew/etagivan…
EashaS Apr 8, 2025
90e0004
adds triangle wave
vmcspadden Apr 10, 2025
5e0d2dc
sends the correct SAP command for the ramp wave
vmcspadden Apr 11, 2025
1f8c3f0
adds setup loop to API and adds close and turn off functions
vmcspadden Apr 11, 2025
e2864e0
fixed setup loop
vmcspadden Apr 11, 2025
76b6e1b
create_analog_outputs
joelaugustine099 Apr 11, 2025
bc549eb
Merge branch 'asi_daq' of https://github.com/Daniel-Buckelew/etagivan…
joelaugustine099 Apr 11, 2025
adb6f9b
Merge branch 'asi_daq' into victoria/rfvc
Daniel-Buckelew Apr 11, 2025
1e13f82
Merge pull request #10 from Daniel-Buckelew/victoria/rfvc
Daniel-Buckelew Apr 11, 2025
2240a65
logic_Cell_on cmds
joelaugustine099 Apr 11, 2025
71e3975
Changes made to make things functions
Daniel-Buckelew Apr 14, 2025
3a6aeb1
Maybe this improves things.
Daniel-Buckelew Apr 14, 2025
a285c3d
Update asi.py
AdvancedImagingUTSW Apr 23, 2025
7db8435
The Navigate crashing error is resolved.
Daniel-Buckelew Apr 23, 2025
b7a0f84
The awkward cahnges to try and make stuff work.
Daniel-Buckelew Apr 24, 2025
f6f6864
start daq calls start device
joelaugustine099 Apr 29, 2025
6290ca6
Revert "start daq calls start device"
joelaugustine099 Apr 30, 2025
fa48620
DAQ now effectively runs as another serial device. Hopefully this wor…
Daniel-Buckelew Apr 30, 2025
e401072
Merge branch 'asi_daq' of https://github.com/Daniel-Buckelew/etagivan…
Daniel-Buckelew Apr 30, 2025
fb8c165
Revert "Merge branch 'asi_daq' of https://github.com/Daniel-Buckelew/…
Daniel-Buckelew Apr 30, 2025
c3ba1bf
Removing unnecessary catch
Daniel-Buckelew Apr 30, 2025
e17cf99
Makes name not hard coded
joelaugustine099 Apr 30, 2025
b81cc65
Setup_control_loop is mostly correct and waveforms can be measured.
Daniel-Buckelew Apr 30, 2025
84082ca
Making documentation changes.
Daniel-Buckelew May 1, 2025
3048fce
Getting RFVC to work with daq setup control loop
Daniel-Buckelew May 2, 2025
3028db2
Merge branch 'develop' into asi_daq
Daniel-Buckelew May 2, 2025
1665fbd
pulls sweep_time value, intifies galvo waveform periods
joelaugustine099 May 4, 2025
8678b6c
small changes to troubleshoot galvo
joelaugustine099 May 4, 2025
7d96c33
cell 3 and cell 7 delays put in
joelaugustine099 May 5, 2025
0b7cd7f
Fixed SA_waveform to operate as intended
joelaugustine099 May 5, 2025
9bad958
fixes amplitude and offset, makes galvo sawtooth triangle, modifies a…
joelaugustine099 May 6, 2025
1a00b35
Commented out the shutter physical ouput.
Daniel-Buckelew May 6, 2025
112591b
copied Victoria's changes in
joelaugustine099 May 6, 2025
2f3d347
Merge branch 'asi_daq' of https://github.com/Daniel-Buckelew/etagivan…
joelaugustine099 May 6, 2025
a48af84
period for 50% makes it even
joelaugustine099 May 6, 2025
0982e0e
Rounding for odd number periods for Galvo 50% sawtooth
Daniel-Buckelew May 6, 2025
d8b7cde
Added post trigger delay and galvo 2 delay to the control loop
Daniel-Buckelew May 6, 2025
64b9eb7
delays calculation
joelaugustine099 May 6, 2025
6a2cd4d
analog outputs
joelaugustine099 May 6, 2025
372ed45
intifies periods[0]
joelaugustine099 May 6, 2025
6b639b4
int(round(period))
joelaugustine099 May 7, 2025
d5810fa
int(round(period)) for RFVC and Galvo
joelaugustine099 May 8, 2025
618eb7c
Actually synchronized with phases
joelaugustine099 May 8, 2025
9895647
doesn't pass period to setup control loop
joelaugustine099 May 8, 2025
a628c3e
cleaned up some code, commented, pulled camera and rfvc delays into A…
joelaugustine099 May 8, 2025
518434d
Adding camera delay and rfvc delay to workable features
Daniel-Buckelew May 8, 2025
9d6f110
Reordering the TTL in the hardcode.
Daniel-Buckelew May 8, 2025
f7b246d
Making things fast as heck
Daniel-Buckelew May 9, 2025
fa47761
Making things fast pt. 2
Daniel-Buckelew May 9, 2025
39596bd
Maybe this did something?
Daniel-Buckelew May 9, 2025
43ea873
Final touches to fix minor bugs in frequency etc.
Daniel-Buckelew May 9, 2025
e493c14
Axis from config
joelaugustine099 May 14, 2025
0e49218
Tweaknig the galvo assignment to work more correctly.
Daniel-Buckelew May 16, 2025
7986977
Merge pull request #16 from Daniel-Buckelew/asi_daq
Daniel-Buckelew May 16, 2025
b0a9378
rfvc documentation and comments
vmcspadden May 21, 2025
f1d3f2f
Merge pull request #17 from Daniel-Buckelew/rfvc_pr
Daniel-Buckelew May 22, 2025
be425bc
added info to config database and fixed documentation
vmcspadden Jun 4, 2025
55df284
Merge branch 'rfvc_pr' of https://github.com/Daniel-Buckelew/etagivan…
vmcspadden Jun 4, 2025
b9853d2
added some information to documentation
vmcspadden Jun 4, 2025
81eacf1
Packaging adjustment
Daniel-Buckelew Jun 4, 2025
0e86e05
More packaging adjustments
Daniel-Buckelew Jun 4, 2025
a5d94fa
Removing Galvo for it's own pull request
Daniel-Buckelew Jun 4, 2025
7a826e2
Pulling in the changes from the Laser PR
Daniel-Buckelew Jun 4, 2025
683edfe
Removing DAQ text and reorganizing some things
Daniel-Buckelew Jun 5, 2025
1c78126
Merge branch 'develop' into rfvc_pr
joelaugustine099 Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/source/02_user_guide/01_supported_hardware/remote_focus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,34 @@ Optotune Focus Tunable Lens

------------------

ASI
---

The ASI Tiger Controller has a few limitations for the analog signals. First, the
minimum voltage must be zero volts. Second, the period value needs to be a whole number.

There are two analog waveforms offered, triangle and ramp waves. The triangle waveform is
a periodic analog waveform, with no delay periods. The sawtooth waveform is a periodic
analog waveform with a delay period between each cycle.

.. collapse:: Configuration File

.. code-block:: yaml

microscopes:
microscope_name:
remote_focus_device:
hardware:
type: ASI
axis: A
min: 0
max: 5
port: COM2
baudrate: 9600
|

------------------

Synthetic Remote Focus Device
-----------------------------
If no remote focus device is present, one must configure the software to use a synthetic
Expand Down
2 changes: 2 additions & 0 deletions src/navigate/config/configuration_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,14 @@
remote_focus_device_types = {
"Equipment Solutions": ("EquipmentSolutions", "equipment_solutions"),
"Analog Device": ("NI", "ni"),
"ASI Device": ("ASI", "asi"),
"Virtual Device": ("Synthetic", "synthetic"),
}

remote_focus_hardware_widgets = {
"type": ["Device Type", "Combobox", "string", remote_focus_device_types, None],
"channel": ["DAQ Channel", "Input", "string", None, "Example: PXI6259/ao3"],
"axis": ["Device Type", "Input", "string", None, "Example: A"],
"min": [
"Minimum Voltage",
"Spinbox",
Expand Down
2 changes: 1 addition & 1 deletion src/navigate/model/device_startup_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def start_daq(configuration: Dict[str, Any], device_type: str = "NI") -> DAQBase
from navigate.model.devices.daq.ni import NIDAQ

return NIDAQ(configuration)

elif device_type.lower().startswith("synthetic"):
from navigate.model.devices.daq.synthetic import SyntheticDAQ

Expand Down
66 changes: 66 additions & 0 deletions src/navigate/model/devices/APIs/asi/asi_tiger_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,3 +1010,69 @@ def logic_card_off(self, axis : str) -> None:
self.read_response()
self.send_command(f'6 CCA Z=0\r')
self.read_response()

def logic_cell_on(self, axis : str):
Copy link
Collaborator

@AdvancedImagingUTSW AdvancedImagingUTSW Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add numpydoc commenting

self.send_command(f'M E = {axis}\r')
self.read_response()
self.send_command(f'CCA Z=1\r')
self.read_response()

def logic_cell_off(self, axis :str):
self.send_command(f'M E = {axis}\r')
self.read_response()
self.send_command(f'CCA Z=0\r')
self.read_response()

def SA_waveform(self, axis:str, waveform=0, amplitude=1000, offset=500, frequency=1000):
"""Programs the analog waveforms using SAA, SAO, and SAP
Default waveform is a sawtooth waveform with an amplitude of 1V with an offset of 0.5V

Parameters
----------
axis: str
Tiger Controller axis
waveform:
Type of waveform pattern according to https://asiimaging.com/docs/commands/sap
amplitude:
amplitude of the waveform in mV
offset:
sets the center position of the waveform in mV
frequency:
sets the period of the waveform in milliseconds
"""

"Verify if this is for synchronous or asynchronous"
print(f"Period (ms): {frequency}")
Copy link
Preview

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or replace the debug print statement with proper logging to avoid unintended console output in production.

Suggested change
print(f"Period (ms): {frequency}")
logging.debug(f"Period (ms): {frequency}")

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adopt recommended change to log this information, not print it to the console.

if (waveform % 128 == 3):
offset = .5*(offset+amplitude)
amplitude = amplitude*2

self.send_command(f"3 SAP {axis}={waveform}")
self.read_response()
self.send_command(f"3 SAA {axis}={amplitude}")
self.read_response()
self.send_command(f"3 SAO {axis}={offset}")
self.read_response()
self.send_command(f"3 SAF {axis}={frequency}")
self.read_response()

def SAM(self, axis: str, mode: int):
"""Sets the single-axis mode according to the integer code.

0: stops waveforms if they are running
1: starts generating the waveform pattern
2: waveform only runs for one cycle, then waits for another trigger
3: starts generating the waveform pattern, restarts the other waveform on the same card
4: starts generating the waveform, free running after the trigger

Parameters
----------
axis: str
Laser axis
mode:
Integer code
"""

self.send_command(f"3 SAM {axis}={mode}")
self.read_response()

Loading