You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f09abe3
Browse filesBrowse the repository at this point in the historyBrowse files
Optional "pulse" waveform option for galvo (#1226)
* Optional "pulse" waveform option for galvo
Pretty basic pulse, delayed by camera delay and lasting sweep time duration.
Goal is to have a simple pulse which can run the resonant galvo while acquiring.
* Document and correct galvo pulse waveform
Expose the new galvo pulse waveform in the configuration selector and user documentation so NI and synthetic galvo users can choose it explicitly.
The underlying single_pulse waveform expects delay and pulse_width values as percentages of the sweep, but the galvo pulse branch was passing camera_delay / sweep_time as a fractional ratio. Convert the camera delay to percent before calling single_pulse and derive the remaining pulse width from that percent value.
Add a regression test that uses the real SyntheticGalvo adjust path with a 10 ms camera delay over a 100 ms sweep. The test verifies the pulse starts after the expected delay and remains active for the rest of the sweep.
Validation: python -m pytest -o addopts='' test/model/devices/galvo/test_galvo_base.py test/model/test_waveforms.py -q; ruff check/format on changed Python files; git diff --check.
* Need [0] at the end of single_pulse
Last sample in single_pulse must be zero to clear the buffer, or else the galvo never shuts off.
I did this before by making the pulse width max 99%, but better to just set the last sample to zero.
---------
Co-authored-by: Kevin M. Dean <kevin.dean@utsouthwestern.edu>
Copy file name to clipboardExpand all lines: docs/source/02_user_guide/01_supported_hardware/galvo.rst
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,12 @@ National Instruments
15
15
Multiple types of galvanometers have been used, including Cambridge Technologies/Novanta, Thorlabs, and ScannerMAX. Each of these devices are externally controlled via analog signals delivered from an NI-based data acquisition card.
16
16
17
17
For NI and synthetic galvos, the software supports the following waveform options:
18
-
``sawtooth``, ``sine``, ``halfsaw``, ``quadratic``, and ``centered_cubic``.
18
+
``sawtooth``, ``sine``, ``halfsaw``, ``quadratic``, ``centered_cubic``, and
19
+
``pulse``.
20
+
21
+
The ``pulse`` waveform is useful for resonant galvos and other devices that need
22
+
a constant analog command during acquisition. It waits for the configured camera
23
+
delay, then holds the configured galvo amplitude for the rest of the sweep.
19
24
20
25
.. collapse:: Configuration File
21
26
@@ -38,7 +43,7 @@ For NI and synthetic galvos, the software supports the following waveform option
0 commit comments