Skip to content

Adding Improve DC Noise Rejection example in NI-DMM - #2217

Open
divakar-selvam07 wants to merge 18 commits into
ni:masterfrom
NI-velmurugan:users/diva/add-nidmm-improve-dc-noise-rejection-example
Open

divakar-selvam07 wants to merge 18 commits into
ni:masterfrom
NI-velmurugan:users/diva/add-nidmm-improve-dc-noise-rejection-example

Conversation

@divakar-selvam07

Copy link
Copy Markdown
  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • Adds nidmm_improve_dc_noise_rejection.py, a Python adaptation of the LabVIEW “Improve DC Noise Rejection” example.
  • Updates CHANGELOG.md to call out the new examples in the unreleased section.

List issues fixed by this Pull Request below, if any.

None

What testing has been done?

  • Manually validated with a simulated instrument and an actual hardware instrument.

@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.49%. Comparing base (cdbd8f2) to head (c8757ec).

❗ There is a different number of reports uploaded between BASE (cdbd8f2) and HEAD (c8757ec). Click for more details.

HEAD has 78 uploads less than BASE
Flag BASE (cdbd8f2) HEAD (c8757ec)
nifakeunittests 15 5
nidcpowerunittests 15 5
nidigitalunittests 15 5
nimodinstunittests 15 5
nirfsaunittests 15 5
niscopeunittests 15 5
nitclkunittests 15 5
codegenunittests 3 1
nidigitalsystemtests 1 0
nifgensystemtests 1 0
nirfsasystemtests 1 0
nirfsgsystemtests 1 0
nidcpowersystemtests 1 0
nitclksystemtests 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2217      +/-   ##
==========================================
- Coverage   88.11%   81.49%   -6.63%     
==========================================
  Files          88       63      -25     
  Lines       22832    12115   -10717     
==========================================
- Hits        20119     9873   -10246     
+ Misses       2713     2242     -471     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests ?
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests ?
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests ?
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests ?
nirfsaunittests 63.40% <ø> (ø)
nirfsgsystemtests ?
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests ?
nitclkunittests 98.26% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@divakar-selvam07

Copy link
Copy Markdown
Author

This PR is ready for @Avinash2Suresh 's review.

Comment thread CHANGELOG.md Outdated
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py Outdated
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py Outdated
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py Outdated
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py Outdated
@divakar-selvam07

divakar-selvam07 commented Oct 9, 2026 •

Copy link
Copy Markdown
Author

@jarnoldNI , the PR is ready for your review.

Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py
Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py
@divakar-selvam07
divakar-selvam07 marked this pull request as ready for review October 12, 2026 16:46
@ni-jfitzger

Copy link
Copy Markdown
Collaborator

If we're going to copy the example, should we adapt the example description, too?
"""
By varying the weighting of the samples that compose a single measurement, noise can be removed from the measurement. The DC Noise Rejection attribute controls the sample weighting. The signal frequencies removed from the measurement are related to the aperture time selected.
"""

@marcoskirsch What do you think?

@jarnoldNI

Copy link
Copy Markdown

If we're going to copy the example, should we adapt the example description, too? """ By varying the weighting of the samples that compose a single measurement, noise can be removed from the measurement. The DC Noise Rejection attribute controls the sample weighting. The signal frequencies removed from the measurement are related to the aperture time selected. """

@marcoskirsch What do you think?

@ni-jfitzger @marcoskirsch - I like the idea of adding a description like this to the examples. If we do it for this one, we should do it for all of the ones we're working on.

Comment on lines +18 to +20
# For aperture times over 100 ms, enable AutoZero to compensate for drift.
# The DMM takes shorter measurements, applies a new AutoZero offset to each,
# averages them, and returns one value.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We're setting auto_zero, way up above. Does this comment need to be split?
Or maybe we set auto_zero down here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe I'm nitpicking, but I feel like this comment could also be clearer. The property that gets set is auto_zero. AutoZero is the enum and it's not like we have a feature with that spelling. The user manual page title it "Auto Zero".
https://www.ni.com/docs/en-US/bundle/ni-dmm/page/auto-zero.html

@marcoskirsch Do you have any thoughts on this?

@divakar-selvam07 divakar-selvam07 Oct 22, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@ni-jfitzger That makes sense. I’ve split the comment, placed the Auto Zero explanation beside auto_zero, and kept the averaging explanation beside number_of_averages. I’ve also corrected the spelling to “Auto Zero.”

Comment thread src/nidmm/examples/nidmm_improve_dc_noise_rejection.py Outdated
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.

6 participants