Skip to content

Raise ASRCalibrationError when an RMS fit width rounds to zero - #655

Merged
suraj-ranganath merged 3 commits into
developfrom
cursor/fix-651-zero-fit-width-b868
Nov 18, 2026
Merged

suraj-ranganath merged 3 commits into
developfrom
cursor/fix-651-zero-fit-width-b868

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

asr_calibrate raises ASRCalibrationError when round(n * width) includes 0, which happens for two or three RMS windows. clean_artifacts and pop_clean_rawdata skip burst repair, keep the sampling rate, and still run window removal. EEGLAB returns before both of those (clean_artifacts.m lines 270-275). The MATLAB reference suite was not run here.

Fixes #651

Open in Web Open in Cursor 

Two or three calibration windows make round(n * width) include 0.
clean_artifacts and pop_clean_rawdata skip burst repair, keep the
sampling rate, and still remove bad windows.

Co-authored-by: Suraj Ranganath <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@suraj-ranganath
suraj-ranganath marked this pull request as draft November 18, 2026 20:17
@suraj-ranganath
suraj-ranganath marked this pull request as ready for review November 18, 2026 20:17
cursoragent and others added 2 commits November 18, 2026 20:26
Keep the zero-scale channel ranking from #649 alongside the
ASRCalibrationError raised when a fit width rounds to zero.

Co-authored-by: Suraj Ranganath <[email protected]>
Keep the ASRCalibrationError changelog bullet, then the pop_loadstudy
bullet from #653, then the existing Unreleased notes.

Co-authored-by: Suraj Ranganath <[email protected]>
@suraj-ranganath
suraj-ranganath merged commit 8a52662 into develop Nov 18, 2026
12 checks passed
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.

[fuzz] pop_clean_rawdata wide start=1202: MATLAB ASR calibration fails on 3 RMS windows, eegprep applies ASR (max abs 74.79)

2 participants