Repository navigation
Fix COLA for odd sizes - #14312
Merged
Merged
Fix COLA for odd sizes#14312
Conversation
larsoner
enabled auto-merge (squash)
September 15, 2026 16:28
larsoner
added a commit
to wmvanvliet/mne-python
that referenced
this pull request
Sep 16, 2026
…d-sphere * commit '0311e444b0450ce9d2b2b304cebe7d5343533357': Fix static doc viewing in IDEs (mne-tools#14195) Fix COLA for odd sizes (mne-tools#14312) add type hints to mne/_fiff/ module (mne-tools#14278) ENH: wire the JupyterLite build into the docs (JupyterLite split 5/5) (mne-tools#14157) MAINT: Update pre-commit hook versions (mne-tools#14306) Small documentation fix for "Frequency and time-frequency sensor analysis" tutorial (mne-tools#14304) FIX: don't mutate cached ICA sources in plot_sources properties (mne-tools#14303) Fix bug with lite backend closing (mne-tools#14302) Fix for NumPy eig change [circle deploy] (mne-tools#14300) No PyQt5 [circle deploy] [skip azp] [skip actions] ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150) FIX: Ver [circle deploy] [skip azp] [skip actions] Hotfix fix EDF round-trip (mne-tools#14296) Brain GUI modernization (Phase 7) (mne-tools#14270) Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293) remove plotting abs as the defauls for plotting volumetric (mne-tools#13989) Coregistration GUI modernisation (phase 4) (mne-tools#14285) Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
larsoner
added a commit
to CarinaFo/mne-python
that referenced
this pull request
Sep 16, 2026
* upstream/main: (91 commits) Fix static doc viewing in IDEs (mne-tools#14195) Fix COLA for odd sizes (mne-tools#14312) add type hints to mne/_fiff/ module (mne-tools#14278) ENH: wire the JupyterLite build into the docs (JupyterLite split 5/5) (mne-tools#14157) MAINT: Update pre-commit hook versions (mne-tools#14306) Small documentation fix for "Frequency and time-frequency sensor analysis" tutorial (mne-tools#14304) FIX: don't mutate cached ICA sources in plot_sources properties (mne-tools#14303) Fix bug with lite backend closing (mne-tools#14302) Fix for NumPy eig change [circle deploy] (mne-tools#14300) No PyQt5 [circle deploy] [skip azp] [skip actions] ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150) FIX: Ver [circle deploy] [skip azp] [skip actions] Hotfix fix EDF round-trip (mne-tools#14296) Brain GUI modernization (Phase 7) (mne-tools#14270) Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293) remove plotting abs as the defauls for plotting volumetric (mne-tools#13989) Coregistration GUI modernisation (phase 4) (mne-tools#14285) Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291) Width [circle deploy] [skip azp] [skip actions] ...
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.
One thing that tripped up @nordme recently, COLA should work regardless of step size, sample rate, etc. Hann doesn't satisfy the COLA constraint for odd window sizes, so make the necessary (tiny) adjustment to the window using
scipy.signal.closest_STFT_dual_windowto get a COLA-satisfying window in those cases:Log if that adjustment was made. For SciPy older than 1.16, continue raising an error. Fix a tiny bug in our step calculation for odd windows, too. Adjust a couple of existing tests that would fail on
mainbut pass on this PR. Changes drafted by Claude Opus 5 and iterated on and reviewed by me.This one is a pretty straightforward bugfix so I'll self-mark for merge-when-green, but if someone wants to review and sees issues I'm happy to address them in a follow-up PR!