Skip to content

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

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

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

Conversation

@divakar-selvam07

Copy link
Copy Markdown
Contributor
  • 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 88.12%. Comparing base (49c8447) to head (a793aa8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2217      +/-   ##
==========================================
+ Coverage   86.40%   88.12%   +1.71%     
==========================================
  Files          86       88       +2     
  Lines       21563    22832    +1269     
==========================================
+ Hits        18631    20120    +1489     
+ Misses       2932     2712     -220     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests 94.36% <ø> (ø)
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (ø)
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests 94.34% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (?)
nirfsaunittests 63.40% <ø> (ø)
nirfsgsystemtests 81.22% <ø> (ø)
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests 94.87% <ø> (ø)
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
Contributor Author

This PR is ready for @Avinash2Suresh 's review.

Comment thread CHANGELOG.md Resolved
@divakar-selvam07

divakar-selvam07 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@jarnoldNI , the PR is ready for your review.

@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.

session.aperture_time = aperture_time
# NORMAL weighs all samples equally; SECOND_ORDER and HIGH_ORDER weigh samples in the middle of the aperture more.
session.dc_noise_rejection = nidmm.DCNoiseRejection[dc_noise_rejection]
# The DMM averages shorter measurements to produce each returned reading.

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.

Isn't this only True if Auto Zero is enabled?

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