Skip to content

Commit 8fc54c3

Browse files
committed
Merge branch 'add-galvo-square-wave' into develop
# Conflicts: # docs/source/02_user_guide/01_supported_hardware/galvo.rst # test/model/devices/galvo/test_galvo_base.py
2 parents f09abe3 + 4ec86a4 commit 8fc54c3

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎docs/source/02_user_guide/01_supported_hardware/galvo.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ For NI and synthetic galvos, the software supports the following waveform option
2020

2121
The ``pulse`` waveform is useful for resonant galvos and other devices that need
2222
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.
23+
delay, holds the configured galvo amplitude through the acquisition window, and
24+
clears the final waveform sample to return the output low.
2425

2526
.. collapse:: Configuration File
2627

‎test/model/devices/galvo/test_galvo_base.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def test_adjust_halfsaw_uses_expected_extreme(amplitude, source_wave):
229229
assert waveforms["channel_1"][1] == pytest.approx(source_wave[1])
230230

231231

232-
def test_adjust_pulse_waveform_respects_camera_delay():
232+
def test_adjust_pulse_waveform_respects_camera_delay_and_clears_final_sample():
233233
config = build_base_configuration(
234234
waveform="pulse",
235235
amplitude="1.0",
@@ -251,8 +251,9 @@ def test_adjust_pulse_waveform_respects_camera_delay():
251251
high_indices = np.flatnonzero(waveform > 0.5)
252252
assert waveform.shape == (100,)
253253
assert high_indices[0] == 10
254-
assert high_indices[-1] == 99
255-
assert len(high_indices) == 90
254+
assert high_indices[-1] == 98
255+
assert len(high_indices) == 89
256+
assert waveform[-1] == 0
256257

257258

258259
def test_adjust_unknown_waveform_sets_channel_to_none():

0 commit comments

Comments
 (0)