Skip to content

Add dither support to remote focus waveforms#1205

Closed
AdvancedImagingUTSW wants to merge 1 commit intodevelopfrom
ut-dallas
Closed

Add dither support to remote focus waveforms#1205
AdvancedImagingUTSW wants to merge 1 commit intodevelopfrom
ut-dallas

Conversation

@AdvancedImagingUTSW
Copy link
Collaborator

Introduce dither amplitude/frequency parameters for remote-focus channels and wire them through config, UI, model and tests.

  • config: add default string keys ("dither_amplitude", "dither_frequency") in verify_waveform_constants and include entries in waveform_constants.yml.
  • view: add Dither Amplitude and Dither Frequency inputs to WaveformParameterPopupWindow.
  • controller: WaveformPopupController now tracks dither variables, traces, validation, UI configuration, and stores values with existing amplitude/offset settings; enables/disables dither controls when live mode toggles.
  • model: RemoteFocusBase gains robust parsing helper get_remote_focus_setting to coerce and validate string inputs, reads dither settings, and if both dither amplitude and frequency are >0 overlays a triangle dither waveform onto the remote-focus waveform.
  • waveforms: add triangle_wave() utility used to generate the dither signal.
  • tests: update existing tests to expect the new keys and widget values, add test to ensure dither is applied after smoothing, and add a waveform-tab test to verify the updated remote-focus waveform is plotted.

Also includes related minor refactors and logging updates for remote-focus setting changes.

Introduce dither amplitude/frequency parameters for remote-focus channels and wire them through config, UI, model and tests.

- config: add default string keys ("dither_amplitude", "dither_frequency") in verify_waveform_constants and include entries in waveform_constants.yml.
- view: add Dither Amplitude and Dither Frequency inputs to WaveformParameterPopupWindow.
- controller: WaveformPopupController now tracks dither variables, traces, validation, UI configuration, and stores values with existing amplitude/offset settings; enables/disables dither controls when live mode toggles.
- model: RemoteFocusBase gains robust parsing helper get_remote_focus_setting to coerce and validate string inputs, reads dither settings, and if both dither amplitude and frequency are >0 overlays a triangle dither waveform onto the remote-focus waveform.
- waveforms: add triangle_wave() utility used to generate the dither signal.
- tests: update existing tests to expect the new keys and widget values, add test to ensure dither is applied after smoothing, and add a waveform-tab test to verify the updated remote-focus waveform is plotted.

Also includes related minor refactors and logging updates for remote-focus setting changes.
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 83.82353% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.93%. Comparing base (a197d21) to head (cc8eb17).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...igate/controller/sub_controllers/waveform_popup.py 79.48% 8 Missing ⚠️
src/navigate/model/devices/remote_focus/base.py 83.33% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1205      +/-   ##
===========================================
+ Coverage    63.64%   63.93%   +0.28%     
===========================================
  Files          189      189              
  Lines        26029    26085      +56     
===========================================
+ Hits         16567    16677     +110     
+ Misses        9462     9408      -54     
Flag Coverage Δ
unittests 63.93% <83.82%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant