+
Skip to content

Conversation

TomDonoghue
Copy link
Member

@TomDonoghue TomDonoghue commented Jun 29, 2023

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_freqs private attribute to False

Note: Related to #237, which brought up how unevenly spaced frequency values can lead to failures down the line.

@fooof-tools fooof-tools deleted a comment from codecov-commenter Jun 29, 2023
@TomDonoghue TomDonoghue mentioned this pull request Feb 18, 2022
3 tasks
Copy link
Contributor

@voytek voytek left a comment

Choose a reason for hiding this comment

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

np.isclose always feels weird, but it works here we just want to keep an eye on where it might fail

@TomDonoghue TomDonoghue changed the title [WIP] - Add check_freqs to check for uneven frequency samples [MNT] - Add check_freqs to check for uneven frequency samples Jun 29, 2023
@TomDonoghue TomDonoghue added the 1.1 Targetted for a fooof 1.1 release. label Jun 29, 2023
@TomDonoghue TomDonoghue merged commit bc415a9 into main Jun 29, 2023
@TomDonoghue TomDonoghue deleted the checkf branch June 29, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.1 Targetted for a fooof 1.1 release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载