Skip to content

Add flatline data handling and comprehensive tests. #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

sondreew
Copy link
Collaborator

For cases when the data has sporadic, missing periods, but is still sampled with the same frequency, there will be sections of 'flatlined' data. This is handled as "bad data" using the oversampled identification for IndicesToIgnore in some cases, but not if the base dataset is also oversampled. This pull request adds functionality to discover "flatline periods" during the calculation of the oversample factor. Such periods will be disregarded when finding the oversample factor, and the resulting downsampled dataset will work as normal through the IndicesToIgnore to disregard the "flatlines" themselves.

A test group for "just" datasets with flat data sprinkled around is included, as well as a quite comprehensive test set which includes both noise, downsampling, oversampling, and data loss before identification to test that all features function together.

@sondreew sondreew linked an issue Apr 28, 2025 that may be closed by this pull request
@sondreew sondreew requested a review from steinelg April 28, 2025 13:41
@steinelg steinelg merged commit 61e0bd9 into master Apr 29, 2025
5 checks passed
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.

PidIdentifier should filter out periods where the signals freeze
2 participants