[MNT] - Add check_freqs to check for uneven frequency samples#269
Merged
TomDonoghue merged 1 commit intomainfrom Jun 29, 2023
Merged
[MNT] - Add check_freqs to check for uneven frequency samples#269TomDonoghue merged 1 commit intomainfrom
check_freqs to check for uneven frequency samples#269TomDonoghue merged 1 commit intomainfrom
Conversation
voytek
approved these changes
Jun 29, 2023
Contributor
voytek
left a comment
There was a problem hiding this comment.
np.isclose always feels weird, but it works here we just want to keep an eye on where it might fail
ryanhammonds
approved these changes
Jun 29, 2023
check_freqs to check for uneven frequency samplescheck_freqs to check for uneven frequency samples
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.
This adds an explicit check when data added that the frequency vector is evenly spaced (equidistant points in linear space). The goal is to check and exclude situations in which there are gaps in frequencies (which could interact weirdly with things like the peak fitting).
Note that this check can be turned off by setting the
_check_freqsprivate attribute to FalseNote: Related to #237, which brought up how unevenly spaced frequency values can lead to failures down the line.