Skip to content

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

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

divakar-selvam07 wants to merge 11 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 88.12%. Comparing base (cdbd8f2) to head (a39ffd0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2217   +/-   ##
=======================================
  Coverage   88.11%   88.12%           
=======================================
  Files          88       88           
  Lines       22832    22832           
=======================================
+ Hits        20119    20120    +1     
+ Misses       2713     2712    -1     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
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.18% <ø> (ø)
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
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
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.

parser.add_argument('--auto-zero', default='OFF', choices=nidmm.AutoZero.__members__.keys(), type=str.upper, help='Specifies the AutoZero mode.')
parser.add_argument('-a', '--aperture-time', default=0.1, type=float, help='Specifies the measurement aperture time for the current configuration, in seconds.')
parser.add_argument('--dc-noise-rejection', default='NORMAL', choices=supported_noise_rejection_modes, type=str.upper, help='Specifies the DC noise rejection mode.')
parser.add_argument('-s', '--sample-count', default=10, type=int, help='Specifies the number of measurements the DMM takes each time it receives a trigger in a multiple point acquisition.')

@jarnoldNI jarnoldNI Oct 9, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you also add the number of averages property for the user to set? I know this isn't in the DC noise rejection example but I think it's a useful thing to show. You can set the default to 8 (which is what is set in the LV example called "Improve DC Resolution").

After adding it, can you add a comment (place comment above in example) explaining the number of averages. Something like "For measurements with a long aperture time (>100ms), it is recommend that Auto Zero is enabled. To compensate for any drift during the aperture time, several shorter measurements can be taken with a new Auto Zero offset applied to each measurement. These measurement are then averaged and a single value is returned."

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.

5 participants