Skip to content
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

ENH: Improve robustness in extracting sfreq #13120

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SYXiao2002
Copy link

Reference issue (if any)

Fixes #13117.

What does this implement/fix?

Enhanced the calculation of the sampling rate to avoid potential indexing errors.

Additional information

It is recommended to include rtol as a function parameter for _extract_sampling_rate(dat) in the future.

@SYXiao2002 SYXiao2002 requested a review from rob-luke as a code owner February 19, 2025 04:18
Copy link

welcome bot commented Feb 19, 2025

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

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

LGTM. I'm lukewarm on insisting on adding a test, since this was clearly just a suboptimal approach before. @larsoner WDYT?

Co-authored-by: Daniel McCloy <[email protected]>
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.

Unexpected Indexing Error Due to Low-Precision sampling_rate Calculation
2 participants