-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
BUGFIX: return events if provided when current = desired sfreq #13070
Conversation
in case current sfreq equals desired sfreq
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a tiny test that would fail on main
but pass on this PR? Perhaps in mne/io/fiff/tests/test_raw_fiff.py:def test_resample
?
Co-authored-by: Eric Larson <[email protected]>
Co-authored-by: Eric Larson <[email protected]>
…python into resample_events
@larsoner Done! Test added under |
for more information, see https://pre-commit.ci
🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪 |
Thanks @Randomidous ! |
…urrent = desired sfreq
…ided when current = desired sfreq) (#13081) Co-authored-by: Roy Eric <[email protected]>
My pleasure @larsoner :) |
Reference issue (if any)
Fixes #13066
What does this implement/fix?
The resample function takes an additional parameter "events" and returns a resampled copy if provided. When the current is equal to the desired sfreq, only self is returned. This fix now returns raw and events if both were provided, avoiding preprocessing pipeline bugs down the line.
Additional information
A test for this is described in the issue.