[MAINT] ASR: defensive hardening and docstring fixes - #117
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #117 +/- ##
=======================================
Coverage 83.10% 83.10%
=======================================
Files 25 25
Lines 2817 2818 +1
=======================================
+ Hits 2341 2342 +1
Misses 476 476 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Note: includes the |
Closed
nbara
force-pushed
the
fix/asr-defensive-docs
branch
from
July 16, 2026 07:09
c488586 to
4fa3875
Compare
- asr_process: read state by key instead of relying on dict order - fit_eeg_distribution: nudge gridsearch arange endpoint (mirror cols grid) - clean_windows: build window offsets from non-truncated N (phase drift) - ASR: expose max_bad_chans as a constructor parameter (default 0.3) - docs: fix clean_windows win_len default (0.5); document the mask3 term
nbara
force-pushed
the
fix/asr-defensive-docs
branch
from
July 16, 2026 07:15
4fa3875 to
389a184
Compare
nbara
approved these changes
Jul 18, 2026
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.
A group of small defensive and documentation fixes in the ASR module (no behavior change on the common paths):
asr_process: readstateby key (state["M"],state["T"],state["R"]) instead ofstate.values(), removing the reliance on dict insertion order.fit_eeg_distribution: nudge the descending gridsearcharangestop endpoint somin_widthis not dropped by floating-point error (mirrors the existingcolsgrid nudge).ASR: exposemax_bad_chansas a constructor parameter (default0.3, preserving current behavior) and document it.clean_windows: build the window-start offsets from the non-truncatedwin_len * sfreqto avoid ~1-sample phase drift for non-integer products (byte-identical when the product is integer, including all existing tests); fix thewin_lendocstring default (0.5, not 1); document the meegkit-specific flat-window removal criterion.Testing
Adds tests for the
max_bad_chansparameter,statekey-order independence, and the offset spacing. Fulltests/test_asr.pypasses;ruffclean.