Repository navigation
Fix psd_array_welch for good data spans shorter than n_per_seg (#13039) #14003
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
larsoner
merged 17 commits into
mne-tools:main
from
CedricConday:fix/welch-short-span-overlap
Oct 6, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
605ddc1
Fix psd_array_welch for good spans shorter than n_overlap (#13039)
CedricConday ce1f435
rename changelog fragment to PR number
CedricConday 7a7a4e8
Drop short good-data spans in Welch PSD with a warning (#13039)
CedricConday 150055a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c82de77
Keep Welch PSD spans shorter than n_per_seg via a per-span window (#1…
CedricConday 88dedc1
Fix codespell: Pre-empt -> Preempt in psd.py comment
CedricConday f6a5a7e
Raise a clear error for a fixed-length window array on a short span
CedricConday ffa1717
Zero-pad short good-data spans instead of shrinking the window
CedricConday 15f26d1
Revert "Zero-pad short good-data spans instead of shrinking the window"
CedricConday 3d3f154
test(psd): assert recovered band power for short good spans (#13039)
CedricConday 45ec6b6
Merge remote-tracking branch 'upstream/main' into fix/welch-short-spa…
CedricConday 34e8bf0
Merge upstream/main into fix/welch-short-span-overlap
CedricConday 5f5599b
Merge branch 'main' into fix/welch-short-span-overlap
CarinaFo 63d3549
[autofix.ci] apply automated fixes
autofix-ci[bot] 25f69fb
Address review: name SciPy's padding, add Raw-level short-span test
CedricConday 985fe8b
FIX: import verbose_static in time_frequency/psd.py
CedricConday c8b34fb
Slim the short-span handling and merge its tests
CedricConday File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix :func:`mne.time_frequency.psd_array_welch` (and Welch-method ``compute_psd``) so that good data spans shorter than ``n_per_seg`` no longer raise ``noverlap must be less than nperseg``; such spans are now analyzed with a window shrunk to the span length (with a warning that their spectral resolution is reduced) instead of being lost, by `Cedric Conday`_. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.