Repository navigation
Port low-level BDF record tests - #352
arnodelorme merged 1 commit into
Conversation
|
🤖 Problem The current EEGLAB suite covers record-level BDF parsing and selected-record reads, but EEGPrep only exposed higher-level BDF workflows. The upstream unknown-record test is commented out and the MATLAB implementation incorrectly divides BDF payload bytes by two instead of three. Approach Add standalone openbdf/readbdf APIs that retain familiar header fields without leaking an open descriptor. Parse fixed and per-signal headers, derive calibration, infer complete records from three-byte samples, decode signed 24-bit values, and support calibrated/raw plus padded/compact legacy modes. Key code src/eegprep/functions/sigprocfunc/openbdf.py owns header parsing and calibration. src/eegprep/functions/sigprocfunc/readbdf.py owns indexed record decoding. tests/test_bdf_records_eeglab_tests.py maps all eight current wrapper methods and strengthens weak/commented cases with deterministic generated files. Tests 10 focused and 26 adjacent tests pass. The full non-MATLAB suite reports 2,865 passed, 262 skipped, one expected xfail, and 400 subtests. Ruff check, ty, staged pre-commit, and Sphinx dummy build also pass; repo-wide format check only reports the pre-existing tests/test_pop_reref.py difference. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
474294e to
5c7bbb6
Compare
There was a problem hiding this comment.
An organization admin can purchase credits or upgrade the plan in Plans & Billing.
Once credits are available, reopen this pull request to trigger a review.
5c7bbb6 to
232e3c1
Compare
232e3c1 to
f4c4d0f
Compare
Ports every current openbdf and readbdf wrapper method into substantive pytest coverage and adds standalone signed 24-bit BDF record access. The implementation corrects EEGLAB's two-byte unknown-record calculation, validates calibration and record indexing, and handles variable per-channel sample counts without a runtime EEGLAB dependency.