Fix waveform arithmetic validation and integration - #34
Merged
gituser789 merged 2 commits intoAug 27, 2026
Merged
Conversation
Validate channel timebases, support nonuniform cumulative integration, and add regression tests.
MooMooCow29
marked this pull request as ready for review
July 30, 2026 20:41
SevenOfNinePE
requested changes
Aug 7, 2026
SevenOfNinePE
left a comment
Collaborator
There was a problem hiding this comment.
The update is valuable and makes sense. Mainly some updates of unit tests are necessary. Moreover don't hold back on comments.
| if label is None: | ||
| # Log missing user input | ||
| logging.info(f"{class_modulename} :Label was not defined. So default value is used", class_modulename) | ||
| logging.info( |
Collaborator
There was a problem hiding this comment.
Do not remove the comment. '# Log missing user input'.
Also if the comment is obviously by code it helps the readability.
In general more comments help to understand the program flow.
Add parametrized coverage for timebase validation, restore flow comments, and keep non-equidistant integration close to the existing implementation.
SevenOfNinePE
approved these changes
Aug 25, 2026
Contributor
Author
|
Thanks for reviewing it and for the feedback; I appreciate it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request improves the numerical correctness and validation of
waveform arithmetic and integration operations.
Changes
have matching timebases.
using the actual sampling intervals.
Motivation
Oscilloscope data may contain nonuniform sample intervals. Using one assumed
sample period can therefore produce inaccurate integrated energy values.
Waveform arithmetic also requires corresponding samples to represent the same
points in time. Explicit timebase validation prevents silent numerical errors
when channels are misaligned.
Testing
Local environment:
standard-xdrlibinstalled becausexdrlibwas removed from Python 3.13Results:
10 passed97 passed, 3 warningspycodestyle: passedAll checks passedThe warnings are existing dependency deprecation warnings involving
standard-xdrlibandfindiff; they are not failures in this change.